Ubuntu under the lamp (linux+apache+mysql+php) development environment of the building

Source: Internet
Author: User

Lamp is a very popular word in the industry. This 4 letter represents Linux. Apache,mysql and PHP.

Lamp's efficient and flexible features have become the first choice for small and medium enterprises.

It has launched a fast road to build lamp.


1 Open terminal in Ubuntu, enter

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

One breath to download (apache2,php5,mysql) three tools


2 install MySQL, will let you set a root administrator's password, enter 2 times, select OK to


3 安装完毕以后打开浏览器输入,localhost或者127.0.0.1,回车

It Works will appear, the installation has been successful


4 Create a PHP test file my.php, stored in the Apache home folder location, the home folder location can be set in the file (/etc/apache2/sites-enabled/000-default.conf),


My home folder is/homt/timothy/workspace/web

sudo touch /home/timothy/workspace/web/my.php

sudo gedit/home/timothy/workspace/web/my.php

写入 

<?

Php

Phpinfo ();

?

>

Save



5 Interview with http://localhost/test.php or http://127.0.0.1/test.php



Assume that a page appears on the

Forbidden

You don ' t have permission to access

, you can view the apache2.conf file

sudo gedit/etc/apache2/apache2.conf

Make sure the configuration is correct

<Directory/home/timothy/workspace/web>
Options FollowSymLinks
AllowOverride None
</Directory>

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Ubuntu under the lamp (linux+apache+mysql+php) development environment of the building

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.