1-Nginx 编译安装

1、安装相关组件nginx

    yum -y install pcre pcre-devel zlib zlib-devel  openssl openssl-develvim

2、下载安装包curl

    wget http://nginx.org/download/nginx-1.9.7.tar.gzide

3、安装Nginx测试

   解压缩:tar xf nginx-1.9.7.tar.gz && cd nginx-1.9.7url

 编译: ./configure --prefix=/usr/local/nginx --with-http_gzip_module --with-http_stub_status_module  --with-http-ssl_module --with-http_flv_module --with-http_rewrite_module && make && make installspa

4、配置环境变量xml

   vim /etc/profile.d/nginx.ship

    NGINX_HOME=/usr/local/nginxssl

    PATH=$NGINX_HOME/sbin:$PATH

    export  PATH

 

  source /etc/profile

5、测试访问

  启动服务: nginx

  检查是否启动: netstat -tlnp |grep 80

  ps uax |grep nginx

  lsof -i:80

 

  测试:       curl http://localhost

          curl  --head http://localhost

          elinks http://localhost

相关文章
相关标签/搜索