Almost every website uses the MySQL database.
1 |
yum install mysql-server |
Start the MySQL daemon:
1 |
service mysqld start |
1 |
chkconfig mysqld on |
Reload the server:
1 |
reboot |
And we will make sure that the MySQL server is restarted:
1 |
service mysqld status |
1 |
/usr/bin/mysql_secure_installation |
1 |
yum install php |
Restart the Apache Web server:
1 |
service httpd restart |
Create a test file with a text editor nano, to make sure that PHP is working, and will check the installed modules:
1 |
nano /var/www/html/info.php |
With the following content:
1 2 3 |
<? phpinfo(); ?> |
Then type in the browser address http://website/info.php and we will see something like the following picture:
Depending on the number of programs installed and configured the server can take several screens.
1 |
yum install php-mysql |
Do not forget to restart Apache after each installation of additional modules for PHP as indicated above:
1 |
service httpd restart |
For a complete list of available modules can be found on the team:
1 |
yum search php |
The Basic setting of the popular set of LAMP to our Web server is finished.