wordpress安装配置记录(摘取部分,供参考)

[root@VM_42_160_centos ~]#
[root@VM_42_160_centos ~]# yum install nginx -y
···
Installed:
nginx.i686 0:1.10.2-1.el6

Dependency Installed:
GeoIP.i686 0:1.6.5-1.el6
GeoIP-GeoLite-data.noarch 0:2017.07-1.el6
GeoIP-GeoLite-data-extra.noarch 0:2017.07-1.el6
fontconfig.i686 0:2.8.0-5.el6
freetype.i686 0:2.3.11-17.el6
gd.i686 0:2.0.35-11.el6
geoipupdate.i686 0:2.2.1-2.el6
libX11.i686 0:1.6.4-3.el6
libX11-common.noarch 0:1.6.4-3.el6
libXau.i686 0:1.0.6-4.el6
libXpm.i686 0:3.5.10-2.el6
libjpeg-turbo.i686 0:1.2.1-3.el6_5
libpng.i686 2:1.2.49-2.el6_7
libxcb.i686 0:1.12-4.el6
libxslt.i686 0:1.1.26-2.el6_3.1
nginx-all-modules.noarch 0:1.10.2-1.el6
nginx-filesystem.noarch 0:1.10.2-1.el6
nginx-mod-http-geoip.i686 0:1.10.2-1.el6
nginx-mod-http-image-filter.i686 0:1.10.2-1.el6
nginx-mod-http-perl.i686 0:1.10.2-1.el6
nginx-mod-http-xslt-filter.i686 0:1.10.2-1.el6
nginx-mod-mail.i686 0:1.10.2-1.el6
nginx-mod-stream.i686 0:1.10.2-1.el6

Complete!
[root@VM_42_160_centos ~]# vim /etc/nginx/conf.d/default.conf

The default server

server {

listen       80 default_server;
#listen       [::]:80 default_server;
server_name  _;
root         /usr/share/nginx/html;

# Load configuration files for the default server block.
location / {
    location = /40x.html {
    location = /50x.html {
}

}

"/etc/nginx/conf.d/default.conf" 26L, 452C written
[root@VM_42_160_centos ~]# nginx
[root@VM_42_160_centos ~]# chkconfig nginx on
[root@VM_42_160_centos ~]# yum install mysql-server -y
···
Installed:
mysql-server.i686 0:5.1.73-8.el6_8

Dependency Installed:
mysql.i686 0:5.1.73-8.el6_8 perl-DBD-MySQL.i686 0:4.013-3.el6
perl-DBI.i686 0:1.609-4.el6

Dependency Updated:
mysql-libs.i686 0:5.1.73-8.el6_8

Complete!
[root@VM_42_160_centos ~]# service mysqld restart
Stopping mysqld: [ OK ]
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK
···
Please report any problems with the /usr/bin/mysqlbug script!

                                                       [  OK  ]

Starting mysqld: [ OK ]

[root@VM_42_160_centos ~]# /usr/bin/mysqladmin -u root password '···'
[root@VM_42_160_centos ~]# chkconfig mysqld on
[root@VM_42_160_centos ~]# yum install php-fpm php-mysql -y
···
Installed:
php-fpm.i686 0:5.3.3-49.el6 php-mysql.i686 0:5.3.3-49.el6

Dependency Installed:
php-common.i686 0:5.3.3-49.el6 php-pdo.i686 0:5.3.3-49.el6

Complete!
[root@VM_42_160_centos ~]# service php-fpm start
Starting php-fpm: [ OK ]
[root@VM_42_160_centos ~]# netstat -nlpt | grep php-fpm
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 2216/php-fpm
[root@VM_42_160_centos ~]# chkconfig php-fpm on
[root@VM_42_160_centos ~]# yum install wordpress -y
···
Installed:
wordpress.noarch 0:4.8.1-1.el6

···

Complete!
[root@VM_42_160_centos ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
···
mysql> create database wordpress;
Query OK, 1 row affected (0.00 sec)

mysql> exit
Bye

[root@VM_42_160_centos ~]# cd /etc/nginx/conf.d/
[root@VM_42_160_centos conf.d]# mv default.conf default.conf.bak
[root@VM_42_160_centos conf.d]# ls
default.conf.bak ssl.conf virtual.conf
[root@VM_42_160_centos conf.d]# vim /etc/nginx/conf.d/wordpress.conf

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    fastcgi_pass   127.0.0.1:9000;

"wordpress.conf" [New] 15L, 467C written
[root@VM_42_160_centos conf.d]# nginx -s reload
[root@VM_42_160_centos conf.d]# ls
default.conf.bak ssl.conf virtual.conf wordpress.conf

[root@VM_42_160_centos conf.d]# cd /usr/share/nginx/html/
404.html index.html poweredby.png
50x.html nginx-logo.png

[root@VM_42_160_centos share]# vim /etc/nginx/conf.d/wordpress.conf
server {

listen 80;
root /usr/share/wordpress;
    try_files $uri $uri/ /index.php index.php;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    include        fastcgi_params;
}

}
"/etc/nginx/conf.d/wordpress.conf" 15L, 470C written
[root@VM_42_160_centos share]# nginx -s reload
[root@VM_42_160_centos share]# cd /var/www/html/
[root@VM_42_160_centos html]# ls
wordpress

[root@VM_42_160_centos html]# chmod 777 -R *
[root@VM_42_160_centos html]# ll
total 4
drwxrwxrwx 5 root root 4096 Aug 31 09:42 wordpress

[root@VM_42_160_centos wordpress]# mv wp-config.php wp-config.php.symlink
[root@VM_42_160_centos wordpress]# cp /usr/share/wordpress/wp-config.php ./
·
[root@VM_42_160_centos wordpress]# chmod 777 wp-config.php
[root@VM_42_160_centos wordpress]# vim wp-config.php
···
/* The name of the database for WordPress /
define('DB_NAME', 'wordpress');

/* MySQL database username /
define('DB_USER', 'root');

/* MySQL database password /
define('DB_PASSWORD', '`');

[root@VM_42_160_centos wordpress]# vim wp-config.php      

[root@VM_42_160_centos wordpress]# nginx -s reload

版权声明

弈心博客


本文首发弈心博客,转载请附上博文链接!