首页 > 其他 > 详细

nginx安装最简单教程

时间:2018-06-19 17:35:18      阅读:256      评论:0      收藏:0      [点我收藏+]

[root@bogon ~]# wget -c http://nginx.org/download/nginx-1.7.9.tar.gz #下载安装包
[root@bogon ~]# ls
anaconda-ks.cfg Downloads Pictures Videos Desktop initial-setup-ks.cfg nginx-1.7.9.tar.gz Public Documents Music original-ks.cfg Templates
[root@bogon ~]# tar zxvf nginx-1.7.9.tar.gz #解压
[root@bogon ~]# ls
anaconda-ks.cfg Downloads nginx-1.7.9 Pictures Videos
Desktop initial-setup-ks.cfg nginx-1.7.9.tar.gz Public Documents Music original-ks.cfg Templates
[root@bogon ~]# cd nginx-1.7.9/
[root@bogon nginx-1.7.9]# ls
auto CHANGES.ru configure html Makefile objs src
CHANGES conf contrib LICENSE man README
[root@bogon nginx-1.7.9]# yum -y install gcc-c++ pcre-devel zlib-devel #安装依赖,主要是安装这些,而接下来的三步则是编译安装必须执行的,其中prefix选项是指安装位置
[root@bogon nginx-1.7.9]# ./configure --prefix=/usr/etc/ngin
[root@bogon nginx-1.7.9]# make
[root@bogon nginx-1.7.9]# make install
[root@bogon nginx-1.7.9]# cd /usr/etc/ngin
[root@bogon ngin]# ls
client_body_temp fastcgi_temp logs sbin uwsgi_temp
conf html proxy_temp scgi_temp
[root@bogon ngin]# cd sbin
[root@bogon sbin]# ./nginx #启动服务,现在访问localhost就能看到nginx的欢迎界面了

nginx安装最简单教程

原文:https://www.cnblogs.com/biaopei/p/9199599.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!