Tutorial: Install Apache2, PHP5, MySQL, and PHPMyAdmin in Linux Ubuntu 12.04 LTS

Saturday, August 17, 2013

PHP is popular language for web programming, this language is free and can install on many operating systems: Windows, Linux, and MacOS. PHP can't run without Apache. What is Apache? 

Apache is web server to run a web application that can run on many operating systems (Unix, BSD, Linux, Windows, and MacOS). The protocol used to serve the facility web is using HTTP (Hyper Text Transfer Protocol).

Installation Apache, PHP, and MySQL not easy in Linux, different in Windows operating system, many bundle application for package Apache, PHP, and MySQL like Wamp or XAMPP. 

To manage MySQL, we can use PHPMyAdmin with GUI (Graphical User Interface) that easy to use.

In this article, we will to try install package Apache2, PHP5, MySQL and PHPMyAdmin in Ubuntu 12.04 LTS.


Step-by-step install package Apache2, PHP5, MySQL and PHPMyAdmin to make a web server and SQL server:
  1. Run the Terminal and type: sudo su
  2. Then install apache2 with the following command:
    apt-get install apache2
  3. Install the package PHP:
    apt-get install php5 libapache2-mod-php5
  4. Installation apache2 and php5 has been completed, please check with type localhost to web browser.
  5. Then install MySQL with this command:
    apt-get install mysql-server mysql-client
  6. Install support package to MySQL and PHP:
    apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
  7. Restart apache2:
    /etc/init.d/apache2 restart
  8. Install PHPMyAdmin:
    apt-get install phpmyadmin
  9. During process installation phpmyadmin, you must input password for login. Type password what you want.
  10. http://localhost/phpmyadmin NOT FOUND, so you must share phpmyadmin directory to /var/www with this way:
    ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin
  11. And the last step, reload apache2 with type this command:
    /etc/init.d/apache2 reload
  12. Installation Apache2, PHP5, MySQL, and PHPMyAdmin has been completed.

No comments :

Post a Comment

 

Search This Blog

Follow My Twitter

Archives