Nginx - [02] 安装部署&配置

官网下载地址:http://nginx.org/en/download.html

 

001 || 安装[windows]

解压之后,在命令提示符窗口启动nginx.exe

在浏览器访问80端口:localhost:80

002 || 安装[linux]

1、下载tar包解压后执行./configure

2、执行make、make install

3、执行whereis nginx查找

4、在/usr/local/nginx/sbin下执行./nginx即可启动

 

003 || 常用命令

cd /usr/local/nginx/sbin/
# 启动
./nginx
# 停止
./nginx -s stop
# 安全退出
./nginx -s quit
# 重新加载配置文件
./nginx -s reload
# 查看nginx进程
ps aux|grep nginx

 

004 || 配置

在nginx.conf中进行配置反向代理、负载均衡、权重(更多的请求转发给权重高的服务器)

 

 

 

 

 

 

posted @ 2025-02-16 18:33  HOUHUILIN  阅读(13)  评论(0)    收藏  举报