CENTOS 6.5版本
- yum -y install httpd
1.yum install httpd mysql-server php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc -y --(install software)
2.rpm -qa | grep php | xargs rpm -e --(remove-last-php)
3.rpm -qa | grep php
4.rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm 安装php yum 源
5.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 安装最新php
6.service httpd start service mysqld start
7.mysqld
7.1 show databases;
create database wordpress;
7.2 show databases;
7.3 create user wpuser@localhost;
7.4 use mysql;
7.5 select User from user;
7.6 update user set password = password(“wppassword”) where User = ‘wpuser’;
7.7 GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost IDENTIFIED BY ‘wppassword’;
7.8 flush privileges;
7.9 exit;
- tar -vxf 解压wordpress 到 /var/www/html 下
8.1 cd wordpress/
8.2 cp wp-config-sample.php wp-config.php
8.3 vim wp-config.php
8.4 /** WordPress数据库的名称 */
define(‘DB_NAME’,‘wordpress’);
/** MySQL数据库用户名 */
define(‘DB_USER’,‘wpuser’);
/** MySQL数据库密码 */
define(‘DB_PASSWORD’,‘wppassword’);
- service iptables stop
10 vim /var/www.html/info.php
<?php phpinfo(); ?>来源:CSDN
作者:凌晨六点的蓝
链接:https://blog.csdn.net/qq_30840869/article/details/103602848