|
很多对Linux系统不熟悉的用户, 通过自己的经验安装 Apache 服务器是件不容易的事儿,如果您想添加 MySQL、PHP 和 Perl,那就更难了。而XAMPP 确很容易安装和使用:只需下载,解压缩,启动即可。XAMPP(Apache+MySQL+PHP+PERL)是一个功能强大的建 XAMPP 软件站集成软件包,易于安装且包含 MySQL、PHP 和 Perl 的 Apache 发行版。以下简单的介绍下XAMPP的默认安装的方法步骤:
* 步骤1:登陆服务器下载xampp安装程序
[root`]#wget http://jaist.dl.sourceforge.net/ ... 8.2-2-installer.run
* 步骤2:安装
下载后只需键入以下命令:
转到Linux shell并作为系统管理员的身份登录:
su
更改权限安装
输入 [root`]#chmod 755 XAMPP-LINUX-1.8.2-0-installer.run
运行安装程序
[root`]#./xampp-linux-1.8.2-0-installer.run
这就是全部。XAMPP现在已经安装/ OPT / LAMPP目录下 。
* 步骤3:启动
要启动XAMPP,只需调用这个命令:
[root`]#/ OPT / LAMPP / LAMPP 启动
现在,你应该在你的屏幕上看到类似这样:
启动XAMPP 1.8.2 ...
LAMPP:启动Apache ...
LAMPP:启动MySQL ...
LAMPP开始。
准备好了。Apache和MySQL正在运行。
* 步骤4:测试
在服务器上的浏览器,只需键入下面的URL中:http://localhost
现在,你应该可以看到XAMPP的起始页面包含一些链接检查已安装的软件和一些小编程实例的状态。
注意:如果不能访问,先检查80端口是否被服务器防火墙屏蔽。
-----------------------------
xampp 访问出现New XAMPP security concept:外网访问本地xampp遇到的问题。
xampp 访问出现Access forbidden
设置后xampp的security的密码后,发现不能登录,出现以下错误:
Access forbidden
New XAMPP security concept:
Access to the requested directory is only available from the local network.
This setting can be configured in the file “httpd-xampp.conf”.
解决方法:
打开httpd-xampp.conf(/xampp/apache/conf/extra/httpd-xampp.conf)
# New XAMPP security concept
#
<LocationMatch “^/(?i?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))”>
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
81.196.40.94/32
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
需要注释Deny from all,即
#Deny from all
注:需要重启apache[/opt/lampp/lampp restartapache]
就可以远程登录xampp了,通过外网登陆本地xampp了。
|
|