CentOS (minimal) +nginx+php+mysql implements host access to virtual machines

Source: Internet
Author: User
Tags fpm install php install openssl mysql client openssl iptables

/*    1. First solve the Internet 1-1. Refer to the Networked status file # cd/etc/sysconfig/network-scripts # vi ifcfg-eth0 1-2. Edit the Networking form See figure 1-2 1-3. Restart Network # service Network Restart | /etc/init.d/network Restart 2. Installation common 2-1. Download tool wget # yum install wget 2-2. browser w3m # Yum INS Tall w3m 3.Nginx 3-1. Installation dependency: gcc (compiler) # yum install gcc gcc-c++ pcre ( REDIRECT support) # yum install pcre pcre-devel OpenSSL (https support) # Yum install OpenSSL openssl-d Evel Zlib (gzip module support) # Yum install zlib zlib-devel 3-2. Download the package into the download directory #        Cd/home/tony/download Download # wget http://nginx.org/download/nginx-1.9.0.tar.gz 3-3. Unzip Unzip # TAR-ZXVF nginx-1.9.0.tar.gz Enter # CD         nginx-1.7.8 configuration (Figure 3-3) #./configure               Install # make && make install 3-4. Boot into # cd/usr/l        Ocal/nginx/sbin Execute #/nginx |./nginx-s Stop |./nginx-s reload 4. Turn off the firewall 4-1. Close the direct # service Iptables stop add open port # Vi/etc/syscon                        Fig/iptables Add record Save-A input-m State--state new-m tcp-p TCP--dport 80-j ACCEPT                    Restart Services # service iptables restart 5. Install PHP 5-1. Install the main file # Yum Install php other Library # yum install php-mysql php-gd php-imap Php-ldap                        Php-odbc php-pear Php-xml php-xmlrpc nginx Dependency # Yun Install php-fpm                    Start Dependent # service PHP-FPM start 6. Configure Nginx support PHP 6-1. Modify Configuration Entry # Cd/usr/local/nginx/conf Edit # VI nginx.conf 6-2. Restart Service # Cd/usr/lo        Cal/nginx/sbin #./nginx |./nginx-s Stop |./nginx-s Reload 7. Testing 7-1. New PHP into # cd/usr/local/nginx/html new and save # VI Inde  x.php 7-2. Browse # w3m 127.0.0.1/index.php 8. Install MySQL Client #                    Yum install MySQL server # yum install mysql-server boot                        # service Mysqld start 9. Access MySQL 9-1. Access # cd/usr/local/nginx/html New and Save # VI mysql.php Browse # w3m 127.0.0.1/mys                            ql.php 10. Configuring host access to virtual machines 10-1. Configure the VM (10-1) 10-2. Configure NAT (10-2) 10-3. Restart Service # service NetworK Restart 

Required Drawings:

"Figure 1-2"

"Figure 3-3"

"Figure 6-1"

"Figure 6-1-1"

"Figure 10-1"

"Figure 10-2"

CentOS (minimal) +nginx+php+mysql implements host access to virtual machines

Related Article

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.