CentOS 7.0编译安装Nginx+MySQL+PHP的方法
来源:才华咖 本文已影响1.43W人
来源:才华咖 本文已影响1.43W人
【提要】本篇《CentOS 7.0编译安装Nginx+MySQL+PHP的`方法【1】》特别为需要方法编程学习的朋友收集整理的,仅供参考。内容如下:
PHP独特的语法混合了C、Java、Perl以及PHP自创的语法。它可以比CGI或者Perl更快速地执行动态网页。以下是小编为大家搜索整理的CentOS 7.0编译安装Nginx+MySQL+PHP的方法,希望能给大家带来帮助,更多精彩内容请及时关注我们考试网!
准备篇:
CentOS 7.0系统安装配置图解教程
一、配置防火墙,开启80端口、3306端口
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop ice #停止firewall
systemctl disable ice #禁止firewall开机启动
2、安装iptables防火墙
yum install iptables-services #安装
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 ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p 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 ice #最后重启防火墙使配置生效
systemctl enable ice #设置防火墙开机启动
二、关闭SELINUX
vi /etc/selinux/config
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
:wq! #保存退出
setenforce 0 #使配置立即生效
三 、系统约定
软件源代码包存放位置:/usr/local/src
源码包编译安装位置:/usr/local/软件名字
四、下载软件包
1、下载nginx(目前稳定版)
2、下载MySQL
3、下载php
4、下载pcre (支持nginx伪静态)
5、下载openssl(nginx扩展)
6、下载zlib(nginx扩展)
7、下载cmake(MySQL编译工具)
8、下载libmcrypt(php扩展)
9、下载yasm(php扩展)
英语阅读:Why Apple says it's slowing down older iPhone
My Experience Of Studying Math英语作文
我的英语演讲稿living at present is my top concern
Is a Test of Spoken English Necessary英语四级作文
The Sprint in College Entrance Exam英语作文
如何在Linux CentOS上编译并安装Clang
英语阅读:Life is inevitable consequence of physics
MS SQL Server Management Studio Express安装图文具体步骤
英语作文My Experience With Foreign Coins
Zend studio for eclipse中使php可以调用mysql相关函数的设置方
The place of Science and Technology in Modern Life英语作文
WinXP如何安装Apache+MySQL+PHP环境
Why Public Speaking Is So Important 公共演说的重要性大学英语
The Olympic Games in London初中英语作文
CentOS上搭建Nginx+Mono运行asp.net环境配置教程
托福英语写作范文:Examinations exert a pernicious influence on educat
2015年12月英语四级写作范文:Excess Spending on Campus
英语作文:how college students Howdostudentsinmyclassg
Keeping Healthy Topic2 Section C教案教学反思
php使用MySQL保存session会话
Modern Technology Makes Life More Conv英语六级作文
英语四级作文The Importance of Physical Exercise
An Exciting Sports Meeting英语作文
MySQL安装时出现current root password的解决方法
The Impact of Information Explosion高中英语作文
PEP六上Unit2 Ways to go to school教学反思
华为HCNP-MSTP Transmission认证考试主要内容
The Opinion of Buying Cars英语作文
Wanna prensent you guys a touching英语美文
Linux Mint Cinnamon下使用vino-server配置桌面共享的方法
英语口语:Teaching and Learning Responsibility
SAT官方指南Senctence Completion的练习题
Health in developing countries大学六级英语写作范文
WebSphere MQ Solution Designer认证考试
My Happy Times During Winter Vacation初中英语作文
关于女性的英语作文:Inspiring women leading the way