Setting up a lamp frame under Ubuntu

Source: Internet
Author: User
Tags phpinfo phpmyadmin

---restore content starts---

sudo apt-get install update

Su Root

1. Install MySQL

sudo apt-get install mysql-server mysql-client

2. Install PHP

sudo add-apt-repository ppa:Ondrej/php5 sudo apt-get update sudo apt -Get
sudo apt-get install php5
This is a post-installation upgrade.

3, Installation Apache2

sudo apt-get install apache2

Test after installation, enter http://localhost/or HTTP://127.0.0.1/in the browser

If an "It works!" appears, you've made it.

4. Let Apache support PHP

sudo apt-get install php5 libapache2-mod-php5

If this step is not installed, open a PHP page that lets you download the file instead of opening it in the browser

Restart Apache server after installation is complete

Sudo/etc/init.d/apache2 restart

5. Check if you can open PHP file

Then go to Apache's www folder (default in/Var), create the phpinfo.php file

Cd/var/www

Ls

VI phpinfo.php

and write it in the phpinfo.php file.

<?php

Phpinfo ();

?>

Save, open http://localhost/phpinfo.php, you can see the information of PHP

6, install the corresponding other modules PHP

sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5- Ming Php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

After the visit, we open http://localhost/phpinfo.php again, we can see some other phpinfo information

7, Installation phpMyAdmin

sudo apt-get install phpMyAdmin

Since the default phpmyadmin is in/usr/share/phpmyadmin/, we will move to/var/www below

Mv/usr/share/phpmyadmin/var/www

If you are lucky, you can see the phpMyAdmin page, if there is a lack of mysqli extension information, we can solve the problem by the way

Modify in/etc/php5/apache2/php.ini

; Extension=php_mysqli.dll

Remove the preceding semicolon, and then restart Apache to be OK.





---restore content ends---

Setting up a lamp frame under Ubuntu

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.