CentOS 6.8编译安装LNMP环境(2)

安装pcre
[root@Zabbix_Server mysql]# cd /usr/local/Tools/
[root@Zabbix_Server Tools]# mkdir /app/pcre
[root@Zabbix_Server Tools]# tar zxvf pcre-8.36.tar.gz 
[root@Zabbix_Server pcre-8.36]# ./configure --prefix=/app/pcre/
[root@Zabbix_Server pcre-8.36]# make && make install

安装openssl
[root@Zabbix_Server pcre-8.36]# cd ..
[root@Zabbix_Server Tools]# mkdir /app/openssl
[root@Zabbix_Server Tools]# tar zxvf openssl-1.0.1j.tar.gz 
[root@Zabbix_Server Tools]# cd openssl-1.0.1j
[root@Zabbix_Server openssl-1.0.1j]# ./config --prefix=/app/openssl/
[root@Zabbix_Server openssl-1.0.1j]# make && make install
[root@Zabbix_Server openssl-1.0.1j]# vim /etc/profile
export PATH=$PATH:/app/openssl/bin/
[root@Zabbix_Server openssl-1.0.1j]# source /etc/profile

安装zlib
[root@Zabbix_Server openssl-1.0.1j]# cd /usr/local/Tools/
[root@Zabbix_Server Tools]# mkdir /app/zlib
[root@Zabbix_Server Tools]# tar zxvf zlib-1.2.8.tar.gz 
[root@Zabbix_Server Tools]# cd zlib-1.2.8
[root@Zabbix_Server zlib-1.2.8]# ./configure --prefix=/app/zlib/
[root@Zabbix_Server zlib-1.2.8]# make && make install

安装Nginx

[root@Zabbix_Server zlib-1.2.8]# cd /usr/local/Tools/
[root@Zabbix_Server Tools]# groupadd www
[root@Zabbix_Server Tools]# useradd -g www www -s /bin/false 
[root@Zabbix_Server Tools]# tar zxvf nginx-1.6.2.tar.gz 
[root@Zabbix_Server Tools]# cd nginx-1.6.2
[root@Zabbix_Server nginx-1.6.2]# ./configure --prefix=/app/nginx --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-openssl=/usr/local/Tools/openssl-1.0.1j --with-zlib=/usr/local/Tools/zlib-1.2.8 --with-pcre=/usr/local/Tools/pcre-8.36
[root@Zabbix_Server nginx-1.6.2]# make && make install
[root@Zabbix_Server nginx-1.6.2]# /app/nginx/sbin/nginx    #启动nginx 
[root@Zabbix_Server nginx-1.6.2]# ps -ef|grep nginx
root      2477    1  0 17:10 ?        00:00:00 nginx: master process /app/nginx/sbin/nginx
www      2478  2477  0 17:10 ?        00:00:00 nginx: worker process
root      2480  6918  0 17:10 pts/0    00:00:00 grep nginx
[root@Zabbix_Server nginx-1.6.2]#

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/5a1fda6d652fbdd09da3d10ae83a6c31.html