centos 6.5 安装 nginx

  从nginx官网下载安装包:nginx-1.8.1.tar.gz,解压

tar xvf nginx-1.8.1.tar.gz -C /usr/local

  安装依赖

yum install gcc  
yum install pcre*  
yum install openssl*  
yum install zlib*

  安装nginx

cd /usr/local/nginx-1.8.1  
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre --with-http_gzip_static_module  
make  
make install

  卸载nginx只需要删除安装目录

  nginx启动、关闭、重启命令

cd /usr/local/nginx/sbin  
   
./nginx  
./nginx -s stop  
./nginx -s reload
posted @ 2018-02-28 16:04  Shef  阅读(92)  评论(0编辑  收藏  举报