How to build a php environment under the ubuntu system: first install Apache2 and install the PHP module; then install the database and select papche2 and lighttpd; then enter the password of the mysql database and set the management password; finally enter [php - v] Just check the PHP version.
How to build a php environment under the ubuntu system:
1. Install Apache2:
sudo apt-get install apache2
2. Install PHP module:
sudo apt-get install php7.0
3. Install the database:
sudo apt install -y mysql-server mysql-client
Use mysql -u root -p to log in to the database
4. Installation of some other modules:
sudo apt-get install libapache2-mod-php7.0
sudo apt-get install php7.0-mysql
sudo apt-get install php7.0-gd
sudo apt-get install phpmyadmin
5. During the period, you will be asked to select papche2 and lighttpd. Press the space to select papche2 and press Enter to confirm
6. You need to enter the password of the mysql database
7. You need to set the management password
8. Enter php -v to view the PHP version
Related learning recommendations: PHP programming from entry to proficiency
The above is the detailed content of How to set up a PHP environment under Ubuntu system?. For more information, please follow other related articles on the PHP Chinese website!