nginx 的源码安装
安装nginx之前要做的准备工作有:安装如下库
(1)gzip模块需要 zlib 库
(2)rewrite模块需要 pcre 库
(3)ssl 功能需要openssl库
还有一种简单的方法就是
yum install gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl openssl-devel
然后就是解压压缩包,编译安装就行了
1~pcre的安装:
我们可以之间yum 安装
|
yum -y install pcre* |
或者源码安装
|
cd /usr/local/src wget https://sourceforge.net/projects/pcre/files/pcre/8.39/pcre-8.39.tar.gz/download tar xf pcre-8.39.tar.gz cd pcre-8.39 ./configure make make install |
2~openssl的安装
需要ssl的支持,如果不需要,跳过这一步,
|
yum 安装 yum -y install openssl* 源码安装 wget ftp://ftp.openssl.org/source/openssl-1.0.1t.tar.gz tar xf cd ./config make && make install 在安装这个的时候指定一下安装路径因为在下面安装nginx的时候需要指定openssl的安装路径 |
3.zlib的编译安装:
|
wget http://zlib.net/zlib-1.2.8.tar.gz tar xf cd ./configure make && make install |
4~重头戏来了,nginx的编译安装
|
wget http://nginx.org/download/nginx-1.10.1.tar.gz groupadd nginx useradd nginx -g nginx tar xf nginx-1.10.1.tar.gz ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-pcre -with-openssl=/usr/local/src/openssl-1.0.1t 下面解释一下 --with-pcre:为了支持rewrite重写功能,必须制定pcre --with-http_stub_status_module:支持nginx状态查询 --with-http_ssl_module:支持https 最后执行:make && make install 至此nginx 就安装完成了 nginx的启动方式为 cd /usr/local/nginx/sbin/ ./nginx -s start | stop | restart | reload |
nginx 的源码安装的更多相关文章
- Nginx unit 源码安装初体验
Nginx unit 源码安装初体验 上次介绍了从yum的安装方法(https://www.cnblogs.com/wang-li/p/9684040.html),这次将介绍源码安装,目前最新版为1. ...
- 编译nginx的源码安装subs_filter模块
使用nginx的反向代理功能搭建nuget镜像服务器时,需要针对官方nuget服务器的响应内容进行字符串替换,比如将www.nuget.org替换为镜像服务器的主机名,将https://替换为http ...
- NFS, web,负载均衡,Nginx yum 源码安装
作业一:nginx服务1.二进制安装nginx 2.作为web服务修改配置文件 3.让配置生效,验证配置 [root@localhost ~]# systemctl stop firewalld.s ...
- linux应用之nginx的源码安装及配置(centos)
1.准备工作选首先安装这几个软件:GCC,PCRE(Perl Compatible Regular Expression),zlib,OpenSSL.Nginx是C写的,需要用GCC编译:Nginx的 ...
- 关于nginx的源码安装方式
Nginx(engine x)是一款是由俄罗斯的程序设计师Igor Sysoev所开发高性能的 Web和 反向代理 服务器, 也是一个 IMAP/POP3/SMTP 代理服务器.在高连接并发的情况下, ...
- zabbix,php,nginx,mysql源码安装 神仙操作
→软件包 mkdir /soft/ cd /soft ♦下载以下软件包 nginx-1.14.2.tar.gz wget http://nginx.org/download/nginx-1.14.2. ...
- linux nginx+php源码安装
PHP安装 1)下载 wget http://cn2.php.net/distributions/php-5.6.30.tar.gz 2)解压 tar –xf php-5.6.30 3)进入目录 cd ...
- 源码安装nginx以及平滑升级
源码安装nginx以及平滑升级 ...
- Nginx源码安装及调优配置
导读 由于Nginx本身的一些优点,轻量,开源,易用,越来越多的公司使用nginx作为自己公司的web应用服务器,本文详细介绍nginx源码安装的同时并对nginx进行优化配置. Nginx编译前的优 ...
随机推荐
- Elastic search入门
首先是下载elasticsearch https://www.elastic.co/downloads,解压: 然后下载了中文分析器ik,github上搜索elasticsearch-ik就能找到,h ...
- EM basics- the Maxwell Equations
All the two important problems that the EM theory trys to describe and explain are propogation and r ...
- 莫比乌斯反演 BZOJ 2820
莫比乌斯反演真(TMD)难学.我自看了好长时间. BZOJ 2820: YY的GCD Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 1384 Sol ...
- PHP中的include和require
1.include语句 使用include语句可以告诉PHP提取特定的文件,并载入它的全部内容 <?php inlude "fileinfo.php"; //此处添加其他代码 ...
- MySQL数据库学习笔记(九)----JDBC的ResultSet接口(查询操作)、PreparedStatement接口重构增删改查(含SQL注入的解释)
[声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4 ...
- 十个Flex/Air疑难杂症及解决方案简略
十个Flex/Air疑难杂症及解决方案简略 转自http://blog.sban.us/40.html 最近去一家台企,对方给我出了十道“难道”:在TileList中如果選擇檔過多,會出現捲軸,當拖動 ...
- Spring 集成 RMI
Maven <dependency> <groupId>org.springframework</groupId> <artifactId>spring ...
- 5050 [JL] 他爱上了鸭蛋
5050 [JL] 他爱上了鸭蛋 时间限制: 1 s 空间限制: 1000 KB 题目等级 : 白银 Silver 题解 题目描述 Description 小明爱上了零鸭蛋.他喜欢输 ...
- 2666 Accept Ratio(打表AC)
2666 Accept Ratio 时间限制: 1 s 空间限制: 32000 KB 题目等级 : 钻石 Diamond 题解 查看运行结果 题目描述 Description 某陈痴迷 ...
- C# 利用BarcodeLib.dll生成条形码(一维,zxing,QrCodeNet/dll二维码)
原文:http://blog.csdn.net/kongwei521/article/details/17588825 首先效果: 一.下载BarcodeLib.dll 下载地址 :http://do ...