XAMPP只支持32位的linux。因此若是在64位中運行XAMPP會報錯:XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.php
解決這個問題很簡單,只需安裝32位庫,運行:mysql
yum install -y glibc*i686
安裝完以後要考慮如下安全問題,XAMPP爲了方便開發,被設置得儘可能開放,但這也帶來一些安全問題。這兒有一份 XAMPP 缺少安全防禦的列表:linux
/opt/lampp/lampp security
接下來可能會遇到phpmyadmin拒絕訪問的問題。只需打開httpd-xampp.conf文件,找到<Directory 「/opt/lampp/phpmyadmin」>,在對應的</Directory>以前加上Require all granted。修改完以下所示:sql
<Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted </Directory>
而後用 /opt/lampp/lampp restart 從新運行便可正確訪問數據庫
若是一切順利那麼恭喜恭喜。可是我很不幸的發現進了phpmyadmin卻各類沒有權限!這個問題在windows下面遇到過,緣由應該是在前面解決安全問題時修改了數據庫帳號root的密碼,而phpmyadmin中默認的爲空。這麼想問題就簡單了,到/opt/lampp/phpmyadmin下找到config.inc.php,在/* Authentication type and info */下面加上必要的信息,好比個人就是這樣:windows
/* Authentication type and info */ $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = '123456'; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['AllowNoPassword'] = true;
最後重啓lampp,安全