Install nginx + mysql + php in CentOS7.0
A PHP program has nothing to worry about. I installed CentOS7 linux on a virtual machine and installed the PHP environment (in sub-installation, there are actually many one-click shell Integrated Installation packages, I always feel that learning is a step-by-step approach.) previously, I just made some simple operations on the server, which is purely for primary school students,It is only for your own study. You can refer to it for reference.This is misleading. Please try again. Thank you ~!
Preparations:
- The VM vm11 is installed in advance. Baidu recommends the current vm11 serial number: 1F04Z-6D111-7Z029-AV0Q4-3AEH8. The installation instructions are not required;
- Download centos7 installation package: http://www.centoscn.com/plus/download.php? Open = 2 & id = 5070 & uhash = 30d461226e4a5148bf1cb899, which is installed on a virtual machine. It is easy to describe in detail;
- Start the VM and configure the system
- Disable the built-in firewall (discard the built-in firewall and enable the iptables firewall)
- [Plain] view plaincopy
- [Root @ localhost ~] # Systemctlstopfirewalld. service stop firewall
- [Root @ localhost ~] # Systemctldisablefirewalld. service disable firewall startup
- Install iptables Firewall
- [Html] view plaincopy
- [Root @ localhost ~] # Install yuminstalliptables-services
- Modify iptables configurations
- [Html] view plaincopy
- [Root @ localhost ~] # Vim/etc/sysconfig/iptables edit the firewall configuration file
- Add these two items under-a input-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT.
- [Html] view plaincopy
- -AINPUT-mstate -- stateNEW-mtcp-ptcp -- dport80-jACCEPT
- -AINPUT-mstate -- stateNEW-mtcp-ptcp -- dport3306-jACCEPT
- Save and exit: wq
- Start and set startup
- [Html] view plaincopy
- Systemctlrestartiptables. service restart the new firewall to make the configuration take effect
- Systemctlenableiptables. service: Set firewall startup
Update System: [html] view plaincopy
- <Spanstyle = "white-space: pre"> </span> [root @ localhost ~] # Vim/etc/yum. repos. d/CentOS-Base.repo
Modify "baseurl = http://developer.centos.org/centos/?releasever/ OS /?basearch/" to "baseurl = #" to update the system [html] view plaincopy
- <Spanstyle = "white-space: pre"> </span> [root @ localhost ~] # Yum-yupgrade
Software Directory:/usr/local/src software source code package storage location/usr/local/software installation location install compilation tool and library file [html] view plaincopy
- <Spanstyle = "white-space: pre"> </span> [root @ localhost ~] # Yuminstall-yapr * release * cloog-pplcompat * cppcurlcurl-release * freetype-develgccgcc-c ++ gtk +-develgdgettextgettext-develglibckernelkernel-headerskeyutilskeyutils-libs-develkrb5-devellibcom_err-devellibpnglibpng-devellibjpeg * libsepol-devellibselinux-devellibstdc ++-devellibtool * libgomplibxml2libxml2-devellibXpm * libw.libtiff * makempfrncurses * ntpopensslopenssl-develpatchpcre-develperlphp-commonphp-gdpolicycoreutilstelnett1libt1lib * nasmnasm * wgetzlib-devel
Download installation package http://nginx.org/download/nginx-1.6.0.tar.gz
Http://blog.csdn.net/daojibruce/article/details/46531847