1. 安装wget。

sudo yum -y install wget

2. 下载nginx发布代码。

sudo wget http://nginx.org/download/nginx-1.8.0.tar.gz

3. 解压缩。

sudo tar -zxvf nginx-1.8..tar.gz

4. 安装编译需要的软件包。

sudo yum -y install gcc pcre pcre-devel zlib-devel openssl-devel

5. 配置、编译并安装。

sudo ./configure --prefix=/opt/nginx --with-pcre --with-http_stub_status_module --with-http_ssl_module
sudo make
sudo make install

6. 启动nginx服务器。

sudo /opt/nginx/sbin/nginx

7. 重启nginx服务。

sudo /opt/nginx/sbin/nginx -s stop
sudo /opt/nginx/sbin/nginx

Install nginx on centos的更多相关文章

  1. How To Install Nginx on CentOS 7(转)

    How To Install Nginx on CentOS 7 PostedJuly 22, 2014 427.4kviews NGINX CENTOS About Nginx Nginx is a ...

  2. Install Nginx on CentOS 7

    To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with ...

  3. [转载]How To Install Nginx And PHP-FPM On CentOS 6 Via Yum

    http://www.lifelinux.com/how-to-install-nginx-and-php-fpm-on-centos-6-via-yum/ http://blog.csdn.net/ ...

  4. Install NGINX, PHP-FPM (5.6) on CentOS 6

    Installing NGINX with PHP on CentOS 6 can be a hassle depending on the install and packages you use. ...

  5. Centos 7下安装nginx,使用yum install nginx,提示没有可用的软件包

    Centos 7下安装nginx,使用yum install nginx,提示没有可用的软件包. 18 (flaskApi) [root@67 flaskDemo]# yum -y install n ...

  6. yum install nginx

    先安装nginx的yum源 http://nginx.org/en/linux_packages.html#stable 找到链接,安装: rpm -ivh http://nginx.org/pack ...

  7. Docker 实战(二)——centos7镜像安装nginx,将安装nginx的centos容器生成新的镜像,并导出

    Docker centos7镜像安装nginx 1.安装docker 使用yum安装docker不再重复:见  Linux常用命令 2.pull centos 1)在docker仓库中搜索centos ...

  8. ASP.NET Core Docker jexus nginx部署-CentOS实践版

    本文用图文的方式记录了我自己搭建centos+asp.net core + docker + jexus + nginx的整个过程,希望对有同样需求的朋友有一定的参考作用. 本文主要内容如下: cen ...

  9. nginx在centos & ubuntu上的安装

    安装Centos 添加当前账号加入sudoers,具备sudo功能 安装编辑器vim Yum install vim Su root Cd cp /etc/sudoers /etc/sudoers[d ...

随机推荐

  1. 预装apk

    一般是在device/rockchip/ LOCAL_PATH := $(call my-dir)include $(CLEAR_VARS)LOCAL_MODULE := LanguageSetLOC ...

  2. Ubuntu 12.04 下安装 JDK 7

    原文链接:http://hi.baidu.com/sanwer/item/370a23330a6a7b23b3c0c533 方法一1.下载 JDK 7从http://www.oracle.com/te ...

  3. 中国移动物联网平台数据转发 c# 控制台程序

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.N ...

  4. android 屏幕旋转 不重新加载oncreate

    当手机设定了使用横屏或者竖屏的时候,还想要使用重力感应,可以设置activity属性 android:screenOrientation="sensor" 但是每次翻转屏幕,都会重 ...

  5. 第84讲:Scala中List和ListBuffer设计实现思考

    今天来学习了scala中的list和ListBuffer scala list 内部很多操作是listbuffer做的,因为改变元素,listbuffer非常高效,tl是var类型的  ,但是他属于s ...

  6. double float的精度问题

    三部曲 1: #include <iostream> #include <stdio.h> #include <string.h> using namespace ...

  7. eclipse 离线安装插件报cannot perform operation.Computing alternate solutions...解决办法

    当不能连接外网,离线安装SVN插件时,可能会发现以下问题:eclipse长时间停留在下图所示状态,提示“cannot perform operation.Computing alternate sol ...

  8. HSmartWindowControl 之 摄像头实时显示( 使用 WPF )

    1.添加Halcon控件,创建WPF项目 在VS2013中创建一个WPF工程,然后添加halcon的控件和工具包,参见: HSmartWindowControl之安装篇 (Visual Studio ...

  9. WPF实战案例-打印

    在前段时间做了一下打印,因为需要支持的格式比较多,所以wpf能打印的有限分享一下几种格式的打印(.xls .xlsx .doc .docx .png .jpg .bmp .pdf) 首先为了保证exc ...

  10. OSLab多进程

    日期:2019/3/23 内容:Linux下与多进程相关的函数.     进程基本知识 定义 应用程序关于某数据集合上的一次运行活动. 特点 ·操作系统进行资源分配和调度的基本单位 ·进程是程序的一次 ...