CentOS6.5 uses yum to install Linux+Nginx+PHP+MySQL (LNMP) environment
Recently took over the maintenance of a Linux server, Centos6 version, and the customer wanted to convert from Apache to Nginx. At the same time, upgrade PHP to the latest version Configure Nginx1.0.10+PHP5.3.8(fastcgi)+Mysql5.5.17+eAccelerator as follows (the relevant version number is the latest version of the source software package) Use Nginx official source, Epel extension library and remi source. The remi source is based on epel. You must install the epel source first. remi includes php-fpm, mysql-server5.5. If you only need php-fpm, you can do it separately. Disable this source after installing php-fpm. Install Nginx source: rpm-ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm Install EPEL source: (64-bit system) rpm -ivh http://download.Fedora.RedHat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm (32-bit system) rpm -ivh http://download.Fedora.RedHat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm Install REMI source: rpm-ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm Enable REMI and edit /etc/yum.repos.d/remi.repo vi /etc/yum.repos.d/remi.repo Modify enable=1 esc :wq yum -y install nginx mysql-server php-fpm php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc php-pear php-pecl-memcache php-eaccelerator 1. Configure the nginx configuration file according to your needs (this blog post does not provide specific configuration) 2. Modify /etc/php-fpm.conf user group to nginx 3. Modify /var/lib/php/session (so that php can save the session), and the web user group is nginx chown -R nginx:nginx /var/lib/php/session (if it does not exist, you need to create it)…
CentOS6.5 uses yum to install Linux+Nginx+PHP+MySQL (LNMP) environment
Recently took over and maintained a Linux server, Centos6 version, the customer wants to convert from Apache to Nginx. Upgrade PHP to the latest version at the same time Configure Nginx1.0.10+PHP5.3.8(fastcgi)+Mysql5.5.17+eAccelerator as follows (the relevant version number is the latest version of the source software package) Use Nginx official source, Epel extension library and remi source, remi source is based on epel, you must install epel source first, remi contains php-fpm, mysql-server5.5, if you only need php-fpm, you can use it separately Disable this source after installing php-fpm. Install Nginx source: rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm Install the EPEL source: (64-bit system) rpm -ivh http://download.Fedora.RedHat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm (32-bit system) rpm -ivh http://download.Fedora.RedHat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm Install the REMI sources: rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm Open REMI, edit /etc/yum.repos.d/remi.repo vi /etc/yum.repos.d/remi.repo Modify enable=1 esc :wq yum -y install nginx mysql-server php-fpm php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc php-pear php-pecl-memcache php-eaccelerator 1. Configure the nginx configuration file according to the requirements (this blog post does not provide specific configuration) 2. Modify /etc/php-fpm.conf user group to nginx 3. Modify /var/lib/php/session (so that php can save the session), and the web user group is nginx chown -R nginx:nginx /var/lib/php/session (you need to create if it does not exist) chown -R…