• Linux之源码安装nginx,并按照作业一描述的那样去测试使用


    作业五:源码安装nginx,并按照作业一描述的那样去测试使用

    [root@localhost nginx]# yum install gcc-* glibc-* openssl openssl-devel pcre pcre-devel zlib zlib-devel -y

    [root@localhost nginx]# wget -q http://nginx.org/download/nginx-1.10.3.tar.gz

    [root@localhost nginx]# ls nginx-1.10.3.tar.gz

    nginx-1.10.3.tar.gz

    [root@localhost nginx]# tar -xf nginx-1.10.3.tar.gz

    [root@localhost nginx]# cd nginx-1.10.3/

    [root@localhost nginx]# ./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module

    [root@localhost nginx]# make && make install

    # 配置nginx.conf

    [root@localhost nginx]# cat /usr/local/nginx/nginx.conf|egrep -v "^$|^#|#"

    worker_processes  1;

    events {

        worker_connections  1024;

    }

    http {

        include       mime.types;

        default_type  application/octet-stream;

        sendfile        on;

        keepalive_timeout  65;

        server {

            listen       80;

            server_name  localhost;

            location / {

                root   /data/www/html;

                index  index.html index.htm;

            }

            error_page   500 502 503 504  /50x.html;

            location = /50x.html {

                root   html;

            }

        }

    }

  • 相关阅读:
    2015年中国500强企业
    汇编语言
    oracle数据库学习路线
    OI生涯回忆录
    NOIP 2020游记
    CF223B Two Strings 题解
    CSP-S 2020游记
    CSP/NOIP 注意事项(2020)
    Luogu P6583 回首过去 题解
    Luogu P2210 Haywire 题解
  • 原文地址:https://www.cnblogs.com/asaka/p/6592443.html
Copyright © 2020-2023  润新知