Linux Archives

Over 80% is running on some form of Linux – so does your Mac and you iPhone. Sometimes we have to get our hands dirty on the command line – it makes you feel like a proper hacker.

Here are some pointers I picked up on my journey.

Linux Disk Space shown as Pie Chart

It's much easier to see a nice diagramme rather than a cryptic line of text from the command line interface

I’m managing a server for Loft London. They’re using it as FTP site for various clients, so I wanted to provide an easy way for them to keep an eye on how much space is used and how much is left.

I’ve done some digging and found this super handy PHP Pie Chart generator by Rasmus Peters. You can call it just like an image, give it some parameters and generate a very cool pie chart diagramme.

My challenge was to use it dynamically by calling the df command on th ecommand line and convert that into a pie chart. Here’s how I did it:

Read more

When Plesk fails to upgrade

I’ve had this issue before: you get a new server, the image is a few revisions behind the current release and your first line of business is to upgrade the system.

A few minutes later you check and find that Plesk refuses to start. Bugger. Now what?

My Customer Support Gurus always know what to do, but in an effort to not disturb them at night here’s what they did to make it all work again. These instructions work on a CentOS 5 system with Plesk 9.0.1 installed.

Read more

How to install Parallels Plesk on a new Linux server

So I’ve expanded my server arsenal to a fifith machine with Strato in Germany. Sadly they only offer an OpenSUSE installation bundled with Plesk (in German – unchangeable to English).

What I really wanted was another CentOS system though, which Strato offer – but without Plesk installed.

After a bit of hackage, I found out that it’s very easy to install Plesk from the command line via the Parallel’s Auto Installer.

These instructions should work on any distribution of Linux – just make sure you download the right auto installer package from the Parallels site (you need to create an account with them and log in for this link to work).

Read more

How to repair MySQL tables from the Command Line

Sometimes your tables crash and your website is unresponsive. You don’t have access to phpMyAdmin to do a repair, because you can’t access Plesk. That sucks! When you’re out in the field and all that’s at hand is a trusty SSH connection from your mobile, here’s an alternative way to bring your WordPress Sites back … Read more

Where is php.ini on a Linux Server?

By default, it’s located in /etc/php.ini In this file, you can set your upload limits, memory limits, safe mode and many other settings that you may wish to change. Before saving permanent changes to this file please consider the following: CREATE A BACKUP before saving all changes will be live AFTER REBOOTING your machine all … Read more

How to setup a Cron Job in Linux and Plesk

Wouldn’t it be great if something could be triggered even when you’re not around? Say once an hour, once a day, once a week or whenever you like in predetermined intervals? Then you want to do this with what’s known as a Cron Job, or Scheduled Task. Unfortunately, this is a bit beyond what WordPress … Read more