标签:configure doc change 安装位置 cond ini figure auto 启动
[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的欢迎界面了
标签:configure doc change 安装位置 cond ini figure auto 启动
原文地址:https://www.cnblogs.com/biaopei/p/9199599.html