You are currently browsing the category archive for the ‘Ubuntu’ category.

This Guide Is Depreciated!!!
Please visit my company website where there is an in-depth install.

OrangeHRM is a Human Resource tool for all sorts of HR things, which I’m sure is great… I have no idea how good it is, but an install was required, I had to install it, and the docs to install it are aweful. They mainly assume you are using AMP, on Windows and are very unclear as to what’s actually required. On Ubuntu you need:
sudo aptitude install apache2 mysql-server-5.0 php5 php5-mysql

If it’s a fresh install make sure you use a root password for mysql, go grab the tar.gz file from their website and extract it somehwhere temporarily. It’ll extract a file and a directory

  • orangehrm-2.4.2
  • orangehrm-quick-start-guide.html

Move it to /var/www removing the digits at the end.

Then all you need to do is go to http://you_server/orangehrm and follow the on screen Wizard. If you are getting blank screens like I was (Thanks for that PHP) it means you likely forgot php-mysql like I did. Oops. It should have been obvious, but Apache logs gave no errors and PHP gave me blank pages… 😦

PS: It looks very flash. Perhaps worth demoing to Finance/HR people if your company has a 90s application that still live on ! Its even got commercial support and a bug tracker built in which can submit bugs back to OrangeHRM.

Advertisements

sudo aptitude install wmi-client

Example of usage is;

wmic -U DOMAIN/administrator%password //10.99.92.9 “Select * from Win32_Service”

Lists all services, the first line it spits back is the fields which you can use this SQL like language  to filter, so to see only the names of the services installed we’d do:

wmic -U DOMAIN/administrator%password //10.99.92.9 “Select Name from Win32_Service”

Or Name and State:

wmic -U DOMAIN/administrator%password //10.99.92.9 “Select Name,State from Win32_Service”

Or for just one service in this case the UPS service:

wmic -U DOMAIN/administrator%password //10.99.92.9 “Select Name,State from Win32_Service where name=’UPS'”

The language for the queries is called WQL and a reference is available here over at MSDN.

Hope this helps, this is only in Hardy as far as I’m aware.

I’ve been struggling (albeit not spending too much time) working on an issue on a Gutsy Server problem I’ve had. From one day to the next my SSH logins started asking me for a password. I had set up password-less logins with SSH keys.

In the logs I kept getting:

Authentication refused: bad ownership or modes for directory /home/username

It should have been a clue really… I checked and double checked that $HOME/.ssh might not be set to 0700, or the authorized_keys file might not be set to 0600. No joy… But the clue was really in the error. It was the ownership of my entire home directory, which although the owner is me and the group is also my username it apparently wasn’t good enough.

So chmod 700 /home/username fixed it…

Annoyingly easy !

UPDATE: Check no one has added themselves to your group in /etc/group… yep it’s a *special* account used by a couple of us, and one of the guys had added his own account to the group… tut tut 😉

That would explain the “Working From One Day To The Next” scenario !

If you followed my instructions to get the Plugin Architecture on Gutsy running you would have ended up running a “Middle Distro Deb” (Yes I made that up…no idea what you’d call it) of Cacti 0.8.7a2. When you do upgrade to Hardy they actually ended up switching to 0.8.7b due to some security fixes and improvments. Not a problem…

When you do the Distro Upgrade it’ll carry on like usual, next time you go to the Cacti web frontend it will do the upgrade process like usual. Now this is where you get a minor error:

[Fail] ALTER TABLE `graph_templates_item` ADD INDEX `task_item_id` ( `task_item_id` )

[Success] ALTER TABLE `data_input_data` ADD INDEX `t_value`(`t_value`)

Have no fear, the error occurs becasue when you did the upgrade from 0.8.6j (Gutsy’s version) to the 0.8.7a2 release it already too place. If you don’t believe me use MySQL’s command line util to view the indexes of that table with:

show index from graph_templates_item;

The Plugin Arch will need to be repatched over the code, which I’ll update ASAP.

(Usual disclaimer applies: Use this on a test system, I don’t claim this to be bulletproof if you’ve made changes etc. 😉 but it should work ! ie. did for me on a fully running system )

Install cacti via aptitude as per usual, loads of guides out there for that; configure it etc. can even add hosts. It doesn’t break anything, so this can be an upgrade on a current running system.

Download Hardy’s cacti deb from http://packages.ubuntu.com/hardy/web/cacti

Install that locally, you’ll then need to follow the upgrade process via the browser again. Be careful if you used cactid rather than the php script you’ll need to make sure it’s not looking for spine (the new cactid name) which hasn’t changed as of yet.I simply modified the path in the config to point at the current cactid binary file.

After  all that, check it’s running, it should be ! Then you can grab the Cacti Plugin Architecture from http://cactiusers.org/downloads/cacti-plugin-arch.tar.gz

Best thing to do here is make a quick backup of /usr/share/cacti/site

cd /usr/share/cacti/

sudo cp -a /usr/share/cacti/site /usr/share/cacti/site_BACKUP

Then untar the  plugin-arch tarball to the /usr/share/cacti/ directory and copy the directory within and the patch file into your /usr/share/cacti/site directory and follow the details on the cactiusers.org page to patch them, note do not overwrite files as this totally messes up the changes Ubuntu has made to the Cacti package.

There’s a tiny fix needs to be applied though, edit the file /usr/share/cacti/site/includes/global.php and on line 57 (on mine anyway) and modify it to

$config[‘url_path’] = ‘/cacti/’;

The patching proces changes that to $config[‘url_path’] = ‘/’; which means all the graphics disappears etc. which is obviously not good !

That should be it… one thing to note is so far the CLI tools for cacti are not in the Ubuntu package. Dead simple to add these. Just download the 0.8.7a tarball from cacti.net and extract it somewhere. Inside it is a cli directory, that can be just copied into the /usr/share/cacti/site folder and you can add graphs, hosts etc. via the CLI tools.

Enjoy… 🙂

Baring any omissions by me (This was done from memory)

There’s a small bug in Ubuntu when you install mplayer-plugin for Mozilla. Two extra links need to be created to get it to recognise DivX files and play them back in a browser. It’s simple to fix. At a terminal type:

cd /usr/lib/firefox/plugins/
sudo ln -s ../../mozilla/plugins/mplayerplug-in-dvx.so mplayerplug-in-dvx.so
sudo ln -s ../../mozilla/plugins/mplayerplug-in-dvx.xpt mplayerplug-in-dvx.xpt

Restart Firfox and now you’ll be able to click on a DivX file and it will play properly.

Happy viewing 🙂

Anyone who knows me will know I have a love for all things aviation and space. The past week I have been glued to Nasa TV listening to the idle chatter from STS-118. I don’t know what it is about someone bolting something to a large can whizzing over the Earth at 17,000MPH+ that interest me, (“Changing Rooms” in space !?)…. well maybe you do, which means you are just as bad ! 🙂

I also like to know where the ISS is. I love the chart they have in Mission Control plotting its course along the Earth. It’s pretty cool to think if you look up now and conditions are right you might catch a bright star like object crossing the night’s sky. Well here’s how you can using Kubuntu/Debian.

First off we need to install KTrack and a couple of extra packages to get up and running.

At a terminal run:

sudo aptitude install ktrack libhamlib2 libhamlib-dev xplanet

Note there is a bug with the current ktrack package in Ubuntu/Debian that does not properly resolve dependancies. The libhamlib-dev package needs to be entered manually to get around this otherwise it’s going to be crash city for ktrack. Xplanet adds the nice background 3D worldmap.

Now we can also add this script I wrote to pull the “Two-Line-Elements” from Nasa/AMSAT. These are basically the numbers required to define the ISS and other satellite’s orbits around the Earth. The code should be put in /etc/cron.daily/update_nasa_tle script file. Easiest way to do this is

sudo nano -w /etc/cron.daily/update_nasa_tle

Then when the blank file opens up, copy this text and paste it using right mouse button menu or shift+insert

Here’s the script:

NOTE: This was edited as I since discovered a bare text file which didn’t require any sed work.. oh well !

#!/bin/bash

#We will work in temp
cd /tmp

#Grab the file from AMSAT
wget http://www.amsat.org/amsat/ftp/keps/current/nasabare.txt

cp nasabare.txt /usr/share/apps/ktrack/nasa.tle

#Now we clean up the temp file

rm /tmp/nasabare.txt

Then make sure you make it executable:

sudo chmod 755 /etc/cron.daily/update_nasa_tle

I’m not sure how often this file is updated, but doing it daily should catch it (It’s most likely weekly), and it’s a tiny file so they won’t exactly be swamped by the bandwidth usage !

Now all you have to do is set your location when you start up KTrack, select the satellite ISS in the selection menu and make sure you turn on XPlanet in the Options… and if you fancy set it as your wallpaper.

Yes I don’t get out much ! 😉

KTrack Showing The ISS & Hubble

EDIT: In case anyone wants it, here’s the previous version of the script to strip out the satellite info from the non bare file.

#!/bin/bash

cd /tmp
wget http://www.amsat.org/amsat/ftp/keps/current/nasa.all

cat nasa.all | sed -e ‘/./{H;$!d;}’ -e ‘x;/AO/!d;’ | grep -v “/EX” | grep ‘.’ > /usr/share/apps/ktrack/nasa.tle

rm /tmp/nasa.all