Install apache2 + php5 + mysql in Ubuntu

Source: Internet
Author: User
1. Install the runtime environment sudoapt-getinstallapache2sudoapt-getinstallmysql-serversudoapt-getinstallphp5-commonsudoapt-getinstallphp5-gdsudoapt-getinstallphp5-mysqlsudoapt-getinstalllibapache2-mod-ph 1. Install the runtime environment
Sudo apt-get install apache2
Sudo apt-get install mysql-server
Sudo apt-get install php5-common
Sudo apt-get install php5-gd
Sudo apt-get install php5-mysql
Sudo apt-get install libapache2-mod-php5

2. Configure php5

Sudo gedit/etc/php5/apache2/php. ini
Modify the maximum memory usage allowed.

Memory_limit = 8 M
Change

Memory_limit = 32 M
Modify the maximum size allowed for upload and search

Upload_max_filesize = 2 M
Change

Upload_max_filesize = 8 M
Allow the mysql and gd modules to check whether the file finally contains the following code, if not added. (It is added at the end of the configuration file by default. Check it just in case)

Extension = mysql. so

Extension = gd. so
Save and close the file.

3. Configure mysql to support access from other clients. You do not need to modify it if you do not need it.

Sudo gedit/etc/mysql/my. cnf
Search for files

Skip-networking
Change

# Skip-networking
Save and close the file.

Restart mysql

Sudo/etc/init. d/mysql restart
Insert other clients to access the user (because the default account is root @ localhost, but the client uses root @ localhost. localdomain to log on)

Mysql-u root-e "grant all privileges on *. * TO root@localhost.localdomain
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.