接下来安装PHP5和Apache的ph">
First install the Apache Web server, terminal: sudo apt-get install apache2 apache2-doc, and then test whether the installation is successful. Enter: http://localhost in the browser address bar and press Enter. If the content shown in the picture below appears, it means success!
Next install PHP5 and Apache’s php module, terminal: sudo apt-get install php5 libapache2-mod-php5. Restart the Apache service to make the php module take effect. Terminal: sudo service apache2 restart. To test whether php5 is installed successfully, first edit a test file, terminal: sudo vim /var/www/html/phpinfo.php, enter the following content:
[php] view plaincopy
Save, and then enter: http://localhost/phpinfo.php in the browser address bar. When the content as shown in the picture appears, the installation is successful!
Install MySql database, terminal: sudo apt-get install mysql-server mysql-client, the installation process will prompt you to set a password, set one and remember it!
Then install the mysql interface to manage phpmyadmin. Terminal: sudo apt-get install phpmyadmin. During the installation process, you will be prompted to select the web server, select apache, and press Enter. You will also be prompted. Set a password! After phpmyadmin is installed, it is not in the default path of apache. You need to establish a connection. Terminal: sudo ln -s /usr/share/phpmyadmin /var/www/html. Restart the apache server. Open the browser: http://localhost/ phpmyadmin, if the login page shown below appears, the installation is successful!
Enter the password you just set and click 'Execute' in the lower right corner to log in!
After logging in, it prompts that mcrypt is wrong! Terminal execution: sudo php5enmod mcrypt,
Then restart apache, log in to phpmyadmin again and it's normal!
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.