MySQL | php |
---|---|
Wordpress_CN 4.9 | Apache |
CentOS 7.2 | 192.168.200.10 |
yum -y install mariadb mariadb-server php php-server wget php-fpm php-mysql
启动httpd,mariadb,并初始化mairadb
systemctl start maraidb httpd
mysql_secure_installation #设置数据库root用户密码
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
打开浏览器访问本机ip
http://192.168.200.10/phpinfo.php
# wget https://cn.wordpress.org/wordpress-4.9-zh_CN.tar.gz
tar -zxf wordpress-4.9-zh_CN.tar.gz
MariaDB [(none)]> create database `wordpress-db`;
MariaDB [(none)]> grant all privileges on `wordpress-db`.* to 'wordpress'@'localhost' identified by '000000';
MariaDB [(none)]> flush privileges;
[root@server ~]# cp wordpress/wp-config-sample.php wordpress/wp-config.php
[root@server ~]# vi wordpress/wp-config.php
cp -r wordpress/* /var/www/html/
vi /etc/httpd/conf/httpd.conf
找到151行的AllowOverride,修改如下
[root@server ~]# systemctl restart httpd mariadb