Tuesday, February 7, 2012

How to get system-config-netboot working on CentOS 6, RHEL 6 or SL 6

Sadly, Redhat has decided to drop system-config-netboot from it's offerings for RHEL 6. I was very much accustomed to the simplicity of using system-config-netboot for PXE boot client installs. Redhat may have not included the packages to install system-config-netboot, but it is certainly easy to get running on your RHEL 6 or clone. Here is the CentOS 6 i386example (please run commands as root or sudo you guts out):

1. Make sure some pre-requisites are in place:
yum install tftp-server xinetd pygtk2-libglade gnome-python2-canvas

2. Adjust for your arch type: Download the latest CentOS 5.x system-config-netboot* and alchemist* versions:
wget http://mirrors.kernel.org/centos/5/os/i386/CentOS/system-config-netboot-0.1.45.1-3.el5.noarch.rpm wget http://mirrors.kernel.org/centos/5/os/i386/CentOS/system-config-netboot-cmd-0.1.45.1-3.el5.noarch.rpm wget http://mirrors.kernel.org/centos/5/os/i386/CentOS/alchemist-1.0.36-2.el5.i386.rpm

3. Force the install of the above packages:
rpm -ihv --force --nodeps system-config-netboot-* alchemist-1.0.36-2.el5.i386.rpm

4. Move part of the installed alchemist package to the correct place... bad administrator! ;)
mv /usr/lib/python2.4/site-packages/* /usr/lib/python2.6/site-packages/

Running "system-config-netboot" through some warning message at me, but it did what I wanted it to do

Yeah, it's a bit hackish. I'm OK with it if you are. You *could* rebuild the source rpm for each of them correcting the the alchemist path etc. I will for my systems, but this is the "easy" version of the "How to get system-config-netboot working on CentOS 6, RHEL 6 or SL 6" after all...

Thursday, November 10, 2011

Howto get network card vendor, device or kernel module from the /proc and/or /sys filesystem

Work in progress - place to keep notes to myself - may help someone else - cheat sheet kinda page ;)

1. How to get NIC/network card vendor information (scripted example)

for i in `ls -d /sys/class/net/eth*` do   ETH="`basename $i`"   echo -n "$ETH "   NICID="`cat /sys/class/net/$ETH/device/vendor|cut -c3-`"   grep "^$NICID" /usr/share/hwdata/pci.ids done
2. How to get the NIC/network card MAC address (simple example)
cat /sys/class/net/eth0/address
3. How to get the NIC/network kernel module and PCI device info (DETAILS). This can also derive the vendor and device info like above (simple example)
VENDOR="`cat /sys/class/net/eth0/device/modalias |cut -c6-13`" DEVICE="`cat /sys/class/net/eth0/device/modalias |cut -c15-22`" grep -i $VENDOR /lib/modules/`uname -r`/modules.alias | grep -i $DEVICE
OR generally
grep `cat /sys/class/net/eth0/device/modalias |cut -c-22` /lib/modules/`uname -r`/modules.alias
External important links for PCI or kernel module information for Linux:
http://www.pcidatabase.com/

4. How to find the WWN for a SAS end device (the arrary for example) card on RHEL 6, CentOS 6 or similar (simple example)
cat /sys/class/sas_device/*/sas_address
5. How to find the WWN for a SAS card on RHEL 6, CentOS 6 or similar (simple example)
cat /sys/class/sas_phy/*/sas_address

OpenGTS client connection test with gps2opengts-free

WORK IN PROGRESS!!!

Just recently started playing setting up a GPS tracking server. Here is a follow up client connection on my Android phone with the free version of  gps2opengts. Here are some (incomplete) notes so far.

I hope you can at least find and install the gps2opengts-free on your own. I will skip that ;)
I will leave it up to you to figure out how to tunnel/port forward through your firewall as required.

OpenGTS server config change for "GPRMC" type of connections based on info from HERE.
Edit /var/lib/tomcat6/webapps/track/WEB-INF/webapp.conf and uncomment the the next 2 lines from the "# --- GPRMC properties" section:

gprmc.parm.account=acct
gprmc.parm.device=dev

Rebuild and deploy the tomcat container as noted from my server setup page:
ant all
ant track.deploy
ant gprmc.deploy

(re)Start tomcat:
service tomcat6 restart

OpenGTS web based vehicle setup for gps2opengts-free (should also work with GPS2OpenGTS_Pro):
1. Log into your OpenGTS server as a user "demo" (just playing with the demo install at this point!). 
1. From the "Main Menu" -> "Administration" tab -> "Vehicle Admin" -> create a new "Vehicle ID" of "test01".
2. From the "View/Edit Vehicle Information" section -> select the new vehicle and then "Edit" button.
3. "Unique ID" is required and will be the "test01" that is the only option for the free client gps2opengts-free. Otherwise add info to as many fields as you know/want. Make sure this vehicle is also "Active" = "Yes" and hit the "Change" button to save.

gps2opengts-free android app client setup:
I hope to document this tonight...

Note: As part of the frustration of initial install, I needed a little help from tcpdump to help figure out what was/was not happening. Again, my lack of tomcat knowledge was the reason for my issues:
tcpdump port 8080 -vvvvvv and not host THE_HOST_YOU_MAY_HAVE_SSHd_FROM

Note: I was hoping to find a handy to use wget to make local connection attempts. The assumption is that you are connecting via the "demo" default account like:
wget --post-data='/gprmc/Data?acct=demo&dev=test01&gprmc=$GPRMC,172413,A,3848.8028,N,08957.3521,W,0,000.0,171111,,*16' http://localhost:8080
But I have been unable to get this kinda thing to work. Wireshark shows the wget doing an http/1.0 post that is different that the gps2opengts_free http/1.1 post :(

Log information can be gotten from the /var/log/tomcat6/catalina.out  $GTS_HOME/logs/w-gprmc.log $GTS_HOME/logs/TrackWar.log or any other file in the $GTS_HOME/log/ directory.

Friday, October 28, 2011

CentOS 6.0 OpenGTS 2.3.8 install and demo setup howto

This is the quick install and setup for OpenGTS and CentOS 6.0.  OpenGTS is a general GPS tracking software for many types of devices. There is also a commercial version.
There are some details missing, but the jist of what needs to happen is here.

*Please keep in mind that I live VERY near St. Louis and was writing this during the World Series Championship game 6 and game 7! I've been distracted to say the least ;)

OpenGTS Config
manual is the REAL source for what needs to be done, but here are the steps for CentOS 6.0 with a little strategy difference (I wanted to use the CentOS provided version of most everything).

If you want to use the "real" java SDK, fine, download it from HERE and change the rest of the java install accordingly:
yum install ant mysql-connector-java java-1.6.0-openjdk tomcat6 apache-tomcat-apis httpd classpathx-mail cd /opt wget "http://sourceforge.net/projects/opengts/files/server-base/2.3.8/OpenGTS_2.3.8.zip/download" unzip OpenGTS_2.3.8.zip ln -s OpenGTS_2.3.8 OpenGTS

Create environment file
cat >> /etc/profile.d/opengts.sh << EOF #The Java JDK (NOT the JRE) installation directory. #export JAVA_HOME=/usr/java/latest export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 #The Apache Ant installation directory. #export ANT_HOME=/usr/lib64/gcj/ant #The Apache Tomcat installation directory. export CATALINA_HOME=/usr/share/tomcat6 #The OpenGTS installation directory. export GTS_HOME=/opt/OpenGTS EOF . /etc/profile.d/opengts.sh

If you don't want to use the "classpathx-mail" javamail.jar you can download the mail.jar from Oracle or  here:
unzip javamail1_4_4.zip cp -p ~/javamail-1.4.4/mail.jar $JAVA_HOME/jre/lib/ext/
OR just use the one installed:
ln -s /usr/share/java/javamail.jar $JAVA_HOME/jre/lib/ext/

Here are a couple of symlinks that help out:
mkdir /usr/share/tomcat6/common/lib cd /usr/share/tomcat6/common/lib ln -s /usr/share/java/tomcat6-servlet-2.5-api-6.0.24.jar servlet-api.jar ln -s /usr/share/java/mysql-connector-java-5.1.12.jar $JAVA_HOME/jre/lib/ext/

The real meat of the install of the java stuff:
cd $GTS_HOME ant all ant track.war ant track.deploy

A couple of housekeeping commands to silence warnings/errors before running the checkInstall.sh:
ln -s $JAVA_HOME java ln -s $CATALINA_HOME tomcat ln -s $GTS_HOME gts $GTS_HOME/bin/checkInstall.sh

Correct issue noted from the checkinstall script.

Initialize the database and get the demo stuff up and going:
service mysqld restart service tomcat6 restart echo "create database demo;"|mysql $GTS_HOME/bin/initdb.sh -rootUser=root -rootPass= $GTS_HOME/bin/admin.pl  Account -account=demo -nopass -create $GTS_HOME/bin/admin.pl  Device -account=demo -device=demo  -create $GTS_HOME/bin/admin.pl  Device -account=demo -device=demo2 -create $GTS_HOME/bin/dbAdmin.pl   -load=EventData -dir=./sampleData

Look at $GTS_HOME/logs/TrackWar.log or /var/log/tomcat6/catalina.2011-10-26.log for issues.

Next part will be connecting a real test client to this server... coming soon!

http://www.opengts.org/FAQ.html
http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS#RHEL.2FCentOS.2FSL_6_:_Packages_Status_Summary

Saturday, October 22, 2011

CentOS 6.x updated wine-1.3.29 install howto

Stable is good! That's why I like the CentOS/SL/RHEL distrobutions. But sometimes you need to kick it up a notch and go more recent with specific packages. It might be an office suite update or a Xen update or even a PHP update; it doesn't matter, you just need some part that is, well, more recent. This time it's wine. And, instead of version wine-1.2 stable something, you get to most recent and kick-ass version 1.3 something. I can say that the wine-1.3 is much better at handling the oddities of running  the most recent Google Windows Picasa version. Let's face it, the Linux version 3.0 is OK, but WAYYYY dated. Besides, the face recognition is much better in Picasa 3.8. Enough fluff; down to business. Start off with some good information from the CentOS RPMForge link
and make sure to set up either priorities or ProtectBase. Get familiar with RPMForge/Repoforge. Then install it the important repository:
(32bit)
rpm -ihv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

(64bit)
rpm -ihv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
By the way, this wine upgrade also works with CentOS/SL/RHEL version 5.x. Just substitute "el5" for"el6" above.

Get rid of the old:
yum remove wine\*

In with the new:
yum install wine --disablerep=\* --enablerepo=rpmforge-testing

All done! Time to pay attention to the St. Louis Cardinals as they play for the World Series World Series against Texas ;)

Wednesday, October 19, 2011

CentOS 6.x Mythtv 0.24 plus Hauppauge PVR-500 setup hotwo

Let me start by stating that getting this setup to be functional was a frustrating experience. Mostly due to my lack of Mythtv setup experience. It's not to say that I have not been using Mythtv for a very long time. It's more along the lines that I run the boxes for sooooo long without issue and therefore don't have to deal with setup very often. The box I'm replacing was a venerable CentOS 5 setup with a single Hauppauge PVR-250. The other issue is that I introduced some new-to-me equipment (the PVR-500) and most found documentation did not directly pertain to the mythtv-0.24 version.

Basic CentOS 6.0 32bit is documented in a previous post. This will be more about the setup of the Hauppauge PVR-500 since that was really the only problem.

There is some some information in the Mythtv wiki that is helpful.

Please keep in mind that my main intent is to show the PVR-500 setup and not all
the easy other stuff.

Step 1: run mythtvsetup
Step 2: select "Capture cards" -> "New capture card"

Step 3: from "Card type:" select "H.264 encoder card (HD-PVR)" then "Finish"

Step 4: select "New capture card" -> "Card type:" select "H.264 encoder card (HD-PVR)" again. This time change "Video device:" to "/dev/video1" then "Finish"

Step 5: add your "Video source" and "Input connections" and follow any other instructions you have ;)


Error messages I had while trying to get the PVR-500 setup correctly:
snd_pcm_open_noupdate unknown pcm default
Error: Failed to open audio device ALSA:default
Encountered problems running /usr/bin/mythpreviewgen

Note: vlc error:
*** glibc detected *** vlc: free(): invalid pointer:
 Solution was simple for this 32bit install, as root:
mv /usr/lib/vlc/plugins/meta_engine/libtaglib_plugin.so ~/libtaglib_plugin.so-vlc-issue

Google Music Manager native Linux client install and review

To Google's credit they have quickly moved to a native Linux client with their beta Music Manager, The "google-musicmanager-beta-1.0.18.6104-0.i386" was built on September 14 and made available on September 24 2011. The initial Music Manager was built on wine like some other notable Google products (like Picasa). The Linux version of the Music Manager is now native! And since there is no bundled wine the install size is a very modest 9.5MBish.

I am running this test on CentOS 6.0(CR). Other choices for downloads is available from HERE or by going to your "ADD MUSIC" option toward the top right of the music.google.com screen after Google login. Google has downloads for Debian/Ubuntu and for Fedora/openSUSE in both 32bit and 64bit:
As root install your download. For my CentOS box I did:
yum install google-musicmanager-beta-1.0.18.6104-0.i386

 You can run the program from the command line by just typing  at your GUI prompt:
google-musicmanager

To run the Linux Google Music Manager from the Gnome desktop, just select "Applications" -> "Internet" -> "Google Music Manager". You will be greeted with this start sequence:





Here is a screenshot of the "About" for this installed version:

Here is a screenshot of the Gnome panel view of the running Music Manager:


Firefox seems well supported for Google Music when you have Flash installed: