Figure-LAMP
UseApt-getBuildLAMPEnvironment Basics
If you are installing it on the local machine for testing, it is best to ensure that the hosts content is as follows:
Username @ ubuntu :~ $ Cat/etc/hosts
127.0.0.1 localhost
[Edit] install
[Edit] install LAMP
1. Careful manual installation (minimum components)
Sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
Some of them are automatically installed because of dependencies, but they are more suitable for insurance purposes. At the beginning of installation, sudo will ask you for the password (only possible), which is the password of the system administrator. During installation, MySQL requires a password for the account, which is irrelevant to the operating system.
2. Lazy Installation Method
Select edit in the new software package manager -- mark the software package with the Task Group
In the displayed window, select lamp server and click OK.
Click the green check mark application button in the main window.
Okay. The next step is to wait... until the new version is automatically downloaded and installed. During installation, MySQL requires a password for the account, which is irrelevant to the operating system.
Sudo apt-get install apache2 mysql-server php5 php5-mysql # terminal command
Open http: // localhost
Apache default page
[Edit] install phpmyadmin
In fact, this is also a security risk. We recommend that you use openssh to manage servers.
Solution 1: run commands on the terminal (not recommended)
Sudo apt-get install phpmyadmin
Solution 2:
We strongly recommend that you do not install it from the source
Download the software package from the phpmyadmin website and decompress it to the local directory/var/www/phpmyadmin.
Tips: If you need to decompress it directly to/var/www/phpmyadmin. If phpmyadmin does not exist, create it by yourself.
Run
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
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cooker ';
$ Cfg ['servers'] [$ I] ['host'] = 'localhost ';
$ Cfg ['servers'] [$ I] ['connect _ type'] = 'tcp ';
$ Cfg ['servers'] [$ I] ['compus'] = 'false ';
$ Cfg ['servers'] [$ I] ['extension'] = 'mysql ';
Save and exit
Install php5-mcrypt
Sudo apt-get install php5-mcrypt