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.

Ubuntu-2012-12-01-23-31-13

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.

Ubuntu-2012-12-01-23-37-38

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.

Ubuntu-2012-12-02-00-01-34

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.

Ubuntu-2012-12-02-00-10-59

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

Ubuntu-2012-12-02-00-15-42

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.

Ubuntu-2012-12-02-00-21-29

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.

Ubuntu-2012-12-02-00-42-45

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.

Ubuntu-2012-12-02-01-02-24

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.

Ubuntu-2012-12-02-01-00-59

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

Ubuntu-2012-12-02-00-47-07

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.

Ubuntu-2012-12-02-01-09-56

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

How to use my MySQL Server”Basics”

MySQL is a database to store the user information MySQL is free and Opensource  it is very easy to use,SQl stand for “structure query language.”

What is Database ?

This is one of the hardest topic to define but i will enplane you as easy as possible lets go, imagine an excel sheet on your mind then divide them into rows and columns and give the row a name like a,b,c,d and give the columns 1,2,3,4 then i want you to store “apple” in a1 if you did it then when you need a apple you would go to a1. this is like an array where the data is stores in specific memory and then pointing that memory to access that data.if you understand this then you know what is a database, a database is used to store large amount of data then application or web pages  use that database to access that data,a user can store there picture,music in a database a user can also password protect the data in a database.

How to install Mysql ?

To install MySQL Server on a windows here is the process you can choose your platform.

  • Download MySQL by visiting here .
  • Download the MySQL windows installer.
  • after Downloading install it on the computer.
  • Locate the directory where MySQL is installed and open it up.

after the above process it would open a console window ,type in password if you have entered any  in the installation process.so lets get started to use MySQL first enter the “help” command basically it will print the list of MySQL commands. To see the Databases enter this command “show databases;”   remember to put semi-colon at the end of the command or statement because it means the command or statement has ended.after typing this command you will see some databases that are created to use these databases we will use the “use” command and the name of the database(e.g. use test).to see tables inside the database we will use the “show tables;” remember we are using the test database, To see which database are you using use the “status;” command to see the current status of the database.under the current database you can see your current database that you are using.this command also shows which database server are you using which TCP port are you using and many more things.to create a database we will use “create database” command and the name of the database (e.g.”create database hello;”) this will create a hello database to see your database type the “show databases” command,To delete a database we will use the “drop database” command and the name of the database(e.g.”drop database hello“)this will completely remove every thing of the database that you have chosen remember to use this command with caution.to use our database that we have created we will then again use the “use” command.Let’s create a Table if you don’t know what is a table you can think of this way think a folder is a database and the files inside that folder are tables,to create a table we will use the ‘create’ command,(e.g.”create table infor (name varchar(25), address varchar(100), age int, pnumber varchar(12));”)so it will create a fields named info and inside that it will create varchar(variable character) which is 25 character long and it will create another varchar which is 100 character long then  int(integer) age and then varchar which is 12 character long.to see your tables that you have created type the “show tables” command it will the show your tables.if you want to see the content of  the infor table use the “describe” command and the name of the table(e.g.”describe infor;”)to erase a table we will use the “drop” command and the name of the table(e.g.”drop table infor”).to insert something in to a table for example our name, address etc.. we will use the “insert into” command and the name of the table.(e.g.”insert into infor values (“sik”, ” fake address”, 14, “5555-555-103”); “) remember string would be in quotes.after that we will select every thing using the “select * from” command and the name of the table(e.g.”select * from infor“) it will basically select every thing from infor table that is inside the “hello” database.if you want to see only address not the name and any other fields the we will use “select”command name of the field and the table name (e.g.”select address from infor”)it will echo the address that is stored in infor.to delete something from the table we will use the “delete from” command and table name then we will type “where” and the name of the field which is equal to content in the field.(e.g.”delete from infro where address=” fake address”).then enter this command “select * from infor” to see if the fake address has deleted or not.

End of MySQL Basics.

How to earn Money Online as a Freelancer

If you are an expert in your field and want to earn money in your spare time or you can work all day by sitting on the computer doing their work from home well there are way some company offer an online freelancer jobs opportunity so people can do work in their home.

How does it Work?

Lets suppose you a task and you don’t know how to do it or you may not have that much time “what ever the case is” so you post your tasks  so other can do your work and earn some money with it. There are a lot of people that will be willing to work to earn some money.

Which is the best Company For a freelance Jobs ?

The best Company the one I use are as fallows

ODesk

ODesk Is the one of the easiest and reliable Freelance jobs Website offers all kinds of jobs so people can start making money, if you want to make some easy money in some spare time choose Data-entry  because it is one the most easiest job to get around.Odesk Support all kinds of payment methods. visit Odesk

Elance

Elance is an another reliable freelance jobs website that I have use it also support all kind of  jobs to earn money right away,Elance support all kind of payment methods. visit Elance

Scrip-lance

If you are a programmer and want to do work online and earn some extra money then this website is best. There are a lot of programming jobs posted every day so people can start doing work.visit Scriplance

What do you need to get a job easily ?

To get a job on these websites a user must need to complete its profile and start to some test before they get started a test is about 40 or 30 minutes which may have 40 or 30 or more multiple choice Question in one or more may be correct there are all kinds of test according to your field for example if you are expert in web designing you can attend a web designing test .After the test you get a score if you do  good then your score would be higher then, there are more chances that you will get the work much faster,after doing someone’s work you will get a feedback about how you did the work,if  you have good feedback then there are much more chances the you will get the work.Try to create a attractive portfolio so people know how you do your work .