Linux Ubuntu lamp installation and configuration

Source: Internet
Author: User
Tags fully qualified domain name

Lamp (Linux + Apache + MySQL + PERL/PHP/Python) is an open Resource Network Development Platform Based on Linux, Apache, MySQL, and PHP. It is hailed as a golden combination of php development.

1. Ubuntu
Install the lamp component in the environment
System-> System Management-> New Software Package Manager, open new software package, edit-> MARK software package by Task Group-> select lamp server.

(After you reinstall Ubuntu to the latest version of ubuntu10.10, you have not set up the Software Package Manager in the new software package manager.-edit-use the task tag group package --

Actually, only two commands are required.

Sudo apt-Get install tasksel

Task tag group

Sudo tasksel install lamp-Server

)

 

2. Install phpMyAdmin
System-> System Management-> New Software Package Manager, open the new software package search phpMyAdmin, and mark the installation.
Or sudo
Apt-Get install phpMyAdmin
Create a hard connection between phpMyAdmin and apache2. For example, run the command: sudo ln in the/home/dreamcatcher/WWW directory of my www.
-S/usr/share/phpMyAdmin
/Home/dreamcatcher/WWW can open http: // localhost/phpMyAdmin in the address bar of the browser.

3. Enable mod_rewrite module
Sudo a2enmod rewrite

4. apachesupports .htm. html. php
Sudo gedit/etc/apache2/apache2.conf
Add
Addtype application/X-httpd-PHP. php. htm. html
Solve the Problem of Garbled text in Firefox, or this file, and add
Adddefacharcharset UTF-8
Here the UTF-8 can also be replaced by gb2312 according to the actual situation.

5. Restart Apache
Sudo/etc/init. d/apache2 restart
6. Start MYSQL: mysql-u root-P. Enter the password as prompted.
If:
* Restarting Web Server apache2
Apache2: cocould not reliably determine the server's fully qualified domain name, using 127.0.1.1 for servername
Apache2: cocould not reliably determine the server's fully qualified domain name, using 127.0.1.1 for servername

Continue sudo gedit/etc/apache2/apache2.conf
Add servername 127.0.0.1 to the end of the file.

Note: Remember the following commands and locations:

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/cgi-bin/(CGIProgram)

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.