Home  >  Article  >  Database  >  How to install phpmyadmin on linux

How to install phpmyadmin on linux

藏色散人
藏色散人forward
2021-01-27 15:50:374177browse

The following tutorial column of phpmyadmin will 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
3. Move to the accessible address of the website (website root directory)

mv phpMyAdmin-4.9.2-all-languages /var/www/
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
and then Executive editor:

vim config.inc.php
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;
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;  
        }    
    }
Restart nginx

service nginx restart
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!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete