一、安装编译工具及库文件

yum -y install gcc

yum -y install gcc-c++

yum -y install zlib;

yum -y install pcre-devel

yum -y install openssl openssl-devel

二、下载安装包

wget -c https://nginx.org/download/nginx-1.10.3.tar.gz
tar -zxvfnginx-1.10.3.tar.gz

cd nginx-1.8.0

设置编译路径为 /usr/local/nginx

./configure --prefix=/usr/local/nginx

三、编译安装

make

make install

启动Nginx,执行以下命令:

./nginx -s reload

error:

-bash: ./nginx: No such file or directory

执行

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

四、设置开机启动

systemctl status nginx
Error:Unit nginx.service could not be found.

Solution:

[ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found

service nginx start
Starting nginx (via systemctl): [ OK ]

Nginx Install 记录的更多相关文章

  1. Nginx正确记录post日志的方法

    Nginx正确记录post日志的方法 事实上可以很简单,这取决于把 access_log 放在哪个 location 里面. 一,放到包含fastcgi_pass或proxy_pass的Locatio ...

  2. CentOS 6.6 nginx install

    /************************************************************************* * CentOS 6.6 nginx instal ...

  3. az nginx install and other

    Nginx     1◆ nginx install 源码:https://trac.nginx.org/nginx/browser   官网:http://www.nginx.org/       ...

  4. nginx 日志记录 自定义详解(分析上报用)

    nginx 日志记录 自定义详解   1.log_format 普通格式 log_format main '$remote_addr - $remote_user [$time_local] $req ...

  5. 解决nginx在记录post数据时 中文字符转成16进制的问题【转载】

    1. 问题描述 nginx 在获取post数据时候,如果是中文,则转换成16进制显示在日志文件中,如下图所示.   Paste_Image.png 日志格式为: log_format postdata ...

  6. centos源码编译安装nginx过程记录

    前言:Centos系统编译安装LNMP环境是每来一台新服务器或换电脑都需要做的事情.这里仅做一个记录.给初学者一个参考! 一.安装前的环境 这里用的是centos 7系统. 我们默认把下载的软件放在 ...

  7. Nginx 日志记录post数据,并使用goaccess进行日志分析

    nginx日志默认不会记录post数据 在nginx配置文件的http节 log_format 日志格式标识 [escape=json] 日志格式 比如:日志格式标识设置为main,添加escape= ...

  8. --with-http_realip_module选项(后台Nginx服务器记录原始客户端的IP地址 )

    转自:http://blog.itpub.net/27043155/viewspace-734234/ 通过这个模块允许我们改变客户端请求头中客户端IP地址值(例如,X-Real-IP 或 X-For ...

  9. nginx实时记录请求状态信息( ngx_realtime_request_module)

    cd /usr/local/src/ wget "http://nginx.org/download/nginx-1.4.2.tar.gz" tar -xzvf nginx.tar ...

随机推荐

  1. UVA 536 Tree Recovery 建树+不建树

    题意: 给出先序和中序,求后序. 思路: ①建树然后递归输出. //建树的 #include<iostream> #include<cstdio> #include<qu ...

  2. ng表单验证

    <angular>中form表单的验: 1.在form中加上 novalidate 2.利用ng-pattern验证 (*如果不匹配的话 ng-model是绑定不上数据的) 常用的表单验证 ...

  3. You must configure either the server or JDBC driver (via the serverTimezone configuration property

    使用JDBC连接MySql时出现:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one ...

  4. jmeter基本组成原件介绍

    jmeter基本组成原件介绍 参考地址:https://wenku.baidu.com/view/d4986ca2aaea998fcc220ec1.html 从性能工具的原理划分: Jmeter工具和 ...

  5. 牛刀小试之用pytorch实现LSTM

    https://www.itcodemonkey.com/article/9008.html 要看一看

  6. vue_事件绑定 v-on _事件修饰符

    事件绑定 v-on 传参的同时,接收事件对象 <button @click="test('111', $evnt)">哈哈</button> 事件修饰符 阻 ...

  7. 安卓动态分析工具【Android】3D布局分析工具

    https://blog.csdn.net/fancylovejava/article/details/45787729 https://blog.csdn.net/dunqiangjiaodemog ...

  8. PAT甲级1103 Integer Factorization【dfs】【剪枝】

    题目:https://pintia.cn/problem-sets/994805342720868352/problems/994805364711604224 题意: 给定一个数n,要求从1~n中找 ...

  9. kubernetes in action - Services

    问题,如何将Pod所提供的功能提供给别人用?微服务,是服务,所以关键要把服务提供出去 直接把pod的静态ip提供给用户用,这个会有很多问题,比如failover,扩容,负载均衡等 所以需要servic ...

  10. 学习ActiveMQ(七):JMS消息的事务管理

    Spring提供了一个JmsTransactionManager用于对JMS ConnectionFactory做事务管理.这将允许JMS应用利用Spring的事务管理特性.JmsTransactio ...