溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Linux7安裝和配置phpmyadmin的步驟

發(fā)布時間:2021-09-18 15:17:09 來源:億速云 閱讀:129 作者:chen 欄目:建站服務(wù)器

這篇文章主要講解了“Linux7安裝和配置phpmyadmin的步驟”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“Linux7安裝和配置phpmyadmin的步驟”吧!

1.在https://www.apachefriends.org/zh_cn/index.html這個網(wǎng)站下載xampp

2.本文下載的是xampp-linux-x64-7.2.2-0-installer.run

  1. wget https://www.apachefriends.org/xampp-files/7.2.2/xampp-linux-x64-7.2.2-0-installer.run

3.修改文件的權(quán)限


  1. chmod 755 xampp-linux-x64-7.2.2-0-installer.run

4.安裝

  1. [root@aws ~]# ./xampp-linux-x64-7.2.2-0-installer.run

  2. ----------------------------------------------------------------------------

  3. Welcome to the XAMPP Setup Wizard.


  4. ----------------------------------------------------------------------------

  5. Select the components you want to install; clear the components you do not want

  6. to install. Click Next when you are ready to continue.


  7. XAMPP Core Files : Y (Cannot be edited)


  8. XAMPP Developer Files [Y/n] :n


  9. Is the selection above correct? [Y/n]:


  10. ----------------------------------------------------------------------------

  11. Installation Directory


  12. XAMPP will be installed to /opt/lampp

  13. Press [Enter] to continue:


  14. ----------------------------------------------------------------------------

  15. Setup is now ready to begin installing XAMPP on your computer.


  16. Do you want to continue? [Y/n]:


  17. ----------------------------------------------------------------------------

  18. Please wait while Setup installs XAMPP on your computer.


  19.  Installing

  20.  0% ______________ 50% ______________ 100%

  21.  #########################################


  22. ----------------------------------------------------------------------------

  23. Setup has finished installing XAMPP on your computer.

5.啟動

  1. [root@aws lampp]# ./lampp start

  2. Starting XAMPP for Linux 7.2.2-0...

  3. XAMPP: Starting Apache...ok.

  4. XAMPP: Starting MySQL...ok.

  5. XAMPP: Starting ProFTPD...ok.

6.在瀏覽器里輸入http://13.115.1xx.xx,換成自己的ip和最好用google瀏覽器,其他瀏覽器有可能顯示不了

 Linux7安裝和配置phpmyadmin的步驟

7.點擊上圖右邊的”phpmyadmin”,會遇到403錯誤,解決辦法是修改配置文件,讓它允許local之外訪問

  1. vi /opt/lampp/etc/extra/httpd-xampp.conf

把下面這段代碼中黑體字

  1. <Directory "/opt/lampp/phpmyadmin">

  2.     AllowOverride AuthConfig Limit

  3.     Require local

  4.     ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

  5. </Directory>

修改為

  1. <Directory "/opt/lampp/phpmyadmin">

  2.     AllowOverride AuthConfig Limit

  3.     Require all granted

  4.     ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

  5. </Directory>

8.再次點擊”phpmyadmin”,出現(xiàn)如下的界面就表示安裝成功了。

Linux7安裝和配置phpmyadmin的步驟

9.這個頁面有3種模式,默認(rèn)是httpd,我一般喜歡用config模式,如下圖:

Linux7安裝和配置phpmyadmin的步驟


修改方法是:

  1. vi /opt/lampp/phpmyadmin/config.inc.php


  2. auth_type默認(rèn)是http,修改為cookie即可


  3. $i++;

  4. /* Authentication type */

  5. $cfg['Servers'][$i]['auth_type'] = 'cookie';

  6. $cfg['Servers'][$i]['user'] = 'root';

  7. $cfg['Servers'][$i]['password'] = '';

  8. /* Server parameters */

  9. //$cfg['Servers'][$i]['host'] = 'localhost';

  10. $cfg['Servers'][$i]['compress'] = false;

  11. $cfg['Servers'][$i]['AllowNoPassword'] = true;



如果想管理其他的mysql數(shù)據(jù)庫,按照如下設(shè)置,把$i++;下面的拷貝一份,放到下面,修改host等

  1. $i++;

  2. /* Authentication type */

  3. $cfg['Servers'][$i]['auth_type'] = 'cookie';

  4. $cfg['Servers'][$i]['user'] = 'root';

  5. $cfg['Servers'][$i]['password'] = '';

  6. /* Server parameters */

  7. //$cfg['Servers'][$i]['host'] = 'localhost';

  8. $cfg['Servers'][$i]['compress'] = false;

  9. $cfg['Servers'][$i]['AllowNoPassword'] = true;


  10. $i++;

  11. /* Authentication type */

  12. $cfg['Servers'][$i]['auth_type'] = 'cookie';

  13. /* Server parameters */

  14. $cfg['Servers'][$i]['host'] = 'oms';

  15. $cfg['Servers'][$i]['compress'] = false;

  16. $cfg['Servers'][$i]['AllowNoPassword'] = false;


感謝各位的閱讀,以上就是“Linux7安裝和配置phpmyadmin的步驟”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對Linux7安裝和配置phpmyadmin的步驟這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關(guān)知識點的文章,歡迎關(guān)注!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI