Solutionist's Blog

Tech | Health | Life | Travel

Find out the IP address of eth0 and display IP only

  Now you just wanted the IP address, use grep to get the IP: $ /sbin/ifconfig eth0| grep ‘inet addr:’Output: inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0 To get IP address from use cut command: $ /sbin/ifconfig eth0 | grep ‘inet addr:’ | cut -d: -f2Output: 192.168.2.1 Bcast Finally remove Bcast with awk $ /sbin/ifconfig eth0 | grep […]

How can i see if an ethernet interface is up/down linux centos

watch ip link show   ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 50:e5:49:45:3f:96 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:0a:cd:20:31:4a brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether […]

Fix: Cyrus-IMAP Logging region out of memory cirus imap

I found out that the Cyrus-IMAP’s database is flagging with errors as below: [root@mail ~]# tail -n 100 -f /var/log/maillog Mar 24 10:36:14 mail lmtpunix[4017]: executed Mar 24 10:36:14 mail lmtpunix[4017]: DBERROR db4: Logging region out of memory; you may need to increase its size Mar 24 10:36:14 mail lmtpunix[4017]: DBERROR: opening /var/lib/imap/deliver.db: Cannot allocate memory Mar 24 10:36:14 mail lmtpunix[4017]: […]

How to setup an NFS share from Mac OSX Server to Linux

Set up the NFS share Download NFS Manager from www.bresink.com/products.html. It’s very low-cost shareware but you can use it free if you don’t mind an occasional pop-up reminder. You could probably set things up without NFS Manager, but it makes things a heck of a lot simpler. Using NFS Manager, add a new share, browsing for the directory […]

How To Kill A Remote TTY Session In Centos Linux:

First do a ‘w’ command to get the ‘tty’ details of the session that you would like to terminate. # w root     pts/1    192.168.1.104    10:21    0.00s  0.03s  0.00s w root pts/2   10.0.0.XX 16:26 0.00s 0.02s 0.00s w In the above example, i have initiated another ssh session from 10.0.0.XX. To […]

Password less SSH with just 2 commands

ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys. # ssh-keygen # ssh-copy-id -i ~/.ssh/id_rsa.pub <remote-host-address> wla ……. you ready to ssh without password

install NFS server Centos / Red hat

1. Install NFS and Create Directories The first step is to create a NFS server if one is not already set up. The client OS filesystem lives (is stored) on that NFS server. As part of the PXE boot process a host with a PXE boot enabled network card, will issue a broadcast for a […]

Secured By miniOrange