Configure PHP, Apache, and MySQL in Ubuntu

Source: Internet
Author: User

Su1. Install SSH (required)

Sudo apt-Get Install SSH

2. Install MySQL (although the latest version is 5.1, only MySQL 5.0 can be installed)

Sudo apt-Get install mysql-server-5.0

3. install Apache

Sudo apt-Get install apache2

4. install PHP

Sudo apt-Get install PhP5 libapache2-mod-php5
Sudo apt-Get install libapache2-mod-auth-mysql
Sudo apt-Get install php5-mysql
Sudo apt-Get install php5-gd

Configure PHP. ini:
Sudo gedit/etc/PhP5/apache2/PHP. ini
Put the file behind the file:
# Extension = mysql. So
# Extension = Gd. So
.

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

Sudo/etc/init. d/apache2 restart

6. Install phpMyAdmin

Sudo apt-Get install phpMyAdmin

7. simple configuration

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)

8. log on to the root account in English and change the Chinese version.

In the vi. profile file

Lang = C
Language = C

Changed:

Lang = "zh_CN.UTF-8"
Language = "zh_cn: ZH"

The above operations should be performed under the root account as much as possible

Use the terminal sudo Su as the root user

9. log on to Ubuntu with Root

Sudo VI/etc/TPD. conf

Change allowroot = on

 

10. InstallPhpMyAdminCommand:

Sudo apt-Get installPhpMyAdmin
Installed in/usr/share/by default/PhpMyAdmin
Make a link to the/var/www/directory and run the following command: sudo ln-S/usr/share/PhpMyAdmin// Var/www/
Use http: // localhost/PhpMyAdminThat is, access is allowed.

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.