Posts

Showing posts from February, 2015

Deploying a HA Redis setup

Image
Sentinel process takes the responsibility of electing a slave as master if a failure occurs. For more information refer  this . Install Redis in each node. Following methods can be used to install Redis. Using Ubuntu repositories.  sudo apt-get install redis-server Manual installation You can download a Redis distribution from this page  http://redis.io/download . Follow the instructions on this page to setup Redis using the downloaded setup  https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis Set requirepass property to set the password in the configuration file in /etc/redis. Note that this should be same in all nodes. Set Up replication Set the following properties to set replication on slaves. slaveof <masterip> <m...

Bind a remote server's port to a local port

If you have a remote server (say in Amazon EC2) you might want to access a particular port of that server. But there can be situations where it is not that port is not globally open. If you do not want to bother making it globally open you can use it by binding it to a local port of your workstation via ssh. Following command will bind port 9000 of remote machine to your local port 8000.  As an example if it is web server you can easily access it by typing localhost:8000 in your web browser. ssh -L 8000:localhost:9000 username@host