Posts tagged as:

linux

Howto: Backup and restore your system! – Ubuntu Forums.

{ 0 comments }

Sponsored links:

You can upgrade your entire Ubuntu server from one revision to another with dist-upgrade.

First, you must ensure the new version repositories replace the existing repositories in your server’s /etc/apt/sources.list, then simply issue the apt-get update.

Finally, perform the actual upgrade by typing:

sudo apt-get dist-upgrade

{ 0 comments }

Sponsored links:

I’ve learnt quite a lot about Linux server administration in the last year or so. I had found this subject complicated and inaccessible, but recently it’s been a lot more fun and easy to understand. This is entirely due to Slicehost, my all-time favourite hosting company.

Slicehost offer basic ‘slices’ (IP address, storage, bandwidth and RAM) for as little as $20 per month, you get to choose the installed OS from the major Linux distros. This means you have to do everything else yourself; extra packages, web servers, databases, email, whatever. For someone like myself the learning curve was a little steep, but due to Slicehost’s powerful admin tool and incredibly well-written articles you can start doing this stuff with only a little understanding about server admin.

So, if you want to learn this stuff quickly, buy a Slice and refer to PickledOnion’s articles. Easy!

{ 6 comments }

Sponsored links:

Ubuntu Hardy Heron Server comes pre-installed with a program called logrotate.d. Once you understand how this works log rotation for your Virtual Hosts is easy.

First, edit the log rotation parameters:

sudo nano /etc/logrotate.d/apache2

The standard contents of this file is:

/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f /var/run/apache2.pid ]; then
/etc/init.d/apache2 restart > /dev/null
fi
endscript
}

I simply copy and paste this function and change the initial path in the first line and link it to my Apache log files in whatever Virtual Host I want to work with. You can also modify the other parameters for more or less frequent rotation. Full instructions can be found in the logrotate manual:

man logrotate

The logorotate file is run daily by the crontab at 6.25 AM, if you need to change this type you need to edit the crontab file:

sudo nano /etc/crontab

Easy!

{ 0 comments }

Sponsored links:

We run multiple websites on multiple servers so it’s fairly important that we can synchronise the time-zones on all these different boxes.

We found the Linux process of changing time-zone a little quirky, so we thought we would note it down here for future reference.

I think the following applies to most flavours of Linux, but we’re specifically using Ubuntu Dapper Drake in this example.

First of all, you’ll probably want to check the time and date on your box, to do this log-in via SSH and type the following command at the prompt:

date

You should then see the current time and date in this format:

Mon Aug 13 09:30:19 EDT 2007

OK, so let’s change our time-zone from EDT to something else. The server time-zone is controlled by a file called localtime, this file is a symbolic link to the specific time zone file. This file can be found in the etc/ folder, the specific time zone files can be found in usr/share/zoneinfo/. So, we just need to re-write the localtime sym link and re-point it. Working in the etc/ folder which contains localtime, type:

ln -sf /usr/share/zoneinfo/EST localtime

Now, when you check the time and date, you should that it now displays a different time and zone:

Mon Aug 13 06:45:02 PST 2007

There you have it, time-zone changed!

There are lots of options in the zoneinfo folder, take a look inside to see what you can use.

{ 3 comments }

Sponsored links: