#!/bin/bashservice iptables stopsetenforce 0yum -y install httpdservice httpd restartyum -y install mysql-serverservice mysqld startss -ntl |awk -F {print $4}|grep ^:::3306$ /dev/null[ $? -eq 0...
#!/bin/bash service iptables stop setenforce 0 yum -y install httpd service httpd restart yum -y install mysql-server service mysqld start ss -ntl |awk -F" " '{print $4}'|grep ^:::3306$ &> /dev/null [ $? -eq 0 ] && echo "MYSQL服务正常启动" || echo "MYSQL服务启动失败.." echo "执行数据库安全策略.." mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('123123') WHERE User='root';" mysql -u root -e "DELETE FROM mysql.user WHERE User='';" mysql -u root -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" mysql -u root -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';" mysql -u root -e "FLUSH PRIVILEGES;" echo "数据库安全策略执行完毕" echo "创建wordpress数据库" mysql -h127.0.0.1 -uroot -p123123 -e "CREATE DATABASE wpdb;" mysql -h127.0.0.1 -uroot -p123123 -e "CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'centos';" mysql -h127.0.0.1 -uroot -p123123 -e "GRANT ALL ON wpdb.* TO 'wpuser'@'localhost';" echo "wordpress数据库创建完成" yum -y install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php php-mysql service iptables stop echo "---------------" echo "db is wpdb" echo "user is wpuser" echo "pass is centos" echo "---------------" curl -o wp.tar.gz https://wordpress.org/latest.tar.gz tar -xf wp.tar.gz rm -rf /var/www/html/* mv wordpress/* /var/www/html
沃梦达教程
本文标题为:centos6一键安装WordPress
基础教程推荐
猜你喜欢
- pbootcms二次开发必须要了解的后台目录结构 2023-07-09
- dedecms织梦全局变量调用方法总结 2023-07-08
- 织梦DedeCMS搜索指定多个栏目文档的办法 2022-11-11
- PbootCMS网站标题描述等标签限制字数的办法 2023-07-08
- dedecms织梦cms常用判断语句汇总 2022-06-24
- dedecms根据来访IP区域自动跳转对应页面的方法 2022-07-21
- dedecms织梦无需登录注册可下单购买的修改 2022-11-04
- pbootcms网站自动清理runtime缓存方法 2023-07-09
- 织梦dedecms如何在dede:sql中使用[field:global.autoindex/] 2022-08-27
- 织梦dedecms调用当前栏目文章数的方法 2022-11-08