Ubuntu Build Lamp Platform

Source: Internet
Author: User



Ubuntu Build Lamp Platform

$ sudo apt-get install apache2

$ sudo apt-get install mysql-server-5.5 (root password arbitrary, such as: 123456)

$ sudo apt-get install PHP5

$ sudo apt-get install LIBAPACHE2-MOD-PHP5 (Solve Apache identification PHP page)

$ sudo apt-get install php5-mysql (fix PHP connection mysql)


$ sudo ls/etc/php5/conf.d/(ensure that the directory has Mysqli.ini, Mysql.ini, Pdo.ini, pdo_mysql.ini files, if it is copied to the directory under other paths)

$ sudo service apache2 restart


Verify:

$ sudo vi/var/www/test.php

<?php
Phpinfo ();
?>

: Wq


$ sudo vi/var/www/mysql.php

<?php
$db = mysql_connect ("localhost", "root", "123456") or Die ("fail");

echo "Connect ok!<br>"
?>

: Wq


Visit http://localhost/test.php http://localhost/mysql.php



This article from "Linux" blog, declined reprint!

Ubuntu Build Lamp Platform

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.