User Tools

Site Tools


installingoncentos5

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
installingoncentos5 [2008/11/20 08:14]
spunkmeyer
installingoncentos5 [2010/02/25 11:01] (current)
rogeraas Dependency fixes
Line 1: Line 1:
 ====== Installing NAV on CentOS 5 ====== ====== Installing NAV on CentOS 5 ======
-  * Maintained by Roger Aas at Ementor Norge AS.+  * Maintained by Roger Aas at Atea AS.
 <​code>​ <​code>​
 ### ###
Line 7: Line 7:
 ### for CentOS 5 ### for CentOS 5
 ### ###
-### Roger Aas, Ementor Norge AS+### Roger Aas, Atea AS
 ### ###
 ### ###
 +### 25.02.2010:
 +###   - Fixed a lot of dependency problems, removed unneeded packages, upgraded others
 +### 22.02.2010:
 +###   - NAV version is 3.5.5
 +###   - Fixed some minor problems
 +### 26.01.2010:
 +###   - Tested on CentOS 5.4 i386 DVD
 +###   - NAV version is 3.5.4
 +###   - FCGI-0.68, CGI.pm-3.48,​ psycopg2-2.0.13,​ IPy-0.70, setuptools-0.6c11,​ pyrad-1.2, Django-1.1.1
 +### 10.09.2009:
 +###   - Tested on CentOS 5.3 i386 DVD
 +###   - NAV version is latest 3.5.4
 +###   - Many changes since 3.4
 ### 26.08.2008: ### 26.08.2008:
 ###   - Fixed several small issues ###   - Fixed several small issues
Line 21: Line 34:
 ### ###
 ### For feedback please contact me on the NAV mailing list or directly ### For feedback please contact me on the NAV mailing list or directly
-### at <roger at hsh.no>+### at <roger.aas at atea.no>
  
-NB!+Important information about site specific information that is needed:
 # #
 # There are a lot of site specific information that you have to put in # There are a lot of site specific information that you have to put in
Line 31: Line 44:
 # put in all the correct information. I have added information about # put in all the correct information. I have added information about
 # this site specific information in each section header that will need it. # this site specific information in each section header that will need it.
 +
  
  
Line 36: Line 50:
 ### Installation of CentOS 5 ### Installation of CentOS 5
 ### ###
-# I have included a very basic installation of CentOS 5 here.+# I have included a very basic installation of CentOS 5 from DVD here.
 # I have selected to do a "​minimal"​ install and rather do an up2date or yum # I have selected to do a "​minimal"​ install and rather do an up2date or yum
 # for the extra packages NAV needs in addition to that. That way I don't get # for the extra packages NAV needs in addition to that. That way I don't get
 # a lot of services running on the machine that I don't need. I use static # a lot of services running on the machine that I don't need. I use static
 # network configuration so the NAV server don't need to rely on a DHCP # network configuration so the NAV server don't need to rely on a DHCP
-# server functioning. I disable SELinux. +# server functioning.
-+
-# WARNING! If you choose to use SELinux here you MUST do some configuration +
-# of that to get NAV to work.+
 # #
 # Site-specific:​ # Site-specific:​
Line 50: Line 61:
 #   ​hostname.yourdomain.tld #   ​hostname.yourdomain.tld
 #   ​gateway ip-address #   ​gateway ip-address
-#   dns server ip-addresses+#   dns server ip-address(es) 
 +#   root password
 # #
-# Boot from CentOS 5.i386 DVD+# Boot from CentOS 5.i386 DVD
 # "​Boot:",​ press Enter # "​Boot:",​ press Enter
 # "CD Found",​ select Skip # "CD Found",​ select Skip
-# Screen 1: "Welcome+# Screen 1: "CentOS
-#   "​CentOS 5", press Next+#   Press Next
 # Screen 2: "​Language Selection"​ # Screen 2: "​Language Selection"​
 #   Press Next #   Press Next
Line 67: Line 79:
 #   or if your situation needs it select #   or if your situation needs it select
 #    (a) if you want to remove all previous partitions on selected drives #    (a) if you want to remove all previous partitions on selected drives
-#    (b) which drives you want to use +#    (b) if you want to encrypt system 
-#    (c) if you need any advanced configuration +#    (c) which drives you want to use 
-#    (d) if you want to modify ​the defaults+#    (d) if you need any advanced ​storage ​configuration 
 +#    (e) if you want to review and modify ​partitioning layout
 #   ​Window 1: "​Warning"​ #   ​Window 1: "​Warning"​
 #     Press Yes  #     Press Yes 
Line 93: Line 106:
 #   ​Remove DVD and press Reboot #   ​Remove DVD and press Reboot
  
 +# Firstboot configuration
 +#
 +# WARNING! If you choose to use SELinux here you MUST do some configuration
 +# of that to get NAV to work. You are on your own.
 +#
 # Firstboot: # Firstboot:
 #   ​Select "​Firewall configuration"​ #   ​Select "​Firewall configuration"​
-#   Run Tool () +#   Press Run Tool 
-#     ​Security Level: Disabled +#     Select ​Security Level: Disabled 
-#     ​SELinux:​ Disabled +#     Select ​SELinux: Disabled 
-#     OK +#     Press OK 
-#   Exit+#   Press Exit
  
  
Line 111: Line 129:
 ## ##
 chkconfig autofs off        # Don't need automounting filesystems in this setup chkconfig autofs off        # Don't need automounting filesystems in this setup
 +chkconfig avahi-daemon off  # Don't need Zeroconf service discovery in this setup
 chkconfig cups off          # Don't need printing directly on the NAV server chkconfig cups off          # Don't need printing directly on the NAV server
 chkconfig gpm off           # Don't need a console mouse chkconfig gpm off           # Don't need a console mouse
-#chkconfig mcstrans off      # No SELinux on this machine+chkconfig mcstrans off      # No SELinux on this machine
 chkconfig mdmonitor off     # No software RAID in this setup chkconfig mdmonitor off     # No software RAID in this setup
 chkconfig netfs off         # I will not use any Network FS in this setup chkconfig netfs off         # I will not use any Network FS in this setup
Line 123: Line 142:
  
 ## ##
-## Other services that depends on the machine you use for NAV+## Other services that depends on the hardware of the specific ​machine you use for NAV
 ## ##
 ## Check the syslog and other log files to see if they are needed f.ex.: ## Check the syslog and other log files to see if they are needed f.ex.:
Line 163: Line 182:
  
 ## ##
-## Update installed packages+## Update installed packages ​to newest versions
 ## ##
 # Check available updates # Check available updates
Line 227: Line 246:
 #  yourlogemail@yourdomain.tld #  yourlogemail@yourdomain.tld
 # #
-# We use a SMART_HOST server that we want the mail to go through. + 
-And I set up root's email to go to a specified email address.+# We use a SMART_HOST server that we want outgoing ​mail to go through. 
 +If you do not use that you can skip this part 
 +# Start of smart host setup
 # Install sendmail-cf # Install sendmail-cf
 yum -y install sendmail-cf yum -y install sendmail-cf
Line 236: Line 257:
 make -C /etc/mail make -C /etc/mail
 cd cd
 +# Restart sendmail
 +service sendmail restart
 +# End of smart host setup
 +
 +# Decide who gets the mail to the root user (system logs etc.)
 echo "root: yourlogemail@yourdomain.tld"​ >>/​etc/​aliases echo "root: yourlogemail@yourdomain.tld"​ >>/​etc/​aliases
 newaliases newaliases
-service sendmail restart 
  
  
Line 264: Line 289:
  
 chkconfig snmpd on chkconfig snmpd on
-service snmpd start 
  
  
 ## ##
-## Configure syslog to accept syslog messages from other hosts+## Configure syslog to accept syslog messages from external ​hosts
 ## ##
 sed -e '/​SYSLOGD_OPTIONS/​s/​m 0/m 0 -r/' -i /​etc/​sysconfig/​syslog sed -e '/​SYSLOGD_OPTIONS/​s/​m 0/m 0 -r/' -i /​etc/​sysconfig/​syslog
-service syslog restart 
  
  
Line 278: Line 301:
 ## ##
 ## Here I have added a sample firewall setup ## Here I have added a sample firewall setup
 +##
 +## If you do not care about a local firewall just skip this step
 ## ##
 ## Site-specific:​ ## Site-specific:​
Line 359: Line 384:
 ## ##
 ## Log in with your new user and become root ## Log in with your new user and become root
-## Root access ​is needed for installing and configuring NAV+## Root privileges ​is needed for installing and configuring NAV
 ## ##
 su - su -
Line 365: Line 390:
  
 ## ##
-## Install and configure Apache, mod_ssl, mod_python ​and php:+## Install and configure Apache, mod_ssl and mod_python:
 ## ##
 # #
Line 384: Line 409:
 # #
 # Install Apache # Install Apache
-yum -y install httpd mod_ssl mod_python php+yum -y install httpd mod_ssl mod_python ​php (PHP NO LONGER NEEDED)
 # Remove autocreated cert and make a new certificate. # Remove autocreated cert and make a new certificate.
 rm -f /​etc/​pki/​tls/​certs/​localhost.crt rm -f /​etc/​pki/​tls/​certs/​localhost.crt
Line 393: Line 418:
 # I guess NAV4 should be out before that... :-) # I guess NAV4 should be out before that... :-)
 # Enter your own data in the cert creation. # Enter your own data in the cert creation.
-openssl ​req -new -key /​etc/​pki/​tls/​private/​localhost.key \ +cat << EOF > openssl.conf 
- -x509 -days 3652 -out /​etc/​pki/​tls/​certs/​localhost.crt +[ req ] 
-NO +default_bits ​          = 1024 
-Rogaland +distinguished_name ​    = req_distinguished_name 
-Haugesund +prompt ​                = no
-Ementor Norge AS+
  
-hostname.yourdomain.tld +[ req_distinguished_name ] 
-webmaster@yourdomain.tld+countryName ​           = NO 
 +stateOrProvinceName ​   = Rogaland 
 +localityName ​          = Haugesund 
 +organizationName ​      = Atea AS 
 +organizationalUnitName = Haugesund 
 +commonName ​            = atealinux.haugesund.kommune.no 
 +emailAddress ​          = roger.aas@atea.no 
 +EOF
  
 +openssl req -new -key /​etc/​pki/​tls/​private/​localhost.key \
 + -x509 -days 3652 -out /​etc/​pki/​tls/​certs/​localhost.crt -config openssl.conf
 chmod go-rwx /​etc/​pki/​tls/​certs/​localhost.crt chmod go-rwx /​etc/​pki/​tls/​certs/​localhost.crt
 # Enable httpd to start on boot # Enable httpd to start on boot
Line 444: Line 477:
 ## ##
 yum -y install gcc yum -y install gcc
-yum -y install postgresql postgresql-server postgresql-jdbc ​php-pgsql +yum -y install postgresql postgresql-server postgresql-jdbc ​# NAV dependency 
-yum -y install ​postgresql-devel Checked out, psycopg needs it to compile +yum -y install python-ldap # NAV dependency 
-yum -y install ​mx Checked out, psycopg needs it to compile +yum -y install ​samba-client ​NAV dependency (Arnold uses nmblookup) 
-yum -y install ​python-devel # Checked out, psycopg ​needs it to compile +yum -y install ​autoconf ​NAV dependency 
-yum -y install ​perl-DBI Checked out, AlertEngine needs it [Engine.pm] +yum -y install ​ant # NAV dependency 
-yum -y install ​perl-DBD-Pg ​Checked out, AlertEngine needs it +yum -y install postgresql-devel # psycopg ​build dependency 
-yum -y install perl-libwww-perl # Cricket ​needs it? +yum -y install ​python-devel psycopg build dependency 
-yum -y install db4-devel # Checked out, DB_File needs it to compile +yum -y install ​mx psycopg build dependency 
-yum -y install ​mysql Checked out, gammu needs it to install +yum -y install perl-libwww-perl # Cricket ​dependency 
-yum -y install ​samba-client ​Arnold uses nmblookup +yum -y install db4-devel # Cricket dependency 
-yum -y install pkgconfig # python-gammu ​needs it to install +yum -y install ​perl-TimeDate ​Cricket dependency 
-yum -y install ant +yum -y install ​mysql gammu dependency 
-yum -y install autoconf +yum -y install pkgconfig # python-gammu ​dependency
-yum -y install perl-TimeDate +
-yum -y install tomcat5 +
  
  
Line 467: Line 497:
  
 ## ##
-## Make download directory+## Make download/​source ​directory
 ## ##
 mkdir ~/nav3 mkdir ~/nav3
Line 476: Line 506:
 ## Download NAV source tar and extract it ## Download NAV source tar and extract it
 ## ##
-wget http://ans.hsh.no/home/​roger/​nav3/nav-3.4.2.tar.gz +wget http://www.pannekake.net/nav/nav-3.5.5.tar.gz 
-tar xvzf nav-3.4.2.tar.gz+tar xvzf nav-3.5.5.tar.gz
  
  
 ## ##
-## Install Java Developer Kit+## Install Java Developer Kit, NAV dependency
 ## ##
-wget http://ans.hsh.no/home/​roger/​nav3/jdk-6u7-linux-i586-rpm.bin +wget http://www.pannekake.net/nav/jdk-6u18-linux-i586-rpm.bin 
-bash jdk-6u7-linux-i586-rpm.bin +bash jdk-6u18-linux-i586-rpm.bin
- yes+
 # Fix the alternatives system to use new JDK # Fix the alternatives system to use new JDK
-alternatives --install /​usr/​bin/​java java /​usr/​java/​default/​bin/​java ​1607 +alternatives --install /​usr/​bin/​java java /​usr/​java/​default/​bin/​java ​16180 
-alternatives --install /​usr/​bin/​javac javac /​usr/​java/​default/​bin/​javac ​1607+alternatives --install /​usr/​bin/​javac javac /​usr/​java/​default/​bin/​javac ​16180
 # Set environment variables for Java used for installation # Set environment variables for Java used for installation
 export PATH=/​usr/​java/​default/​bin:​$PATH export PATH=/​usr/​java/​default/​bin:​$PATH
Line 495: Line 524:
  
 ## ##
-## Install Java SNMP Package+## Install Java SNMP Package, NAV dependency
 ## ##
 mkdir JavaSNMP mkdir JavaSNMP
 cd JavaSNMP cd JavaSNMP
-wget http://ans.hsh.no/home/​roger/​nav3/​source_1.4.2.zip+wget http://www.pannekake.net/nav/​source_1.4.2.zip
 unzip source_1.4.2.zip unzip source_1.4.2.zip
 make SNMPPackage make SNMPPackage
Line 508: Line 537:
 ## Use GPG-key for installing RPMs from Dag Wieers ## Use GPG-key for installing RPMs from Dag Wieers
 ## ##
-wget http://ans.hsh.no/home/​roger/​nav3/​RPM-GPG-KEY.dag.txt+wget http://www.pannekake.net/nav/​RPM-GPG-KEY.dag.txt
 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
Line 514: Line 543:
  
 ## ##
-## Install gammu+## Install gammu, NAV dependency
 ## ##
-wget http://ans.hsh.no/home/​roger/​nav3/​gammu-1.11.0-1.el5.rf.i386.rpm+wget http://www.pannekake.net/nav/​gammu-1.11.0-1.el5.rf.i386.rpm
 rpm -ivh gammu-1.11.0-1.el5.rf.i386.rpm rpm -ivh gammu-1.11.0-1.el5.rf.i386.rpm
-wget http://ans.hsh.no/home/​roger/​nav3/​gammu-devel-1.11.0-1.el5.rf.i386.rpm+wget http://www.pannekake.net/nav/​gammu-devel-1.11.0-1.el5.rf.i386.rpm
 rpm -ivh gammu-devel-1.11.0-1.el5.rf.i386.rpm rpm -ivh gammu-devel-1.11.0-1.el5.rf.i386.rpm
  
  
 ## ##
-## Install rrdtool ​version 1.0 (1.2 is not supported in py-rrdtool)+## Install rrdtool, NAV dependency
 ## ##
-wget http://ans.hsh.no/home/​roger/​nav3/rrdtool-1.0.50-3.el5.rf.i386.rpm +wget http://www.pannekake.net/nav/rrdtool-1.2.23-1.el5.rf.i386.rpm 
-rpm -ivh rrdtool-1.0.50-3.el5.rf.i386.rpm +wget http://​www.pannekake.net/​nav/​perl-rrdtool-1.2.23-1.el5.rf.i386.rpm 
-wget http://ans.hsh.no/home/roger/nav3/perl-rrdtool-1.0.50-3.el5.rf.i386.rpm +wget http://www.pannekake.net/nav/python-rrdtool-1.2.23-1.el5.rf.i386.rpm 
-rpm -ivh perl-rrdtool-1.0.50-3.el5.rf.i386.rpm +wget http://www.pannekake.net/​nav/​rrdtool-devel-1.2.23-1.el5.rf.i386.rpm 
-wget http://​ans.hsh.no/​home/​roger/​nav3/​rrdtool-devel-1.0.50-3.el5.rf.i386.rpm +rpm -ivh rrdtool-1.2.23-1.el5.rf.i386.rpm ​perl-rrdtool-1.2.23-1.el5.rf.i386.rpm 
-rpm -ivh rrdtool-devel-1.0.50-3.el5.rf.i386.rpm+rpm -ivh python-rrdtool-1.2.23-1.el5.rf.i386.rpm 
 +rpm -ivh rrdtool-devel-1.2.23-1.el5.rf.i386.rpm
  
  
Line 537: Line 567:
 ## ##
  
-Checked out, cricket/​compile needs it +Cricket dependency 
-wget http://ans.hsh.no/​home/​roger/nav3/​SNMP_Session-1.12.tar.gz+wget http://www.pannekake.net/nav/​SNMP_Session-1.12.tar.gz
 tar xvzf SNMP_Session-1.12.tar.gz tar xvzf SNMP_Session-1.12.tar.gz
 cd SNMP_Session-1.12 cd SNMP_Session-1.12
Line 546: Line 576:
 cd .. cd ..
  
-MD5 CPAN Perl module +Cricket dependency 
-wget http://ans.hsh.no/home/​roger/​nav3/​MD5-2.03.tar.gz+wget http://www.pannekake.net/nav/​MD5-2.03.tar.gz
 tar xvzf MD5-2.03.tar.gz tar xvzf MD5-2.03.tar.gz
 cd MD5-2.03 cd MD5-2.03
Line 555: Line 585:
 cd .. cd ..
  
-Checked out, cricket/​compile needs it +Cricket dependency 
-wget http://ans.hsh.no/home/​roger/​nav3/DB_File-1.817.tar.gz +wget http://www.pannekake.net/nav/DB_File-1.820.tar.gz 
-tar xvzf DB_File-1.817.tar.gz +tar xvzf DB_File-1.820.tar.gz 
-cd DB_File-1.817 +cd DB_File-1.820
-perl Makefile.PL +
-make +
-make install +
-cd .. +
- +
-# FCGI CPAN Perl module +
-wget http://​ans.hsh.no/​home/​roger/​nav3/​FCGI-0.67.tar.gz +
-tar xvzf FCGI-0.67.tar.gz +
-cd FCGI-0.67 +
-perl Makefile.PL +
-make +
-make install +
-cd .. +
- +
-# CGI CPAN Perl module +
-wget http://​ans.hsh.no/​home/​roger/​nav3/​CGI.pm-3.40.tar.gz +
-tar xvzf CGI.pm-3.40.tar.gz +
-cd CGI.pm-3.40+
 perl Makefile.PL perl Makefile.PL
 make make
Line 582: Line 594:
 cd .. cd ..
  
-Checked out, bin/​makecricketconfig.pl needs it +NAV dependency 
-wget http://ans.hsh.no/​home/​roger/nav3/​pgsql_perl5-1.9.0.tar.gz+wget http://www.pannekake.net/nav/​pgsql_perl5-1.9.0.tar.gz
 tar xvzf pgsql_perl5-1.9.0.tar.gz tar xvzf pgsql_perl5-1.9.0.tar.gz
 cd pgsql_perl5-1.9.0 cd pgsql_perl5-1.9.0
Line 598: Line 610:
 ## ##
  
-+NAV dependency 
-wget http://ans.hsh.no/home/​roger/​nav3/​psycopg-1.1.21.tar.gz+wget http://www.pannekake.net/nav/​psycopg-1.1.21.tar.gz
 tar xvzf psycopg-1.1.21.tar.gz tar xvzf psycopg-1.1.21.tar.gz
 cd psycopg-1.1.21 cd psycopg-1.1.21
Line 612: Line 624:
 cd .. cd ..
  
-Checked out, machinetracker.py needs it +NAV dependency 
-wget http://ans.hsh.no/home/roger/​nav3/​IPy-0.62.tar.gz +wget http://www.pannekake.net/nav/psycopg2-2.0.13.tar.gz 
-tar xvzf IPy-0.62.tar.gz +tar xvzf psycopg2-2.0.13.tar.gz 
-cd IPy-0.62+cd psycopg2-2.0.13
 python setup.py install python setup.py install
 cd .. cd ..
  
-Checked out, servicemon needs it +NAV dependency 
-wget http://ans.hsh.no/home/roger/​nav3/​py-rrdtool-0.2.1.tar.gz +wget http://www.pannekake.net/nav/IPy-0.70.tar.gz 
-tar xvzf py-rrdtool-0.2.1.tar.gz +tar xvzf IPy-0.70.tar.gz 
-cd py-rrdtool-0.2.1+cd IPy-0.70
 python setup.py install python setup.py install
 cd .. cd ..
  
-Needs version 2 of pysnmp +NAV dependency 
-wget http://ans.hsh.no/home/​roger/​nav3/​pysnmp-2.0.9.tar.gz+wget http://www.pannekake.net/nav/​pysnmp-2.0.9.tar.gz
 tar xvzf pysnmp-2.0.9.tar.gz tar xvzf pysnmp-2.0.9.tar.gz
 cd pysnmp-2.0.9 cd pysnmp-2.0.9
Line 633: Line 645:
 cd .. cd ..
  
-Checked out +NAV dependency 
-wget http://ans.hsh.no/home/​roger/​nav3/Cheetah-1.0.tar.gz +wget http://www.pannekake.net/nav/Cheetah-2.2.1.tar.gz 
-tar xvzf Cheetah-1.0.tar.gz +tar xvzf Cheetah-2.2.1.tar.gz 
-cd Cheetah-1.0+cd Cheetah-2.2.1
 python setup.py install python setup.py install
 cd .. cd ..
  
-+NAV dependency 
-wget http://ans.hsh.no/home/​roger/​nav3/​forgethtml-cvs-2004-10-21.tar.gz +wget http://www.pannekake.net/nav/​forgetSQL-0.5.1.tar.gz
-tar xvzf forgethtml-cvs-2004-10-21.tar.gz +
-cd forgethtml +
-python setup.py install +
-cd .. +
- +
-# thresholdMon.py +
-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
 # Patch it with patch from NAV source # Patch it with patch from NAV source
-cp nav-3.4.2/​contrib/​patches/​forgetSQL-0.5.1.patch forgetSQL-0.5.1/​lib+cp nav-3.5.5/​contrib/​patches/​forgetSQL-0.5.1.patch forgetSQL-0.5.1/​lib
 cd forgetSQL-0.5.1/​lib cd forgetSQL-0.5.1/​lib
 patch <​forgetSQL-0.5.1.patch patch <​forgetSQL-0.5.1.patch
Line 658: Line 663:
 cd .. cd ..
  
-Install Python bindings for gammu +pyrad dependency 
-wget http://ans.hsh.no/home/roger/nav3/​python-gammu-0.20.tar.gz+wget http://www.pannekake.net/nav/setuptools-0.6c11.tar.gz 
 +tar xvzf setuptools-0.6c11.tar.gz 
 +cd setuptools-0.6c11 
 +python setup.py install 
 +cd .. 
 + 
 +# NAV dependency 
 +wget http://​www.pannekake.net/​nav/​pyrad-1.2.tar.gz 
 +tar xvzf pyrad-1.2.tar.gz 
 +cd pyrad-1.2 
 +python setup.py install 
 +cd .. 
 + 
 +# NAV dependency 
 +wget http://​www.pannekake.net/​nav/​Django-1.1.1.tar.gz 
 +tar xvzf Django-1.1.1.tar.gz 
 +cd Django-1.1.1 
 +python setup.py install 
 +cd .. 
 + 
 +# gammu dependency 
 +wget http://​www.pannekake.net/nav/​python-gammu-0.20.tar.gz
 tar xvzf python-gammu-0.20.tar.gz tar xvzf python-gammu-0.20.tar.gz
 cd python-gammu-0.20 cd python-gammu-0.20
Line 669: Line 695:
 ## Compile and install NAV ## Compile and install NAV
 ## ##
-export CLASSPATH=/​root/​nav3/​JavaSNMP/​snmp.jar:/​usr/​share/​java/​tomcat5-servlet-2.4-api.jar +export CLASSPATH=/​root/​nav3/​JavaSNMP/​snmp.jar 
-cd nav-3.4.2+cd nav-3.5.5
 autoconf autoconf
-./configure+./​configure ​CRICKETDIR=/​usr/​local/​nav/​cricket/​cricket
 make make
 make install make install
Line 720: Line 746:
 export JAVA_HOME=/​usr/​java/​default export JAVA_HOME=/​usr/​java/​default
 export PATH=\$JAVA_HOME/​jre/​bin:​\$PATH export PATH=\$JAVA_HOME/​jre/​bin:​\$PATH
-export CATALINA_OPTS="​-Djava.awt.headless=true -Xmx128M -server -Djava.ext.dirs=/​usr/​local/​nav/​lib/​java"​ 
 EOF EOF
  
Line 730: Line 755:
 ## ##
 ln -s /​usr/​share/​java/​postgresql-jdbc.jar /​usr/​local/​nav/​lib/​java ln -s /​usr/​share/​java/​postgresql-jdbc.jar /​usr/​local/​nav/​lib/​java
 +
  
 ## ##
Line 750: Line 776:
 cat << EOF > /​usr/​lib/​python2.4/​site-packages/​sitecustomize.py cat << EOF > /​usr/​lib/​python2.4/​site-packages/​sitecustomize.py
 import sys import sys
-sys.path.append('​/​usr/​local/​nav/​lib/​python')+__navpath = "/​usr/​local/​nav/​lib/​python
 +if __navpath not in sys.path: 
 +    sys.path.append(__navpath)
 EOF EOF
- 
-## 
-## Configure Tomcat 
-## 
-# Let Tomcat only listen to the localhost address 
-sed -e '​s/​port="​8080"/​port="​8080"​ address="​127.0.0.1"/'​ -i /​etc/​tomcat5/​server.xml 
-# Link in the NAV servlets 
-ln -s /​usr/​local/​nav/​apache/​webapps/​*.war /​var/​lib/​tomcat5/​webapps 
-chkconfig tomcat5 on 
  
  
Line 768: Line 787:
 # #
 # Site-specific:​ # Site-specific:​
-#   nav user password+#   navdbpassword
 # #
-# Start postgres ​(also on boot)+# Start postgres ​when the machine boots and now
 chkconfig postgresql on chkconfig postgresql on
 service postgresql start service postgresql start
-# Configure postgres with net authorization+# Configure postgres with correct ​net authorization
 sed -e '​s/​^local/#​local/'​ -i /​var/​lib/​pgsql/​data/​pg_hba.conf sed -e '​s/​^local/#​local/'​ -i /​var/​lib/​pgsql/​data/​pg_hba.conf
 sed -e '​s/​^host/#​host/'​ -i /​var/​lib/​pgsql/​data/​pg_hba.conf sed -e '​s/​^host/#​host/'​ -i /​var/​lib/​pgsql/​data/​pg_hba.conf
Line 787: Line 806:
 # Become postgresql admin # Become postgresql admin
 su - postgres su - postgres
-Create a NAV DB user and set a password on it +Use NAV script to make db user with password, make and init nav db
-# Select n for no so the account can not create more roles +
-createuser --no-createdb --no-adduser --pwprompt nav +
-# Set up the NAV databases +
-createdb --owner nav --encoding UTF-8 manage +
-createdb --owner nav --encoding UTF-8 navprofiles +
-createdb --owner nav --encoding UTF-8 logger +
-createdb --owner ​nav --encoding UTF-8 arnold +
-createlang plpgsql manage +
-createlang plpgsql navprofiles+
 cd /​usr/​local/​nav/​doc/​sql cd /​usr/​local/​nav/​doc/​sql
-# Use the nav user password you just made here +sh createdb.sh -p navdbpassword 
-export PGPASSWORD=****** +# Go back to root user
-psql -f manage.sql manage nav +
-psql -f types.sql manage nav +
-psql -f snmpoid.sql manage nav +
-psql -f navprofiles.sql navprofiles nav +
-psql -f logger.sql logger nav +
-psql -f arnold.sql arnold nav+
 exit exit
 # Configure NAV config file with the nav user password you chose # Configure NAV config file with the nav user password you chose
-sed -e '​s/​userpw_nav=/​userpw_nav=*******/' -i /​usr/​local/​nav/​etc/​db.conf+sed -e '​s/​userpw_nav=/​userpw_nav=navdbpassword/' -i /​usr/​local/​nav/​etc/​db.conf
  
  
Line 821: Line 825:
 # #
 # 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
 +#
 +# Check out the original /​etc/​gammurc file for hints on different setups
 +#
 +# Two examples:
 # #
  
Line 838: Line 846:
  
 # #
-# Check out the original /​etc/​gammurc file for hints on different setups +# You can now test that the gammu program works by doing this test as root:
-+
-# You can test that the gammu program works by doing this test as root:+
 # #
 gammu nothing --identify gammu nothing --identify
Line 848: Line 854:
 echo Test | gammu nothing --sendsms TEXT YourMobileNumber echo Test | gammu nothing --sendsms TEXT YourMobileNumber
 # #
-# and of course change "​YourMobileNumber"​ with the phone number of your mobile :-) +# Since the NAV program runs as the navcron user it needs permissions to use 
-#  +the /dev/tty* device ​files. Use this command to give the navcron user the 
-# Since the NAV program runs as the navcron user (that was created when installing +needed permission:
-# the nav rpm) it needs permissions to use the /dev/ttyS0 device ​file. Use this +
-command to give the navcron user the needed permission:+
 # #
 usermod -G uucp navcron usermod -G uucp navcron
Line 858: Line 862:
 # Now you can test the smsd.py 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:​
 # #
 +su - navcron
 /​usr/​local/​nav/​bin/​smsd.py -t YourMobileNumber /​usr/​local/​nav/​bin/​smsd.py -t YourMobileNumber
-+exit
-# Again change "​YourMobileNumber"​ with the phone number of your mobile+
  
  
Line 871: Line 875:
 mkdir ~/cricket mkdir ~/cricket
 cd ~/cricket cd ~/cricket
-wget http://ans.hsh.no/home/​roger/​nav3/​cricket-1.0.5.tar.gz+wget http://www.pannekake.net/nav/​cricket-1.0.5.tar.gz
 tar xvzf cricket-1.0.5.tar.gz tar xvzf cricket-1.0.5.tar.gz
 ln -s cricket-1.0.5 cricket ln -s cricket-1.0.5 cricket
Line 931: Line 935:
 ## Start NAV ## Start NAV
 ## ##
-/​usr/​local/​nav/​bin/​nav start 
- 
-# Check the startup by using this command: 
-/​usr/​local/​nav/​bin/​nav status 
- 
-# I sometimes have problems starting servicemon and/or pping. I then use this command: 
-/​usr/​local/​nav/​bin/​nav start servicemon pping 
-# Maybe even two times to get it going 
-# or I stop NAV and start it again this way: 
-/​usr/​local/​nav/​bin/​nav stop 
 /​usr/​local/​nav/​bin/​nav start /​usr/​local/​nav/​bin/​nav start
  
  
 ## Now NAV is up and running and it is time to log in and seed the database. ## Now NAV is up and running and it is time to log in and seed the database.
-## Go to the webpage and log in as admin (remember to change ​the password) +## Go to the webpage and log in as admin with password ​admin (remember to change 
-## and go to Toolbox, Edit database+## the password!) ​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
-## NAV, but not stop it on shutdown of the server.+## start NAV, but not stop it on shutdown of the server.
 ## Use it if you want or make a better one and share it. ## Use it if you want or make a better one and share it.
  
Line 963: Line 957:
 ## ##
 ## As you can see I have put the packages on a local webserver to make it ## As you can see I have put the packages on a local webserver to make it
-## easier to reinstall (don't have to rely on the remote servers being up and+## easier to reinstall (don't have to rely on the remote servers being up and
 ## having the same versions available), and you are welcome to download from ## having the same versions available), and you are welcome to download from
 ## that server. But if you want to get the files yourself here are the links: ## that server. But if you want to get the files yourself here are the links:
 ## ##
 # #
-# http://​launchpad.net/​nav/​3.4/3.4.2/​+download/​nav-3.4.2.tar.gz+# http://​launchpad.net/​nav/​3.5/3.5.5/​+download/​nav-3.5.5.tar.gz
 # http://​java.sun.com # http://​java.sun.com
 # http://​gicl.cs.drexel.edu/​people/​sevy/​snmp/​source_1.4.2.zip # http://​gicl.cs.drexel.edu/​people/​sevy/​snmp/​source_1.4.2.zip
Line 974: Line 968:
 # http://​dag.wieers.com/​rpm/​packages/​gammu/​gammu-1.11.0-1.el5.rf.i386.rpm # http://​dag.wieers.com/​rpm/​packages/​gammu/​gammu-1.11.0-1.el5.rf.i386.rpm
 # http://​dag.wieers.com/​rpm/​packages/​gammu/​gammu-devel-1.11.0-1.el5.rf.i386.rpm # http://​dag.wieers.com/​rpm/​packages/​gammu/​gammu-devel-1.11.0-1.el5.rf.i386.rpm
-# http://​dag.wieers.com/​rpm/​packages/​rrdtool/​rrdtool-1.0.50-3.el5.rf.i386.rpm +# http://​dag.wieers.com/​rpm/​packages/​rrdtool/​rrdtool-1.2.23-1.el5.rf.i386.rpm 
-# http://​dag.wieers.com/​rpm/​packages/​rrdtool/​perl-rrdtool-1.0.50-3.el5.rf.i386.rpm +# http://​dag.wieers.com/​rpm/​packages/​rrdtool/​perl-rrdtool-1.2.23-1.el5.rf.i386.rpm 
-# http://​dag.wieers.com/​rpm/​packages/​rrdtool/​rrdtool-devel-1.0.50-3.el5.rf.i386.rpm+# http://​dag.wieers.com/​rpm/​packages/​rrdtool/​python-rrdtool-1.2.23-1.el5.rf.i386.rpm 
 +# http://​dag.wieers.com/​rpm/​packages/​rrdtool/​rrdtool-devel-1.2.23-1.el5.rf.i386.rpm
 # http://​www.switch.ch/​misc/​leinen/​snmp/​perl/​dist/​SNMP_Session-1.12.tar.gz # http://​www.switch.ch/​misc/​leinen/​snmp/​perl/​dist/​SNMP_Session-1.12.tar.gz
 # ftp://​ftp.uninett.no/​pub/​CPAN/​modules/​by-module/​MD5/​GAAS/​MD5-2.03.tar.gz # ftp://​ftp.uninett.no/​pub/​CPAN/​modules/​by-module/​MD5/​GAAS/​MD5-2.03.tar.gz
-# ftp://​ftp.uninett.no/​pub/​CPAN/​modules/​by-module/​DB_File/​DB_File-1.817.tar.gz +# ftp://​ftp.uninett.no/​pub/​CPAN/​modules/​by-module/​DB_File/​DB_File-1.820.tar.gz
-# ftp://​ftp.uninett.no/​pub/​CPAN/​modules/​by-module/​FCGI/​FCGI-0.67.tar.gz +
-# ftp://​ftp.uninett.no/​pub/​CPAN/​modules/​by-module/​CGI/​CGI.pm-3.40.tar.gz+
 # ftp://​ftp.uninett.no/​pub/​CPAN/​modules/​by-module/​Pg/​pgsql_perl5-1.9.0.tar.gz # ftp://​ftp.uninett.no/​pub/​CPAN/​modules/​by-module/​Pg/​pgsql_perl5-1.9.0.tar.gz
-# http://​initd.org/​pub/​software/​psycopg/​psycopg-1.1.21.tar.gz +# http://www.initd.org/​pub/​software/​psycopg/​psycopg-1.1.21.tar.gz 
-# http://pypi.python.org/packages/source/I/IPy/IPy-0.62.tar.gz +# http://www.initd.org/pub/software/psycopg/psycopg2-2.0.13.tar.gz 
-# http://heanet.dl.sourceforge.net/sourceforge/py-rrdtool/py-rrdtool-0.2.1.tar.gz+# http://pypi.python.org/packages/source/I/IPy/IPy-0.70.tar.gz
 # http://​heanet.dl.sourceforge.net/​sourceforge/​pysnmp/​pysnmp-2.0.9.tar.gz # http://​heanet.dl.sourceforge.net/​sourceforge/​pysnmp/​pysnmp-2.0.9.tar.gz
-# http://​heanet.dl.sourceforge.net/​sourceforge/​cheetahtemplate/​Cheetah-1.0.tar.gz +# http://​heanet.dl.sourceforge.net/​sourceforge/​cheetahtemplate/​Cheetah-2.2.1.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://​pypi.python.org/​packages/​source/​s/​setuptools/​setuptools-0.6c11.tar.gz
 +# http://​pypi.python.org/​packages/​source/​p/​pyrad/​pyrad-1.2.tar.gz
 +# http://​www.djangoproject.com/​download/​1.1.1/​tarball/​
 # http://​dl.cihar.com/​python-gammu/​latest/​python-gammu-0.20.tar.gz # http://​dl.cihar.com/​python-gammu/​latest/​python-gammu-0.20.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
installingoncentos5.1227168892.txt.gz · Last modified: 2008/11/20 08:14 by spunkmeyer