Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
Xampp亮开机不自动运行如何处理?
Experiences and Insight
535
views ·
5
replies ·
To
floor
Go
Dengshuangjang
deepin
2019-11-04 02:25
Author
本帖最后由 Dengshuangjang 于 2019-11-3 18:29 编辑
Xampp是很棒的一个网站管理程序,出于兴趣,安装后,它不在开机后自动运行,非得你在终端进去安装目录:/opt/xampp目录下输入:./xampp,还得输入管理员密码,实在是麻烦!于是建立一个快捷方式,用快捷方式启动一个脚本,脚本放在:/user/sbin目录下,内容是:
#!/bin/bash
echo 密码 || sudo -S /opt/xampp/xampp start
EOF
测试,双击快捷方式,成功
但觉得这里显露了密码,不能作为一种普及开来的办法,于是研究!
换第二个办法!
然后在/etc/init.d下建立一个we--xampp的文件,内容如下:
#!/bin/sh
#chkconfig:2345 80 05
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
/opt/xampp/xampp start #这里迷糊了,还是该写成:
cd /opt/xampp
./xampp
chmod +x web-xampp
chkconfig –add web-xampp
chkconfig –list web-xampp
伙伴们,你们看我这样能成功吗?
Reply
Like 0
Favorite
View the author
All Replies
haohaohao
deepin
2019-11-04 02:56
#1
可以用宝塔,而且外网用IPV6地址可以直接访问网站,
Reply
Like 0
View the author
Dengshuangjang
deepin
2019-11-04 03:26
#2
haohaohao 发表于 2019-11-3 18:56
可以用宝塔,而且外网用IPV6地址可以直接访问网站,
你说的这个我安装过,不能成功安装,而且安装时间太长,最后还莫法用!
Reply
Like 0
View the author
Dengshuangjang
deepin
2019-11-04 03:34
#3
haohaohao 发表于 2019-11-3 18:56
可以用宝塔,而且外网用IPV6地址可以直接访问网站,
安装宝塔,我用了接近个多小时,而安装xampp只用了几分钟,而且可用!只是没法开机自动启动运行!
Reply
Like 0
View the author
Dengshuangjang
deepin
2019-11-05 02:41
#4
终于搞定设置软件自动启动运行的问题!其实木有那么麻烦!
Reply
Like 0
View the author
Dengshuangjang
deepin
2019-11-05 02:43
#5
[Unit] Description=Xampp service After=network.target remote-fs.target [Service] Type=simple ExecStart=/opt/lampp/xampp start ExecStop=/opt/lampp/xampp stop KillMode=process Restart=on-failure RestartSec=40s [Install] WantedBy=multi-user.target
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Events
More
Xampp是很棒的一个网站管理程序,出于兴趣,安装后,它不在开机后自动运行,非得你在终端进去安装目录:/opt/xampp目录下输入:./xampp,还得输入管理员密码,实在是麻烦!于是建立一个快捷方式,用快捷方式启动一个脚本,脚本放在:/user/sbin目录下,内容是:
#!/bin/bash
echo 密码 || sudo -S /opt/xampp/xampp start
EOF
测试,双击快捷方式,成功
但觉得这里显露了密码,不能作为一种普及开来的办法,于是研究!
换第二个办法!
然后在/etc/init.d下建立一个we--xampp的文件,内容如下:
#!/bin/sh
#chkconfig:2345 80 05
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
/opt/xampp/xampp start #这里迷糊了,还是该写成:
cd /opt/xampp
./xampp
chmod +x web-xampp
chkconfig –add web-xampp
chkconfig –list web-xampp
伙伴们,你们看我这样能成功吗?