Ubuntu Build Lamp Environment

Source: Internet
Author: User
Tags phpmyadmin

Lamp Build Environment

Created Tuesday 300 Months 2012

installation process

First Step installation Apache2

sudo apt-get install apache2 second Step installing PHP module
sudo apt-get install php5 third step installing MySQL
sudo apt-get install Mysql-server
sudo apt-get install mysql-client Fourth Step other module installation
sudo apt-get install LIBAPACHE2-MOD-PHP5
sudo apt-get install Libapache2-mod-auth-mysql
sudo apt-get install Php5-mysql
sudo apt-get install PHP5-GD Fifth Step test Apache is working properly
Open the browser and enter localhost to see if there is an IT works! page display. Directory is the sixth step of/var/www Modify permissions/var/www
sudo chomod 777/var/www Seventh Step installation phpMyAdmin
sudo apt-get install phpMyAdmin
Select Apache2 during the installation process and click OK. The next option is to configure the database and enter the password. Eighth Step Test phpMyAdmin
sudo ln-s/usr/share/phpmyadmin/var/www
Then run http://localhost/phpmyadmin directly to see if there is any database management software appearing. Configuration process

First step enabling the Mod_rewrite module

sudo a2enmod rewrite
Restart Apache server: sudo/etc/init.d/apache2 restart or sudo service apache2 Restart the second step of setting Apache support. htm. html. php
sudo gedit/etc/apache2/apache2.conf&
Add the following sentence: AddType application/x-httpd-php. php. htm. html third Step Test PHP Web page
Edit the mysql_test.php code as follows:
<?php$link = mysql_connect ("localhost", "root", "password");
if (! $link) die (' Could not connect: '. Mysql_error ()); Elseecho "MySQL configuration is correct!"; Mysql_close ($link);? >
Access http://localhost/mysql_test.php display ' MySQL is configured correctly ' on behalf of the correct configuration. Fourth step third step here appeared garbled after solution
Open config file sudo gedit/etc/apache2/apache2.conf&
Add the following code: Adddefaultcharset UTF-8. Configure OK.
Top
6

Ubuntu Build Lamp Environment

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.