Lamp + phpMyAdmin installation and Setup

Source: Internet
Author: User
Tags php and mysql

Install lamp:

New --> edit --> use the task group to mark the software package --> hook "lamp server" and install it again.

Add the following in Apache. conf:

$ Sudo gedit/etc/apache2/apache2.conf

Add (last added ):

Addtype application/X-httpd-PHP. php. htm. html

Addtype application/X-httpd-PHP-source. PHPs

Add the following content to PhP. ini to make PHP and MySQL work together:

$ Sudo gedit/etc/PhP5/apache2/PHP. ini

Add the following in dynamic extension:

Extension = mysql. So

Extension = Gd. So

Test whether MySQL has been installed:

$ Mysqladmin-u Root Password New Password

Command Line Logon:

$ Mysql-u root-P

Enter password:

Welcome to the MySQL monitor.

....

Mysql>

The MySQL installation is successful.

Test the combination of MySQL and PHP:

Create a new file, new. php, and place it in the/var/www/directory. The file content is as follows:

View plaincopy to clipboardprint?
<HTML>
<Head>
<Title>
Test PhP5
</Title>
<Body>
<? PHP phpinfo ();?>
</Body>
</Html>
<HTML>
<Head>
<Title>
Test PhP5
</Title>
<Body>
<? PHP phpinfo ();?>
</Body>
</Html>

Enter http: // 127.0.0.1/New. php or http: // localhost/New. php in the browser.

Install phpMyAdmin:

$ Sudo apt-Get install phpMyAdmin

PhpMyAdmin is installed in/usr/share/phpMyAdmin by default.

Make a link to the/usr/www/directory:

$ Sudo ln-S/usr/share/phpMyAdmin // usr/www/

Test:

Http: // 127.0.0.1/phpMyAdmin or http: // localhost/phpMyAdmin

Log on to the MySQL root account and password.

================= Reference ======================================== ============================================

Http://hi.baidu.com/qxf996/blog/item/6b534d54ffb8cc52564e0086.html

Install Apache: sudo apt-Get install apache2

Install PHP: sudo apt-Get install PhP5

Sudo apt-Get install php5-mysql

Install MYSQL: sudo apt-Get install mysql-server mysql-Client

Install phpgd Library: $ sudo apt-Get install php5-gd ####

Create a PHP file in the root directory: sudo gedit/var/www/testphp. php

To make PHP and MySQL work together, Edit
Sudo gedit/etc/PhP5/apache2/PHP. ini
Uncomment; Extension = mysql. So
Install the phpMyAdmin command:

Sudo apt-Get install phpMyAdmin
Installed in/usr/share/phpMyAdmin by default
Make a link to the/var/www/directory and run the following command: sudo ln-S/usr/share/phpMyAdmin // var/www/
You can use http: // localhost/phpMyAdmin to access it.

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/stamhe/archive/2009/02/23/3919556.aspx

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.