gunicorn behind Apache web server

gunicorn is a python application server used to run python applications in production. This is normally run behind web servers like nginx or apache.

To configre gunicorn behind apache, enable following apache modules.

Restart apache web server

For web site running pythin application, add a virtual host like following.

run same command on multiple tmux panes

If you want to run same command on multiple servers, you can use tmux synchronize-panes feature. This will be useful when you need to setup multiple servers, say install nginx/php/mysql on multiple servers.

You can create multiple panes in tmux. SSH into each of the servers from these panes. Now run

Now type

Whatever command you run on one of the pane will be executed on all panes. Be careful when you run server specific commands.

tmux create new window on current directory

When you start a new window or split pane on tmux, it always start with the directory from where you run tmux command.

I prefer it start with current working directory of active tmux window. To do this, edit file


Auto Attach to tmux session on SSH

To start tmux and attach to existing connection on SSH in, edit file


Method 2

You can use following command when connecting to remote sevrer.

Install MongoDB 4.0 on CentOS 7

To install MongoDB 4.0 (for other versions, see release note) on CentOS 7, create file

Add content

Install MongoDB with

Enable MongoDB start on boot

Start Mongo DB with

To see mongoDB version, run

To see if mongoDB running

Or use

Configure postfix to relay mails using Gmail

Install postfix

Create file


Save and exit editor. Run

Edit postfix configuration file

Find and remove

At end of the file, add

Restart postfix

Now all mails will be forwarded using gmail.

Test Email Delivery

Install mailutils

To sent test email, run

Check mail log

See postfix

Install jupyter notebook

To install jupyter notebook on Ubuntu run

To start jupyter notebook, create an empty folder, change to it

Now run

By default, it bind to localhost. If you want to run on a public IP, run as follows


List SSH keys

To list all SSH keys used by ssh agent on your system, run



To add all available ssh keys to agent, run