Start a service when boot – Linux

This post describes how to place a script for running at Linux start up.

Write a bash script serviceX (e.g. “./home/you/x/bin/start” )

 
chmod +x serviceX
sudo cp serviceX /etc/init.d/serviceX
sudo chown root serviceX
sudo update-rc.d serviceX defaults
sudo service serviceX start

Tip: Use other files under /etc/init.d/ for reference.

Advertisements

Useful Links to Linux Related Subjects

Clean Cache and Free RAM

sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

SSL Tutorial

Use SSL to encrypt site’s info and establish secure connection from a Cent OS serverk.

Bitnami

One click solution to app deployment on cloud. e.g. LAMP, DRUPAL and more..

Useradd – A good tutorial with many useful examples.