phpmyadmin

phpmyadmin

前面我们分布部署了lamp 过程在 https://blog.csdn.net/hanyuce/article/details/99095236

php端操作

下载phpMyAdmin压缩包
[root@daxiong ~]# cd /usr/src/
[root@daxiong src]# wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-all-languages.zip

将包解压到/www/xiaoxiong/下面
[root@daxiong src]# yum -y install unzip
[root@daxiong src]# unzip phpMyAdmin-4.0.10.20-all-languages.zip
[root@daxiong src]# mv phpMyAdmin-4.0.10.20-all-languages /www/xiaoxiong/
[root@daxiong src]# ls /www/xiaoxiong/
index.php  phpMyAdmin-4.0.10.20-all-languages
[root@daxiong xiaoxiong]# ln -sv phpMyAdmin-4.0.10.20-all-languages pma
[root@daxiong xiaoxiong]# ll
总用量 8
-rw-r--r--. 1 root root   24 8月   8 22:45 index.php
drwxr-xr-x  9 root root 4096 8月  10 18:26 phpMyAdmin-4.0.10.20-all-languages
lrwxrwxrwx  1 root root   34 8月  10 18:23 pma -> phpMyAdmin-4.0.10.20-all-languages


复制样本配置文件config.sample.inc.php为config.inc.php
[root@daxiong xiaoxiong]# cd pma
[root@daxiong pma]# cp config.sample.inc.php config.inc.php
[root@daxiong pma]# vim config.inc.php
$cfg['Servers'][$i]['host'] = '192.168.28.130';	   找到此行将他改为数据库主机的地址
[root@daxiong ~]# service php-fpm restart
Gracefully shutting down php-fpm . done
Starting php-fpm  done

mysql端操作

[root@xiaoxiong ~]# mysql -uroot -p'hyc123!'
mysql> grant all on *.* to pmauser@'192.168.28.%' identified byy 'pmapass';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

httpd端操作

将反向代理目录换为php端需要共享的目录
[root@hyc ~]# vim /etc/httpd24/httpd.conf
<VirtualHost *:80>
    DocumentRoot "/usr/local/apache/htdocs"
    ServerName www.hanyuce.com
    ProxyRequests Off
    ProxyPassMatch ^/(.*\.php)$ fcgi://192.168.28.131:9000/www/xiaoxiong/pma/$1
    <Directory "/www/xiaoxiong/">
        Options none
        AllowOverride none
        Require all granted
    </Directory>
</VirtualHost>
[root@hyc ~]# mkdir /usr/local/apache/htdocs/pma
[root@hyc htdocs]# apachectl stop
[root@hyc htdocs]# apachectl start
[root@hyc ~]# ss -antl
State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN     0      128     *:22                  *:*                  
LISTEN     0      100    127.0.0.1:25                  *:*                  
LISTEN     0      128    :::80                 :::*                  
LISTEN     0      128    :::22                 :::*                  
LISTEN     0      100       ::1:25                 :::*      

验证

浏览器上使用ip访问,若看到以下界面则表示php成功,否则请检查你的操作
在这里插入图片描述

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值