Linux

Linux ifconfig cheat sheet

Display link status & IP Addresses ifconfig Bring interface up ifconfig eth0 up Bring interface down ifconfig eth0 down Assign IP to device eth0 ifconfig eth0 192.168.0.2 Assign IP to device including netmask and broadcast ifconfig eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.1 Add IP as alias ifconfig eth0:1 192.168.1.2

Linux ip cheat sheet

Display link status ip link show Display ip addresses ip addr show Bring interface up ip link set eth0 up Bring interface down ip link set eth0 down Assign IP to device eth0 ip addr add 192.168.0.2 dev eth0 Assign IP to device including netmask and broadcast ip addr add 192.168.0.2/24 broadcast 192.168.0.255 dev eth0 Delete IP from device ip addr del 192.168.0.2/24 dev eth0 Add IP as alias ip addr add 192.

Running multiple PostgreSQL clusters using systemd

Requirements   Using systemd   Multiple instance of PostgreSQL       First instance running on port 5491       Second instance running on port 5492 Steps to setup first service STEP 1 create and edit service file sudo vi /etc/systemd/system/postgresql-9.4-5941.service STEP 2 Import original and Add Env .include /lib/systemd/system/postgresql-9.4.service [Service] Environment="PGDATA=/var/lib/pgsql/9.4/data1/" STEP 3 Modify postgresql.conf for instance sudo vi /var/lib/pgsql/9.4/data1/postgresql.conf" STEP 4 Change port for postgresql