1、安装软件
yum install httpd mysql-server php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc -y
2、查看php版本
php -version
3、php版本小于5.6,卸载php
rpm -qa | grep php | xargs rpm –e
4、更新php的yum源
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
5、安装php
yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-odbc.x86_64 php56w-xml.x86_64 php56w-xmlrpc.x86_64 php56w-soap.x86_64
6、启动httpd服务
service httpd start
7、启动mysql服务
service mysqld start
8、查看端口
ss -tnl
9、进入mysql
mysql
10、为wordpress在mysql中创建一个databases
create database wordpress;
11、打开databases
show databases;
12、为wordpress在mysql中创建一个wpuser用户
create user wpuser@localhost;
13、使用mysql数据库
use mysql;
14、从user表中,选择User列的数据
select User from user;
15、把user中的’wpuser’的密码改为”wppassword”
update user set password = password(“wppassword”) where User = ‘wpuser’;
16、授权wpuser用户拥有wordpress数据库的所有权限
GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost IDENTIFIED BY ‘wppassword’;
17、刷新系统权限表
flush privileges;
18、退出mysql
exit;
19、进入html
cd /var/www/html
20、解压
tar xvf wordpress-4.5.3-zh_CN.tar.gz
21、进入wordpress
cd wordpress/
22、将wp-config-sample.php复制为wp-config.php
cp wp-config-sample.php wp-config.php
23、打开wp-config.php
vim wp-config.php
24、配置wordpress
localhost/wordpress
最新推荐文章于 2024-04-01 15:14:22 发布