The following tutorial column ofphpmyadminwill introduce to you how to install phpmyadmin on Linux. I hope it will be helpful to friends in need!
1. Download
http://www.phpmyadmin.net/
After entering, there is a download button, click on the navigation bar Download link, enter the download interface, download the latest version of phpMyAdmin 4.9.2 here
## 2. Download it and upload it to the server, then execute the following command to decompress it:tar -xvzf phpMyAdmin-4.9.2-all-languages.tar.gz
mv phpMyAdmin-4.9.2-all-languages /var/www/
cp config.sample.inc.php config.inc.php
vim config.inc.php
$cfg['blowfish_secret'] = '随便设置一个复杂的字符串'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! *//** * Servers configuration */$i = 0;/** * First server */$i++;/* Authentication type */$cfg['Servers'][$i]['auth_type'] = 'cookie';/* Server parameters */$cfg['Servers'][$i]['host'] = '数据库host地址'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = false;
server { client_max_body_size 20M; listen 80; server_name 47.**.**.230; set $root_path '/var/www/phpmyadmin'; root $root_path; index index.php index.html index.htm; try_files $uri $uri/ @rewrite; location ~ \.php { fastcgi_pass 127.0.0.1:9000; fastcgi_index /index.php; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
service nginx restart
The above is the detailed content of How to install phpmyadmin on linux. For more information, please follow other related articles on the PHP Chinese website!