linux 安装 phpmyadmin

4-24 2,440 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

php获取包含10w个手机号的txt文件(逗号隔开)

txt文件格式如下 13000000000,13000000005,13000000403,13001010129,13001010688,13001010838,13001016389,13001019538,13001030005,13001042700,13001047495...

阅读全文

php使用Carbon获取2个日期之间的日期

<?php use Carbon\CarbonPeriod; $period = CarbonPeriod::create('2018-06-14', '2018-06-20'); // Iterate over the period fore...

阅读全文

php 解决超卖的几种方案(redis锁、mysql悲观锁)

1.创建商品和订单表模拟商品交易操作 fa_goods商品表,stock商品库存,test_order=订单表 2.添加一个测试商品数据(商品数量为150个) 测试并发购买的方法(gol...

阅读全文

欢迎留言