How to install Apache Server, MySQL,PHP,phpmyadmin on linux

We will learn how to install Apache 2 web server with php, MySQL and phpmyadmin on Linux.For this Post i am will be using Ubuntu 12.4 but you can use any linux ditro.

Lets Start.Open up the command terminal in Linux and type “sudo apt-get install update” this will update the repository in ubuntu,After this type this command to install Apache 2 web server”sudo apt-get install apache2″ in the installation it will say do you want to Continue, type “y” to install it.


Next we need to install php5 programming language in ubuntu Linux, Type “sudo apt-get install php5” in the Terminal and press enter to install it.


After this we will Type this command “sudo apt-get install libapache2-mod-php5” to connect with apache 2 web Server.After this we need to install MySQL database, Type this command in the terminal “sudo apt-get install mysql-server” to install  MySQL database in ubuntu Linux, after the installation mysql server will ask you for the root  password, Type the desire password e.g ubuntusql and press enter after this it will again ask you to retype you password enter the same password and press enter.


After setting up the MySQL server on Ubuntu Linux its time to install phpmyadmin, Type “sudo apt-get install libapache2.mod-auth-mysql php5-mysql phpmyadmin”  and press enter, after installation process is over  Configuring phpmyadmin window will show up choose apache2 webserver and press enter.


After some Configuration process this window wills show up type your Mysql Database password e.g. “ubuntusql” and press enter.


After this another window will show up in that window type your desire phpmyadmin password e.g “ubuntuphp” and press enter, Type the same password again and press enter.


Now your good to go everything has install in the system properly now we need to create a link in the /var/www  directory for easy access  to that type this “sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin” in the Terminal and press enter.Now type this command “sudo /etc/init.d/apache2 restart” to restart apache.You can also start or stop apache2 by replacing restart with start or stop.

After that open Firefox or any web browser and type localhost, if you see the following screen that means apache2 server is working properly.


To add web content on this server open up the var/www/ directory and create a html or php web file.

To test php locate the www directory by typing this command in the terminal “cd /var/www” after this type this “sudo touch test.php” to create a new php after that type this “sudo gedit test.php” and press enter, a code editor will open up; type this line of code ““in the test.php file to check if  php is working.


Open up the web browse and type localhost/test.php in the url, if you see the following page that means php has properly installed on the system.


Now Type localhost/phpmyadmin in the url to open phpmyadmin.


Enter your Username and password,User name is “root” and the password is ubuntuphp yours will be different and click on go or just press enter. After logging in you will see the following screen.


Now everything is working fine to learn more about myself or php check my other posts.


What is a MotherBoard

A Motherboard or Main board is a major and the most important part of a computer it is Printed Circuit Board  PCB which holds many of the crucial components of the system.Cpu, Ram, Video Card, NIC, Hard Drive, DVD Rom etc. is connected to the motherboard. A motherboard provides the electrical connections by which the other components of the system communicate. Unlike a backplane, it also connects the central processing unit and hosts other subsystems and devices.

Here is close look of a motherboard

MotherBoards are Aviable in different forms and Sizes but every board is different then other and every form has it on case for example you can fit BTX MotherBoard into a ATX case because BTX is large in size.

Form Factor

Form factor is great way of describing a motherboard’s size and shape, impoertan because it involves industry-wide standards and ties with the computer case and power supply unit PSU.The most common motherboard is ATX(Advanced Technology eXtended).

Motherboard Sizes

ATX             = 305mm X 244mm

MiniATX   = 284mm X 208mm

MicroATX =  244mm X 244mm

FlexATX    =  229mm X 191mm

Balanced Technology eXtended

BTX             =  265mm X 325mm

MicroBTX  = 267mm = 263mm

PicoBTX     = 267mm X 203mm

Here is close look of a ATX motherboard

And here is a close look of a BTX moterboard

Thats it i hope you have learn the basic  information about motherboard.

Storage Devices

In this topic we will discuss about Storage Devices and backup media which are as fallows

– HDD (hard Drive Disk)

  • Solid-State Disk
  • Magnetic Disk

-FDD (floppy Drive disk)

Optical Drives

  • CD
  • DVD
  • RW
  • blu-Ray

-Removable Stroage

  • Flash Drives(SD CARD, thumb drives, USB, Flash)
  • External CD-RW and hard-drive
  • Tape Drive
  • HOT & Non- Hot Swappable devices.

FDD (floppy Drive Disk)

in these days FDD does not use to much and they are very hard to fine Fdd comes in many different sizes and Memory the most popular is the 1.44 Megabytes (MB) an a 3.5 (90mm) disk.

some Computer have built in Floppy drive but some Computer dose not if you have floppy and you need to connect it with a modern Computer that dose not have a floppy drive then you will probably need a USB  floppy drive .in  floppy drive you can save data that are 1.44  MB in memory floppy drive contain magnetic disk to store data know a days people flash dive to store data in Gigabyte’s that why floppy drive are not use to much .


What is HDD ?

HDD (Hard-drive disk)

hard drive are used to store  an write data they are connected to mother Board or Main board operating System and programs are stored inside the hard drive they are 3 types of hard drive SATA & ATA, PATA, Scuzzy Drive  or SCSI Drive.

SATA (Serial Advanced Technology Attachment) & ATA

Modern computer use ATA drive to store large amount of data.

PATA or IDE Drive

PATA or IDE drive are old and not use to much in computer.

SCSI (Small Computer System interface)

SCSI drives offer faster data transfer speeds than it competitors ATA and IDE. Although ATA and IDE are common for desktop users, these drives do not offer as many features as SCSI which can foster the connection of multiple interfaces.

How Hard Drive Works ?

Hard drive is made of metal and it is very strong hard drive are tightly pack so no dust particles can get it hard drive contain a “platter” in which the data is stored this platter is a magnetic disk,data written and read by”head”,the “arm” move the head back and forth to write the data or read in the “platter”, the platter is move by “spindle” ,An “Actuator” is responsible for the move meant of the arm.So the spindle is spinning the platter and the actuator is reading  and writing  binary’s in the platter.Data are arrange in track in a platter,there are many track on a platter and track contain sectors a sector contain 512 byte’s of information there are million of sectors on a  platter, and those sectors make up the cluster.

SSD or Solid State Disk.

Solid state Disk is modern technology of storing data it is very fast and last longest then any other storing devices, a Solid State Disk contain Flash chips to store data,but hard drive use platter to store data solid state is much expensive the hard drive.

A hard Drive needs to know where to start the system it uses master boot record or MBR it is the first sector of the hard drive, in that tiny little sector boot signature and booting info stored it also contain info for your operating system for where to boot from,if your operating system does’t boot up then there is a problem in the MBR this problem can be fix by rewriting the MBR.

Optical Drives

CD or Compact disk are use to store data and to share it with others it is circular disk a cd has a storing capacity of 700mb.

DVD or Digital Versatile Disk  are used in the same way as CD but it can store a large amount of data as compare to cd. A dvd has a storing capacity of 4.4 Gb for Single layer and 8.5 Gb for dual layer.

Blu-ray Disk are used for sharing data but it has a lot of storage capacity a single layer blu-ray Disk has a storing capacity of 25 Gb and dual layer has a storing capacity of 50 is expensive then the other disk as it can store a large amount of data.

Removable Storage 

Removable Storage are very useful for storing data,we can store data in Flash Drive or Memory stick and can plug and remove from the system and can plug into another system.


SD card are very small in size and can store large amount of data they are commonly used in cell phones, cameras,audio devices etc SD card comes in many different shapes and also with different storage capacity.

External Hard-drive

External hard drive are very useful if you need to transfer data from one computer to another. External hard drive have a usb port and a power connection but there are also external hard drive multi adapter where a user can connect ide or sata into that adapter and then connect’s the hard drive or Disk Drive then plug-in a usb cable in to a computer it is very useful if you have a laptop.

Multi External Drive Adapter

Tape Drive

Tape Drive are very use full if you have large scale of data it commonly used in industry or company to store a huge amount of data a user can use a tape drive to copy or backup all the data of all the computer or server automatically at night so if something happens then user can recover that data it also store data in a encryption so other people can’t access the data,a tape drive contain a magnetic tape where the data is stored it can contain up to 16 ,32 or more tape disk so users’s can save a lot of data.

End of Storage Chapter