Install and configure apache2 + php5 + mysql in Ubuntu

Source: Internet
Author: User
1. Install apache2 + php5 + mysqlsudoapt-getinstallapache2php5-mysqllibapache2-mod-php5mysql-server 2. Set mysql password mysqladmin-urootpassword new password 3. Install phpmyadminsudoapt-getinstallphpmyadmin test: http: // localhos 1. Install apache2 + php5 + mysql
Sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

Ii. Set the mysql password
Mysqladmin-u root password New password

3. Install phpmyadmin
Sudo apt-get install phpmyadmin
Test: http: // localhost/phpmyadmin/

4. Other operations:
Edit test page :( )
Sudo gedit/var/www/testphp. php

Start Apache
$ Sudo/usr/sbin/apache2ctl start
Stop Apache
$ Sudo/usr/sbin/apache2ctl stop
Restart Apache
$ Sudo/etc/init. d/apache2 restart

To enhance security for local development only, set as follows:
$ Gksudo "gedit/etc/apache2/ports. conf"
$ Password:
Change ports. conf
Listen 127.0.0.1: 80
Save the file and restart apache. In this case, Apache can be accessed only through 127.0.0.1.

What I want to say: I still like to download the package and configure the environment by myself. It is difficult and time-consuming, but there are a lot of online materials and there will be no problems that cannot be solved. I don't like Ubuntu. Apache2 after a tar.gz package was downloaded, installed on its own, and the test was completed successfully. Today, the above items are installed in the New Software Package Manager (lazy, you have to change it. I have a cleanliness for my computer, and I want to delete anything I can't use. Hey, delete it.
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.