Categories: Computing, Linux, Microsoft, Miscellaneous, Scripting, Security, SQL, Support, Teaching
Migrating a Joomla installation to a new server
Over the past couple of days I have been tasked with migrating our student intranet from an internal virtual host to an external hosting provider. With this in mind, I now present my guide to moving Joomla. Hope it helps!
Step 1: Backup everything!
The first thing you want to do is backup all files within your Joomla installation. Create a folder on your local system, and download all files to that folder using your ftp client application.
Step 2: Export your database
The easiest thing to do is use PHP admin to generate scripts via the Export function - this should create an SQL file that you can simply upload in to your new installation. The other, more complex way is to copy the Joomla database files from your mySQL instance and copy them up to your new server. This does imply that you have access to the relevant directories on both hosts. This is unlikely on a shared host. You can normally find the database files in /var/lib/mysql
Step 3: Modify configuration.php
This step is very important. Go to the folder on your local system to which you downloaded all of your Joomla files. In the first level folder, you will find the file named "configuration.php". Open this file with a text editor and make the necessary changes. At the very least, you will probably need to change the following parameters:
* $mosConfig_absolute_path: This is the absolute server path to your new Joomla! installation. It will probably look something like "/path/to/joomla/installation".
* $mosConfig_cachepath: This is the absolute server path to the cache for your Joomla! installation. It will probably look something like "/path/to/joomla/installation/cache".
* $mosConfig_live_site: This is your website's url. It will be something like "http://www.yoursite.com".
* $mosConfig_host: This is the location of the server that hosts your MySQL database. For most instances, this value will be "localhost". If you are unsure, ask your hosting provider.
* $mosConfig_db: This is the name of your MySQL database.
* $mosConfig_user: This is the database user name. Make sure this user has all privileges on your database.
* $mosConfig_password: This is the password for your MySQL database user.
Step 4: Upload all of your files to your new server
Using an ftp client application (like FileZilla), upload all of your files to the location on your new server where you want to install Joomla.
Step 5: Import your database to your new MySQL server
Using phpMyAdmin (or console commands if you know mySQL and have SSH access) and the SQL file you generated in step 2, import your old database into your new database. Alternatively, as mentioned, upload your Joomla database files.
Step 6: Test your new installation
Everything should be pretty much working - it's always worth making sure that the PHP and Apache configurations of both servers are identical. mod_rewrite in particular can cause issues if you have SEF links.
Finding Large Files and Directories under CentOS
For my sins, I act as our Moodle admin. For those of you that don't know Moodle, it's a virtual learning environment. We use it to present a number of courses and it generates about 250k hits a month.
Well, this morning the server ran out of space. I am in Cornwall and could hear the panic from here! Thanks to the fact the, bizarrely, I have HSDPA access with my T-Mobile 3G broadband on the edge of nowhere, I was able to SSH in and take a look. Main issue is to get the site up and running again, which means clearing down any unnecessary data. That means logs and temp files. But how do you find them without a GUI?
The easiest way I have found is to navigate to a likely directory (in this case /var/www/moodledata) and run the following:
This'll give you a list of the 50 largest files (and directories) in the current tree. In my case, it appears that the cron job had not been clearing down the backups correctly. Checking that they'd been moved to tape, a quick delete and we've got 4GB back - enough for the weekend and more importantly enough for me to get back to doing nothing in peace!
Yours truly interviewed by Computing
A couple of months ago, I was interviewed in my capacity as Systems DBA at Milton Keynes College about some of the challenges that we face as an organisation. You can read the resulting article, Defence Mechanisms, here.
DHCP Service Error - Access Denied
After a nasty attack of Conficker, one of our Windows 2003 boxes refused to start the DHCP service, giving the following message:

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7023
Date: Date
Time: Time
User: N/A
Computer: ServerName
Description: The DHCP Client service terminated with the following error: Access is denied.
The problem appears to be with permissions on a couple of registry keys, namely:
HKLM\SYSTEM\CurrentControlSet\Services\Dhcp
and
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip
To fix the error (comes from Service Control Manager with a code of 7023), set the permissions for the Network Service account on the two keys above to Full Control. Make sure that the permissions are cascaded down to sub-keys by going to Advanced Permissions and ticking the box which states "Replace permission entries on all child objects with entries shown here that apply to child objects".
This should fix the issue ![]()
Why not use a proper f***ing RDBMS?!
Over the past few weeks I've been working on a number of different projects, and the same issues have cropped up in all of them. Namely providers of supposedly Enterprise class software using God-awful back end databases. For example, Visual Fox Pro is not suitable for a finance system (I'm pretty sure you can only get it on 5 1/4 inch floppies!) Flat files are not suitable for an HR system. And Access 2003 is not suitable for anything! Full stop! There is no excuse for such shabby coding. In most cases, the software probably emerged from desktop projects that people had cobbled together. That's fine, but if you're going to release it as a paid for, supported product please, please, PLEASE use a proper back end database. Postgres is free. mySQL is free. Even SQL Server Express is free!
A plea to all programmers out there. I know you think your system is great. I don't care. All I want to be able to do is take the data out of the back end, run it through SSAS or SSRS and spit some reports out. It's not difficult, but some of you are set on causing me pain. Stop. For the love of God, please!
More Symbian S60 v3 Freeware - Nokia E90 essential apps
VNC Viewer: You'll probably have used VNC viewer at some point, but if not, let me explain. You can use this to take control of a remote PC. Couple this with PuTTY (in my previous list) and you can access pretty much any system you choose ![]()
Symbian DivX Player: Does exactly what it says - a full implimentation of the DivX codec for Symbian S60 v3 phones...
Navimote: Free SatNav! It's never going to be a TomTom beater, but it'll get you out of a spot, and it's free...
Locr: Automatically Geotag your photos - if that's your sort of thing, knock yourself out!
Nokia Step Counter: I'm sure a lot of people are still desperately trying to lose weight as part of their New Years resolution to get fit. Well, with the step counter, you can see exactly how fit (or how lazy) you really are...
SymTorrent: Tie an unrestricted data plan (thank you Vodafone!) with a desire to download stuff on the move, and what do you get? SymTorrent - the only Symbian S60 v3 bit torrent client.
Installing Sharepoint Server 2007 on Windows Server 2008 R2
As part of our ongoing Sharepoint project, I've decided to go all modern - the base OS is 64 bit Windows Server 2008 R2 Enterprise and the database engine is 64 bit SQL Server 2008. However, as soon as you try installing Sharepoint Server 2007 with a vanilla disk, you'll run in to problems - 2008 R2 expects Sharepoint to be service packed up, and at the moment there's no media available with SP1 or SP2 embedded (in fact there's no media avaliable at all on the Volume Licensing site at all, just a note telling you that for the moment they'll ship you the physical media for free - WTF is going on at Redmond at the moment?)
Luckily, there is a pretty easy way to get around the problem.
- Copy your install disk to a hard drive
- Download Sharepoint Server 2007 SP2 here
- Run the following command from the command prompt (cd to the directory where your download is stored first): officeserver2007sp2-kb953334-x64-fullfile-en-us.exe /extract: [Location of files copied from installation disk]\Updates
- Run setup.exe from the copied installation media root
Job done ![]()
Fun with Blades
As part of a Sharepoint deployment project, this week I've been building up one of the blades in our blade centre (an HP C-Class with an MSA1500 sitting on the back). A couple of things have struck me as I've been going through the build process - firstly, the insanely huge recommended partition size for Windows Server 2008 R2. The minimum recommended is 64GB. Take a while and let that sink in. 64 GB. The blade I'm using comes equipped with a pair of 137GB SAS drives, so once we mirror them, nearly half of the available space is taken! Not funny Microsoft! I'm sure that the chaps at Redmond will justify this by saying that it means that the OS has the optimum amount of space to spread in to, but compare this with a CentOS installation on the same hardware. 1.5GB. There is no way anyone can justify more than 40 times space for an equivalent installation - our CentOS box runs mySQL, Apache with 4 virtual sites and 2 instances of our VLE (Moodle - more of that in later posts). It's just not on, and it's no wonder that a lot of the admins I speak to are looking more and more seriously at an Open Source back end...
Secondly, the lack of 64 bit driver support is a major pain. Building the blade with a SmartStart v7.9 disk was an absolute no-no, even though it's only around a year old. Had to download v8.3 to get driver support for R2 x64. It's no wonder that lacklustre support from vendors leads to the same from developers - on my 64 bit desktop, probably half of the apps are still installed in the x86 Program Files root. 64 bit computing is not a new idea, and until either Microsoft or Intel make a stand and push 64 bit then we'll be stuck in a situation where 64 bit chips are running 32 bit code, hosting virtual machines to run 16 bit code designed by 2 bit companies...
Accessibility Considerations for End Users
As part of the MCDST course material, we look at accessibility options for end users. The material available is fine for the exam, but doesn't go in to nearly enough detail for the real world. Microsoft have therefore produced a number of factsheets for the various main desktop products which will give you, in great detail, all of the information you need to configure the OS of your choice for end users with any type of impairment.
Visit the site Here
Some Examples of End User Stupidity
When you work in support, people often ask why your default reaction is to assume that users are idiots. If you have a look at the pictures below, you'll have an idea why...
This is how Amazon takes my payment, right? Note there are 2 cards...

If at first you don't succeed, try installing it loads of times...

So close, yet so far...

I'm getting the most of my £200 by installing Office 9 times...


25/05/10 04:18:48 pm, 