centos mysql 5.2.3 编译安装_CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5.3 5.4 5.5 5.6

前传:

1、CentOS 7.3.1611系统安装配置图解教程

http://www.osyunwei.com/archives/10003.html

2、CentOS服务器初始化设置

http://www.osyunwei.com/archives/9034.html

准备篇

一、防火墙配置

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-prohibited

COMMIT

: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.3.tar.gz

2、下载MySQL

https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.16.tar.gz

3、下载php

http://mirrors.sohu.com/php/php-7.1.3.tar.gz

http://mirrors.sohu.com/php/php-7.0.17.tar.gz

http://mirrors.sohu.com/php/php-5.6.30.tar.gz

http://mirrors.sohu.com/php/php-5.5.38.tar.gz

http://mirrors.sohu.com/php/php-5.4.45.tar.gz

http://mirrors.sohu.com/php/php-5.3.29.tar.gz

http://museum.php.net/php5/php-5.2.17.tar.gz

http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz

4、下载cmake(MySQL编译工具)

https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz

5、下载pcre (支持nginx伪静态)

ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz

6、下载openssl(nginx扩展)

https://www.openssl.org/source/openssl-1.1.0e.tar.gz

7、下载zlib(nginx扩展)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值