CENTOS6 Server Yum Installation Lnmp (linux+nginx+mysql+php)

Source: Internet
Author: User
Tags fpm install php openssl ssh server

Before all used lamp, this configuration a lnmp to see, try Nginx is not easy to use

Turn off SELinux
#SELINUX =enforcing #注释掉
#SELINUXTYPE =targeted #注释掉
Selinux=disabled #增加

Shutdown-r now #重启系统

Installing Ngnix

Installing the GCC compiler and related tools
Yum-y install gcc gcc-c++ autoconf automake
Libraries that the installation module relies on
Yum-y install zlib zlib-devel OpenSSL openssl–devel pcre pcre-devel
Update system time
Ntpdate time.nist.gov
Enable the on-time service to boot
Chkconfig ntpd on

If you need to compile and install the latest
Get Ngnix version
wget http://nginx.org/download/nginx-1.0.14.tar.gz
Tar zxvf nginx-1.0.14.tar.gz
CD nginx-1.0.14

Direct Yum Installation
Yum install-y Nginx
will be installed in the/usr/share/nginx/
Start Nginx
Service Ngnix Start

Install PHP

wget Http://dev.centos.org/centos/5/CentOS-Testing.repo
Rpm–import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

Yum install-y php php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcryp T Php-bcmath php-mhash libmcrypt libmcrypt-devel php-fpm

Set up auto-start
Chkconfig PHP-FPM on

Configuring Nginx Support PHP
#修改nginx运行账号为: Nginx User of Nginx Group
User Nginx Nginx;

#增加index. php
Index index.php index.html index.htm;
Uncomment the FASTCGI Server section location, and note the parameters of the Fastcgi_param row, change to $document_root$fastcgi_script_name, or use the absolute path

Configure PHP-FPM
user = Nginx
Group = Nginx

Install MySQL
Yum-y install MySQL Mysql-server
Start MySQL
Service mysqld Start
Chkconfig mysqld on #设为开机启动

Set a password for the root account

Restart all services
Service mysqld Restart
Service Nginx Restart
Test success

Installing the SSH server and Subversion server
Yum Install-y openssh-server
Yum install-y Subversion

This article is from the "Tibetan Treasure Court" blog, please be sure to keep this source http://xiufm.blog.51cto.com/9921842/1695970

CENTOS6 Server Yum Installation Lnmp (linux+nginx+mysql+php)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.