1,关闭防火墙:
chkconfig firewalld off
2,更新yum源:
wget http://www.atomicorp.com/installers/atomic
sh ./atomic
yum check-update
3,安装开发包和库文件
yum -y install ntp make openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel
4,安装nginx+php
yum install nginx php lighttpd-fastcgi php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy php-common php-devel php-fpm php-mysql
5,安装mysql
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
6,设置自启
chkconfig --levels 235 nginx on
chkconfig --levels 235 mysqld on
chkconfig --levels 235 php-fpm on
这样,lnmp环境就配置完成了。接下来配置nginx.conf以支持php即可。