Ubuntu系统下XAMPP的安装与配置

1.Install XAMPP(Ubuntu 18.04 64-bit)

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

      cd /tmp/

      wget https://downloadsapachefriends.global.ssl.fastly.net/5.6.40/xampp-linux-x64-5.6.40-0-installer.run

1.2.Change the permissions to the installer :

      chmod 755 xampp-linux-x64-5.6.40-0-installer.run

1.3.Run the installer :

      sudo ./xampp-linux-x64-5.6.40-0-installer.run

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

1.4.Start or Stop XAMPP :

      cd /opt/lampp/

      sudo ./lampp start    or    sudo ./lampp stop

      You should now see something on your screen.

2.Auto-Start XAMPP

2.1.Copy the /opt/lampp/lampp script to the /etc/init.d directory:sudo cp /opt/lampp/lampp /etc/init.d

2.2.Add or modify the following lines at the beginning of the /etc/init.d/lampp script:vim /etc/init.d/lampp

    ### BEGIN INIT INFO

    # Provides:            xampp

    # Required-Start:   $remote_fs $syslog

    # Required-Stop:   $remote_fs $syslog

    # Default-Start:       2 3 4 5

    # Default-Stop:       0 1 6

    # Short-Description: Start XAMPP at boot time

    #Description:            Enable services provided by XAMPP.

    ### END INIT INFO

2.3.Add the script to the default runlevels and enable it:

      sudo update-rc.d -f lampp defaults

      sudo update-rc.d -f lampp enable

2.4.Reboot your system and XAMPP should start automatically.

3.Configure FTP Access

3.1.Open a new linux terminal and ensure you are logged in as root

3.2.Create a new group named ftpgroup. This group will contain those user accounts allowed to upload files via FTP.

      groupadd ftpgroup

3.3.Add your account(in this example, ftpuser) to the new group. Add other user if needed.

      useradd ftpuser

      passwd  ftpuser

      usermod -a -G ftpgroup ftpuser

3.4.Change the ownership and permissions of the /opt/lampp/htdocs/ subdirectory of the XAMPP installation directory so that it is writable by the new ftp group

      cd /opt/lampp/

      chown root.ftpgroup htdocs

      chmod 777 htdocs

3.5.Restart XAMPP

      sudo ./lampp restart

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xld0932

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值