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 ).
now, every time i want to do some development i have to sudo service apache2 start
and sudo service mysql start
in a terminal. wich is fine.
my question is: could those commands be executed from a .sh file? 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
#!/bin/sh
sudo service mysql start
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.