Search Blog Content

Sunday, January 1, 2012

Installing PHP and MySQL Database in Ubuntu



PHP (the acronym for PHP Hypertext Preprocessor) is a web-based programming language which has the ability to process data dynamically. PHP is said to be a server-side embedded scripting language because its syntax and commands that we provide in HTML pages or PHP pages will be fully executed by the server. Applications that are built using PHP in general will provide results on the web browser while the overall process executed on the server.
In principle, the server will work if there is a request from a client. In this case the client use URL to send a request to the server. When using PHP as a server-side embedded scripting language, the server will do the following things:
Read requests from the client / browser
Finding pages / page on the server
Perform the instructions provided by PHP to make modifications to the page / page.
Sending reload the page to the client via the internet or intranet.
Why PHP?
PHP can run on different platforms (Windows, Linux, Unix, etc.)
PHP is an open source web scripting
PHP easy to study
MySQL is a database processing program which is quite famous among web developer due to several factors or advantages:
Free license (open source), so as web developer does not need to worry about licensing issues.
Relatively small size of its data files.
Good Performance.
Easy operation with the several number of GUI (graphical user interface) based client programs make the user more easily in processing the data in mysql database systems.
The number of web hosting server support on the Internet that uses mysql as its DBMS.
Concurrent multi user, hot backups and cold backups/recovery.
To install PHP and MySQL on Ubuntu Desktop 11.10 is relatively easy. First we have to open the Synaptic Package Manager program via the menu button on the Ubuntu Unity. Then type in Synaptic and select or click on the program. Then you will be brought to the Synaptic program. If your Synaptic has not been synchronized with the Ubuntu repositories, then you must press the 'Reload' and wait a few minutes for the process of updating from the repository. After all the update process is complete, type 'php5' in the search box and then you'll be presented with a list of programs associated with php5. Look for a program called 'php5', 'php5-cli', 'php5-cgi' and 'php5-mysql' then right click on your choice and choose 'Mark for Installation'. Repeat these steps to install the program MySQL Server: 'mysql-server'. One more thing you need to do is select the program 'phpmyadmin'. This program is used to process batabase content to be used in a PHP program. After all necessary programs have been selected, click the 'Apply' button and the installation process will start soon. At the time of this installation process you will be asked to use the root password of the administrator of the MySQL database server.
For the installation php and mysql on Ubuntu Server that does not provide the program Synaptic GUI, then you can use the command line. All of the above programs can be installed using a single line of command line as follows:
prompt $ sudo apt-get install php5 php5-cli php5-cgi php5-mysql mysql-server phpmyadmin [enter]
To confirm, type Y and press enter. Then the installation process begins immediately and you will be asked what the password you'll use for the MySQL database server administrators.
After all the installation process is complete, you can try to access a MySQL database using PHPMyAdmin program. For those of you who use Ubuntu 11.10 Desktop, open the Mozilla Firefox program and access URL of localhost with subdirectory phpmyadmin address and then you will be taken to the login page MySQL database. Use the login information you created during the installation process.
For those of you who use Ubuntu 11.10 server, the easiest way to check if everything is going well is a way to access your server from another computer.Suppose your server's IP is then use another computer, open Firefox and open URL IP Address of server with subdirectory phpmyadmin. Next you will be taken to the login page of MySQL.
That is how to install PHP and MySQL program as well as supporting applications that phpMyAdmin in Ubuntu operating system which is pretty simple.
Tri Asih is a PHP Programmer at Tablet Computers 101
Article Source:

Article Source:

1 comment:

  1. Many thanks for making the truthful effort to explain this. I feel very strong about it and would like to read more. If you can, as you find out more in depth knowledge, would you mind posting more posts similar to this one with more information.
    hosting companies