nginx安装与卸载
1、下载nginx
image.png
image.png
wget http://nginx.org/download/nginx-1.14.2.tar.gz
解压
tar -zxvf nginx-1.14.2.tar.gz
2、创建安装目录
mkdir nginx
0、安装依赖包
···
yum -y install gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel
···
3、进入源文件目录编译安装
cd /opt/app/nginx-1.14.2
./configure --prefix=/opt/app/nginx --with-http_ssl_module
make
make install
*cd /opt/app/nginx/sbin 启动(./nginx)
查看端口(netstat -nltp)
image.png
卸载
[图片上传中...(image.png-1e517c-1547608338947-0)]
停止(./nginx -s stop)
删除安装目录
image.png
网友评论