Everything from Virtual Private Server (VPS) tips, to CCTV and more.

Random header image... Refresh for more!

When the space is running out….

Sometimes, you run do run out of room, and reach a point where you cant really delete much more to gain space.

When that happens, you can purchase extra space, in my case I opted for a extra 10 gig of space for $9.99 a month extra.

The process was quick and easy, for a short while I was denied access to the sites control panel, with a message saying a upgrade was in progress (cant recall the exact wording, but you get my drift.)

Once that went away, the extra space was in place.  Nice and simple, no messing around.

Good job I did get extra too, as I quickly hit the old space limit, but now have more room for growth.

January 9, 2008   No Comments

Modifying your error pages.

The location of the error pages is

/var/www/error

Editing the files in that directory enables you to have custom error pages, noindex pages, 404 pages etc.

You can customise them to suit your sites look and feel, or even add extra functionality if desired.

Note, the above location may vary on different servers - the location given is where they are on my goddady centos vps. You will need to do your own research to find the exact location if you are not there!

December 26, 2007   No Comments

Quick ban a IP address.

Simple quick IP ban using IP Tables, so I dont forget ;)

# cd /sbin

# ./iptables -I  INPUT -s  THEIPADDRESS -j DROP

November 30, 2007   No Comments

Quick n easy search and replace in mysql

I had to do a quick search and replace on a field that had some records with the ‘http’ bit duplicated, so this did the trick.

update `pages` SET url=(replace (url, ‘http://http://’,'http://’))

November 2, 2007   No Comments

Virtual Terminals via SSH

If you want more than one window when using SSH, instead of opening up multiple ssh sessions/putty windows you can type

screen -S 1

This will start the screen utility, and give you a new window.

To open a new window use CTRL-A C

Top swop windows use CTRL-A window number or just CTRL-A

Its handy if you want to have a couple or more windows open and swap between them fast.

October 31, 2007   No Comments

Great little bit of software.

I have been on the lookout for a decent editor/ftp/putty type utility, and finally I came across winSCP from

http://winscp.net/eng/index.php

Only used it for a few minutes, and already I feel at home, its nice and intuitive, very fast, and if your after something like this, you should check it out.

Anyone know of any other similar (free) software like this, if so leave a comment so I can try it, cheers!

October 13, 2007   No Comments

Dont kill your java.

If you have the simple control panel on your gd VPS, then dont kill the java process, as I mistakenly did after looking at it and thinking, hmmm thats taking rather a lot of memory for something I am not using.

If you kill the java process, you cant get back into your control panel, and have to request a power cycle, which is quick and easy, but not something people should do unless absolutely required, as if it really is a power cycle that will bring down all accounts on that VPS for a short while until it reboots. At least thats my assumption…

Mind you, I suppose I could have shutdown the server from the command line, but Im reluctant to try that, Im not sure if it restarts automatically, or not (anyone know?)

October 12, 2007   1 Comment

Running Centos on a thinkpad…

As the VPS i use is running Centos, I wondered if it would be possible (without tearing my hair out) to run a copy of Centos on my IBM Thinkpad R32 laptop.

As a test, I downloaded the Centos 5 Live CD iso file (available from centos.org) and burned it to a cd.

With my fingers crossed, I rebooted and chose to boot from the cd.

The result is I am now typing this post, on a Centos 5 system, which is running *from the cd*.

Everything just worked, firefox, internet access, sounds the whole lot just works! It can even see the files belonging to XP on the C: drive, so it makes a good emergency boot disk, and comes with plenty of software (spreadsheet, presentation, graphics, internet, email etc)

Now I know it works, I will have to download a full install, and stick it on a second hard drive, that I can just put in the ultrabay enabling me to boot into a unix system when I feel like it.

ps - it also seems to be running faster than my XP was ;)

October 12, 2007   No Comments

Problems running the tuning-primer script

I found a tuning-primer script in the home directory, I must have installed it earlier, and forgot all about it, if you have the same one (for tuning mysql) and you run it only to find it only half works, and the other half is just errors then you need to install the

bc

package, with

yum install bc

October 11, 2007   No Comments

Restoring a mysql backup.

Its easy enough to use phpmyadmin to restore backups, but its pretty limited when it comes to larger databases - so I tend to use the command line to restore those.

I usually export the file ‘zipped’ (you can do gzip if prefered, and alter the unzip part later) then ftp it to my server, to a location out of the webroot.

After using

unzip filename.sql.zip

you end up with the unzipped file, I normally delete the original zip to save space on the server at this point.

To import the database (you need to make sure you have already set up a database user in the control panel etc) use the following syntax

mysql -u username -ppassword database_name < unzipped-file.sql

then wait, whilst it imports.

October 11, 2007   No Comments