Archive | March, 2004


31 Mar

rpm –query –filesbypkg
rpm –query –whatprovides

1) To find out which package an installed file belongs to:
rpm -qf /some/file
To find out what files an installed package contains:
rpm -ql package
To find out which files an rpm contains:
rpm -qlp file.rpm

2) To extract the files from an rpm:
rpm2cpio file.rpm | cpio -id


18 Mar

This will allow you to run XDM over a network..
It will allow you to connect your Xserver from a windows machine to a Linux machine.
Continue reading


17 Mar

OpenNMS gathers data on your network.

OpenNMS-webapp is a separate program that allows you to view the data via a Tomcat server.

You need Postgres for OpenNMS and you need to allow TCPIP connections in /var/lib/pgsql/data/postgres.conf and /var/lib/pgsql/data/pg_hba.conf.

You might need to edit /etc/tomcat4/server.xml and change the server port, default is 8080.

You will need to edit /opt/OpenNMS/etc/discovery-configuration.xml and edit the range of the network that is to be scanned

You will NEED an openNMS entry in /etc/tomcat4/server.xml – this should be done by the RPM, but if you have messed up the RPM install order it can be problematic.

++++If you get the following error:
>-bash-2.05b$ sudo /etc/init.d/opennms start
>Starting OpenNMS: ERROR: Either your JDK is too old, or I was unable to find
>echo lib/tools.jar in your JAVA_HOME directory. Please make
>sure you have a Java2-compliant compiler and JVM. JDK
>versions earlier than 1.3 may work with OpenNMS on some
>platforms, but are not supported.

You just need to do an: export JAVA_HOME=”/usr/java/j2sdk1.4.1_07/”

++++If you get the following problem when installing:
>Configures PostgreSQL tables, users, and other miscellaneous settings.
>DBI connect(‘dbname=template1′,’postgres’,…) failed: FATAL: IDENT >authentication
> failed for user “postgres” at /opt/OpenNMS/bin/ line 250
>*** Unable to connect to the database!! ***
>Be sure PostgreSQL is started and running correctly
>before running this install script!
>FATAL: IDENT authentication failed for user “postgres”

You need to allow TCPIP connections (see above).
Continue reading


15 Mar

Dayle probably has too much time on her hands


14 Mar

grep -e ‘hello’ -e ‘goodbye’

— searches for more than one regex at a time


14 Mar

Script to sync desktop to mirvy server (backup of Brunatex song files).

@echo off
echo Try rsync -auvzbP file remote:/home/myusername
set PATH=H:\PROGRA~1\Rsync;%PATH%
set CYGWIN=binmode tty
set TERM=ansi
set USERNAME=<username>

set HOME=H:\PROGRA~1\Rsync set RSYNC_RSH=ssh.exe

REM Backup all of d:\Brunatex Pro Tools New
rsync246 -e ssh -Cavz –delete "/cygdrive/d/Brunatex Pro Tools New" <username>@mirvy:/var/0DATA/brunatex

REM Backup all of j:\Pro Tools New
rsync246 -e ssh -Cavz –delete "/cygdrive/j/Pro Tools New" <username>@mirvy:/var/0DATA/brunatex


5 Mar

#simple loop
while [ 1 ]; do ls -al ; done

#another loop

while [ $CNT -lt 10 ];
echo count is $CNT
let CNT=CNT+1

#a for loop, need `seq` to work….
for i in `seq 1 10`; do
echo $i