首先执行: tar -xvf nginx-1.18.0.tar 解压文件
然后cd进入到nginx-1.18.0目录内执行
[root@localhost nginx-1.18.0]# ./configure --prefix=/app/nginx 安装目录,会自动创建
如出现权限不够执行:
chmod +x configure
[root@localhost nginx-1.18.0]# make
[root@localhost nginx-1.18.0]# make install
安装完之后就会看到目录了
启动进入目录:cd /app/nginx/sbin
输入命令:./nginx
停止操作:
./nginx -s stop