Install nginx + mysql + php in CentOS7.0

Source: Internet
Author: User

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:

  1. 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;
  2. 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;
  3. 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
    1. [Root @ localhost ~] # Systemctlstopfirewalld. service stop firewall
    2. [Root @ localhost ~] # Systemctldisablefirewalld. service disable firewall startup
  • Install iptables Firewall
  • [Html] view plaincopy
    1. [Root @ localhost ~] # Install yuminstalliptables-services
  • Modify iptables configurations
  • [Html] view plaincopy
    1. [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
    1. -AINPUT-mstate -- stateNEW-mtcp-ptcp -- dport80-jACCEPT
    2. -AINPUT-mstate -- stateNEW-mtcp-ptcp -- dport3306-jACCEPT
  • Save and exit: wq
  • Start and set startup
  • [Html] view plaincopy
    1. Systemctlrestartiptables. service restart the new firewall to make the configuration take effect
    2. Systemctlenableiptables. service: Set firewall startup
Update System: [html] view plaincopy
  1. <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
  1. <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
  1. <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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.