Linux 64位安装xampp

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

  • MySQL 管理员(root)没有密码。
  • MySQL 可经过网络访问。
  • ProFTPD 使用“lampp”做为用户名“nobody”的密码。
  • PhpMyAdmin 能够经过网络访问。
  • 示例程序能够经过网络访问。
  • MySQL 和 Apache 在同一个用户名(nobody)下运行。
要修正绝大部分的安全薄弱环节,只需执行如下命令:
/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,安全

相关文章
相关标签/搜索