Category Archives: VPS - Page 2

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>

Command (m for help): n
Command action
e extended
p primary partition (1-4): p
Partition number (1-4): <enter partition number>
First cylinder (32-6527, default 32):
Last cylinder or +size or +sizeM or +sizeK (32-6527, default 6527):

Command (m for help): t
Partition number (1-4): <enter partition number>
Hex code (type L to list codes): 8e
Command (m for help): p
Command (m for help): w

The partition table has been altered!
master:~# reboot

when it has rebooted, you just have to resize the filesystem with..

master:~# resize2fs /dev/xvda1
master:~# reboot

Resize the SWAP Disk like this:

<run through the regular resize for a disk and reboot>

master:~# swapoff

master:~# cfdisk /dev/swap-partion

master:~# mkswap -c /dev/swap-partition

master:~# swapon -a


 

Disk speed VPS, how fast?


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

The number one bottle neck for a VPS is Disk I/O. The easy way to find out the quality of your VPS’s disc I/O is by issuing the above command which will copy a 32mb file, outputting the time taken and average transfer speed…

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.

First you need to install all the correct libs


yum install gcc-c++

then download latest pcre from

http://www.pcre.org/

unpack and configure


./configure --prefix=/usr
--docdir=/usr/share/doc/pcre-8.10
--enable-utf8
--enable-unicode-properties


make


make check


make install

the libraries will be installed to /usr/lib and you will need to add a new path for your DSO loader create a file called pcre.conf in the directory


/etc/ld.so.conf.d

and insert the path


/usr/lib

save and close and update the cache by running


ldconfig

restart your web server and check phpinfo that your PCRE module has been updated to 8.11 (or latest).

Logrotate

WordPress › Error

There has been a critical error on this website.

Learn more about debugging in WordPress.