LNMP环境搭建(MariaDB二进制安装)
LNMP环境搭建(Nginx+mariadb+php源码编译安装)
LNMP 软件所需要的软件包:
MySQL=http://dev.mysql.com/downloads/mysql/ mysql 主程序包
PHP=http://php.net/downloads.php php 主程序包
Nginx=http://nginx.org/en/download.html Nginx 主程序包
libmcrypt=http://mcrypt.hellug.gr/index.html libmcrypt 加密算法扩展库
pcre=http://pcre.org/ pcre是php的依赖包
一、安装Nginx
1.1安装依赖包:
~]# yum groupinstall "Development Tools" "Development Libraries" -y
~]# yum -y install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre*
~]# tar xf pcre-8.37.tar.bz2 -C /usr/local/src/ #解压pcre包即可,不需要安装
./configure --prefix=/usr/local/nginx --with-http_dav_module --with-http_stub_status_module --with-http_addition_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-pcre=/usr/local/src/pcre-8.37
~]# make -j 3 ; make install
~]# useradd -M -u 8001 -s /sbin/nologin nginx
1.2配置Nginx支持php文件
~]# vim /usr/local/nginx/conf/nginx.conf #Nginx 主配置文件
*********************************配置文件如下*********************************
#user nobody;