最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
linux/cenots中nginx的安装方法
时间:2022-06-30 18:25:05 编辑:袖梨 来源:一聚教程网
nginx 安装
yum -y install gcc gcc-c++ pcre pcre-devel zlib zlib-devel
cd /usr/local/src/
wget http://*ngin*x.*org/download/nginx-1.8.0.tar.gz
tar -zxvf nginx-1.8.0.tar.gz
cd nginx-1.8.0
./configure --prefix=/usr/local/nginx
make && make install
nginx 目录结构
conf 配置文件
logs 日志文件
html 网页
sbin 二进制程序
启动
为了方便使用,创建一个软链接
ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
nginx
[root@localhost sbin]# nginx -h
nginx version: nginx/1.8.0
Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/local/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
一些常用命令
[root@localhost sbin]# nginx -V
nginx version: nginx/1.8.0
built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)
configure arguments: --prefix=/usr/local/nginx
[root@localhost sbin]# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx
nginx -s reload
相关文章
- 剑星百合忧郁之雨物品如何获取 忧郁之雨获取方法介绍 09-14
- 无期迷途雷温怎么配队 雷温配队推荐 09-14
- 无期迷途雷温专烙要开吗 雷温专烙升级建议 09-14
- 无期迷途雷温培养材料是什么 雷温培养材料大全 09-14
- 无期迷途雷温要抽几枷 雷温枷锁抽取建议 09-14
- 无期迷途渡鸦怎么养 渡鸦全方位养成攻略 09-14