CentOS 7.2.1511 编译安装Nginx1.10.1+MySQL5.7.14+PHP7.0.11

这篇文章主要介绍了CentOS 7.2.1511 编译安装Nginx1.10.1+MySQL5.7.14+PHP7.0.11,需要的朋友可以参考下
准备篇

一、防火墙配置

CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙。

1、关闭firewall:

systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动

2、安装iptables防火墙

yum install iptables-services #安装

vi /etc/sysconfig/iptables #编辑防火墙配置文件

sample configuration for iptables service# you can edit this manually or use system-config-firewall# please do not ask us to add additional ports/services to this default configuration*filter:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT-A INPUT -p icmp -j ACCEPT-A INPUT -i lo -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT-A INPUT -j REJECT --reject-with icmp-host-prohibited-A FORWARD -j REJECT --reject-with icmp-host-prohibitedCOMMIT

:wq! #保存退出

systemctl restart iptables.service #最后重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
/usr/libexec/iptables/iptables.init restart #重启防火墙

二、关闭SELINUX

vi /etc/selinux/config
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
:wq! #保存退出
setenforce 0 #使配置立即生效

三 、系统约定

软件源代码包存放位置:/usr/local/src
源码包编译安装位置:/usr/local/软件名字

四、下载软件包

1、下载nginx
http://nginx.org/download/nginx-1.10.1.tar.gz
2、下载MySQL
http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.33.tar.gz
3、下载php
http://cn2.php.net/distributions/php-5.6.26.tar.gz
4、下载cmake(MySQL编译工具)
https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz
5、下载pcre (支持nginx伪静态)
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
6、下载openssl(nginx扩展)
https://www.openssl.org/source/openssl-1.0.2j.tar.gz
7、下载zlib(nginx扩展)
http://zlib.net/zlib-1.2.8.tar.gz
8、下载libmcrypt(php扩展)
http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
9、下载yasm(php扩展)
http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
10、t1lib(php扩展)
ftp://sunsite.unc.edu/pub/Linux/libs/graphics/t1lib-5.1.2.tar.gz
11、下载gd库安装包
https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.1.tar.gz
12、libvpx(gd库需要)
http://ftp.osuosl.org/pub/blfs/conglomeration/libvpx/libvpx-1.6.0.tar.bz2
13、tiff(gd库需要)
http://download.osgeo.org/libtiff/tiff-4.0.6.tar.gz
14、libpng(gd库需要)

文章来源:http://www.iis7.com/b/ssyqdq/

原文地址:https://www.cnblogs.com/ngnntds03/p/10700018.html

时间: 2024-12-23 19:09:19

CentOS 7.2.1511 编译安装Nginx1.10.1+MySQL5.7.14+PHP7.0.11的相关文章

CentOS 7.2.1511编译安装Nginx1.10.1+MySQL5.7.15+PHP7.0.11

准备篇 一.防火墙配置 CentOS 7.2默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2.安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑

CentOS6.8编译安装Nginx1.10.2+MySQL5.7.16+PHP7.0.12

1.    下载 #MySQL下载地址 http://dev.mysql.com/downloads/mysql/ #Nginx下载地址 http://nginx.org/en/download.html #PHP下载地址 http://php.net/downloads.php 使用WinSCP把下载好的压缩包上传到/usr/local/src目录 mysql-5.7.16.tar.gz nginx-1.10.2.tar.gz php-7.0.12.tar.gz 2.    安装 2.1   

CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5.3 5.4 5.5 5.6 7.0 7.1多版本全能环境

准备篇 一.防火墙配置 CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2.安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑

CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3

准备篇: CentOS 6.6系统安装配置图解教程 http://www.osyunwei.com/archives/8398.html 一.配置防火墙,开启80端口.3306端口 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filte

CentOS 7.1编译安装Nginx1.8.1+MySQL5.6.19+PHP5.5.14

废话少说,直接部署 一.配置防火墙,开启80端口.3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.se

CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3(转)

vi /etc/sysconfig/iptables #编辑防火墙配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state

Linux(CentOS6.5)下编译安装Nginx1.10.1

首先在特权账号(root)下安装编译时依赖项: yum install gcc gcc-c++ perl -y 首先以非特权账号(本文以账号comex为例)登陆OS: 进入data目录下载相关安装介质 mkdir /comexData/package cd /comexData/package wget http://nginx.org/download/nginx-1.10.1.tar.gz wget http://120.52.73.43/jaist.dl.sourceforge.net/p

5分钟编译安装nginx1.10.1支持清除缓存

实现功能: nginx稳定版本 支持模块purge.rewrite.ssl等等 软件包下载 等等等等.... 本文送给需要安装nginx的小伙伴,由于本人编代码能力非常有限,故下面的脚本写的很烂,勿喷. 相信下面的脚本是个人都能看懂!!! cat nginx.sh yum -y install wget git vim make gcc gcc-c++ openssl-devel #安装依赖库 mkdir /root/appcd /root/appmkdir -p /usr/local/ngin

在ubuntu16编译安装nginx-1.10.2(full)完全自带组件

第一步:先安装全部用到的包 apt install gcc libpcre++-dev libssl-dev make libxml2-dev libxslt-dev libgd-dev libgeoip-dev libgoogle-perftools-dev libatomic-ops-dev libperl-dev 第二步:下载并解压nginx-1.10.2.tar.gz wget http://nginx.org/download/nginx-1.10.2.tar.gz tar zxvf