centos7 安装XAMPP和ftp

安装xampp,尤其是ftp时遇到各种坑,浪费了很多时间,在此做个记录:

安装xampp:

1、查看你linux系统的位数,是32位的还是64位的。使用uname -a命令查看。

显示有

x86_64则说明你是64位内核, 跑的是64位的系统.

i386, i686说明你是32位的内核, 跑的是32位的系统

2、首先下载xampp的安装包。打开网址:https://www.apachefriends.org/zh_cn/download.html或http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.3/,选择你需要的版本,根据linux系统位数下载

3、使用linux的wget命令下载,下载前先进入opt文件夹,不然我们不知道我们下载文件到哪里去了。

cd /opt wget 地址

如果提示证书错误

使用下面的命令wget --no-check-certificate 地址

4、然后我们先赋予755权限,以防因为权限不足,无法安装

chmod -R 755 xampp-linux-1.8.3-5-installer.run
5、然后我们运行这个安装文件

./xampp-linux-1.8.3-5-installer.run
6、安装的过程就不多说了,也不用设置什么,无非就是问你时候确定一些选项,出现提问,直接按  回车 下去即可。xampp默认安装在/opt/lampp下

7、安装完毕之后,并没有运行,我们需要手动启动xampp服务,也就是启动apache,ftp和mysql这些服务器。使用命令

/opt/lampp/lampp start

此时,lampp组件就成功启动了,但它并不是每次随系统启动
输入以下命令
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

这样,就随系统启动了!

8、环境安装完了,但是MySQL的密码是多少,ftp的账号密码也是多少?我们不知道,这个默认为空,还需要我们自己设置。【要先在文本上面写好先在复制安全点,不然密码设置成什么自己都不记得了】输入命令

sudo /opt/lampp/lampp security


如图所示:他会依次要求你

1、先输入xampp控制面板的密码(用户名是xampp);

2、输入phpmyadmin的密码(用户名是pma)

3、输入mysql的密码(用户名是root)

4、输入ftp密码(用户名是daemon,默认端口21)

 9、在浏览器输入服务器的ip访问看一下成功了没有?

由于服务器设置了xampp不允许远程访问,所以远程不能访问需要修改conf文件

vi /opt/lampp/etc/extra/httpd-xampp.conf

将   Require local  改成  Require  all granted 

/opt/lampp/lampp restart 重启xampp

到此xampp安装完成

linux下xampp如何开机自动启动
centos下:
1.首先检查默认启动文件在那个文件下:
egrep :initdefault: /etc/inittab
2.如果结果是:rc3.d则如下(如果是rc5.d则将3改成5即可),
cd /etc/rc.d/rc3.d
3.执行命令
ln -s /opt/lampp/lampp S99lampp
ln -s /opt/lampp/lampp K01lampp

(转载)

重点!!!!!!!!

安装完之后,要用filezilla上传文件到linux服务器,需要做个配置:

1. Open the file /opt/lampp/etc/proftpd.conf

2. Search for the port "21" and change it to some other port (e.g 28).

3. Open the file /opt/lampp/xampp

4. Search for the port "testport 21" and replace it to "testport 28". 

5. Now go and run "sudo /opt/lampp/xampp restart". (It should work now).

PS:
1 修改权限,获取全部权限:
chmod  777 /opt/lampp/htdocs
2 如果Proftp无法启动,则按照以下步骤操作
查看端口占用情况:
netstat -tnlp
杀死占用了80端口的进程:sudo kill 5109








原文地址:https://www.cnblogs.com/jaysonguo/p/7853088.html