linux 安装 phpmyadmin

4-24 1,643 views

1.去phpmyadmin官网下载最新版本
https://www.phpmyadmin.net/downloads/
执行命令:

wget https://files.phpmyadmin.net/phpMyAdmin/4.7.0/phpMyAdmin-4.7.0-all-languages.tar.gz
tar -xzvf phpMyAdmin-4.7.0-all-languages.tar.gz
mkdir /apps/www/phpmyadmin
cp -r phpMyAdmin-4.7.0-all-languages/* /apps/www/phpmyadmin
2.配置nginx

vim /etc/nginx/conf.d/phpmyadmin.conf

server {
    listen       88;
    server_name  localhost;
    index index.html index.htm index.php;
    root  /home/apps/phpmyadmin;

    location / {
        if (!-e  $request_filename) {
                rewrite  ^/(.*)$  /index.php/$1  last;
                break;
        }

       index  index.php;

    }

    location ~ \.php {

       fastcgi_pass   127.0.0.1:9000;

        fastcgi_index  index.php;

        set $real_script_name $fastcgi_script_name;
        if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
                set $real_script_name $1;
                set $path_info $2;
        }
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $real_script_name;
        fastcgi_param PATH_INFO $path_info;
        include        fastcgi_params;
    }

}
3.配置目录权限,开启端口

chmod -R 0777 /apps/www/phpmyadmin
systemctl restart nginx
vi /etc/sysconfig/iptables
添加保存:-A INPUT -p tcp -m state --state NEW -m tcp --dport 88 -j ACCEPT
systemctl restart iptables

nginx 解析php conf配置文件

本博客的nginx 配置文件 server { listen 80;#80和443端口同时监听 listen 443 ssl; server_name www.koukousky.com koukousky.com...

阅读全文

php composer 安装阿里云镜像

#doc: https://developer.aliyun.com/composer 全局配置(推荐) composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ 取消配...

阅读全文

intervention/image处理IOS上传图片翻转问题

#安装 $ composer require intervention/image <?php use Intervention\Image\ImageManagerStatic as Image; //test.png要处理的图片路径 Image::make(&...

阅读全文

欢迎留言