5分钟搞定Nginx安装的教程
1.安装gcc(centos7之后一般已自带,可以在第6步失败后再安装)
yuminstallgccgcc-c++
2.安装pcre
yuminstall-ypcrepcre-devel
3.安装zlib
yuminstall-yzlibzlib-devel
4.安装openssl
yuminstall-yopensslopenssl-devel
5.下载并解压Nginx(之后进入Nginx目录)
wgethttp://nginx.org/download/nginx-1.12.2.tar.gz
6.编译Nginx(加载常用模块如ssl)
./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_gzip_static_module--with-http_ssl_module
7.安装Nginx
make&&makeinstall
8.启动
/usr/local/nginx/sbin/nginx
9.停止
/usr/local/nginx/sbin/nginx-sstop(reload表示重启)
10.浏览器访问Nginx所在机器IP,验证Nginx启动成功
http://yourhost/
注:Nginx配置文件位置
/usr/local/nginx/conf/nginx.conf
以上这篇5分钟搞定Nginx安装的教程就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持毛票票。
热门推荐
10 祝女儿简短祝福语大全
11 大学新年祝福语简短创意
12 元旦适合的祝福语简短
13 朋友出远门祝福语简短
14 初六简短的祝福语
15 祝男孩生日祝福语简短
16 同事调离的祝福语简短
17 拜年红包的祝福语简短
18 妈妈生日祝福语简短励志