April 22, 2009

Plesk Backup Error: ‘ERROR Unable to open /opt/psa/var/apspkgarc/archive-index.xml’

I was getting the following error when trying to use Plesk’s backup function:

ERROR Unable to open /opt/psa/var/apspkgarc/archive-index.xml

The solution is to visit the “Application Vault” under the “Server” tab of your Plesk interface.  The file gets auto-generated at that point.

For more information on how to use Plesk’s backup feature, read this post

January 6, 2009

Flushing your DNS cache in Mac OS X 10.5.x Leopard

Simply run

dscacheutil -flushcache

in the Terminal. (/Applications/Utilities/Terminal.app)

If you are running a version of Mac older than Leopard, such as 10.3 Panther, or 10.4 Tiger, the command is a little different:

lookupd -flushcache

December 22, 2008

Collaborative Real-Time Editing

EtherPad is a collaborative, real-time text editor created by the originators of AppJet. An EtherPad document is quickly set up without any need for registration. By sharing the URL of the document that you created, others who visit that page will be able to see, in real-time, whatever you’re typing. This is awesome for collaborating on that script, or piece of code that you want your super-duper developer friend to help you on. Currently they have syntax highlighting for JavaScript, but I am assuming that they will begin supporting more languages in the near future. Head on over there and check them out!

December 19, 2008

Installing ntop on Mac OS X 10.5.x, Leopard

First off, install MacPorts, with some additional instructions here.

Then open up the Terminal (/Applications/Utilities/Terminal.app) and type:

sudo port install ntop

Notice: It will take a LONG time even on good hardware (about 10 minutes on my Mac Pro with a striped RAID boot array).

After that is complete, you can then launch it by running:

sudo ntop -d

which launches it in daemon mode so that you can close your terminal and still have it running in the background.

It should prompt you to enter the admin password, which has to be 5 characters or more. Type it again to confirm, and it should launch.

Notice that if you do not run it with sudo, you may receive this message:

mac-pro:~ ryebread$ ntop
Fri Dec 19 10:57:15 2008  NOTE: Interface merge enabled by default
Fri Dec 19 10:57:15 2008  Initializing gdbm databases
Fri Dec 19 10:57:15 2008  **ERROR** ....open of /opt/local/var/ntop/prefsCache.db failed: File open error
Fri Dec 19 10:57:15 2008  Possible solution: please use '-P '
Fri Dec 19 10:57:15 2008  **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Dec 19 10:57:15 2008  CLEANUP[t2687149856]: ntop caught signal 2 [state=2]
Fri Dec 19 10:57:15 2008  ntop is now quitting...

It’s just telling you that it does not have the proper permissions to run in the /opt/local/var/ntop/prefsCache.db database.

Go to a web browser, and type:

http://localhost:3000

and you should be able to see an interface something like the following:

ntop running on Mac OS X 10.5.6, Leopard

ntop running on Mac OS X 10.5.6, Leopard

October 10, 2008

Mounting a Samba (SMB) Share in CentOS

Need to mount a samba share on your CentOS server from the command line?

Create a directory on the root:

mkdir /sharename

Then mount the share:

mount -t cifs //<servername>/<sharename> /sharename

if you type df -h you should see that your share is now mounted on the mountpoint that you created earlier.