Posts

Showing posts with the label linux

Deploy Redis on your VPS

Image
via: http://library.linode.com/databases/redis/debian-5-lenny Install Redis Prepare System for Redis Issue the following commands to update your system's package repositories and ensure that all installed packages are up to date: apt-get update apt-get upgrade Install required prerequisites with the following command: apt-get install build-essential This guide only provides instructions for installing and managing Redis itself. The application you deploy likely requires additional infrastructure, dependencies, and utilities. Download and Compile Software Begin the installation process by issuing the following sequence of commands to download the software and prepare it for use: cd /opt/ wget http://redis.googlecode.com/files/redis-2.0.4.tar.gz tar -zxvf /opt/redis-2.0.4.tar.gz mv /opt/redis-2.0.4/ /opt/redis/ cd /opt/redis make This will download and compile the 2.0.4 version of Redis. Check the Redis upstream project source to ensure that you are downloading the most up to date v...

[init.d] adding launch time script to linux

Making scripts run at boot time with Debian Posted by Steve on Mon 11 Oct 2004 at 13:01 Tags: boot , debian-specific commands , initscripts , scheduling Debian uses a Sys-V like init system for executing commands when the system runlevel changes - for example at bootup and shutdown time. If you wish to add a new service to start when the machine boots you should add the necessary script to the directory /etc/init.d/ . Many of the scripts already present in that directory will give you an example of the kind of things that you can do. Here's a very simple script which is divided into two parts, code which always runs, and code which runs when called with "start" or "stop". #! /bin/sh # /etc/init.d/blah # # Some things that run always touch /var/lock/blah # Carry out specific functions when asked to by the system case "$1" in start) echo "Starting script blah " echo "Could do more here" ;; stop) echo "Stopp...