UnixServerAdmin

Server Administration & Management

How to check Hard Disk Read-Write Speed in Linux

1. The command writes a 2.1GB file and output the result.

Check write speed:

# dd if=/dev/zero of=test bs=1048576 count=2048

2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 6.21583 s, 345 MB/s

2. The command reads the 2.1GB file and outputs the result.

Check read speed:

# dd if=test of=/dev/null bs=1048576

2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 0.408619 s, 5.3 GB/s

3. Now delete the test file.

# rm -rvdf test

August 30, 2013 Posted by | Tips & Tricks, Unix/Linux | , , | Leave a comment

How to install PostgreSQL in RHEL/ CentOS

Here are following steps :-

# yum install postgresql postgresql-server -y

# chkconfig postgresql on

# service postgresql start

# service postgresql initdb

# /etc/init.d/postgresql restart

# nmap X.X.X.X

Postgre SQL Port Number – 5432

August 20, 2013 Posted by | PgSQL | , | Leave a comment

SSH Public key challenge

Sometimes, We get the following prompt, when we try to connect a server using SSH. We type “yes”, but is there a way to avoid this.

The authenticity of host ‘111.222.333.444 (111.222.333.444)’ can’t be established.
RSA key fingerprint is f3:cf:58:ae:71:0b:c8:04:6f:34:a3:b2:e4:1e:0c:8b.
Are you sure you want to continue connecting (yes/no)?

Use the -o option,

ssh -o “StrictHostKeyChecking no” user@host

# vim /etc/ssh/ssh_config

Host *    –> line no 20, Uncomment the line
StrictHostKeyChecking no     –> line no 31, Uncomment the line

# /etc/init.d/sshd restart

August 10, 2013 Posted by | SSH | | Leave a comment