系统 Centos 64位

第一步,首先下载Nginx的tar包及安装依赖的工具tar包。

Nginx: http://nginx.org/en/download.html

Nginx需要依赖下面3个包 
gzip 模块需要 zlib 库 ( 下载: http://www.zlib.net/ ) 
rewrite 模块需要 pcre 库 ( 下载: http://www.pcre.org/ ) 
ssl 功能需要 openssl 库 ( 下载: http://www.openssl.org/ )

分别解压。 
具体命令:

wget http://nginx.org/download/nginx-1.13.2.tar.gz
wget http://www.zlib.net/zlib-1.2.11.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz
wget https://www.openssl.org/source/openssl-fips-2.0.16.tar.gz tar zxvf openssl-fips-2.0.16.tar.gz
tar zxvf nginx-1.13.2.tar.gz
tar zxvf zlib-1.2.11.tar.gz
tar zxvf pcre-8.40.tar.gz
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

第二步 编译安装

安装顺序:先安装三个依赖包再安装nginx

cd 到各个解压目录下运行
./configure && make && make install
  • 1
  • 2

安装c++编译环境

yum install gcc-c++
  • 1

第三步 运行nginx

安装好的nginx路径在:

/usr/local/nginx
  • 1
  • 2

默认的配置文件的路径在:

/usr/local/nginx/conf/nginx.conf
  • 1

运行nginx:

/usr/local/nginx/sbin/nginx
  • 1

通过浏览器访问服务器ip,出现以下标志就是启动成功了:

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com. Thank you for using nginx.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

有问题之处烦请在留言中指出,非常感谢。

Centos 安装 Nginx 详细过程的更多相关文章

  1. CentOS7离线安装Nginx(详细安装过程)

    CentOS7离线安装Nginx(详细安装过程) 1.安装gcc.g++ 下载好所需的文件后上传至服务器(下载地址:https://download.csdn.net/download/a729360 ...

  2. centos安装nginx(针对一哥们的博客进行的详细补充(用红色字体标出了补充部分))

    centos安装nginx 原文地址:http://www.cnblogs.com/leechenxiang/p/5402960.html 一.什么是nginx 是一个C语言开发的HTTP反向代理服务 ...

  3. CentOS安装Nginx Pre-Built

    CentOS安装Nginx Pre-Built比较简单,具体可参见:http://nginx.org/en/linux_packages.html#stable. 本文列出详细步骤,已做备份: cat ...

  4. centos7.3 安装oracle 详细过程

    centos7.3安装oracle详细过程1.下载Oracle安装包:linux.x64_11gR2_database_1of2.zip 和 linux.x64_11gR2_database_2of2 ...

  5. centos 安装nginx

    centos 安装nginx 安装依赖 更换源 yum install http://mirrors.163.com/centos/6.8/extras/x86_64/Packages/epel-re ...

  6. 【Oracle RAC】Linux系统Oracle11gR2 RAC安装配置详细过程V3.1(图文并茂)

    [Oracle RAC]Linux系统Oracle11gR2 RAC安装配置详细过程V3.1(图文并茂) 2 Oracle11gR2 RAC数据库安装准备工作2.1 安装环境介绍2.2 数据库安装软件 ...

  7. Mac安装nginx配置过程

    mac电脑系统重装了,记录一下安装nginx的过程: 1.打开终端 2.安装Command Line tools xcode-select --install 3.安装brew命令 ruby -e & ...

  8. Linux系统CentOS6.2版本下安装JDK7详细过程

    Linux系统CentOS6.2版本下安装JDK7详细过程 分类: Linux 2014-08-25 09:17 1933人阅读 评论(0) 收藏 举报 前言:        java 是一种可以撰写 ...

  9. iOS安装CocoaPods详细过程

    iOS安装CocoaPods详细过程 一.简介 什么是CocoaPods CocoaPods是OS X和iOS下的一个第三类库管理工具,通过CocoaPods工具我们可以为项目添加被称为“Pods”的 ...

随机推荐

  1. LeetCode(194.Transpose File)(awk进阶)

    194. Transpose File Given a text file file.txt, transpose its content. You may assume that each row ...

  2. js模板引擎-art-template常用总结

    art-template javascript 模板引擎,官网:https://github.com/aui/art-template 分为原生语法和简洁语法,本文主要是讲简洁语法 基础数据渲染 输出 ...

  3. python要点

    1.数据类型 字符串: ''或""表示单行,写三对符合表示多行, r'这种写法转义符不生效' 布尔值:True, False 空值: None 类型转换 print ), ), b ...

  4. MySQL忘记root密码的解决办法

    # 1.停掉MySQL进程 [root@standby ~]# /etc/init.d/mysqld stop Shutting down MySQL... SUCCESS! [root@standb ...

  5. python实现单向循环链表

    单向循环链表 单链表的一个变形是单向循环链表,链表中最后一个节点的next域不再为None,而是指向链表的头节点. 实现 class Node(object): """节 ...

  6. MySQL随记(一)

    数据类型 Insert Update Delete 函数

  7. Android中的分层----service 层,domain层,dao 层,action层等设计

    service 层 服务层:直接为客户端提供的服务或功能.也是系统所能对外提供的功能. domain层 领域层:系统内的领域活动,存放实体. dao 层 持久层,DB操作都写在这里,数据访问对象,通过 ...

  8. 【noip 2016】提高组

    D1T1.玩具谜题 题目链接 直接模拟就好了……water. #include<cstdio> int n,m,a,s,ans; ];]; int main() { scanf(" ...

  9. 建立一个漂亮的PHP验证码类文件及调用方式

    //验证码类class ValidateCode { private $charset = 'abcdefghkmnprstuvwxyzABCDEFGHKMNPRSTUVWXYZ23456789';/ ...

  10. orcle查看表空间数据文件使用情况

    -- 查看表空间数据文件使用情况select a.*, round(a.usedgb/a.maxgb*100) || '%' usedPer from (select t.TABLESPACE_NAM ...