tutorialspoint website development
2022.03.16
Learn website development from scratch——2.buildLNMPenvironment nginxinstallation configuration,mariadb(mysql)installation configuration,phpinstallation configuration,phpmyadmininstallation and configuration)
(tutorialspoint website development)

Log in to the test server in the terminal
sudo apt install nginx
Installnginx
Type in the browserhttp://192.168.11.37/(virtual machineipaddress),can see anginxdefault welcome screen。This proves that ournginxInstallation was successful!
sudo apt install mariadb-server
Installmariadb(mysql),This database server ismysqluse the same。

(tutorialspoint website development)
sudo mysql_secure_installation
After installation is complete,first run MySQL / MariaDB setting,By default we will be asked for a password,We can just go back。

set uprootpassword

(tutorialspoint website development)
sudo mariadb
Connected tomariadb,Do some database configuration
1.use mysql;
2.update user set authentication_string=password('root'),plugin='mysql_native_password' where user='root';
The second step is to set up the database serverrootpassword isroot,and letrootCan log in with password。
3.flush privileges;
third step,Refresh permissions
4.exit quitmariadb
mariadb -u username -p
Connect to the database

(tutorialspoint website development)
SHOW DATABASES;
Show all databases in the database server
sudo apt install php-fpm php-mysql php-mbstring
Installphp-fpmand some must-have extensions
sudo nano /etc/nginx/sites-available/default
editnginxDefault site configuration
The main point is the red marked part of the figure below
Edit done by pressingctrl+x,then enterY,Then press enter to save

(tutorialspoint website development)
sudo service nginx restart
rebootnginxServe,Make the changes you just made take effect
(tutorialspoint website development)

sudo nano /var/www/html/info.php
create a testphpdocument
(tutorialspoint website development)

(tutorialspoint website development)