Configure LAMP + phpadmin on ubuntu

Source: Internet
Author: User
Ubuntu configuration LAMP + phpadmin with ubuntu install lamp is simple: build LAMP: sudoapt-getinstallapache2php5-mysqllibapache2-mod-php5mysql-server in the address bar input: http: // localhos ubuntu configure LAMP + phpadmin

Installing lamp with ubuntu is simple:

Build LAMP:

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

Enter http: // localhost in the address bar. when It works appears! It indicates that our environment has been set up!

?

Then install phpadmin:

?? Download the software package from the phpmyadmin website and decompress it to the local directory/var/www/phpmyadmin. if you want to decompress it directly to/var/www/phpmyadmin, if phpmyadmin does not exist, create and run it on the terminal.

sudo cp /var/www/phpmyadmin/config.sample.inc.php /var/www/phpmyadmin/config.inc.php
?
sudo gedit /var/www/phpmyadmin/config.inc.php
?

Find blowfish_secret and fill in any letter behind it:

$cfg['Servers'][$i]['auth_type']='cookie';$cfg['Servers'][$i]['host']='localhost';$cfg['Servers'][$i]['connect_type']='tcp';$cfg['Servers'][$i]['compress']='false';$cfg['Servers'][$i]['extension']='mysql';

? Save and exit!

?

For more information about ubuntu, see:

?

Configuration file path:

1> apache configuration file path/etc/apache2/apache2.conf

2> apache website character encoding configuration path/etc/apache2/conf. d/charset

3> php. ini path/etc/php5/apache2/php. ini

4> mysql configuration file path/etc/mysql/my. cnfDo not use it, especially for beginners.

5> phpmyadmin configuration file path/etc/phpmyadmin/apache. conf

6> default website root directory/var/www

?

Common Commands


1. restart apache:

sudo /etc/init.d/apache2 restart

? 2. restart mysql:

sudo /etc/init.d/mysql restart
? Configure apache

1. change the default character set
Use commands in the terminal

sudo nano /etc/apache2/conf.d/charset 

? Replace the following:

# AddDefaultCharset 

? The well number removed, the following field is changed to UTF-8 (if your website is like this)

AddDefaultCharset     UTF-8 

? The number of spaces in the middle is not important, but must exist.

?

2. add the supported file types (not required), and the website address (required)

Use the following command in the terminal:

sudo nano /etc/apache2/apache2.conf

? Add the following lines at the end of the configuration file: support for adding File types

AddType application/x-httpd-php .php .htm .html

? The order of adding the three homepage files can be changed to the previous access priority (of course, you can also add other settings such as default. php)

 
  DirectoryIndex index.htm index.html index.php
 

Its specific information reference: http://wiki.ubuntu.org.cn/index.php? Title = LAMP _ % E6 % 9C % 8D % E5 % 8A % A1 % E5 % 99% A8 % E5 % AE % 89% E8 % A3 % 85% E9 % 85% 8D % E7 % BD % AE & variant = zh-cn #. e5.9F. BA. e7.A1.80

?

?

?

?

?

?

?

?

?

?

?

?

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.