[英]start apache & mysql from desktop script in ubuntu
on lubuntu 14.04 (desktop) i have installed apache web server and mysql server and, because of low ram (only 1024mb), i decided to remove them from startup (with sudo update-rc.d -f apache2 remove
and by editing the /etc/mysql/my.cnf
file ). 在lubuntu 14.04(台式机)上,我已经安装了apache Web服务器和mysql服务器,并且由于内存较低(仅1024mb),我决定从启动中删除它们(使用
sudo update-rc.d -f apache2 remove
并通过编辑/etc/mysql/my.cnf
文件)。
now, every time i want to do some development i have to sudo service apache2 start
and sudo service mysql start
in a terminal. 现在,每次我想进行一些开发时,我都必须在终端中
sudo service mysql start
sudo service apache2 start
和sudo service mysql start
。 wich is fine. 一切都很好。
my question is: could those commands be executed from a .sh file? 我的问题是:可以从.sh文件执行那些命令吗? a file that i can double-click it from my desktop?
我可以从桌面双击它的文件吗? so far i got
到目前为止,我得到了
#!/bin/sh
sudo service apache2 start
sudo service mysql start
You can do it with scripts which you mentioned. 您可以使用您提到的脚本来实现。
Apache: 阿帕奇:
#!/bin/sh
sudo service apache2 start
Mysql MySQL的
#!/bin/sh
sudo service mysql start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.