zoukankan      html  css  js  c++  java
  • Linux安装nginx

    1. 确认gcc g++开发类库是否安装好

    安装make
    
    yum -y install gcc automake autoconf libtool make
    
    安装g++
    yum install gcc gcc-c++

    2. 选定安装目录

    进入/usr/local/src
    
    cd /usr/local/src

    3. 安装PCRE库

    cd /usr/local/src
    wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz 
    tar -zxvf pcre-8.37.tar.gz
    cd pcre-8.34
    ./configure
    make
    make install

    4. 安装zlib库

    cd /usr/local/src
     
    wget http://zlib.net/zlib-1.2.11.tar.gz
    tar -zxvf zlib-1.2.11.tar.gz
    cd zlib-1.2.11
    ./configure
    make
    make install

    5. 安装openssl

    cd /usr/local/src
    wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz
    tar -zxvf openssl-1.0.1t.tar.gz

    6. 安装nginx

    cd /usr/local/src
    wget http://nginx.org/download/nginx-1.1.10.tar.gz
    tar -zxvf nginx-1.1.10.tar.gz
    cd nginx-1.1.10
    ./configure
    make
    make install

    7. 启动nginx

    vim /usr/local/nginx/conf/nginx.conf
    
    server{
        listen                8009;
        server_name      localhost;
    }
    /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

    8. 停止nginx

    1. 查看进程号
    ps -ef | grep nginx
    
    2. 杀死进程
    kill -QUIT 进程号
    
    3.强制停止
    pkill -9 nginx
    
    4.重启nginx
    cd /usr/local/nginx/sbin
    ./nginx -s reload

     

  • 相关阅读:
    DHCP全局配置文件解析
    DHCP介绍
    使用Samba服务程序,让linux系统之间共享文件
    操作系统
    XML基础、 webservice
    JDBC编程--JDBC进阶
    JDBC编程--JDBC基础
    JDBC编程--SQL基础
    Java web--web编程原理
    Java web--web编程进阶(二)
  • 原文地址:https://www.cnblogs.com/s593941/p/11220173.html
Copyright © 2011-2022 走看看