PHP7.2
Sudo add-apt-repository ppa:ondrej/ PHP sudo apt-get update sudo apt-get install php7.2Copy the code
Apache2
sudo apt-get install apache2
Copy the code
PHP extensions
Sudo apt-get install php7.2- FPM php7.2-mysql php7.2-curl php7.2-json php7.2-mbstring php7.2- XML php7.2-intlCopy the code
Other extensions
Sudo apt-get install php7.2-gd sudo apt-get install php7.2-soap sudo apt-get install php7.2- GMP sudo apt-get install Php7.2 -odbc sudo apt-get install php7.2-pspell sudo apt-get install php7.2-bcmath sudo apt-get install php7.2-enchant Sudo apt-get install php7.2-imap sudo apt-get install php7.2-ldap sudo apt-get install php7.2-opcache sudo apt-get Install php7.2-readline sudo apt-get install php7.2-sqlite3 sudo apt-get install php7.2- XMLRPC sudo apt-get install Php7.2-bz2 sudo apt-get install php7.2-interbase sudo apt-get install php7.2-pgsql sudo apt-get install php7.2-recode Sudo apt-get install php7.2-sybase sudo apt-get install php7.2-xsl sudo apt-get install php7.2-cgi sudo apt-get install Php7.2-dba sudo apt-get install php7.2-dbg sudo apt-get install php7.2-snmp sudo apt-get install php7.2-tidy sudo Apt to get the install php7.2 - zipCopy the code
Mysql
sudo apt-get install mysql-server
sudo apt install mysql-client
sudo apt install libmysqlclient-dev
Copy the code
If the password is not set during the installation, run the following command to change the password of Mysql root
mysql> use mysql; Mysql 5.7 mysql> update user set authentication_string=PASSWORD(" PASSWORD ") where user='root'; Mysql > ALTER USER 'localhost' IDENTIFIED WITH mysql_native_password BY 'mysql_native_password '; mysql> update user set plugin="mysql_native_password"; mysql> flush privileges; mysql> exit; // Restart the mysql serviceCopy the code
Mysql > create UTF-8 database
CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci;
Copy the code