1.linux源码安装nginx
- 从官网下载nginx.tar.gz源码包
- 拷贝至Linux系统下进行解压 tar -zxvf nginx.tar.gz
- 进入解压后的目录,需要./configure,此步骤会报多个错,比如没有安装gcc时,要求安装gcc等
- ./confiure
在./configure时,可能会报错,如下:./configure: error: the HTTP rewrite module requires the PCRE library.You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.
- 解决办法是安装pcre-devel这个包,yum -y install pcre-devel 为了重写rewrite
- 安装了上面这个包后,还会报错,提示./configure: error: the HTTP gzip module requires the zlib library. You can either disable the module by using --without-http_gzip_module option, or install the zlib library into the system, or build the zlib library statically from the source with nginx
- 此时需要安装zlib-devel包,yum -y install zlib-devel 为了gzip压缩
4.make
5.make install 或者4和5结合在一块,make && make install
6.通过编译安装的程序都会保存在/usr/local目录下,如下:
[root@localhost nginx-1.14.0]# ls /usr/local/nginx/
conf html logs sbin
[root@localhost nginx-1.14.0]#
7.运行命令 ./sbin/nginx就会启动nginx,通过ps -ef | grep nginx 或者通过netstat -anpl | grep 80可以查看进程或者端口状态
- 访问 firefox localhost:80 ,如果出现如下界面,就表示nginx启动成功:
1.linux源码安装nginx的更多相关文章
- linux源码安装nginx
任务目标:源码安装nginx,作为web服务修改配置文件,让配置生效,验证配置 首先要去官网nginx.org下载一个tar包: tar xvf 解包 进入到解包出来的目录,对configure进行配 ...
- linux 源码安装 Nginx
1.安装前环境准备安装make:# yum -y install gcc automake autoconf libtool make安装g++:# yum install gcc gcc-c++ 2 ...
- Linux 源码安装nginx
编译参数详解:https://www.cnblogs.com/houyongchong/p/compileArgs.html 配置参数详解:https://www.cnblogs.com/houyon ...
- Linux之源码安装nginx,并按照作业一描述的那样去测试使用
作业五:源码安装nginx,并按照作业一描述的那样去测试使用 [root@localhost nginx]# yum install gcc-* glibc-* openssl openssl-dev ...
- 源码安装nginx以及平滑升级
源码安装nginx以及平滑升级 ...
- Linux源码安装JDK1.8
Linux源码安装Java 1.到官网下载 jdk-8u131-linux-x64.tar.gz 官网地址:http://www.oracle.com/technetwork/java/javase/ ...
- 源码安装Nginx以及用systemctl管理
一.源码安装Nginx: 先安装gcc编译器(安装过的可以忽略) [root@localhost ~]# yum -y install gcc gcc-c++ wget 进入src目录 [root@l ...
- mysql-5.5 for linux源码安装
mysql-5.5 for linux源码安装 1.使用Yum安装依赖软件包 # yum install -y gcc gcc-c++ gcc-g77 autoconf automake bison ...
- 工作笔记-- 源码安装nginx
源码安装nginx 1.安装nginx的依赖包 [root@localhost ~]# yum -y install gcc gcc-c++ openssl openssl-devel pcre pc ...
随机推荐
- 6、easyUI-拖放事件及应用
一.EasyUI 基本的拖动和放置 直接代码看: <!doctype html> <html> <head> <meta http-equiv="C ...
- Android开发:《Gradle Recipes for Android》阅读笔记(翻译)2.2——将Eclipse开发的项目导入到AndroidStudio
问题: 你想要将一个Eclipse ADT项目导入到Android Studio中. 解决方案: Android Studio提供了一个导入向导,可以重写已有的项目. 详细: 在Android Stu ...
- 多个 python的pip版本选择
如果你电脑里面装了多个版本的python python3 -m pip instatll xlutilspython2 -m pip instatll xlutils 加载新的pippython -m ...
- hoj 2715 (费用流 拆点)
http://acm.hit.edu.cn/hoj/problem/view?id=2715 将每个格子 i 拆成两个点 i’, i’’并加边(i’, i’’, 1, -Vi), (i’, i’’, ...
- HTML学习笔记——常用元素及其属性(一)
1.img 标签 -- 代表HTML图像 img标签是单独出现的,<img /> 语法: <img src="URI" alt="alttext&quo ...
- POJ3259(虫洞)
题目大意:给你一张图,先输入m条双向边(权值为正),再输入w条单向边(权值为负),判断是否有负环 题目思路:bellman-ford或者SPFA都行,我用的是SPFA(因为和POJ1860类似,就不加 ...
- Reverse and Compare(DP)
Reverse and Compare Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem Statement Yo ...
- linux 终端操作快捷键
熟练使用快捷键可以很大的提高效率,以下列出一些常用的快捷键命令方便随时查阅 1. 移动光标 Ctrl + a 标移到行首.它在多数文本编辑器和 Mozilla 的 URL 字段内可以使用.Ctrl + ...
- 距离,margin padding ,width height 用法 ,记录
margin:0 auto 表示什么意思 margin后面如果只有两个参数的话,第一个表示top和bottom,第二个表示left和right 因为0 auto,表示上下边界为0,左右则根据宽度自适应 ...
- mysql_用户_操作
一. 创建用户 登录MySQL mysql -u root -p 添加新用户 create user 'username'@'host' identified by 'password'; usern ...