Home> Database> phpMyAdmin> body text

How to install phpmyadmin on linux

藏色散人
Release: 2021-02-03 18:49:39
forward
4074 people have browsed it

The following tutorial column ofphpmyadminwill introduce to you how to install phpmyadmin on Linux. I hope it will be helpful to friends in need!

How to install phpmyadmin on linux

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
Copy after login
3. Move to the accessible address of the website (website root directory)

mv phpMyAdmin-4.9.2-all-languages /var/www/
Copy after login
4. Rename the folder (phpMyAdmin-4.9.2-all-languages) to phpmyadmin

5. At this time, you can see that there is a configuration file in the directory: config.sample.inc.php. Copy this file into config.inc.php

cp config.sample.inc.php config.inc.php
Copy after login
and then Executive editor:

vim config.inc.php
Copy after login
Find the $cfg['blowfish_secret'] configuration item, which is empty by default. Here we can set a complex string at will for encryption;

Then $ cfg['Servers'][$i]['auth_type'] defaults to cookie, which means you need to log in every time. We don't need to modify it, which is safer;

Then $cfg['Servers' ][$i]['host'] = '127.0.0.1'; Change here to your own database link address

$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;
Copy after login
as follows:

6. Configure nginx

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; } }
Copy after login
Restart nginx

service nginx restart
Copy after login
7. Visit

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!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!