Centos 6.x configuration based on nginx's wordpress runtime environment

  
 

First, LNMP installation

Linux system with centos 6.4, nginx 1.2.7, mysql5.1.67, php5.3.3. Both are the latest stable versions.

1, add YUM software source and update

#rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8. Noarch.rpm#rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm#yum update

2, install LNMP

# yum install nginx php-fpm php-mysql mysql-server php-mbstring php-gd php-pear php-mcrypt php-mhash php-eaccelerator php-suhosin php-tidy php- Curl

Second, LNMP settings

1, set mysql, nginx, php-fpm boot automatically start

# chkconfig nginx on# chkconfig mysqld on# chkconfig php-fpm on

2, mysql settings

2.1, set mysql password

#service mysqld start#mysqladmin -u root password 'password'

Log in to mysql as root The command is

#mysql -u root -p

restart mysql:

#service mysql restart

2.2, create a database called wordpress , equipment for the installation of wordpress below.

mysql> create database wordpress;

Authorize the database”wordpress”, make the user name ”wpuser”, the operation permission is localhost, the login password is “wp123456”

mysql> grant all on wordpress.* to wpuser@localhost identified by 'wp123456'

Show Query OK, 0 rows affected (0.00 sec), indicating that the operation was successful.

3, php-fpm settings

centos 6 php-fpm is used by default with apache, need to be changed to nginx.

# vi /etc/php-fpm.d/www.conf

Find the following two lines:

user = apachegroup = apache

will The apache is changed to nginx.

Copyright © Windows knowledge All Rights Reserved