Install LAMP, phpmyadmin, and adminer in Ubuntu

Source: Internet
Author: User
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 sudoapt-getinstallapache23. if you do not have sudo permission, you must enter... 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. Step 3. save and exit. Step 4. open the browser and check the content we just created. Enter the following URL. http://localhost If/testphp. php displays the PHP information page, 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 entered http://localhost /Phpmyadmin page. 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. 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
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.