Many problems encountered during LAMP installation, phpmyadmin and adminer installation in Ubuntu are recorded here one by one to open the terminal and enter the command line. 1. install Apache1. open the Terminal 2. Enter the following command sudo apt-get install apache2 3. If you do not have sudo permission, enter the password. 2. Test Apache to determine whether the installation is successful. 1. Open your browser and enter the following url: http: // localhost/if It succeeds, you will see the following content: "It works! "Congratulations, the first step is that you are going out. 3. install PHP5Step 1. open the terminal (ctrl + alt + T ). step 2. enter the following command line: sudo apt-get install php5 libapache2-mod-php5 Step 3. to make PHP and Apache work together, we need to configure PHP and test it. Sudo/etc/init. d/apache2 restart 4. test PHPStep 1. create a PHP test file (phptest. php), enter the following content: sudo gedit/var/www/testphp. php Step 2. in this case, we will open a text editor and enter the following content. <? Php phpinfo ();?> Step 3. Save and exit. Step 4. Open the browser and check the content we just created. Enter the following URL. Http: // localhost/testphp. php if the PHP information page is displayed, it means that you have succeeded in a small step. 5. Install MySQL. Next, we will install MySQL 5 (this is the last step, which is also a much more troublesome step. Pay attention to it during installation .) Step 1. Open the terminal again and enter the following content. Sudo apt-get install mysql-server Step 2. During installation, enter the Mysql password if required. If no requirements are required, perform the next step. Enter the following command in the terminal. Mysql-u root later, you need to enter the following content; mysql> set password for 'root' @ 'localhost' = PASSWORD ('yourpassword '); the above 'root' is your Mysql user name, And 'yourpassword' is your new password. Step 3. next we will deal with the more difficult phpmyadmin. The common problem here is that phpmyadmin is installed but the management interface is not displayed when http: // localhost/phpmyadmin is entered, the page is not found. Don't worry. We have installed phpmyadmin first and then solved it. Run the following command: sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin here phpmyadmin is compatible with the php5 we installed earlier, if you installed PHP and phpmyadmin does not match, they do not work. Step 4. Now let's solve the problem of "not working" phpmyadmin. After installing phpmyadmin, do not think everything is ready. In fact, we have another task to complete, that is, to configure phpmyadmin and apache2. Enter cp/etc/phpmyadmin/apache on the same terminal. conf/etc/apache2/sites-available/phpmyadmin so that we can put apache in phpmyadmin. copy the conf (apache configuration file) to the phpmyadmin file under apache2/sites-available. Step 5. enter the following information to go to the sites-enabled Folder: cd/etc/apache2/sites-enabled/Step 6. after entering, we need to establish a link to the configuration file so that we can use it. Input: sudo ln-s ../sites-available/phpmyadmin Step 7. restart apache2 sudo/etc/init. d/apache2 restart. Open http: // localhost/phpmyadmin and try it out. So far, our LAMP configuration has completely ended, and I hope it will help you. It can also be solved when apache2 and php5 are installed, mainly because of the software source problem. It is okay to set the software source as the master server and install mysql-server, however, phpmyadmin always shows that the software package cannot be found, and it is difficult to change the software source. You can only manually download and install phpmyadmin 6. install phpmyadmin and download the phpmyadmin package from the official website. Download the package and move it to/var/www/. decompress the package and change it to phpmyadmin 1. Download phpmyadmin from the latest version, decompress phpmyadmin 2 and set phpmyadmin permission to drwxr-xr-x, move to the bottom of the/usr/share/folder. 3. Create a connection to sudo ln-s/usr/share/phpmyadmin under/var/www.
7. Installing admineradminer is a PHP file, which is downloaded from http://www.adminer.org/and stored in /var/www /. For example, create a new adminer folder in/var/www, put the downloaded adminer-3.5.1.php or other versions into this folder, then access http: // localhost/adminer/, click the PHP File