Yum installs Apache PHP mysql

Source: Internet
Author: User

Installation:

Yum install-y httpd php


View version:,

Rpm-qa httpd PHP

Httpd-2.2.15-54.el6.centos.x86_64

Php-5.3.3-48.el6_8.x86_64


To modify the Apache configuration file:

Vim/etc/httpd/conf/httpd.conf

Add a row under #servername www.example.com:80 line

ServerName localhost:80

Change the Listen 80 inside to Listen "Your IP": 80

Can be quickly positioned with/80.


Test Apache:


Service httpd Restart


Curl-i 192.168.240.129


There is no error message and a lot of code indicates that the Apache installation was successful.

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/86/B9/wKiom1fIVDvQpuW0AACFkoLn2UE889.png-wh_500x0-wm_3 -wmp_4-s_633067833.png "title=" 1.png "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:200px; height:80px; "alt=" Wkiom1fivdvqpuw0aacfkoln2ue889.png-wh_50 "/>



Test PHP:

Service httpd Restart


Cd/var/www/html

Vim index.php Save the following code input:

<?

Phpinfo ();

?>


Curl-i 192.168.240.129/index.php

There is no error message and a lot of code indicates that the PHP installation was successful:

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/B8/wKioL1fIVrDB-uX8AADdzwZmoG0566.png-wh_500x0-wm_3 -wmp_4-s_518551626.png "title=" 3.png "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:200px; height:80px; "alt=" Wkiol1fivrdb-ux8aaddzwzmog0566.png-wh_50 "/>


MySQL pending test



After testing found that after the installation of the Yum Apache and PHP are automatically configured, very good, than the code compiled to be comfortable, hehe.

Yum installs Apache PHP mysql

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.