您好,登錄后才能下訂單哦!
這篇文章主要講解了“Linux7安裝和配置phpmyadmin的步驟”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“Linux7安裝和配置phpmyadmin的步驟”吧!
1.在https://www.apachefriends.org/zh_cn/index.html這個網站下載xampp
2.本文下載的是xampp-linux-x64-7.2.2-0-installer.run
wget https://www.apachefriends.org/xampp-files/7.2.2/xampp-linux-x64-7.2.2-0-installer.run
3.修改文件的權限
chmod 755 xampp-linux-x64-7.2.2-0-installer.run
4.安裝
[root@aws ~]# ./xampp-linux-x64-7.2.2-0-installer.run
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
XAMPP Core Files : Y (Cannot be edited)
XAMPP Developer Files [Y/n] :n
Is the selection above correct? [Y/n]:
----------------------------------------------------------------------------
Installation Directory
XAMPP will be installed to /opt/lampp
Press [Enter] to continue:
----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.
Do you want to continue? [Y/n]:
----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.
Installing
0% ______________ 50% ______________ 100%
#########################################
----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.
5.啟動
[root@aws lampp]# ./lampp start
Starting XAMPP for Linux 7.2.2-0...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
6.在瀏覽器里輸入http://13.115.1xx.xx,換成自己的ip和最好用google瀏覽器,其他瀏覽器有可能顯示不了
7.點擊上圖右邊的”phpmyadmin”,會遇到403錯誤,解決辦法是修改配置文件,讓它允許local之外訪問
vi /opt/lampp/etc/extra/httpd-xampp.conf
把下面這段代碼中黑體字
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
修改為
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
8.再次點擊”phpmyadmin”,出現如下的界面就表示安裝成功了。
9.這個頁面有3種模式,默認是httpd,我一般喜歡用config模式,如下圖:
修改方法是:
vi /opt/lampp/phpmyadmin/config.inc.php
auth_type默認是http,修改為cookie即可
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
如果想管理其他的mysql數據庫,按照如下設置,把$i++;下面的拷貝一份,放到下面,修改host等
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'oms';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
感謝各位的閱讀,以上就是“Linux7安裝和配置phpmyadmin的步驟”的內容了,經過本文的學習后,相信大家對Linux7安裝和配置phpmyadmin的步驟這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。