Thursday, September 03, 2009

Installing LAMP to CentOS 5.x

This is assuming CentOS was installed properly and connected to the internet.

Installing MySQL

yum install mysql mysql-server

Confirm the install and by answering yes, and yum will download all packages needed to install MySQL.

We need to make sure MySQL is started on boot

chkconfig --levels 235 mysqld on

You can now start the MySQL server by issuing the following command:

/etc/init.d/mysqld start

You can also start it using the command below:

service mysqld start

Once MySQL server is running it will display initial startup text and will instruct you to set "root" user password.

mysqladmin -u root password rootpassword
mysqladmin -h -u root password rootpassword

Make sure you change the highlighted items with the correct information.

Installing Apache (http server)

yum install httpd

Make it run on boot.

chkconfig --levels 235 httpd on

Start the service

service httpd start

Install PHP

yum install php

No comments: