Table of Contents
Step 1: Install ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/php
Step 2: Install PHP-FPM
sudo apt update && sudo apt upgrade -y sudo apt -y install php7.4 php7.4-fpm
Step 3: Configure PHP-FPM
sudo cp /etc/php/7.4/fpm/pool.d/www.conf /etc/php/7.4/fpm/pool.d/www.conf.bak sudo sed -i 's/;listen.mode = 0660/listen.mode = 0660/g' /etc/php/7.4/fpm/pool.d/www.conf sudo sed -i 's/;security.limit_extensions = .php .php3 .php4 .php5 .php7/security.limit_extensions = .php .php3 .php4 .php5 .php7/g' /etc/php/7.4/fpm/pool.d/www.conf
Step 4: Starting PHP-FPM
sudo systemctl start php7.4-fpm sudo systemctl enable php7.4-fpm sudo systemctl status php7.4-fpm
Step 5: Install PHP-Modules
sudo apt install php7.4-[extname]
Example:
sudo apt install php7.4-mysqli sudo apt install php7.4-mbstring sudo apt install php7.4-xml
Step 6: Download phpMyAdmin
Go to site https://www.phpmyadmin.net/ and download the last version of phpMyAdmin, extract to a folder and upload to /var/www/
![](https://www.maixuanviet.com/wp-content/uploads/2021/07/2021-07-05_12-42-17-1024x501.png)
Step 7: Configure nginx to load phpMyAdmin site
server { listen [::]:80; listen 80; server_name mydb.maixuanviet.com; return 301 https://mydb.maixuanviet.com$request_uri; } server { listen [::]:443 ssl; listen 443 ssl; server_name mydb.maixuanviet.com; ssl_certificate /etc/letsencrypt/live/mydb.maixuanviet.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/mydb.maixuanviet.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; root /var/www/phpmyadmin; index index.php index.html index.htm; location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php last; } } location ~ ^/(doc|sql|setup)/ { deny all; } location ~ /\.ht { deny all; } location ~ .php$ { fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_intercept_errors on; fastcgi_read_timeout 300; include fastcgi_params; #include snippets/fastcgi-php.conf; if (-f $request_filename) { fastcgi_pass unix:/run/php/php7.4-fpm.sock; } } }
Done! Good luck to you!
![](https://www.maixuanviet.com/wp-content/uploads/2021/07/2021-07-05_12-54-03-1024x389.png)
Related posts:
How to setup server with Ubuntu 18.04
Git Ignore
Git Tags
Git Init
Git Origin Master
How to Install Git on Windows
Git log
Git Pull / Pull Request
Git command line
Git Checkout
What is GitHub?
Upstream and Downstream
Git Rm
Git Branch
The following signatures couldn’t be verified
Git Fork
Git Rebase
Git Head
Git Repository
Git Fetch
Git Squash
Git Tools
Git Reset
Design and Architecture of A Robo-Advisor Platform
Git Revert
GIT Interview Questions
Git Status
Git Version Control System
Git Cherry-pick
Git Terminology
Git Environment Setup
Git Commit