Category Archives: VPS

Postgresql 9.0 Centos Install and Config

Download repo

wget http://yum.pgrpms.org/reporpms/9.0/pgdg-centos-9.0-2.noarch.rpm

Install repo

rpm -i pgdg-centos-9.0-2.noarch.rpm

Install Postgres

yum install postgresql90-server

Initialise DB

service postgresql-9.0 initdb

Start Service

service postgresql-9.0 start

php-wkhtmltox

wkhtmltox is a great piece of kit to convert webpages to PDF format.

It is – however – an absolute Pita to install, as there are minimal resources on the net for installing this onto a Linux Server.

Resize XEN VM disk and Swap Disk

master:~# fdisk /dev/xvda

Command (m for help): p
Command (m for help): d

Partition number (1-4):<enter partition number>

Disk speed VPS, how fast?


dd if=/dev/zero of=test bs=64k count=512 oflag=dsync

PCRE unicode support CENTOS

Centos PCRE repo is 6.6, and cannot be YUM REMOVED without removing hundred of dependancies…

I needed to install PCRE with unicode support which meant compiling my own package.

Logrotate

Rotating your log files will save you a bunch of space from bloated web logs growing out of control. Logrotate is easily customisable to suit any needs.

Subversion + Lighttpd + Apache

 
 
yum install  -y subversion mod_dav_svn
 
 
groupadd svn
useradd svn
 
mkdir -pm700 /var/svn/projects
svnadmin create /var/svn/projects/test
chown -R svn:svn /var/svn/projects
 
mkdir -p /var/www/projects.example.com/httpdocs

edit httpd.conf

 
 
 
Listen 8080
 
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

Change the user and Group from apache:apache to svn:svn

 
 
 
User svn
Group svn

Add a virtual host.

ad814df1430e6c83c4f557ea3fb56507012

UnixBenchmark 5.1.2 a study measuring performance across different spec VPS’s

Linode

Linode

The idea was pretty simple. See how my VPS benchmarked using the unixbench script.

Then I took the idea further by upgrading my VPS to different sizes to see how performance tracked against different classes of VPS.

YUM tricks of the trade

# make yum update all programs every night

chkconfig yum on

# make yum install program and answer YES to all queries.

yum -y install

How to setup your first VPS – linode – PART 2

So we’ve setup our server, it is up to date, and root login has been disabled. Now to setup our webserver:

ad814df1430e6c83c4f557ea3fb56507027