YUM Install Apache PHP MySQL

Installation:

yum install -y httpd php

< p>Check version:

rpm -qa httpd php

httpd-2.2.15-54.el6.centos.x86_64

php-5.3.3 -48.el6_8.x86_64

Modify the apache configuration file:

vim /etc/httpd/conf/httpd.conf

Add a line under the #ServerName www.example.com:80 line

ServerName localhost:80

Change the Listen 80 inside to Listen “Your IP”:80

You can use /80 to quickly locate.

Test apache:

service httpd restart

curl- i 192.168.240.129

There is no error message and a lot of codes are prompted to indicate that apache is installed successfully. As shown in the picture

wKiom1fIVDvQpuW0AACFkoLn2UE889.png-wh_50

Test PHP:

service httpd restart

cd /var/www/html

vim index.php enter and save the following code:

phpinfo();

?>

curl -i 192.168.240.129/index. php

There is no error message and a lot of codes indicate that the php installation was successful: as shown in the figure

wKioL1fIVrDB-uX8AADdzwZmoG0566.png-wh_50

mysql to be tested

After testing, it is found that apache and PHP are automatically configured after yum is installed, which is very good. It is more comfortable than code compilation, ha ha.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5551 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.