centos7下安装nginx

1.从官网(http://nginx.org/)下载安装包

  笔者下载版本为nginx-1.10.2.tar.gz

2.使用tar命令解压

  tar xvf nginx-1.10.2.tar.gz

  cd nginx-1.10.2/

  ./configure  --prefix=/usr/local/nginx   (prefix指定安装目录)

  注意:在此步骤中因为缺少相关依赖库会出现以下问题:

    ./configure: error: the HTTP rewrite module requires the PCRE library.

    直接安装pcre-devel解决问题
    yum -y install pcre-devel

    ./configure: error: the HTTP cache module requires md5 functions
    from OpenSSL library.   You can either disable the module by using
    --without-http-cache option, or install the OpenSSL library into the system,
    or build the OpenSSL library statically from the source with nginx by using
    --with-http_ssl_module --with-openssl=<path> options.

    直接安装openssl解决问题

    yum -y install openssl openssl-devel

  解决上述问题后重新执行

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

  make

  make install

  

3.安装完毕后去安装目录启动Nginx

  sh /usr/local/nginx/sbin/nginx

时间: 2024-07-30 10:17:04

centos7下安装nginx的相关文章

CentOS7 下安装 Nginx + MongoDB + Wildfly

一. 准备 以下是本次安装用到的系统及软件版本: CentOS 7.0 Nginx 1.9.3 MongoDB 3.0.5 Wildfly 9.0.1 JDK 8u51 安装 Nginx 还需要到 Pcre 和 Zlib,它们的版本是: Pcre 8.37 Zlib 1.2.7 二. 安装操作系统 1. 安装界面语言 CentOS 7 的安装引导界面比较清晰,安装界面语言选择简体中文即可. 2. 安装信息摘要 在安装信息摘要界面有一个软件选择,里面定义了一些常用场景的软件包集合,这里我们选择基础

#建站【CentOS7.0下安装Nginx 1.7.4 】

来源:blog.csdn.net  作者:QuantSeven 原文链接点:这里 一个在CentOS7.0下安装Nginx 1.7.4的教程,亲测有效.下面直接上教程: 一.安装准备 首先由于nginx的一些模块依赖一些lib库,所以在安装nginx之前,必须先安装这些lib库,这些依赖库主要有g++.gcc.openssl-devel.pcre-devel和zlib-devel 所以执行如下命令安装. $ ./configure $默认安装在/usr/local/nginx $ make $

centos7.0 安装nginx

在centos7.0下安装nginx需要安装 prce和zlib包去官网下载相应的包 然后解压相应的包进行编译 解压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 --with-pcre=/usr/local/pcre-

centos7下安装php+memcached简单记录

1)centos7下安装php 需要再添加一个yum源来安装php-fpm,可以使用webtatic(这个yum源对国内网络来说恐怕有些慢,当然你也可以选择其它的yum源) [[email protected] ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 安装php7-fpm和一些其它的必要的组件 [[email protected] ~]# yum -y install php70w-fpm php

Nginx系列-1.Linux下安装Nginx

Nginx系列-1.Linux下安装Nginx 目录 - Nginx系列 Nginx系列-1.Linux下安装Nginx Nginx系列-2.配置LNMP(Linux.Nginx.MySQL.PHP)架构 Nginx系列-3.配置Nginx虚拟主机 Nginx系列-4.Nginx日志配置及日志切割 Nginx系列-5.配置Nginx的防盗链 Nginx系列-6.配置Nginx的HTTPS Nginx系列-7.配置Nginx使用uwsgi支持web.py框架 Nginx系列-8.配置Nginx+A

Centos7下安装及配置PPTP VPN

说到VPN服务,我们大家都知道,VPN是虚拟专用网络(Virtual Private Network)的缩写,VPN有多种分类方式,包括PPTP.L2TP.IPSec等,本文配置的VPN服务器是采用PPTP协议的,PPTP是在PPP协议基础上开发的一种新的增强型安全协议.当然在windows上和linux上都可以部署服务,我们今天主要介绍一下在Centos7下安装及配置PPTP VPN. 因为PPTP是基于PPP协议基础上的,因此需要系统支持PPP,使用 rpm -qa ppp 检查是否安装了P

Centos7下安装及配置Zabbix3.0

说到Zabbix相信很多管理员都使用过,因为zabbix所提供的功能给广大管理员们及时得知自己所管理的服务器的服务状态,当然有很多软件服务(cacti.ngios等)都可以实现zabbix类似的功能,但是对于zabbix的功能相对更强大一点,具体就不细说了,今天我们主要介绍一下,Centos7下安装及配置Zabbix3.0的介绍,具体见下: 在安装服务器的时候我们需要注意一些问题:比如服务器的防火墙.selinux等都会影响到Zabbix的正常通信 环境介绍: OS:Centos7 Servic

CentOS-7下安装MySQL5.6.22

CentOS7下安装MySQL5.6.22(当前最新版本:2015-01-17) 转载请注明出处:jiq?钦's technical Blog 一  安装环境 (1)CentOS版本:CentOS-7 查看方法: [[email protected] 桌面]# cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) 来源:官网下载 下载地址:http://www.centos.org/ (2)MySQL版本:MySQL-5.6.2

centos7下安装mariadb

参考: http://www.cnblogs.com/Netsharp/p/5875474.html https://downloads.mariadb.org/mariadb/repositories/#mirror=neusoft&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.1 RDS for MySQL 备份文件恢复到自建数据库 参考: https://help.aliyun.com/knowl