Menu
abriraqui
  • reflexiones
  • publicaciones
  • hackership
  • experiencias
abriraqui

Removing processes from start up #gnu/linux

Posted on September 20, 2013September 20, 2013

Tweet

cup - hacker inside Sometimes, one thinks that is going to do one thing and ends up doing something else. So yesterday, since what the to-do task got complicated and I had the opportunity of being with a nice sysadmin, that wants to shared good practices, we ended up improving the performance of the laptop, but removing from background processes that run on the starting up.
Since I have a really bad memory, I preferred to post it for my own sake and also to share it.

I had always running redis-server, mysql, postgres, apache, things that actually I don’t need by default, and when I need them I can just start them 🙂

So, to remove a process in init.d from the start up, it had to be done the following

lala@lala:~$ sudo update-rc.d -f redis-server remove
lala@lala:~$ sudo update-rc.d -f postgresql remove
lala@lala:~$ sudo update-rc.d -f apache2 remove

If I need them, I just need to

lala@lala:~$ sudo service redis-server start
lala@lala:~$ sudo service postgres start

Also I discovered that initial processes are not only on /etc/init.d but also on /etc/init

But the way to remove them from the start up, is a bit different, you need to create a .override file

For example I wanted to deactivate MySQL, so I’ve done

sonduk@sonduk:~$ echo ‘manual’ | sudo tee /etc/init/mysql.override

now I have a new file called mysqld.override and inside just one word “manual” 🙂

©2023 abriraqui | Powered by SuperbThemes & WordPress