Ubuntu Server 开机启动Xampp

来源:互联网 发布:淘宝秒杀优惠券玩法 编辑:程序博客网 时间:2024/05/17 01:02
方法一:

1. 在/etc/init.d 目錄下建立lampp.sh 文件,然后添加以下内容:
#!/bin/sh
/opt/lampp/lampp start

2. chmod 755 /etc/init.d/lampp.sh

3. 编辑/etc/init.d/rc.local在最后一行加上:
   sh /etc/init.d/lampp.sh

或者
   exec /etc/init.d/lampp.sh  (注:这种方法即使开机后没有登入,XAMPP还是会启动)

4. 重启ubuntu

方法二:

sudo ln -s /opt/lampp/lampp  /etc/init.d/lampp
sudo update-rc.d -f lampp defaults
0 0
原创粉丝点击