AlmaLinux OS是一個(gè)開(kāi)源、社區驅動(dòng)的項目,旨在提供CentOS穩定版的替代品,現在多數美國服務(wù)器也陸續支持使用AlmaLinux系統。phpMyAdmin是我們常用的數據庫管理工具,那么如何在A(yíng)lmaLinux服務(wù)器上安裝配置phpMyAdmin?下面一起來(lái)了解下。
1、利用SSH工具(如PuTTY)登錄到AlmaLinux服務(wù)器后,運行下面命令更新系統。
sudo dnf update
2、啟用EPEL和REMI存儲庫。運行下面命令將EPEL和REMI存儲庫添加到系統中。
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
3、安裝PHP-Fedora-Autoloader。
dnf install http://rpms.remirepo.net/enterprise/8/remi/x86_64/php-fedora-autoloader-1.0.0-5.el8.remi.noarch.rpm
4、phpMyAdmin安裝需要獨立的數據庫或LAMP堆棧,所以需先AlmaLinux服務(wù)器上安裝LAMP堆棧。相關(guān)閱讀:《AlmaLinux服務(wù)器上LAMP環(huán)境搭建教程》
5、安裝phpMyAdmin包
dnf –enablerepo=remi install phpMyAdmin
phpMyAdmin會(huì )將配置插入到Apache webserver (httpd)中,為了加載新配置,我們需重新啟用httpd。
service httpd restart
6、編輯phpMyAdmin.conf文件,進(jìn)行簡(jiǎn)單配置。
nano /etc/httpd/conf.d/phpMyAdmin.conf
并替換以下行:
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
設置完畢后,保存文件并重新啟動(dòng)Apache服務(wù)。
sudo systemctl restart httpd
7、配置防火墻。
創(chuàng )建防火墻規則以允許外部網(wǎng)絡(luò )的http請求,相關(guān)命令如下:
sudo firewall-cmd –permanent –add-service=http
sudo firewall-cmd –reload
8、通過(guò)瀏覽器訪(fǎng)問(wèn)phpMyAdmin。
打開(kāi)瀏覽器在地址欄中輸入http://ip-address/phpmyadmin/,其中ip-addresss根據實(shí)際情況填寫(xiě)。安裝成功后,便會(huì )顯示出phpMyAdmin登錄界面,然后使用root用戶(hù)的MySQL密碼或其他MySQL用戶(hù)及密碼進(jìn)行登錄即可。
來(lái)源鏈接:https://www.idcspy.com/42038.html
本站聲明:網(wǎng)站內容來(lái)源于網(wǎng)絡(luò ),如有侵權,請聯(lián)系我們,我們將及時(shí)處理。
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。
Copyright ? 2009-2022 56dr.com. All Rights Reserved. 特網(wǎng)科技 特網(wǎng)云 版權所有 特網(wǎng)科技 粵ICP備16109289號
域名注冊服務(wù)機構:阿里云計算有限公司(萬(wàn)網(wǎng)) 域名服務(wù)機構:煙臺帝思普網(wǎng)絡(luò )科技有限公司(DNSPod) CDN服務(wù):阿里云計算有限公司 百度云 中國互聯(lián)網(wǎng)舉報中心 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證B2
建議您使用Chrome、Firefox、Edge、IE10及以上版本和360等主流瀏覽器瀏覽本網(wǎng)站