Difference between revisions of "EWEB2"
From Klaus' wiki
(→Install PHP) |
|||
Line 27: | Line 27: | ||
10.1.18.104/info.php | 10.1.18.104/info.php | ||
</source> | </source> | ||
+ | |||
+ | |||
+ | ===Get in contact with MySQL=== | ||
+ | |||
+ | As root install support for the MySQL database by issuing: | ||
+ | |||
+ | <source lang="bash"> | ||
+ | $ yum install php-mysql | ||
+ | </source> | ||
+ | |||
+ | Restart the httpd server. | ||
+ | |||
+ | Reload the info.php page and observe that you now have a section about MySQL. |
Revision as of 12:45, 14 January 2014
Install PHP
In order to use PHP in the web server, you have to install PHP.
As root perform:
$ yum install php
$ service httpd restart
The last line is to restart the Apache server loading the newly installed module.
Test the PHP installation
In the web-server root (typical /var/www/html) create a file info.php with this content:
<?php phpinfo(); ?>
Next test that your web-server and PHP is running as expected by entering in your web-browser the IP-address of your virtual server and /info.php like:
10.1.18.104/info.php
Get in contact with MySQL
As root install support for the MySQL database by issuing:
$ yum install php-mysql
Restart the httpd server.
Reload the info.php page and observe that you now have a section about MySQL.