1.在ubuntu桌面下载nginx wget http://nginx.org/download/nginx-1.14.0.tar.gz解压缩 tar -zxvf nginx-1.14.0.tar.gz进入解压缩之后的nginx目录 cd nginx-1.14.0/执行命令,编译安装 ./configure --prefix=/usr/local/nginxmakesudo make install
5.给nginx可执行文件添加软连接
sudo ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx6.终端启动 sudo nginx7.查看进程 ps aux|grep nginx8.nginx停止与重载 sudo nginx -s stop # 停止
sudo nginx -s reload # 重载
|
|