Ubuntu Configuration lamp Run Environment note

Source: Internet
Author: User
Tags fully qualified domain name

Step 1 Installation Lamp

sudo apt-get install lamp-server^

STEP2 Configuring the Apache Environment

/* Set default directory */

In systems such as CentOS, Apache profiles are typically/etc/httpd/conf/httpd.conf

In the Debian system, the configuration file is/etc/apache2/sites-enabled/000-default.conf

Edit the DocumentRoot in this file to set the default directory

After that reboot the Apache command is: sudo/etc/init.d/apache2 Restart (obviously also start and stop)

Will find an error: Could not reliably determine the server ' s fully qualified domain name, using 127.0.1.1. Set the ' ServerName ' directive globally to suppress this message

Because, Apache server can not determine the host domain name, so replace with IP127.0.1.1, the solution in the CentOS system add servername localhost:80 can, in the Debian system, looking for/etc/apache2/s Ites-available/default Add ServerName 127.0.0.1 at the top.

/* Set default home page */

In CentOS, find the DirectoryIndex in httpd.conf and change it to DirectoryIndex index.php index. HTML index.html This way, the default home page of your site directory is index.php, if no index.php system will automatically look for index.html, HTML.

STEP3 Installation phpMyAdmin

sudo apt-get install phpMyAdmin

phpMyAdmin generally installed in the/usr/share only, at this time, you must use a soft link, first switch to the root directory of our settings, and then sudo ln-s/usr/share/phpmyadmin phpmyadmin can be.

Ubuntu Configuration lamp Run Environment note

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.