Install Apache + PHP + MySQL in Ubuntu

Source: Internet
Author: User
Tags apache php
InstallSSHClientandServer (formyremoteaccess): sudoapt-getinstallsshInstallDatabaseServer: sudoapt-getinstallmysql-server-5.0InstallApacheHTTPServer: sudoapt-getins

Install SSH Client and Server (for my remote access ):
Sudo apt-get install ssh


Install Database Server:
Sudo apt-get install mysql-server-5.0


Install Apache HTTP Server:
Sudo apt-get install apache2


Install PHP 5 and Apache PHP 5 module:
Sudo apt-get install php5 libapache2-mod-php5

Restart Apache:
Sudo/etc/init. d/apache2 restart


Optionally, install php MyAdmin:
Sudo apt-get install phpmyadmin

On the windows page, whether it is a collection of environment packages such as app-server or LAMP, phpmyadmin is automatically included after the installation is complete. However, in Ubuntu, We need to install phpmyadmin one by one, how can I enable phpmyadmin to work properly.
1. # sudo apt-get install phpmyadmin
PS: You will find that accessing http: // localhost/phpmyadmin is not easy to use
2. # sudo ln-s/usr/share/phpmyadmin // var/www/
To install the above method, we can establish a soft connection, or you can copy phpmyadmin directly to the/var/www/folder.
Phpmyadmin can be used normally under Ubuntu.
The default delimiter name is root.
On the windows page, whether it is a collection of environment packages such as app-server or LAMP, phpmyadmin is automatically included after the installation is complete. However, in Ubuntu, We need to install phpmyadmin one by one, how can I enable phpmyadmin to work properly.
1. # sudo apt-get install phpmyadmin
PS: You will find that accessing http: // localhost/phpmyadmin is not easy to use
2. # sudo ln-s/usr/share/phpmyadmin // var/www/
To install the above method, we can establish a soft connection, or you can copy phpmyadmin directly to the/var/www/folder.
Phpmyadmin can be used normally under Ubuntu.
The default delimiter name is root.

Enjoy!

How is it? Easy! In addition to the download time, it will take less than one minute to complete the configuration. Do I still need an APM package on Ubuntu? Remember the following commands and positions.

Sudo/etc/init. d/apache2 restart (restart apache)
Sudo gedit/etc/php5/apache2/php. ini (configure php. ini)
Sudo gedit/etc/apache2/apache2.conf (configure apache2.conf)
/Var/www/(home directory location)
Sudo/etc/init. d/apache2 restart (restart apache)
Sudo gedit/etc/php5/apache2/php. ini (configure php. ini)
Sudo gedit/etc/apache2/apache2.conf (configure apache2.conf)
/Var/www/(home directory location)


Important files

View plaincopy to clipboardprint?
Sudo/etc/init. d/apache2 restart (restart apache)
Sudo vim/etc/php5/apache2/php. ini (configure php. ini)
Sudo vim/etc/apache2/apache2.conf (configure apache2.conf)
/Var/www/(put The apache2 webpage file here)
/Var/lib/mysql/(put the mysql database here)
Sudo/etc/init. d/apache2 restart (restart apache)
Sudo vim/etc/php5/apache2/php. ini (configure php. ini)
Sudo vim/etc/apache2/apache2.conf (configure apache2.conf)
/Var/www/(put The apache2 webpage file here)
/Var/lib/mysql/(put the mysql database here)

View plaincopy to clipboardprint?
In ubuntu, http. conf is empty by default.
The configuration file for a specific site is in the/etc/apache2/sites-enabled/folder.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.