After the construction of the. NET in the front of the environment after the need to build database-related environments, first I choose the data is MySQL, in the choice of MySQL at the same time consider I use Tomcat to control the database or something else, Here I choose is the way of phpMyAdmin is very convenient, if using Tomcat so my home and the company's computer to install the software in operation, but with phpMyAdmin easy to use a browser to enter the account password on the line
Next start configuring
Install Apache2:
sudo apt-get install apache2
Install PHP:
sudo apt-get install PHP
(Note here PHP it defaults to php7,ubuntu16.0 without PHP5 version installed)
Let Apache2 support PHP:
sudo apt-get install libapache2-mod-php
Install MySQL and set a password
sudo apt-get install Mysql-server
Let Apache support MySQL:
sudo apt-get install Libapache2-mod-auth-mysql
sudo apt-get install Php-mysql
To install the MySQL visual client phpMyAdmin:
sudo apt-get install phpMyAdmin
Create a sync link
sudo ln-s/usr/share/phpmyadmin//var/www/html
"This next step can be skipped."
Modify the permissions of the Portal folder, changed to 777 is to facilitate the uploading of files, according to their own needs to change to the appropriate permissions
sudo chmod 777 HTML
Then reboot
sudo service apache2 Restart
Modify Apache Port number
- sudo vi/etc/apache2/ports.conf
- Namevirtualhost *:8080
- Listen 8080
Step2: Just modify the VirtualHost port
- sudo vi/etc/apache2/sites-available/default.conf
- <virtualhost *:8080>
Step3: Restart Apache2
- sudo service apache2 stop
- sudo service apache2 start
The port number must be modified after the configuration is complete because the same port number installed in front of the nginx will conflict "modify port number when modifying two files on top of the introduction"
Browser input ip:8080 After installation completes Apache installation if Apache interface is present
Enter the account root password to install MySQL password when re-entering the address [ip:8080/phpmyadmin] Login screen
This is where the environment is built.
Small Forum Linux Server build Apache PHP mysql Environment