二、Nginx的安装配置
来源:互联网 发布:济南seo排名 编辑:程序博客网 时间:2024/06/18 18:49
【转载自】http://blog.csdn.net/u010028869/article/details/50444801
版本号: nginx-1.8.0.tar.gz
错误一:缺少gc++库文件
解决方式:在线安装gcc gcc-++
错误二:缺少PCRE库
./configure: error: the HTTP rewrite module requires the PCRE library.
解决方式:安装pcre-devel解决问题
错误三:
错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
–without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
–with-http_ssl_module –with-openssl= options.
解决方式:
安装后继续执行configure命令,即可完成Nginx的安装
① 启动方式
【Nginx启动文件地址】 -c 【Nginx配置文件地址】
例如:
② 三种关闭方式
从容停止 : Kill -QUIT 13421
快速停止 : kill -TERM 13421 或 kill -INT 13421
强制停止 : pkill -9 nginx
③ 重启
第二种发送信号方式:
至此Linux环境下 Nginx的安装配置以及启动停止都已经讲解完成了,这些过程最好自己动手实践一下哦。
软件下载
官网下载:http://nginx.org/en/download.html版本号: nginx-1.8.0.tar.gz
开始安装
① 解压文件
[root@localhost ~]# cd /usr/local/software/[root@localhost software]# tar -zxvf nginx-1.8.0.tar.gz
② 进步Nginx目录进行编译安装
[root@localhost local]# cd /usr/local/software/nginx-1.8.0[root@localhost nginx-1.8.0]# ./configure --prefix=/usr/local/nginx[root@localhost nginx-1.8.0]# make & make install
③ 启动Nginx
[root@localhost local]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
常见错误
在进行./configure 命令的时候经常会因为缺少库文件而报错,如下:错误一:缺少gc++库文件
解决方式:在线安装gcc gcc-++
yum -y install gcc gcc-++ autoconf automake
错误二:缺少PCRE库
./configure: error: the HTTP rewrite module requires the PCRE library.
解决方式:安装pcre-devel解决问题
yum -y install pcre-devel
错误三:
错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
–without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
–with-http_ssl_module –with-openssl= options.
解决方式:
yum -y install openssl openssl-devel
安装后继续执行configure命令,即可完成Nginx的安装
./configure --prefix=/usr/local/nginx
Nginx的启动、停止、重启
首先介绍如何查看Nginx的进程号:用命令:ps -ef|grep nginx 查看
[root@localhost local]# ps -ef|grep nginxroot 13421 1 0 02:55 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.confnobody 13422 13421 0 02:55 ? 00:00:00 nginx: worker processroot 13448 7858 0 03:04 pts/0 00:00:00 grep --color=auto nginx
① 启动方式
【Nginx启动文件地址】 -c 【Nginx配置文件地址】
例如:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
② 三种关闭方式
从容停止 : Kill -QUIT 13421
快速停止 : kill -TERM 13421 或 kill -INT 13421
强制停止 : pkill -9 nginx
③ 重启
第一种reload命令:
[root@localhost local]# cd /usr/local/nginx/sbin/[root@localhost sbin]# ./nginx -s reload
第二种发送信号方式:
kill -HUP 13421
至此Linux环境下 Nginx的安装配置以及启动停止都已经讲解完成了,这些过程最好自己动手实践一下哦。
0 0
- 二、Nginx的安装配置
- Nginx的安装与配置(二)
- Nginx的安装配置
- nginx的安装配置
- nginx的安装配置
- nginx的安装配置
- nginx的安装、配置
- Nginx的安装配置
- Nginx学习笔记二 -- nginx的配置
- Nginx(二)之Nginx 的安装
- FastDFS+nginx---(二)安装配置测试
- Mac安装Nginx、配置PHP(二)
- nginx(二) nginx编译安装 及 配置WEB服务
- 【nginx】Nginx的安装和配置
- Nginx的安装与配置
- Nginx的安装及配置
- nginx的安装与配置
- Nginx的安装和配置
- java实现数据库读写分离
- "com.facebook.imagepipeline.bitmaps.TooManyBitmapsException" Fresco使用过程中遇到的坑
- Android 游戏破解修改金币
- Windows 的Qt开发环境下,使用数据库的一般操作
- 隐马尔可夫模型(HMM)的MATLAB实现——Viterbi算法
- 二、Nginx的安装配置
- [机房练习赛] 题解 求逆序对
- 数据结构链表题目总结
- 自己对设计模式的理解:工厂模式和单例模式
- omp for知识
- 洛谷 P1373 小a和uim之大逃离
- android 内存泄漏情况大全
- Fidder工具抓包及篡改数据
- QLabel与其Buddy