User Tools

Site Tools


installingonrhel4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
installingonrhel4 [2007/07/12 10:18] – Updated to NAV 3.2.2 rogeraasinstallingonrhel4 [2007/07/30 13:39] (current) – Fixed sms daemon rogeraas
Line 10: Line 10:
 ### ###
 ### ###
 +### 27.07.2007:
 +###   - Tested for RHEL4 Update 5
 +###   - No need to make ~/.gnupg anymore
 +###   - Included a patch for forgetSQL-0.5.1
 +###   - Fixed smsd.py setup, now sends SMSes again
 +###   - Big rewrite mainly because of this fix
 ### 12.07.2007: ### 12.07.2007:
 ###   - Updated for NAV 3.2.2 ###   - Updated for NAV 3.2.2
Line 121: Line 127:
 # #
 # Boot from RHEL4AS CD1 # Boot from RHEL4AS CD1
-Press Enter +"Boot:", press Enter 
-Select Skip+"CD Found", select Skip
 # "Welcome to Red Hat Enterprise Linux AS", press Next # "Welcome to Red Hat Enterprise Linux AS", press Next
 # "Language Selection" Press Next ("English (English)" is already selected) # "Language Selection" Press Next ("English (English)" is already selected)
 # "Keyboard Configuration", select Norwegian and press Next (for us with that kind of keyboard) # "Keyboard Configuration", select Norwegian and press Next (for us with that kind of keyboard)
 # "Disk Partitioning Setup", press Next (Already set to "Automatically partition") # "Disk Partitioning Setup", press Next (Already set to "Automatically partition")
-# "Automatic Partitioning", press Next (Set to "Remove all partitions on this system",+# "Automatic Partitioning", press Next (Already set to "Remove all partitions on this system",
 #    "sda" and "Review (and modify if needed) the partitions created") #    "sda" and "Review (and modify if needed) the partitions created")
-# "Warning", press Yes +# "Warning", press Yes
 # "Disk Setup", press Next # "Disk Setup", press Next
 # "Boot Loader Configuration", press Next # "Boot Loader Configuration", press Next
Line 138: Line 144:
 #   Type in ip-addresses for gateway and DNS servers #   Type in ip-addresses for gateway and DNS servers
 #   Press Next #   Press Next
-# "Firewall Configuration", select "No firewall", select "Disabled" on "Enable SELinux?", Next+# "Firewall Configuration", select "No firewall", select "Disabled" on "Enable SELinux?", press Next
 # "Warning - No Firewall", press Proceed # "Warning - No Firewall", press Proceed
 # "Additional Language Support", press Next # "Additional Language Support", press Next
Line 154: Line 160:
 # #
 # Boot from CentOS 4 CD1 or DVD # Boot from CentOS 4 CD1 or DVD
-Press Enter +"Boot:", press Enter 
-Select Skip+"CD Found", select Skip
 # "Welcome to CentOS-4 i386", press Next # "Welcome to CentOS-4 i386", press Next
 # "Language Selection" Press Next ("English (English)" is already selected) # "Language Selection" Press Next ("English (English)" is already selected)
Line 172: Line 178:
 #   Type in ip-addresses for gateway and DNS servers #   Type in ip-addresses for gateway and DNS servers
 #   Press Next #   Press Next
-# "Firewall Configuration", select "No firewall", select "Disabled" on "Enable SELinux?", Next+# "Firewall Configuration", select "No firewall", select "Disabled" on "Enable SELinux?", press Next
 # "Warning - No Firewall", press Proceed # "Warning - No Firewall", press Proceed
 # "Additional Language Support", press Next # "Additional Language Support", press Next
Line 234: Line 240:
 ## Import RPM Key ## Import RPM Key
 ## ##
-# gpg on RHEL4/CentOS4 don't automake this directory like RHEL3/CentOS3 did... 
-mkdir ~/.gnupg 
 gpg --import /usr/share/rhn/RPM-GPG-KEY gpg --import /usr/share/rhn/RPM-GPG-KEY
 rpm --import /usr/share/rhn/RPM-GPG-KEY rpm --import /usr/share/rhn/RPM-GPG-KEY
Line 246: Line 250:
 sed -e 's/pkgSkipList=kernel\*/pkgSkipList=/' -i /etc/sysconfig/rhn/up2date sed -e 's/pkgSkipList=kernel\*/pkgSkipList=/' -i /etc/sysconfig/rhn/up2date
 # Register with RHN # Register with RHN
-up2date+rhn_register
 # Check available updates # Check available updates
 up2date -l up2date -l
Line 470: Line 474:
  
 ## ##
-## Time to reboot the server and log in with your new user+## Time to reboot the server
 ## ##
 shutdown -r 0 shutdown -r 0
 +
 +
 +##
 +## Log in with your new user and become root
 +## Root access is needed for installing and configuring NAV
 +##
 +su -
  
  
Line 568: Line 579:
 up2date mysql # Checked out, gammu needs it to install up2date mysql # Checked out, gammu needs it to install
 up2date samba-client # Arnold uses nmblookup up2date samba-client # Arnold uses nmblookup
 +up2date pkgconfig # python-gammu needs it to install
 # CentOS4: # CentOS4:
 yum -y install gcc # + cpp glibc-devel glibc-headers glibc-kernheaders yum -y install gcc # + cpp glibc-devel glibc-headers glibc-kernheaders
Line 580: Line 592:
 yum -y install mysql # Checked out, gammu needs it to install yum -y install mysql # Checked out, gammu needs it to install
 yum -y install samba-client # Arnold uses nmblookup yum -y install samba-client # Arnold uses nmblookup
 +yum -y install pkgconfig # python-gammu needs it to install
  
  
Line 591: Line 604:
 mkdir ~/nav3 mkdir ~/nav3
 cd ~/nav3 cd ~/nav3
 +
 +
 +##
 +## Install NAV rpm made by Alexander Krapivin of OILspace Inc., UK
 +##
 +wget http://ans.hsh.no/home/roger/nav3/nav-3.2.2-1.noarch.rpm
 +rpm -ivh --nodeps nav-3.2.2-1.noarch.rpm
 +
 +
 +##
 +## Download NAV source tar and extract patches
 +##
 +wget http://ans.hsh.no/home/roger/nav3/nav-3.2.2.tar.gz
 +tar xvzf nav-3.2.2.tar.gz nav-3.2.2/contrib/patches/
  
  
Line 600: Line 627:
 ./jdk-1_5_0_12-linux-i586-rpm.bin ./jdk-1_5_0_12-linux-i586-rpm.bin
  yes  yes
 +
 +
 +##
 +## Install Tomcat
 +##
 +wget http://ans.hsh.no/home/roger/nav3/apache-tomcat-5.5.23.tar.gz
 +tar --extract --verbose --ungzip --file apache-tomcat-5.5.23.tar.gz --directory /usr/local
 +
 +
 +##
 +## Install Java SNMP Package
 +##
 +mkdir JavaSNMP
 +cd JavaSNMP
 +wget http://ans.hsh.no/home/roger/nav3/source_1.4.2.zip
 +unzip source_1.4.2.zip
 +export PATH=$PATH:/usr/java/jdk1.5.0_12/bin
 +make SNMPPackage
 +cp snmp.jar /usr/local/nav/lib/java
 +cd ..
  
  
Line 608: Line 655:
 gpg --import RPM-GPG-KEY.dag.txt gpg --import RPM-GPG-KEY.dag.txt
 rpm --import RPM-GPG-KEY.dag.txt rpm --import RPM-GPG-KEY.dag.txt
 +
 +
 +##
 +## Install gammu
 +##
 +wget http://ans.hsh.no/home/roger/nav3/gammu-1.11.0-1.el4.rf.i386.rpm
 +rpm -ivh gammu-1.11.0-1.el4.rf.i386.rpm
 +wget http://ans.hsh.no/home/roger/nav3/gammu-devel-1.11.0-1.el4.rf.i386.rpm
 +rpm -ivh gammu-devel-1.11.0-1.el4.rf.i386.rpm
  
  
Line 730: Line 786:
 wget http://ans.hsh.no/home/roger/nav3/forgetSQL-0.5.1.tar.gz wget http://ans.hsh.no/home/roger/nav3/forgetSQL-0.5.1.tar.gz
 tar xvzf forgetSQL-0.5.1.tar.gz tar xvzf forgetSQL-0.5.1.tar.gz
-cd forgetSQL-0.5.1+# Patch it with patch from NAV source 
 +cp nav-3.2.2/contrib/patches/forgetSQL-0.5.1.patch forgetSQL-0.5.1/lib 
 +cd forgetSQL-0.5.1/lib 
 +patch <forgetSQL-0.5.1.patch 
 +cd ..
 python setup.py install python setup.py install
 cd .. cd ..
  
 +# Install Python bindings for gammu
 +wget http://ans.hsh.no/home/roger/nav3/python-gammu-0.20.tar.gz
 +tar xvzf python-gammu-0.20.tar.gz
 +cd python-gammu-0.20
 +python setup.py install
 +cd ..
 +
 +
 +###
 +### Nav configuration
 +###
  
 ## ##
-## Install NAV RPM+## NAV setup
 ## ##
- 
-# Download and install rpm made by Alexander Krapivin of MSU in Moscow 
-wget http://ans.hsh.no/home/roger/nav3/nav-3.2.2-1.noarch.rpm 
-rpm -ivh --nodeps nav-3.2.2-1.noarch.rpm 
- 
 # I want to have the alert emails to give the correct servername in the "From:" header. # I want to have the alert emails to give the correct servername in the "From:" header.
 # I do this by changing line 22 of /usr/local/nav/etc/alertengine.cfg # I do this by changing line 22 of /usr/local/nav/etc/alertengine.cfg
 # from "alertengine\@nav" to "alertengine" # from "alertengine\@nav" to "alertengine"
 +#
 # You may want to edit some or all of the files in the directory # You may want to edit some or all of the files in the directory
 # /usr/local/nav/etc/webfront now. This is to personalise your # /usr/local/nav/etc/webfront now. This is to personalise your
 # NAV installation. # NAV installation.
- +
-Arnold needs its log file existing +Edit NAV configuration file
-touch /usr/local/nav/var/log/arnold/arnold.log +
- +
- +
-#+
-## Nav configuration +
-##+
 # #
 # Site-specific: # Site-specific:
Line 767: Line 827:
  -e '/DOMAIN_SUFFIX/s/ntnu.no/yourdomain.tld/' \  -e '/DOMAIN_SUFFIX/s/ntnu.no/yourdomain.tld/' \
  -i /usr/local/nav/etc/nav.conf  -i /usr/local/nav/etc/nav.conf
 +#
 +# Arnold needs its log file existing
 +touch /usr/local/nav/var/log/arnold/arnold.log
  
  
Line 807: Line 870:
  
 ## ##
-## Install Java SNMP Package +## Configure gammu
-## +
-mkdir JavaSNMP +
-cd JavaSNMP +
-wget http://ans.hsh.no/home/roger/nav3/source_1.4.2.zip +
-unzip source_1.4.2.zip +
-export PATH=$PATH:/usr/java/jdk1.5.0_12/bin +
-make SNMPPackage +
-cp snmp.jar /usr/local/nav/lib/java +
-cd .. +
- +
- +
-## +
-## Install and configure gammu+
 ## ##
 # #
Line 826: Line 876:
 #   /etc/gammurc config #   /etc/gammurc config
 #   YourMobileNumber #   YourMobileNumber
-# 
-wget http://ans.hsh.no/home/roger/nav3/gammu-1.11.0-1.el4.rf.i386.rpm 
-rpm -ivh gammu-1.11.0-1.el4.rf.i386.rpm 
 # #
 # First you have to edit the /etc/gammurc file to support your mobile phone # First you have to edit the /etc/gammurc file to support your mobile phone
-# I use a Nokia 3410 with a FBUS cable connected to the serial port on the+# I use a Nokia 6310i with a DLR3 cable connected to the serial port on the
 # computer so I make this /etc/gammurc file: # computer so I make this /etc/gammurc file:
 # #
Line 837: Line 884:
 [gammu] [gammu]
 port = /dev/ttyS0 port = /dev/ttyS0
-connection = fbus+connection = dlr3
 EOF EOF
  
Line 859: Line 906:
 usermod -G uucp navcron usermod -G uucp navcron
 # #
-# Now you can test the smsd.pl module to see that it will send SMS'es:+# Now you can test the smsd.py module to see that it will send SMS'es:
 # #
-/usr/local/nav/bin/smsd.pl -t YourMobileNumber+/usr/local/nav/bin/smsd.py -t YourMobileNumber
 # #
 # Again change "YourMobileNumber" with the phone number of your mobile # Again change "YourMobileNumber" with the phone number of your mobile
Line 867: Line 914:
  
 ## ##
-## Install and configure Tomcat+## Configure Tomcat
 ## ##
-wget http://ans.hsh.no/home/roger/nav3/apache-tomcat-5.5.23.tar.gz 
-tar --extract --verbose --ungzip --file apache-tomcat-5.5.23.tar.gz --directory /usr/local 
 # Let Tomcat only listen to the localhost address # Let Tomcat only listen to the localhost address
 sed -e 's/port="8080"/port="8080" address="127.0.0.1"/' -i /usr/local/apache-tomcat-5.5.23/conf/server.xml sed -e 's/port="8080"/port="8080" address="127.0.0.1"/' -i /usr/local/apache-tomcat-5.5.23/conf/server.xml
Line 978: Line 1023:
 ## ##
 shutdown -r 0 shutdown -r 0
 +
 +
 +##
 +## Log in and become root
 +##
 +su -
  
  
Line 1005: Line 1056:
 ## Go to the webpage and log in as admin (remember to change the password) ## Go to the webpage and log in as admin (remember to change the password)
 ## and go to Toolbox, Edit database ## and go to Toolbox, Edit database
 +
  
 ## Here is a very simple startup that I put on my server. This will ## Here is a very simple startup that I put on my server. This will
Line 1017: Line 1069:
 /usr/local/nav/bin/nav start /usr/local/nav/bin/nav start
 EOF EOF
 +
  
 ## ##
Line 1025: Line 1078:
 ## ##
 # #
 +# http://heanet.dl.sourceforge.net/sourceforge/nav/nav-3.2.2-1.noarch.rpm
 +# http://heanet.dl.sourceforge.net/sourceforge/nav/nav-3.2.2.tar.gz
 # http://java.sun.com # http://java.sun.com
 +# http://www.apache.org/dist/tomcat/tomcat-5/v5.5.23/bin/apache-tomcat-5.5.23.tar.gz
 +# http://gicl.cs.drexel.edu/people/sevy/snmp/source_1.4.2.zip
 # http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt # http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
 +# http://dag.wieers.com/packages/gammu/gammu-1.11.0-1.el4.rf.i386.rpm
 +# http://dag.wieers.com/packages/gammu/gammu-devel-1.11.0-1.el4.rf.i386.rpm
 # http://dag.wieers.com/packages/rrdtool/rrdtool-1.0.50-3.el4.rf.i386.rpm # http://dag.wieers.com/packages/rrdtool/rrdtool-1.0.50-3.el4.rf.i386.rpm
 # http://dag.wieers.com/packages/rrdtool/perl-rrdtool-1.0.50-3.el4.rf.i386.rpm # http://dag.wieers.com/packages/rrdtool/perl-rrdtool-1.0.50-3.el4.rf.i386.rpm
Line 1043: Line 1102:
 # http://forgethtml.sourceforge.net/forgethtml-cvs-2004-10-21.tar.gz # http://forgethtml.sourceforge.net/forgethtml-cvs-2004-10-21.tar.gz
 # http://heanet.dl.sourceforge.net/sourceforge/forgetsql/forgetSQL-0.5.1.tar.gz # http://heanet.dl.sourceforge.net/sourceforge/forgetsql/forgetSQL-0.5.1.tar.gz
-# http://heanet.dl.sourceforge.net/sourceforge/nav/nav-3.2.2-1.noarch.rpm +# http://dl.cihar.com/python-gammu/latest/python-gammu-0.20.tar.gz
-# http://gicl.cs.drexel.edu/people/sevy/snmp/source_1.4.2.zip +
-# http://dag.wieers.com/packages/gammu/gammu-1.11.0-1.el4.rf.i386.rpm +
-# http://www.apache.org/dist/tomcat/tomcat-5/v5.5.23/bin/apache-tomcat-5.5.23.tar.gz+
 # http://heanet.dl.sourceforge.net/sourceforge/cricket/cricket-1.0.5.tar.gz # http://heanet.dl.sourceforge.net/sourceforge/cricket/cricket-1.0.5.tar.gz
 # #
 </code> </code>
installingonrhel4.1184235516.txt.gz · Last modified: by rogeraas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki