Can't find a solution? Call Digiweb support on 1918



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.
Now you can visit http://ipofserver/phpinfo.php and you will be given all the details of your PHP install.


Related Articles

No related articles were found.

Attachments

No attachments were found.

Visitor Comments

Article Details

Last Updated
17th of August, 2009

Would you like to...

Print this page  Print this page

Email this page  Email this page

Post a comment  Post a comment

 Subscribe me

Subscribe me  Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF


User Opinions

100% thumbs up 0% thumbs down (1 vote)

How would you rate this answer?




Thank you for rating this answer.

Continue