installingonrhel4
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| installingonrhel4 [2007/05/14 08:36] – morten | installingonrhel4 [2007/07/30 13:39] (current) – Fixed sms daemon rogeraas | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Installing NAV on RedHat Enterprise Linux 4 ====== | ====== Installing NAV on RedHat Enterprise Linux 4 ====== | ||
| - | * Mostly maintained by Roger Aas at the University College | + | * Mostly maintained by Roger Aas at Stord/ |
| < | < | ||
| + | ### | ||
| + | ### NAV 3 installation | ||
| + | ### | ||
| + | ### for CentOS 4 or Red Hat Enterprise Linux 4 Advanced Server | ||
| + | ### | ||
| + | ### Roger Aas, Stord/ | ||
| + | ### | ||
| + | ### | ||
| + | ### 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: | ||
| + | ### - Updated for NAV 3.2.2 | ||
| + | ### - Tested for CentOS 4.5 | ||
| + | ### - Updated seven packages: | ||
| + | ### - Java 1.5.0_11 -> 1.5.0_12 | ||
| + | ### - SNMP_Session 1.08 -> 1.10 | ||
| + | ### - CGI.pm 3.25 -> 3.29 | ||
| + | ### - IPy 0.52 -> 0.54 | ||
| + | ### - JavaSNMP 1.4.1 -> 1.4.2 | ||
| + | ### - gammu 1.08 -> 1.11 | ||
| + | ### - tomcat 5.5.20 -> 5.5.23 | ||
| + | ### 22.02.2007: | ||
| + | ### - Updated for NAV 3.2.1 | ||
| + | ### - Use the default LVM setup | ||
| + | ### - Small change in sample firewall setup | ||
| + | ### - Set options for Tomcat | ||
| + | ### - Place jdbc and snmp jars in nav java folder | ||
| + | ### - New security setup for postgresql for nav 3.2.1 | ||
| + | ### - No in-built backup of the database | ||
| + | ### - Updated two packages: | ||
| + | ### - Java 1.5.0_09 -> 1.5.0_11 | ||
| + | ### - DB_File 1.814 -> 1.815 | ||
| + | ### 24.11.2006: | ||
| + | ### - Fixes to make Arnold work (Thanks Kjartan@UiS) | ||
| + | ### 23.11.2006 by Roger Aas: | ||
| + | ### - Build Java SNMP Package from source | ||
| + | ### - That means Java SDK instead of JRE to have Java compiler | ||
| + | ### - Removed all the rest of the vi edits | ||
| + | ### - Added " | ||
| + | ### - Fix database backup problem (from NAV 3.2 this goes out) | ||
| + | ### 20.11.2006 by Roger Aas: | ||
| + | ### - Finished update to NAV 3.1.1 | ||
| + | ### - Tested for RHEL4 Update 4 and CentOS 4.4 | ||
| + | ### - Removed CentOS mirror setup, not necessary anymore | ||
| + | ### - Configured and started snmpd | ||
| + | ### - Configured syslog to accept messages from remote hosts | ||
| + | ### - Added sample firewall setup | ||
| + | ### - Removed some 3.0.0 patches | ||
| + | ### - Added simple autostart | ||
| + | ### - Updated some packages: | ||
| + | ### - Java 1.5.0_06 -> 1.5.0_09 | ||
| + | ### - CGI.pm 3.15 -> 3.25 | ||
| + | ### - IPy 0.42 -> 0.52 | ||
| + | ### - gammu 1.04 -> 1.08 | ||
| + | ### - tomcat 5.5.12 -> 5.5.20 | ||
| + | ### 14.11.2006 by Morten Brekkevold: | ||
| + | ### - Updated for NAV 3.1.1. | ||
| + | ### - NOT TESTED | ||
| + | ### 05.01.2006: | ||
| + | ### - Tested for RHEL 4 Update 2 | ||
| + | ### - Fix for pkgSkipList edit for Red Hat | ||
| + | ### - Updated some packages: | ||
| + | ### - Java 1.5.0_05 -> 1.5.0_06 | ||
| + | ### - New revision of rrdtool | ||
| + | ### - SNMP_Session 1.07 -> 1.08 | ||
| + | ### - DB_File 1.811 -> 1.814 | ||
| + | ### - CGI.pm 3.11 -> 3.15 | ||
| + | ### - Cheetah 0.9.18 -> 1.0 | ||
| + | ### - gammu 0.96 -> 1.04 | ||
| + | ### 19.10.2005: | ||
| + | ### - Added warning about SELinux and firewall | ||
| + | ### - Rewrote the introduction | ||
| + | ### 17.10.2005: | ||
| + | ### - tested for CentOS 4.2 | ||
| + | ### - Fixed yum repository setup for CentOS | ||
| + | ### - Shortened it a little | ||
| + | ### - rrdtool 1.0.50 again, this time working :-) | ||
| + | ### 13.10.2005: | ||
| + | ### - Backrev' | ||
| + | ### and that broke cricket (note to self: must test much more) | ||
| + | ### 12.10.2005: | ||
| + | ### - Reworked to include installation on CentOS 4.1 | ||
| + | ### - Updated some packages, most notable Java and Tomcat | ||
| + | ### - Easier file editing | ||
| + | ### - More valuable(?) information :-) | ||
| + | ### | ||
| + | ### For feedback please contact me on the NAV3 mailing list or directly | ||
| + | ### at <roger at hsh.no> | ||
| # NB! | # NB! | ||
| Line 35: | Line 127: | ||
| # | # | ||
| # Boot from RHEL4AS CD1 | # Boot from RHEL4AS CD1 | ||
| - | # Press Enter | + | # " |
| - | # Select | + | # "CD Found", |
| # " | # " | ||
| # " | # " | ||
| # " | # " | ||
| # "Disk Partitioning Setup", | # "Disk Partitioning Setup", | ||
| - | # " | + | # " |
| # " | # " | ||
| - | # " | + | # " |
| # "Disk Setup", | # "Disk Setup", | ||
| # "Boot Loader Configuration", | # "Boot Loader Configuration", | ||
| Line 52: | Line 144: | ||
| # Type in ip-addresses for gateway and DNS servers | # Type in ip-addresses for gateway and DNS servers | ||
| # Press Next | # Press Next | ||
| - | # " | + | # " |
| # " | # " | ||
| # " | # " | ||
| Line 68: | Line 160: | ||
| # | # | ||
| # Boot from CentOS 4 CD1 or DVD | # Boot from CentOS 4 CD1 or DVD | ||
| - | # Press Enter | + | # " |
| - | # Select | + | # "CD Found", |
| # " | # " | ||
| # " | # " | ||
| Line 86: | Line 178: | ||
| # Type in ip-addresses for gateway and DNS servers | # Type in ip-addresses for gateway and DNS servers | ||
| # Press Next | # Press Next | ||
| - | # " | + | # " |
| # " | # " | ||
| # " | # " | ||
| Line 148: | Line 240: | ||
| ## Import RPM Key | ## Import RPM Key | ||
| ## | ## | ||
| - | # gpg on RHEL4/ | ||
| - | mkdir ~/.gnupg | ||
| gpg --import / | gpg --import / | ||
| rpm --import / | rpm --import / | ||
| Line 160: | Line 250: | ||
| sed -e ' | sed -e ' | ||
| # Register with RHN | # Register with RHN | ||
| - | up2date | + | rhn_register |
| # Check available updates | # Check available updates | ||
| up2date -l | up2date -l | ||
| Line 384: | Line 474: | ||
| ## | ## | ||
| - | ## Time to reboot the server | + | ## 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 480: | Line 577: | ||
| up2date perl-libwww-perl # Cricket needs it? + perl-HTML-Parser perl-URI perl-HTML-Tagset | up2date perl-libwww-perl # Cricket needs it? + perl-HTML-Parser perl-URI perl-HTML-Tagset | ||
| up2date db4-devel # Checked out, DB_File needs it to compile | up2date db4-devel # Checked out, DB_File needs it to compile | ||
| - | up2date mysql # Checked out, gammu 1.0 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 492: | Line 590: | ||
| yum -y install perl-libwww-perl # Cricket needs it? + perl-HTML-Parser perl-URI perl-HTML-Tagset | yum -y install perl-libwww-perl # Cricket needs it? + perl-HTML-Parser perl-URI perl-HTML-Tagset | ||
| yum -y install db4-devel # Checked out, DB_File needs it to compile | yum -y install db4-devel # Checked out, DB_File needs it to compile | ||
| - | yum -y install mysql # Checked out, gammu 1.0 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 | ||
| ### | ### | ||
| - | ### Install and configure NAV 3.2.1 and dependencies | + | ### Install and configure NAV and dependencies |
| ### | ### | ||
| Line 505: | Line 604: | ||
| mkdir ~/nav3 | mkdir ~/nav3 | ||
| cd ~/nav3 | cd ~/nav3 | ||
| + | |||
| + | |||
| + | ## | ||
| + | ## Install NAV rpm made by Alexander Krapivin of OILspace Inc., UK | ||
| + | ## | ||
| + | wget http:// | ||
| + | rpm -ivh --nodeps nav-3.2.2-1.noarch.rpm | ||
| + | |||
| + | |||
| + | ## | ||
| + | ## Download NAV source tar and extract patches | ||
| + | ## | ||
| + | wget http:// | ||
| + | tar xvzf nav-3.2.2.tar.gz nav-3.2.2/ | ||
| Line 510: | Line 623: | ||
| ## Install Java Developer Kit | ## Install Java Developer Kit | ||
| ## | ## | ||
| - | wget http:// | + | wget http:// |
| - | chmod 755 jdk-1_5_0_11-linux-i586-rpm.bin | + | chmod 755 jdk-1_5_0_12-linux-i586-rpm.bin |
| - | ./jdk-1_5_0_11-linux-i586-rpm.bin | + | ./jdk-1_5_0_12-linux-i586-rpm.bin |
| yes | yes | ||
| + | |||
| + | |||
| + | ## | ||
| + | ## Install Tomcat | ||
| + | ## | ||
| + | wget http:// | ||
| + | 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:// | ||
| + | unzip source_1.4.2.zip | ||
| + | export PATH=$PATH:/ | ||
| + | make SNMPPackage | ||
| + | cp snmp.jar / | ||
| + | cd .. | ||
| Line 522: | 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:// | ||
| + | rpm -ivh gammu-1.11.0-1.el4.rf.i386.rpm | ||
| + | wget http:// | ||
| + | rpm -ivh gammu-devel-1.11.0-1.el4.rf.i386.rpm | ||
| Line 544: | Line 686: | ||
| # Checked out, cricket/ | # Checked out, cricket/ | ||
| - | wget http:// | + | wget http:// |
| - | tar xvzf SNMP_Session-1.08.tar.gz | + | tar xvzf SNMP_Session-1.10.tar.gz |
| - | cd SNMP_Session-1.08 | + | cd SNMP_Session-1.10 |
| perl Makefile.PL | perl Makefile.PL | ||
| make | make | ||
| Line 571: | Line 713: | ||
| # CGI CPAN Perl module | # CGI CPAN Perl module | ||
| - | wget http:// | + | wget http:// |
| - | tar xvzf CGI.pm-3.25.tar.gz | + | tar xvzf CGI.pm-3.29.tar.gz |
| - | cd CGI.pm-3.25 | + | cd CGI.pm-3.29 |
| perl Makefile.PL | perl Makefile.PL | ||
| make | make | ||
| Line 607: | Line 749: | ||
| # Checked out, machinetracker.py needs it | # Checked out, machinetracker.py needs it | ||
| - | wget http:// | + | wget http:// |
| - | tar xvzf IPy-0.52.tar.gz | + | tar xvzf IPy-0.54.tar.gz |
| - | cd IPy-0.52 | + | cd IPy-0.54 |
| python setup.py install | python setup.py install | ||
| cd .. | cd .. | ||
| Line 644: | Line 786: | ||
| wget http:// | wget http:// | ||
| 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/ | ||
| + | cd forgetSQL-0.5.1/lib | ||
| + | patch < | ||
| + | cd .. | ||
| python setup.py install | python setup.py install | ||
| cd .. | cd .. | ||
| + | # Install Python bindings for gammu | ||
| + | wget http:// | ||
| + | tar xvzf python-gammu-0.20.tar.gz | ||
| + | cd python-gammu-0.20 | ||
| + | python setup.py install | ||
| + | cd .. | ||
| - | ## | ||
| - | ## Install NAV 3.2.1 RPM | ||
| - | ## | ||
| - | # Download and install rpm made by Alexander Krapivin of MSU in Moscow | + | ### |
| - | wget http:// | + | ### Nav configuration |
| - | rpm -ivh --nodeps nav-3.2.1-1.noarch.rpm | + | ### |
| + | ## | ||
| + | ## NAV setup | ||
| + | ## | ||
| # I want to have the alert emails to give the correct servername in the " | # I want to have the alert emails to give the correct servername in the " | ||
| # I do this by changing line 22 of / | # I do this by changing line 22 of / | ||
| # from " | # from " | ||
| + | # | ||
| # 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 | ||
| # / | # / | ||
| # NAV installation. | # NAV installation. | ||
| - | + | # | |
| - | # Arnold needs its log file existing | + | # Edit NAV configuration |
| - | touch / | + | |
| - | + | ||
| - | + | ||
| - | ## | + | |
| - | ## Nav configuration | + | |
| - | ## | + | |
| # | # | ||
| # Site-specific: | # Site-specific: | ||
| Line 681: | Line 827: | ||
| -e '/ | -e '/ | ||
| -i / | -i / | ||
| + | # | ||
| + | # Arnold needs its log file existing | ||
| + | touch / | ||
| Line 687: | Line 836: | ||
| ## | ## | ||
| cat << EOF > / | cat << EOF > / | ||
| - | JAVA_HOME=/ | + | JAVA_HOME=/ |
| PATH=\$PATH: | PATH=\$PATH: | ||
| export JAVA_HOME | export JAVA_HOME | ||
| Line 721: | Line 870: | ||
| ## | ## | ||
| - | ## Install Java SNMP Package | + | ## Configure |
| - | ## | + | |
| - | mkdir JavaSNMP | + | |
| - | cd JavaSNMP | + | |
| - | wget http:// | + | |
| - | unzip source_1.4.1.zip | + | |
| - | export PATH=$PATH:/ | + | |
| - | make SNMPPackage | + | |
| - | cp snmp.jar / | + | |
| - | cd .. | + | |
| - | + | ||
| - | + | ||
| - | ## | + | |
| - | ## Install and configure | + | |
| ## | ## | ||
| # | # | ||
| Line 740: | Line 876: | ||
| # / | # / | ||
| # | # | ||
| - | # | ||
| - | wget http:// | ||
| - | rpm -ivh gammu-1.08.00-1.el4.rf.i386.rpm | ||
| # | # | ||
| # First you have to edit the / | # First you have to edit the / | ||
| - | # 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 / | # computer so I make this / | ||
| # | # | ||
| Line 751: | Line 884: | ||
| [gammu] | [gammu] | ||
| port = /dev/ttyS0 | port = /dev/ttyS0 | ||
| - | connection = fbus | + | connection = dlr3 |
| EOF | EOF | ||
| Line 773: | Line 906: | ||
| usermod -G uucp navcron | usermod -G uucp navcron | ||
| # | # | ||
| - | # WORKAROUND: MetaNAV does not like "smsd dot pl" so please substitute | + | # Now you can test the smsd.py module to see that it will send SMS' |
| - | # " | + | |
| - | # | + | |
| - | # Now you can test the FIXME.pl module to see that it will send SMS' | + | |
| # | # | ||
| - | / | + | / |
| # | # | ||
| # Again change " | # Again change " | ||
| Line 784: | Line 914: | ||
| ## | ## | ||
| - | ## Install and configure | + | ## Configure |
| ## | ## | ||
| - | wget http:// | ||
| - | tar --extract --verbose --ungzip --file apache-tomcat-5.5.20.tar.gz --directory /usr/local | ||
| # Let Tomcat only listen to the localhost address | # Let Tomcat only listen to the localhost address | ||
| - | sed -e ' | + | sed -e ' |
| # Link in the NAV servlets | # Link in the NAV servlets | ||
| - | ln -s / | + | ln -s / |
| Line 895: | Line 1023: | ||
| ## | ## | ||
| shutdown -r 0 | shutdown -r 0 | ||
| + | |||
| + | |||
| + | ## | ||
| + | ## Log in and become root | ||
| + | ## | ||
| + | su - | ||
| Line 900: | Line 1034: | ||
| ## Start Tomcat | ## Start Tomcat | ||
| ## | ## | ||
| - | / | + | / |
| Line 922: | 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 931: | Line 1066: | ||
| # Start NAV | # Start NAV | ||
| . / | . / | ||
| - | / | + | / |
| / | / | ||
| EOF | EOF | ||
| + | |||
| ## | ## | ||
| Line 942: | Line 1078: | ||
| ## | ## | ||
| # | # | ||
| + | # http:// | ||
| + | # http:// | ||
| # http:// | # http:// | ||
| - | # http:// | + | # http:// |
| + | # http:// | ||
| # http:// | # http:// | ||
| + | # http:// | ||
| + | # http:// | ||
| # http:// | # http:// | ||
| # http:// | # http:// | ||
| # http:// | # http:// | ||
| # http:// | # http:// | ||
| - | # http:// | + | # http:// |
| # ftp:// | # ftp:// | ||
| # ftp:// | # ftp:// | ||
| - | # ftp:// | + | # ftp:// |
| # ftp:// | # ftp:// | ||
| # http:// | # http:// | ||
| - | # http:// | + | # http:// |
| # http:// | # http:// | ||
| # http:// | # http:// | ||
| Line 961: | Line 1102: | ||
| # http:// | # http:// | ||
| # http:// | # http:// | ||
| - | # http://heanet.dl.sourceforge.net/sourceforge/ | + | # http://dl.cihar.com/python-gammu/latest/python-gammu-0.20.tar.gz |
| - | # http:// | + | |
| - | # http:// | + | |
| # http:// | # http:// | ||
| # | # | ||
| </ | </ | ||
| - | |||
installingonrhel4.1179131764.txt.gz · Last modified: by morten
