XAMPP目录结构

XAMPP目录结构

重要的文件和目录

文件/目录                              用途

/opt/lampp/bin/XAMPP 命令库。例如 /opt/lampp/bin/mysql 可执行 MySQL 监视器。

/opt/lampp/htdocs/Apache 文档根目录。

/opt/lampp/etc/httpd.confApache 配制文件。

/opt/lampp/etc/my.cnfMySQL 配制文件。

/opt/lampp/etc/php.iniPHP 配制文件。

/opt/lampp/etc/proftpd.confProFTPD 配制文件。(从 0.9.5 版开始)

/opt/lampp/phpmyadmin/config.inc.phpphpMyAdmin 配制文件。

----------------------------------------------------------------------

阿里云Linux环境下,进入后,在opt目录上传xampp安装包: xampp-linux-x64-5.6.3-0-installer.run

上传后可以在ftp工具中修改为755权限


Linux下XAMPP环境安装

官方教程:https://www.apachefriends.org/faq_linux.html

安装XAMPP

Choose your flavor for your linux OS, the 32-bit or 64-bit version.

Change the permissions to the installer

chmod 755 xampp-linux-*-installer.run

Run the installer

sudo ./xampp-linux-*-installer.run

That's all. XAMPP is now installed below the /opt/lampp directory.


启动XAMPP:

To start XAMPP simply call this command:

sudo /opt/lampp/lampp start

You should now see something like this on your screen:

Starting XAMPP 1.8.2...

LAMPP: Starting Apache...

LAMPP: Starting MySQL...

LAMPP started.

Ready. Apache and MySQL are running.

If you get any error messages visitour community pagesfor help.

Also, note that there is a graphical tool that you can use to manage your servers easily. You can start this tool with the following commands:

cd /opt/lampp

sudo ./manager-linux.run (or manager-linux-x64.run)

停止XAMPP:

To stop XAMPP simply call this command:

sudo /opt/lampp/lampp stop

You should now see something like this on your screen:

Stopping XAMPP 1.8.2...

LAMPP: Stopping Apache...

LAMPP: Stopping MySQL...

LAMPP stopped.

If you get any error messages visitour community pagesfor help.

Also, note that there is a graphical tool that you can use to start/stop your servers easily. You can start this tool with the following commands:

cd /opt/lampp

sudo ./manager-linux.run (or manager-linux-x64.run)



------------------------------------------------------------

首先,请从www.xampp.org下载最新版XAMPP。然后,将安装文件服知道/opt下并解压。如果你计算机没有/opt目录,清用超级用户身份执行mkdir/opt命令来创建目录。如果计算机没有sudo命令请用su命令并输入超级用户密码来切换到超级用户。


使用以下命令将文件复制到/opt:

$sudo cp xampp-linux-x.x.tar.gz /opt


使用一下命令进入opt/目录并解压缩文件:

$ cd /opt

$ sudo tar zxvf xampp-linux-x.x-x.tar.gz /opt


卸载 XAMPP,只需输入如下命令:sudo rm -rf /opt/lampp

卸载完成。


如果想要普通用户能写htdocs目录,清修改目录权限。

$ sudo chmod -R a+rw /opt/lampp/htdocs


启动或停止xampp:

$ sudo /opt/lampp/lampp start & stop


小技巧:

Linux下的XAMPP图形化面板


$ cd /opt/lampp/share/xampp-control-panel

$ sudo ./xampp-control-panel


XAMPP 命令

安装 XAMPP

tar xvfz xampp-linux-1.6.4.tar.gz -C /opt

启动 XAMPP

/opt/lampp/lampp start

停止 XAMPP

/opt/lampp/lampp stop


重启 XAMPP

/opt/lampp/lampp restart

安全设置

/opt/lampp/lampp security

使用php4

/opt/lampp/lampp php4

使用php5

/opt/lampp/lampp php5

查看php版本

/opt/lampp/lampp phpstatus

只启动 Apache

/opt/lampp/lampp startapache

停止 Apache

/opt/lampp/lampp stopapache

启动 Apache 的 SSL 支持

/opt/lampp/lampp startssl

停止 Apache 的 SSL 支持

/opt/lampp/lampp stopssl

只启动 MySQL 数据库

/opt/lampp/lampp startmysql

停止 MySQL 数据库

/opt/lampp/lampp stopmysql

启动 ProFTPD 服务

/opt/lampp/lampp startftp

停止 ProFTPD 服务器

/opt/lampp/lampp stopftp

随系统自动启动

ln -s /opt/lampp/lampp /etc/rc.d/rc3.d/S99lampp

ln -s /opt/lampp/lampp /etc/rc.d/rc4.d/S99lampp

ln -s /opt/lampp/lampp /etc/rc.d/rc5.d/S99lampp

取消随系统自动运行

ln -s /opt/lampp/lampp K01lampp

卸载 XAMPP

rm -rf /opt/lampp

XAMPP 重要的文件和目录

XAMPP 命令库。例如 /opt/lampp/bin/mysql 可执行 MySQL 监视器

/opt/lampp/bin/

Apache 文档根目录

/opt/lampp/htdocs/

Apache 配置文件

/opt/lampp/etc/httpd.conf

MySQL 配置文件

/opt/lampp/etc/my.cnf

PHP 配制文件

/opt/lampp/etc/php.ini

ProFTPD 配制文件。(从 0.9.5 版开始)

/opt/lampp/etc/proftpd.conf

phpMyAdmin 配制文件

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容