CentOS 7 install PostgreSQL 9.2.7 with data files on SSD

CentOS 7 is much much newer than 6, highly recommended fro any new “Enterprise” build.

It came with the PostgreSQL is 9.2.7, the latest stable is 9.3.5 from PostgreSQL.org at this moment.
I say 9.2 is good enough for me considering the works RedHat has been done to make it fit.

To install it is super easy:

Mount the data directory on SSD

First check the permission:

Add in /etc/fstab:

Mount it manually:

Change the permission:

And don’t forget reboot check permission:

CentOS 7 Install Open-vm-tools for VMware ESXi

FYI: I found have to reboot the VM to get the info from vmware ESXi control center.

CentOS 7 add new SSD in LVM format XFS

Got sometime with CentOS 7 recently.

Try to add an New SSD into system.
I know to get the best performance should avoid LVM, but for easy extend I will using LVM here.

First make sure you are using newer fdisk (added SSD alignment support after 2.17), CentOS 7 came with 2.23.2.

Create partition and change the flag to LVM (e8):

Create PV

Display PV

Create VG

Create LV using all free space available on the VG just created

Format in XFS

Found /dev/mapper for mounting:

Update /etc/fstab

Mount it:

To check SSD alignment:
Looking at the Start Sector, should be 2048 not 63!

Update WordPress to 4.0

Been busy on Life and Job, finally sit down and check my blog.

WOW, 4795 Comments!!!

11 Updates!!!

Just wget the latest from wordpress.org

[poll id=”4″]

CentOS 7 How to secure SSH service

Haven’t got any time play with CentOS 7 since it launched.

Here are my steps to setup the SSH service on CentOS 7:

1.sudo

2.Configure SSH disable root remote login

3.Configure SSH to a bigger random port
Most of the “Port scanning Tools”, start from lower ports number: 1,2,3…20,21,22,23…10000.
To make “My Friends”‘s work a little bit hard.
To secure the ssh, simply give it an high random number like: 44022

4.Tell SELinux to pickup the new port

5.Update Firmwalld allow the new port

Now restart the ssh and firmwalld daemons

Reference: http://wiki.centos.org/HowTos/Network/SecuringSSH

[poll id=”3″]

New debian SSD Server

Just build an new debian server with SSD installed, here is some optimization:

1.Disable swap

2.Enable dealine scheduler

test at reboot:

3. Mounting SSD filesystems