编译安装 nginx
2013-11-26 16:00
148 查看
大家好我是钟义林,今天我们再来重新安装一个nginx服务吧,下面是安装过程,可以参考/article/4564042.html 做个shell 来安装,当然,这只是一个安装的,我的环境是最小安装的。所以有些库和工具需要安装,当然,我感觉可以忽略这个,反正yum不会重复安装
cp完下面的shell之后记得复权 chmod 755
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/bin/sh
yum install -y *c++* *gcc* *vim* *openssh* *openssl* pcre* make* wget* git setuptool ntsysv iptables system-config-securitylevel-tui system-config-network-tui
mkdir /opt/src && cd /opt/src
wget http://gperftools.googlecode.com/files/gperftools-2.1.tar.gz |\
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz &&\
wget http://nginx.org/download/nginx-1.4.4.tar.gz &&\
wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz
git clone https://github.com/agentzh/redis2-nginx-module
tar zxvf gperftools-2.1.tar.gz && tar zxvf libunwind-1.1.tar.gz && tar zxvf ngx_cache_purge-2.1.tar.gz && tar zxvf nginx-1.4.4.tar.gz
cd /opt/src/libunwind-1.1 && ./configure && make && make install &&\
cd /opt/src/gperftools-2.1 && ./configure && make && make install &&\echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf && /sbin/ldconfig && \
cd /opt/src/nginx-1.4.4 && ./configure --prefix=/usr/local/nginx/ --user=nobody --group=nobody \
--with-http_ssl_module --with-file-aio --with-http_gzip_static_module \
--with-http_addition_module --with-google_perftools_module --with-http_stub_status_module \
--add-module=../ngx_cache_purge-2.1 --add-module=/opt/src/redis2-nginx-module && make && make install
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
记得关闭防火墙iptables -F,在浏览器输入本机IP
本文出自 “钟义林” 博客,请务必保留此出处http://zhongyilin1990.blog.51cto.com/7786958/1331937
cp完下面的shell之后记得复权 chmod 755
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/bin/sh
yum install -y *c++* *gcc* *vim* *openssh* *openssl* pcre* make* wget* git setuptool ntsysv iptables system-config-securitylevel-tui system-config-network-tui
mkdir /opt/src && cd /opt/src
wget http://gperftools.googlecode.com/files/gperftools-2.1.tar.gz |\
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz &&\
wget http://nginx.org/download/nginx-1.4.4.tar.gz &&\
wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz
git clone https://github.com/agentzh/redis2-nginx-module
tar zxvf gperftools-2.1.tar.gz && tar zxvf libunwind-1.1.tar.gz && tar zxvf ngx_cache_purge-2.1.tar.gz && tar zxvf nginx-1.4.4.tar.gz
cd /opt/src/libunwind-1.1 && ./configure && make && make install &&\
cd /opt/src/gperftools-2.1 && ./configure && make && make install &&\echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf && /sbin/ldconfig && \
cd /opt/src/nginx-1.4.4 && ./configure --prefix=/usr/local/nginx/ --user=nobody --group=nobody \
--with-http_ssl_module --with-file-aio --with-http_gzip_static_module \
--with-http_addition_module --with-google_perftools_module --with-http_stub_status_module \
--add-module=../ngx_cache_purge-2.1 --add-module=/opt/src/redis2-nginx-module && make && make install
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
记得关闭防火墙iptables -F,在浏览器输入本机IP
本文出自 “钟义林” 博客,请务必保留此出处http://zhongyilin1990.blog.51cto.com/7786958/1331937
相关文章推荐
- Linux下Nginx源码编译安装
- CentOS 7.2.1511 编译安装Nginx1.10.1+MySQL5.7.14+PHP7.0.11
- 在 CentOS7最小化 下的编译安装:Nginx 1.5.2 + PHP 5.5.7 + MySQL 5.6.10
- centos 下nginx源码编译安装
- 安装成功的nginx如何添加未编译模块?
- NGINX由入门到精通:编译安装nginx
- RHEL/CentOS下编译安装Nginx
- centos + nginx + mysql + php 环境编译安装
- 【系列3】使用Dockerfile创建带编译安装nginx服务的Centos Docker镜像
- nginx安装及编译参数详解
- Nginx 之一:编译安装nginx 1.8.1 及配置
- linux (Centos7) 编译安装nginx
- 编译安装nginx1.9.7+php7.0.0服务器环境
- RedHat 7 编译安装Nginx 1.12并配置WEB站点
- CentOS 7.0编译安装Nginx+MySQL+PHP
- linux 上nginx php 编译安装
- CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3
- 1-Nginx 编译安装
- Nginx(一)编译安装及添加为系统服务
- 编译安装Nginx