Glossary | | Favorites | Login
Centos - Installing LAMP
First log in to the server as a user that has enough privileges to install via yum ( You might have to pop sudo in front of the commands if you are not logged in as root )
- Install the applications that drive LAMP.
yum install httpd mysql-server mysql-client php php-mysql
- Accept the download.
- Start the services.
service mysqld start
service httpd start
- Now we set the services to start at boot.
chkconfig httpd on
chkconfig mysqld on
- Now we set a mysql root password
/usr/bin/mysqladmin -u root password ‘yourpasswordofchoice’
And that’s everything installed and running!
You can test the apache install by visiting the IP of the server in your browser http://ipofserver/
If you want to check the PHP install you can call a simple phpinfo page that will give you lots of information about PHP and its current cofiguration.
- Edit a new file using your favourite text editor (In this example I will use vi).
vi /var/www/html/phpinfo.php
- Place the following code in the file.
<?php phpinfo(); ?>
- And then save the file.
Related Articles
No related articles were found.Attachments
No attachments were found.Visitor Comments
Article Details
Last Updated
17th of August, 2009
