Install Yosemite by USB

If you experience a hard drive failure and need to re-install the Mac OS X operating system, you can create a USB install media.

You need a working Mac and a minimum of an 8GB USB pen drive.

  1. On a working Mac running Yosemite go to the AppStore and download Yosemite.
  2. Plug in the USB and format it using Mac OS X (Journaled) with a GUID partition scheme – leave the name as Untitled
  3. Open ‘Terminal’
  4. Use the following command
sudo /Applications/Install OS X --volume /Volumes/Untitled --applicationpath /Applications/Install OS X --nointeraction

It takes a good 20 minutes to complete and once finished, in the  ‘Terminal’ app, you will see the line

Copy complete.

Put the USB drive into the Mac you want to install on and when it boots hold down the alt key and choose your USB drive.


Open an Application from the command line

If you regularly use the command line and want to directly open an application and pass a file to it you can use the following:

open -a TextEdit ~/Documents/myfile.txt

The switch -a says use this application:

More switches from the command line:

open --help 
-a Opens with the specified application.
-b Opens with the specified application bundle identifier. 
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-F --fresh Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents.
-R, --reveal Selects in the Finder instead of opening.
-W, --wait-apps Blocks until the used applications are closed (even if they were already running).
-n, --new Open a new instance of the application even if one is already running.
-j, --hide Launches the app hidden.
-g, --background Does not bring the application to the foreground.
-h, --header Searches header file locations for headers matching the given filenames, and opens them.
--args All remaining arguments are passed in argv to the application's main() function instead of opened.

Linux LVM migration

So, you have setup a nice lvm partitioning scheme to future proof life, maybe the system will have a heart attack and need a new mobo; maybe we will fill up 20TB within the next year or so; maybe we get new architecture and want to migrate our huge data store across – ah haa !

So you get the set of lvm drives into the new system, boot up and can see the drives using:

fdisk -l

Great so far so good, now what ?

Well, we dont need to know why, just do this:

pvscan (will search all lvm block devices for physical volumes)

vgscan (scans all disks for volume groups)

If you are here its because you haven’t done this before and therefore have not taken the steps to prepare an lvm migration therefore:

1 – mark the volume group inactive

vgchange -an <volume group name here>

2 – export the volume group

vgexport <volume group>

3 – import the volume group into the system (kernel)

vgimport <volume group>

4 – activate the volume group

vgchange -ay <volume group>

Job done !

You can go ahead and mount as required.

Credited source over here

Linux free memory

Ever find yourself on another Linux system wondering why is this system so slow !

I wonder what RAM is installed I hear you thinking, the answer is the ‘free’ command.

# free

This will show you the amount of free and used memory installed in your machine with the option to use the following switches:

-b this will display the output in bytes

-k again in kilobytes

-m megabytes

-g gigabytes

-h in human readable form

-t will give you column totals

-s <variable> will repeat the command every <var> seconds

Developers Time Cheat Sheet

#      300   5 MIN
#      600  10 MIN
#      900  15 MIN
#     1800  30 MIN
#     2700  45 MIN
#     3600   1 HR
#     7200   2 HR
#    10800   3 HR
#    14400   4 HR
#    18000   5 HR
#    36000  10 HR
#    39600  11 HR
#    43200  12 HR
#    46800  13 HR
#    50400  14 HR
#    54000  15 HR
#    86400  24 HR
#    86400   1 DAY
#   172800   2 DAY
#   259200   3 DAY
#   345600   4 DAY
#   432000   5 DAY
#   518400   6 DAY
#   604800   7 DAY
#   604800   1 WEEK
#  1209600   2 WEEK
#  1814400   3 WEEK
#  2419200   4 WEEK
#  2419200   1 MONTH
#  4838400   2 MONTH
#  7257600   3 MONTH
#  9676800   4 MONTH
# 12096000   5 MONTH
# 14515200   6 MONTH
# 16934400   7 MONTH
# 19353600   8 MONTH
# 21772800   9 MONTH
# 24192000  10 MONTH
# 26611200  11 MONTH
# 29030400  12 MONTH

credit given here

Asterisk dependencies

Dependencies to install asterisk from source:


once having downloaded the asterisk source file into /usr/src and untarred it. There is a useful script that can be found in /usr/src/contrib/scripts/ called ‘install_prereq’.
Pass the parameter ‘install’ and sit back !

Force fsck on reboot

If you want to instigate a filesystem check on a Linux file system during the next reboot, create a blank file called forcefsck in the root directory (/).

I would suggest running the following commands as an administrator or user with elevated permissions:

touch /forcefsck


Imapsync migration from Zimbra to Kerio

If you are setting up a new Kerio mail server and want to use imapsync to port across your emails, this following command helps to re-locate your email folders from the existing server into a nice way on your tidy new Kerio server.

imapsync –syncinternaldates –subscribe –ssl1 –ssl2 –authuser1 admin –user1 user1 –passfile1 /home/user1/.passwordfile –user2 olduser1 –passfile2 /home/user1/.oldpasswordfile –sep2 / –prefix2 “INBOX/” –nofastio1 –nofastio2

That should nicely transfer all existing emails into their respective folders underneath your new Kerio Inbox folder.

replace admin; user1; user2; /home/user1/{.passwordfile, .oldpasswordfile} with your details.



Zimbra Imapsync problems

Seems there has been a breakdown in communication between Imapsync developers and main distro developer teams – perhaps even perl – – who knows !!

Anyhow there is a problem at hand between Imapsync and Mail::Client.


Subroutine Authuser redefined at /usr/bin/imapsync line 2557.

imapsync needs perl lib Mail::IMAPClient release 2.2.9 exactly, future imapsync release may suppoort 3.0.x, but sorry not now. See file BUG_IMAPClient_3.xx

# Looks like your test died before it could output anything.


rpm --nodeps -e perl-Mail && rpm -ivh


SSH Certificate No Password not working

Hi all,

For Linux administrators ,SSH is as important ,if not more so, than a watch.

Typing in a password every time a remote connection is established is detrimental to both workflow and security.

Using the tried and tested

cat .ssh/ | ssh 'cat >> .ssh/authorized_keys'

to bypass the password prompt is a great help.

However, it has been found that sometimes this doesnt work, the answer might be the permissions on the ‘authorized_keys’ file.

The solution (on the remote server – after executing the above command)

cd .ssh && chmod 600 authorized_keys

Now logoout and try to re-connect using ssh again

Hope this helps

How to re-install a package using YUM

If you use many distros you probably think ‘why hasn’t yum got a re-install’..

me too

But i found a work-around

rpm -e --justdb --nodeps %packagename%

yum install %packagename%

Thats a way to ensure you only remove the specified package allowing you to use yum to reinstall it again.

Found the original article and info here


Setting up VNC as a service

Hi all,

Question: Many times I wondered why is there a vnc service and why does it always fail on startup?

Answer: Simple configuration of the /etc/sysconfig/vncservers


this sets up a remote desktop service for user ‘john’ with a resolution of 1024×768

edit /etc/sysconfig/vncservers


VNCERSVERARGS=[2]="-geometry 1024x768"

If you want more than one user to have access, do the following:

VNCSERVERS="2:john 3:paul 4:harry"

VNCSERVERARGS[3]="-geometry 800x600"

VNCSERVERARGS[4]="-geometry 1600x1200"

That’s it.

Restart your vnc service and add it to the startup line:

/etc/init.d/vncserver restart

chkconfig vncerver on


Linux Setting rsync to use a different port number

So you have tightened security on your main server by changing the default port number.

Once a week to backup your server data by using the rsync application on a local backup server – possibly even running a crontab script.

All of a sudden you get errors such as:

ssh: connect to host port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-24.1/rsync/io.c(359)

Why is this ???

The option rsh allows the desired port to be specified through ssh.

In the following example, the -r option specifies ‘recursive’; -z enables compression; –rsh=’ssh -p1234′ tells rsync to use port number 1234 for transfers/connection.

The code would look something like this:

rsync -r -z --rsh='ssh -p1234' /dir1 --progress --stats

That’s it enjoy

GIMP Scripting for the beginner

Well, it took me approximately three full days of trying and testing, using the Script-Fu console mainly, but I am happy to report that I now understand the way to use the GIMP command line.

I will try to report on my finding, some solutions and assist with future use of GIMP in the best way I can here in this blog.

A script has also surfaced that presents the results of my hard work. (Covered later)

Some of the problems I encountered when tackling this subject for the first time were:

  • understanding the parenthesis syntax
  • using and ssigning variables and their values

However for now I will just attach the script, which should be saved into ~/.gimp**/scripts/

Once done open gimp and Xtns/Script-Fu/Refresh Scripts…..hopefully no errors and you can access it by the toolbox menu Xtns > Script-Fu/Misc/Levels.

Please bear with me as i am writing this in a hurry and will amend it when i get a minute.

Continue reading


Using BloGTK on Linux is easy to write and upload blog entries on WordPress.

Thanks to the article here it was easy to setup as well.

Using Ubuntu (you may need to add multiverse and universe repositories), simply run:

apt-get install blogtk

Now open Applications > Internet > BloGTK.

In the Account and Prefernces window, use the following info:

Server URL:
Username: Username
Password: Password
Bloggin System: MetaWeblog API

Now click SAVE and then OK.

In the main BloGTK window, select File Connect to get a list of your blogs.

Type away till your heart is content and then publish.

Custom Tags

To make full use of the tags available on, such as , open Edit > Custom Tags …

Tag Name: Code Tags
Start Tag:
End Tag:


When back in the main window you can simply insert the code tags by selecting your code tag and clickling the big green tick arrow.

Have fun

PXE Network Installations using Linux Servers

Hi again,

I’ve been busy testing out the way you can install an operating system, mainly Linux at this stage, directly from booting up your computer/server.


  • You need a server operating system, in this case I am using Fedora Core 6 – but I have also applied the principles to Ubuntu, capable of running DHCP and TFTP services.
  • Enough hard drive space for the server operating system and also enough space to store the contents of the downloaded discs.


  • The minimum requirement is a network card, NIC, with a network boot ROM on and a hard drive with enough space for an operting sytstem of cours.

General Connections

  • A network switch or hub is recommended, although a cross-over cable would suffice (and proably be fairly quick).

So, now onto the specific server requirements…

  1. Download Fedora Core 6 here.
  2. Burn the discs and install a minimum setup – this should help.
  3. create a folder /Fedora and copy the dics 1 contents into this folder.
  4. copy the contents of the directories Fedora/RPMS from each additional disc into the newly created folder /Fedora/RPMS/ (no need to overwrite anything).
  5. make sure you have system-config-netboot/httpd/dhcp/tftp-server installed on the server system. use the command.

yum install -y system-config-netboot httpd dhcp tftp-server

DHCP.conf configuration/setup

  • Supply information so that the connecting machines know the network details as to whewre to find the operating system installlation files. Soedit the config file using:

nano /etc/dhcp.conf

A basic configuration follows:

ddns-update-style none;
option domain-name-servers;
default-lease-time 86400;
max-lease-time 604800;
subnet netmask {
option subnet-mask;
option broadcast-address;
option routers;
filename “pxelinux.0”;

An explanation,taken from the source of this dhcp tutorial found here, follows:
I explain the configuration options here:
* ddns-update-style: You can tell the DHCP server to update a DNS server if the IP address of a server in your LAN has changed (because it has been assigned a different IP by DHCP). As we do not run servers in our LAN or always give them static IP addresses (which is a good idea for servers...) we don't want to update DNS records so we set this to none.
* option domain-name-servers: This tells the DHCP server which DNS servers it should assign to a client. You can specify more than one DNS server here, seperated by commas.
* default-lease-time, max-lease-time: A client can tell the DHCP server for how long it would like to get an IP address. If it doesn't do this, the server assigns an IP address for default-lease-time seconds; if it does, the server grants the requested time, but only up to max-lease-time seconds.
* authoritative: If this is not set this means that if a client requests an address that the server knows nothing about and the address is incorrect for that network segment, the server will _not_ send a DHCPNAK (which tells the client it should stop using the address.) We don't want this so we set authoritative.
* subnet: The subnet to use.
* netmask: The netmask to use.
* range: Tells the DHCP server from which range it can assign IP addresses to clients. In our example it's from to (30 IP addresses).
* option broadcast-address: The broadcast address to use.
* option routers: Tells the DHCP server the gateway address it should assign to requesting clients. In our case the gateway is

The last two lines I have added myself,
filename "pxelinux.0";

this tells the network installation machine to load the “pxelinux.0” image from the server

Start the DHCP server using:

/etc/init.d/dhcpd start

Hopefully, no errors. now to ensure the dhcp server always starts after rebooting run:

chkconfig dhcpd on

Configure WebSite Alias

The install requires a running web-server from which the files are transferred to the new installation machine.

Therefore, we add an alias to the web-server, which we will call /fedora. The alias will point to the physical directory /Fedora. Open the web-server configuration file using:

nano /etc/httpd/conf/httpd.conf

and add the directory with its alias to the end of the file:

Allow from
AllowOverride None

alias /fedora /Fedora

Network Boot Configuration/Setup

To install our initial netboot install run:


and choose “Network Install”.


Now add the name of your install – say “Fedora Core 6”.

Add the location of the install files, using we add the line:

The location of our kickstart file will be at


Hopefully, that should just about get you going with a great PXE nertwork install.

Please let me know if I can improve this tutorial or adapt it to suit your needs.


Free Anti-virus/anti-spyware


Sooner or later your free trial of the Google Pack Norton Anti-viurs 2005 will be running out.

In anticipation of this, I can recommend you switch to an Open Source solution.

The application is call AVG-Free edition, which provides a real-time scanning utility with updates for Windows and Linux users.

In addition to this AVG-Free provide an anit-spyware application. This provides free updates, the free version provides real-time scanning for 30days and then defaults to free updates and manual scans there after.

more will follow….



After many years of thinking that PHPBB2 was the only high quality forum. A need to research other options has come to light due to the ever present spammers allowed to roam free on our lovely Internet.

So during my research I decided to Google “forum matrix”. Low and behold someone has covered this topic down to the last tee.

The place to go if you want to set-up a forum/bulletin board for your website is

I am in no way saying that phpBB is not good, in fact it did me proud for a long-time and version 3 is due for release very soon. (after previewing the beta it looks as though it is maturing well).

The latest offer I have started to test is SMF (Simple Machines Forum) – and without doubt blows the socks off of any rivals. Coming soon to

SMF has a brilliant flash integration chat room, anti-spam plug-in, and all this works seamlessly. Its not only the most well presented, easy-to-use and administer, well documented and fun to setup – but it costs……… nothing at all !! You can’t beat that.

But if you want to compare just about every forum then go to the link above to view the forum matrix.

All the best

Cisco Security Basics


Here are the basics for setting up a Cisco router:

Thanks to Neuromancer & Data Plumber for pointing out the initial commands and helping me with this blog. So, to prepare for entering configuration commands. The initial commands to enter into the system:

Router#configure terminal

You are now ready to start entering commands to configure the system. The following are probably the most common and those neccessary to configure a working router.
Enable password-encryption (to ensure passwords are stored in a way that is unreadable to any chancer):

Router(config)#service password-encryption

Enable secret – higher encrypted authorisation.

Router(config)#enable secret password

Enable login using password authentication:

Router(config)#enable password password

Enable console password authentication:

Router(config)#line console 0
Router(config-line)#password password

Enable virtual terminal password authentication (for the five available logins):

Router(config)#line vty 0 4
Router(config-line)#password password

Set the hostname of your Router:

Router(config)#hostname Cisco1

Set the banner displayed when greeted by the router:

Cisco1(config)#banner motd # Authorised access only #

If, like me your router is too small to hold a newer ISO image. You can do one of two things – a) like I now have, buy memory upgrades (from ebay) or b) store your newly purchased IOS image on a tftp server and load it at boot time.

Cisco1(config)#boot system tftp 2500-io-l.122-5.bin

Breaking the last down, the first tells the router to read this boot line first, it then reads that we are booting a system file, the third part says that we are retrieving an image from a remote tftp server (this tftp server must be on a network connected to one of the configured interfaces) — this is not a configuration file, which is separate and stored in nvram, which is loaded into ram during the bootstrap,next is the IOS image, this will vary entirely on you, lastly is the address of the tftp server — there thats it, just saved £30 on a memory upgrade

So now you have your system quite nice and customised to your liking – you better save it!

Cisco1(config)#end //you can also hit CTRL-Z
Cisco#copy running-config startup-config

Hmm, I wonder which version of software I am running and how much memory I have.

Cisco1#show version
Cisco1#show flash

Configuring RIP routing protocol, so that a router can act as an intermediary between two networks. In this example we are traversing networks and

Cisco1#conf t
Cisco1(config)#router rip
Cisco1#copy run start

Linux Compiz Effects

I have moved from being a dedicated Microsoft Windows user, into a fanatic Mac OS X addict.

My latest spare time sponge is Linux. In particular the SuSE Open Source desktop operating system. The main reason for this switch is the jaw-dropping effects available with my NVIDIA graphics card.

I tried installing Fedora Core 6 but compared to SuSE 10.1 it just did not have the kind of feel and all-round satisfaction that SuSE gives.

If you use SuSE and have a compatible graphics card, Christmas has come early. For an introduction on the effects, using the XGL features you can visit Check for your graphics card before trying to set this up

Another good read is at

The compiz homepage is at

Will post back some more after further testing.

Media Wiki Setup


Just setup a new wiki for my website. So easy — I used Media Wiki as commonly found on Wikipedia.


  1. Ensure you have Apache, PHP running.
  2. Download MediaWiki.
  3. Unzip and move the folder to a web directory.
  4. Change permissions on the config folder.
  5. Open browser goto http://website/wiki_folder.
  6. Fill in user and database details.
  7. Copy /config/Localsettings.phto the main wiki directory.
  8. Delete the config directory.
  9. Enjoy !


I recommend using a separate database for each instance of MediaWiki – this way if you need to uninstall it you can just mysql# drop wiki_database.
Install php-mmcache or similar to help speed wiki access up for users.

The first thing i did was to customise the logo – which has to be 135px by 135px.

Red5 Open Source Streaming Flash Server

I have had a busy weekend playing with the Open Source Flash Streaming Server, known as, Red5 !!

It really aims to fill a whole in the market, similar in essence, as Darwin Streaming Server has done for streaming video in the Open Source community.

I managed to follow the instructions- and spent many hours on the #osflash channel hosted on (respect to daTR in particular for all his help and wisdom).

If you are attempting to set this up yourself and get errors in starting compiling or using this server then i recommend taking note in the setup instructions on the red5 website ine the following areas:

  • Get the correct JDK form Java ( JDK download page ) normally justuse the “JDK 5.0 Update 9”

If you have or use IRC dont just go in and ask every question you can think of as this will upset people !!

You may think, well how do you know that….. trust me ~:0)

Best of luck – i look forward to hearing about anyone elses experiences



Hello and welcome to my newly created blog. This entry will be a short introduction as I am busy setting my site to conform with web accessibility and validation standards. I am also working on SSL; remote client assistance through LogMeIn services and DynDNS clients; VPN tunneling; Cisco IOS commands and as many more as I can keep my eyes open for..

I run and host many other websites which I will be discussing in more depth as the months go on. I like to design websites and love working with PHP and MySQL. I keep meaning to learn AJAX as I know it will impress visitors to my websites – but just haven’t found the time as yet.

I am very excited at the moment as I have just embarked on a new university course – as a student of the Cisco Academy. The university I am with is the Open University and the course is T228 which basically covers the Cisco CCNA curiculum.

Well this is all for now will be back to post an update as soon as I get a minute.

Thanks for reading and I look forward to hearing from you