centos 6 源码安装nginx
2020-06-29 04:25
1141 查看
源码安装nginx
安装依赖包
[root@localhost ~]# yum -y install gcc gcc-c++ pcre-devel zlib-devel
解压nginx压缩包
- 我这里用的是1.16.1版本 这个链接有更全的nginx源码包: link.
[root@localhost ~]# tar zxf nginx-1.16.1.tar.gz
检测安装环境,配置安装
[root@localhost ~]# cd nginx-1.16.1 [root@localhost nginx-1.16.1]# ./configure --prefix=/usr/local/nginx
- –prefix等于的路径是安装路径
编译、安装
[root@localhost nginx-1.16.1]# make && make install
启动、测试
- 启动完可在浏览器测试 注意关闭防火墙
[root@localhost nginx-1.16.1]# /usr/local/nginx/sbin/nginx [root@localhost nginx-1.16.1]# service iptables stop iptables:将链设置为政策 ACCEPT:filter [确定] iptables:清除防火墙规则: [确定] iptables:正在卸载模块: [确定] [root@localhost nginx-1.16.1]# setenforce 0
- 完成界面
相关文章推荐
- CentOs7 Nginx源码安装教程
- CentOS7.5源码编译LNMP环境之nginx安装(一)
- CentOS 6.5 源码安装Nginx1.6.3
- CentOS7源码安装Nginx
- 【服务器环境搭建-Centos】Nginx1.9.9 安装(编译源码)
- centos7.2源码安装php7.0.9和nginx1.10.3服务器
- centos 源码安装Nginx
- centos7.2 源码编译安装nginx,实现tcp反向代理,不中断服务新增编译模块
- CentOS源码编译安装Nginx
- Linux下源码安装Nginx(Ubuntu和CentOS通用)
- Linux(CentOS) - 源码编译安装Nginx
- CentOS 6下源码编译安装nginx 1.4.3
- centos6.5/6.6 php5.4+nginx+mysql 一键源码安装
- RHEL/CentOS服务器上源码编译安装nginx
- Centos7 源码安装nginx
- centos5.5下源码安装nginx
- ubuntu/redhat/centOS下源码安装nginx+php+mysql
- centos7.4下安装配置PHP服务源码安装并配置nginx支持php方法
- CentOS 7.2源码包编译安装nginx-1.10.2
- 经验回顾:在CentOS下用源码安装LNMP(nginx,mysql,php)