CentOS 5.x L.A.M.P. Setup
IceTheme - IceTabs
Setting up your own Web Hosting Server is as simple as 1... 2... 3... Just read the rest of this article and have your web server setup in as little as 15 minutes.
CentOS is one of the worlds leading Linux Distributions especially for web servers. So what we present to your here is an easy guide on how to setup your Own L.A.M.P (Linux, Apache, MySQL, PHP) Server. These are the basic foundations of most of the sites on the Internet today.
The Following is Step by Step written Instructions to go with the video.
1. yum -y nstall httpd php mysql mysql-server
The above command allows for the download & Installation of the Apache Server, PHP Modules, MySQL Client, and the MySQL Server.
2. service httpd start
The Second step is where you are actually starting the apache server. PHP never needs to be started as it is an add in to Apache and therefor starts when Apache starts.
3. service mysqld start
In the third step what we are actually doing above is starting the MySQL Server. Once started as you see in the video some text scrolls by the screen really quick. Since this tutorial was made to just show how to setup a L.A.M.P. Server we will not discuss Security but please take some time to read the information that scrolled by on the screen. It gives multiple options to help secure your databases and clear test database that is installed by default, set root password and more.
4. chkconfig httpd on
Step 4 is checking the httpd service configuration to make sure that the service starts with when the machine starts. If you do not do this you Apache Server will not start by itself the next time the machine is started. If this is ignored on purpose to start the server again when you want to you would use the command from Step 2.
5. chkconfig mysqld on
Step 5 is basically the same thing as Step 4 except this is ensuring that the MySQL Database Server is running the next time the machine is started, or rebooted. If you do not want this service to start automatically for then to restart the MySQL server again run the command from Step 3 again.
1. By using the command chkconfig <SERVICE_NAME> off you are making sure the service you are using it for will make sure the service does not start automaticallywhen the machine is booted. The screen will not notify you in anyway if the command worked. You will get an error if the command is wrong or options are incorrect.
2. The command service <SERVICE_NAME> off will shut off the named service if it actually running. The screen will tell you that the service has been shut down successfully.