Friday, February 24, 2012

Verizon pc770 wireless card setup on CentOS 6.x

It's a very good time in a Linux lovers life when you can just say, "it works"... Because of all of the hard work of countless volunteers (and/or paid professionals). I am pleased to announce that the crappy unount of the virtual CD ROM is no longer needed in CentOS 6.x (or SL 6, RedHat 6)!

Thank You!

1. Plug in the card
2. Select the provider
3. Follow the prompts
4. Activate the card

NICE. It just WORKS!

P.S. Sorry about the situation for CentOS 5.x, but it's, "doable".

CentOS 6.x VMware Workstation 7.1 installation issue solved.

As this writing, VMware-Workstation 7.1 has issues building vmmon on CentOS 6.2 and therefore SL 6 and RHEL 6 also. After some head scratching, google'n and lots of reading, here is the easy way to get up and running.

This install example is for VMware-Workstation-7.1.5-491717.i386.bundle at the very least. Download that from VMware as you would normally.

First, make sure you have booted to the most recent kernel before installing. Otherwise you will not be able to build the VMware modules against the kernel you are running.

First, make sure to have some basic prerequisites before you start:
yum install gcc gcc-c++ kernel-headers kernel-devel


Next install (or update) the VMware-Workstation bundle as root and valid $DISPLAY set:
bash VMware-Workstation-7.1.5-491717.i386.bundle
Follow the promps as usual.

Bummer, vmmon won't load and produces errors in /var/log/messages like:
kernel: vmmon: disagrees about version of symbol smp_ops
kernel: vmmon: Unknown symbol smp_ops


First attempt at a work around yields the ever helpful Akemi Yag (aka "toracat")  blog and the perfect *helpful* comment by NomadAU. Why is that Redhat Bugzilla entry closed anyway??


Here is the portion that is key to fixing the issue; as root:
mv /usr/lib/vmware/modules/binary/bld-2.6.32-*-rhel6 ~/

Finally run:
vmware-modconfig --console --install-all

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 ;)