How to install nginx+php-fpm+mariadb in ubuntu 20.04?

This posting is based on clean installation of ubuntu 20.04 Open termainal.(ctrl+alt+T)


 
First installation, you should set root password
sudo passwd
 
enter current password, enter new or current password to use root
su
get in root
cd 
go to /
apt update 
update in apt.
 
apt install nginx-extras
We are going to install nginx-extras. (enter Y)
 
ufw status
 (option) check ufw status
ufw enable
 enable ufw(firewall)
ufw allow 'Nginx Full'
 allow http and https by nginx
service nginx start
 start nginx 
systemctl enable nginx
 enable auto-start
apt install php-fpm
 install php module (enter Y)
service nginx reload
reload nginx
apt install mariadb-server php-mysql
 install mariadb (enter Y)
mysql_secure_installation
security configuration
 
 
enter
Y
Y
Y
Y
mysql -uroot -p
root configuration
use mysql;
update user set plugin='' where user='root';
flush privileges;
quit;
 
enter this commend in turn
service nginx reload
nginx reload
 
thanks for watching the post!
If you get error, reply plz!

Post a Comment

0 Comments

recent post