新聞中心
phpMyAdmin是一個(gè)非常受歡迎的基于web的MySQL數(shù)據(jù)庫管理工具。它能夠創(chuàng)建和刪除數(shù)據(jù)庫,創(chuàng)建/刪除/修改表格,刪除/編輯/新增字段,執(zhí)行SQL腳本等,本篇文章重點(diǎn)為大家講解一下Linux搭建phpMyAdmin具體步驟。

RHEL/CentOS:(下面以CentOS7.6為例)
我們先來搞定一些先決條件
關(guān)閉selinux并重啟系統(tǒng)生效
# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config && shutdown -r now
然后我們安裝phpMyAdmin需要的php擴(kuò)展
# yum install php73-php-mysqlnd.x86_64 php73-php-mbstring.x86_64 -y
# chown -R nginx:nginx /var/opt/remi/php73/lib/php/
重啟php
# systemctl restart php73-php-fpm.service
下載phpMyAdmin源代碼
# wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-all-languages.zip
安裝zip,并解壓下載的源代碼
# yum install zip unzip -y && unzip phpMyAdmin-4.9.0.1-all-languages.zip
移動(dòng)phpMyAdmin源代碼到網(wǎng)頁目錄下并把權(quán)限設(shè)置為nginx
# mv phpMyAdmin-4.9.0.1-all-languages /usr/share/nginx/html/phpMyAdmin && chown -R nginx:nginx /usr/share/nginx/html/phpMyAdmin
配置phpMyAdmin的短語密碼
# sed -i "108 s/''/'自己隨機(jī)生成32為密碼就行'/g" /usr/share/nginx/html/phpMyAdmin/libraries/config.default.php
示例:
# sed -i "108 s/''/'M4HUkD8rwVPo919e36Rp5zItiPqprByh'/g" /usr/share/nginx/html/phpMyAdmin/libraries/config.default.php
我們打開網(wǎng)頁登錄phpMyAdmin,創(chuàng)建phpmyadmin數(shù)據(jù)庫,看下面的gif動(dòng)態(tài)圖,登錄→查找原因→創(chuàng)建
http://IP地址/phpMyAdmin/index.php
Debian/Ubuntu:(下面以Debian10為例)
我們先來搞定一些先決條件
安裝phpMyAdmin需要的php擴(kuò)展
# apt install php7.3-mysql php7.3-mbstring -y
下載phpMyAdmin源代碼
# wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-all-languages.zip
安裝zip,并解壓下載的源代碼
# apt install zip unzip -y && unzip phpMyAdmin-4.9.0.1-all-languages.zip
移動(dòng)phpMyAdmin源代碼到網(wǎng)頁目錄下并把權(quán)限設(shè)置為nginx
# mv phpMyAdmin-4.9.0.1-all-languages /usr/share/nginx/html/phpMyAdmin && chown -R nginx:nginx /usr/share/nginx/html/phpMyAdmin
配置phpMyAdmin的短語密碼
# sed -i "108 s/''/'自己隨機(jī)生成32為密碼就行'/g" /usr/share/nginx/html/phpMyAdmin/libraries/config.default.php
示例:
# sed -i "108 s/''/'M4HUkD8rwVPo919e36Rp5zItiPqprByh'/g" /usr/share/nginx/html/phpMyAdmin/libraries/config.default.php
我們打開網(wǎng)頁登錄phpMyAdmin,創(chuàng)建phpmyadmin數(shù)據(jù)庫,看下面的gif動(dòng)態(tài)圖,登錄→查找原因→創(chuàng)建
http://IP地址/phpMyAdmin/index.php
文章題目:Linux搭建phpMyAdmin具體步驟
本文地址:http://m.fisionsoft.com.cn/article/djohhoc.html


咨詢
建站咨詢
