Recently my laptop was having some issue, and send to hewlett packet service center for repair. Due to no computer use, and kinda free at office, I decide to continue setup a linux base web server which is in my wish list long time ago. (As mention on free antivirus for linux operating system).

Centos Operating System

I have download Centos 5.2 (www.centos.org) few month ago, also try to install it and experience it, but not much time to really put my self in study on Linux base operating system. After install centos linux base operation system, now I require web server script, Apache, web programming script, PHP, and a database script, MySql. So how to install all this script? I found a easy way to install Linux Apache MySql PHP (LAMP) using Yum command. Just simple 5 step to fully setup your own web server.

How to install Apache using Yum command:
install apache using Yam

Open Terminal, type in ” yum install httpd “, the command will instruct the centos to download apache web server and install it into the server.

How to install MySql using Yum command:
install mysql using yum

After install Apache Web Server, now we require to install MySql database. Type in ” yum install mysql-server mysql “, this command will download MySql dabatase into the server and install it.

How to install PHP using Yum command:
install php using yum

Once finish install MySql server script, lastly, we need to install PHP programming script by type in ” yum install php ” it will download php script and install into the linux server.

After finish install Apache, MySql and PHP, now we require to start the Apache Web Server service and MySql database service.

Optional Method: You can install Apache, MySql and PHP into centos together with using ” yum install httpd php mysql-server mysql ” command, after hit enter, you can sit a side wait for all this 3 script install into your Linux Web Server.

How to start Apache web server:
start apache

Simply type in ” service httpd start ” in the terminal, and the service will be activated.

How to start MySql database service:

To start the MySql server, type in ” service mysqld start ” in the terminal, and MySql service is ready to use. You can create a database, create table, and create record using MySql command line at the terminal.

How to test the Web Server and ensure it is running?
After both Apache Web server and MySql database is start running, now we open a internet explorer, access “http://localhost/” or “http://127.0.0.1” and you will see a welcome page!

centos welcome page

The root directory for the web server will be located at ” var/www/html “, you can try to create an index.html, save it at ” var/www/html “, you will saw this webpage when you access “ http://localhost/ ” or “ http://127.0.0.1/

How to test the Web Server and ensure it is running on the network?
If you are in the network environment, you can use the other computer within the network, and access the web server IP address. For example, the web server local IP address is 192.168.1.5, you can use other computer within the network to access ” http://192.168.1.5 “, you will see the welcome page or the index.html you create in ” var/www/html ” at the web server.

Ok, is time for me to play around the web server, will keep you guys posted if I found any special during my hand on experience. 😀

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock