CentOS6.4下安装xampp

转自:http://blog.163.com/wspjing@126/blog/static/117720534201310290102170/

一、xampp下载地址:

http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.3/

二、我下载的是xampp-linux-x64-1.8.3-1-installer.run

wget http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.3/xampp-linux-x64-1.8.3-1-installer.run/download

三、下载完以后,给该文件添加执行权限:

chmod a+x xampp-linux-x64-1.8.3-a-installer.run

四、安装xampp过程如下:

[root@nginxone src]# sh xampp-linux-x64-1.8.3-1-installer.run

xampp-linux-x64-1.8.3-1-installer.run: xampp-linux-x64-1.8.3-1-installer.run: cannot execute binary file

[root@nginxone src]# ./xampp-linux-x64-1.8.3-1-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] :y

Is the selection above correct? [Y/n]: y

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

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]: y

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

Please wait while Setup installs XAMPP on your computer.

 Installing

 0% ______________ 50% ______________ 100%

 #########################################

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

Setup has finished installing XAMPP on your computer.

Launch XAMPP [Y/n]: y

五、安装后的文件在 /opt/lamp

六、启动xampp:

[root@nginxone lampp]# /opt/lampp/xampp start

Starting XAMPP for Linux 1.8.3-1...

XAMPP: Starting Apache...fail.

XAMPP:  Another web server is already running.

XAMPP: Starting MySQL...ok.

XAMPP: Starting ProFTPD...fail.

XAMPP:  Another FTP daemon is already running.

七、停止xampp:

[root@nginxone lampp]# /opt/lampp/xampp stop

Stopping XAMPP for Linux 1.8.3-1...

XAMPP: Stopping Apache...not running.

XAMPP: Stopping MySQL...ok.

XAMPP: Stopping ProFTPD...not running.

八、添加开机启动:

温习一下ln命令,使用方式:

#ln [option] source dist

#ln –s /opt/lampp/xampp /etc/rc.d/init.d/xampp

九、如果执行完上面这条还不能开机自动启动,再执行下面3条语句。

#chkconfig –add xampp

#chkconfig –list | grep xampp

#chkconfig –level 3 xampp on

 

 

mysql的配置

  在mac 下安装好xampp后,需要在终端命令行操作时,比如输入:mysql -u root -p,未正确配置前不会出现想要的输入密码提示,而是会提示:

command not found

原来当你输入命令的时间,系统会在/usr/bin这个位置里寻找你输入的命令,如果你没有把命令引入到这个位置,无论你直接cd到工具具体的位置调用,也是白费功夫的。只要把这个工具的绝对位置引入到/usr/bin,所有的问题就迎刃而解了,只要我们把这条命令执行: 


  sudo ln -s /opt/lampp/bin/mysql /usr/bin

 

     这样如果不是管理员,会提示输入密码,输入密码就能执行成功。

这时再输入mysql -u root -p就可以正确执行了。

 

 

十、卸载xampp

#/opt/lampp/xampp stop

#rm -rf /opt/lampp

posted on 2015-09-12 14:10  ziyi_ang  阅读(153)  评论(0编辑  收藏  举报

导航