Centos6.6源码编译Nginx
2017-11-23 18:03
232 查看
1、配置yum源(安装环境用)
首先备份系统原有源,然后安装国内163的yum源
yum install -y gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre pcre-devel //安装环境
上传包并解压
创建nginx运行用户
groupadd -r nginx
useradd -r -g nginx nginx
创建软连接
cd /usr/local/src
ln -s openssl-1.0.1i openssl
ln -s pcre-8.35 pcre
ln -s zlib-1.2.7 zlib
开始编译安装
cd /usr/local/src/nginx-1.8.1
./configure \
--prefix=/opt/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_realip_module \
--pid-path=/var/run/nginx.pid \
--with-pcre=/usr/local/src/pcre \
--with-zlib=/usr/local/src/zlib \
--with-openssl=/usr/local/src/openssl
make
make install
/opt/nginx/sbin/nginx 启动
/opt/nginx/sbin/nginx -s reload 重新加载配置文件
首先备份系统原有源,然后安装国内163的yum源
yum install -y gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre pcre-devel //安装环境
上传包并解压
创建nginx运行用户
groupadd -r nginx
useradd -r -g nginx nginx
创建软连接
cd /usr/local/src
ln -s openssl-1.0.1i openssl
ln -s pcre-8.35 pcre
ln -s zlib-1.2.7 zlib
开始编译安装
cd /usr/local/src/nginx-1.8.1
./configure \
--prefix=/opt/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_realip_module \
--pid-path=/var/run/nginx.pid \
--with-pcre=/usr/local/src/pcre \
--with-zlib=/usr/local/src/zlib \
--with-openssl=/usr/local/src/openssl
make
make install
/opt/nginx/sbin/nginx 启动
/opt/nginx/sbin/nginx -s reload 重新加载配置文件
相关文章推荐
- MySQL源码编译安装(CentOS-6.6+MySQL-5.6)
- CentOS6.6 32位 Minimal版本纯编译安装Nginx Mysql PHP Memcached
- CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3
- 详解Centos7 源码编译安装 Nginx1.13
- centos中源码编译nginx
- CentOS 6.6服务器编译安装lnmp(Nginx1.6.2+MySQL5.6.21+PHP5.6.3)
- CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3
- CentOS 6.6 下源码编译安装MySQL 5.7.5
- centos6.5/6.6 php5.4+nginx+mysql 一键源码安装
- centos6.6编译安装lnmp系列之nginx
- Centos6.3 编译源码搭建 PHP(fast-cgi)+Nginx+Mysql+Memcached+Redis高性能服务器
- CentOS 6.6源码编译升级GCC至4.8.2
- CentOS 7.2源码包编译安装nginx-1.10.2
- CentOS 7.4源码编译nginx1.12 并且隐藏nginx的版本
- CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3
- Centos 6.3 源码编译安装 Nginx
- CentOS6.6纯编译安装Nginx Mysql PHP Memcached
- CentOS 6下源码编译安装nginx 1.4.3
- Centos6.5源码编译安装nginx
- centos 6.6编译安装nginx--来自阿里云帮助文档