nginx安装
下载
进入http://nginx.org/en/download.html 可以下载最新稳定版。
linux安装nginx
安装工具包 wget、vim和gcc等
yum -y install wget vim-enhanced make cmake gcc gcc-c++
安装nginx
## 解压 到usr/local目录下
tar -zxvf nginx-1.17.6.tar.gz -C /usr/local/
##进入nginx目录 cd nginx-1.17.6 ## 配置 ./configure --prefix=/usr/local/nginx # 编译安装 make make install
测试是否安装成功
# 进入安装目录 usr/local/nginx/
./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
# 进入安装目录
cd /usr/local/nginx/sbin
# 启动
./nginx
ok了,现在可以正常使用nginx代理,后面咱们记录一下怎样实战。
- THE END -
最后修改:2024年8月6日
非特殊说明,本博所有文章均为博主原创。
如若转载,请注明出处:https://mi-blog.cn/index.php/2020/05/06/nginx%e5%ad%a6%e4%b9%a0%e7%af%87%ef%bc%88%e4%ba%8c%ef%bc%89/