User Tools

Site Tools


installingoncentos5

Differences

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

Link to this comparison view

Next revision
Previous revision
installingoncentos5 [2008/08/22 12:45] – created rogeraasinstallingoncentos5 [2010/02/25 11:01] (current) – Dependency fixes rogeraas
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:
 +###   - Fixed several small issues
 +###   - Configured alternatives system with new java
 ### 22.08.2008: ### 22.08.2008:
 ###   - First (beta?) release of documentation for CentOS 5 ###   - First (beta?) release of documentation for CentOS 5
Line 17: Line 33:
 ###   - Please report any problems with this version if you test it ###   - Please report any problems with this version if you test it
 ### ###
-### For feedback please contact me on the NAV3 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 28: 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 33: 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 NAV3 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 +
-# to get NAV to work.+
 # #
 # Site-specific: # Site-specific:
Line 47: 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 (eller linux pci=nommconf)+# "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 64: 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 90: 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 108: 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 120: 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 134: Line 156:
 chkconfig isdn off          # Run this if your machine don't have an isdn connection chkconfig isdn off          # Run this if your machine don't have an isdn connection
 #chkconfig microcode_ctl off # Run this if microcode is older than your BIOS/Processor microcode #chkconfig microcode_ctl off # Run this if microcode is older than your BIOS/Processor microcode
-chkconfig pcscd off         # Run this if your machine don't have any smart card ports+chkconfig pcscd off         # Run this if your machine does not use any smart cards
 #chkconfig smartd off        # Run this if your HD is not SMART capable #chkconfig smartd off        # Run this if your HD is not SMART capable
  
Line 140: Line 162:
 ## ##
 ## The CentOS5 installation over disabled IPv6, and /etc/sysconfig/network ## The CentOS5 installation over disabled IPv6, and /etc/sysconfig/network
-## have a setting called NETWORKING_IPV6 that is set to "no". But+## have a setting called NETWORKING_IPV6 that is then set to "no". But
 ## still some applications connect to IPv6 addresses and the IPv6 kernel ## still some applications connect to IPv6 addresses and the IPv6 kernel
-## module is autoloaded. We are still not using IPv6 in the college and +## module is autoloaded. We are still not using IPv6 and I am not ready to 
-## I am not ready to look into setting this up in a functioning way so +## look into setting this up in a functioning way so instead I disable IPv6 
-## instead I disable IPv6 in this way:+## in this way:
 ## ##
 # Remove IPv6 from CentOS5 # Remove IPv6 from CentOS5
 echo "alias net-pf-10 off" >>/etc/modprobe.conf echo "alias net-pf-10 off" >>/etc/modprobe.conf
 +# Also stop ipv6 firewall from trying to start
 +chkconfig ip6tables off
  
  
Line 158: Line 182:
  
 ## ##
-## Update installed packages+## Update installed packages to newest versions
 ## ##
 # Check available updates # Check available updates
Line 222: 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 231: 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 259: 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 273: 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 330: Line 360:
 # remove the remark from this line and edit the source ip. # remove the remark from this line and edit the source ip.
 # You will also have to edit the postgresql config file pg_hba.conf # You will also have to edit the postgresql config file pg_hba.conf
 +# so postgresql will listen to more than the loopback address.
 # #
 #-A INPUT -s 158.37.22.2 -p tcp --dport 5432 -j ACCEPT #-A INPUT -s 158.37.22.2 -p tcp --dport 5432 -j ACCEPT
Line 342: Line 373:
 chmod 600 /etc/sysconfig/iptables chmod 600 /etc/sysconfig/iptables
 # Start firewall # Start firewall
-chkconfig iptables on 
 service iptables start service iptables start
  
Line 354: 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 360: Line 390:
  
 ## ##
-## Install and configure Apache, mod_ssl, mod_python and php:+## Install and configure Apache, mod_ssl and mod_python:
 ## ##
 # #
Line 379: 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 388: 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 408: Line 446:
  -e '/^MaxSpareServers/s/20/ 8/' \  -e '/^MaxSpareServers/s/20/ 8/' \
  -e '/^ServerAdmin/s/root@localhost/webmaster@yourdomain.tld/' \  -e '/^ServerAdmin/s/root@localhost/webmaster@yourdomain.tld/' \
- -e 's/^#ServerName new.host.name/ServerName hostname.yourdomain.tld/' \+ -e 's/^#ServerName www.example.com/ServerName hostname.yourdomain.tld/' \
  -e '/^DocumentRoot/s/\/var\/www\/html/\/usr\/local\/nav\/apache\/webroot/' \  -e '/^DocumentRoot/s/\/var\/www\/html/\/usr\/local\/nav\/apache\/webroot/' \
  -e '/^<Directory/s/\/var\/www\/html/\/usr\/local\/nav\/apache\/webroot/' \  -e '/^<Directory/s/\/var\/www\/html/\/usr\/local\/nav\/apache\/webroot/' \
Line 439: 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 462: Line 497:
  
 ## ##
-## Make download directory+## Make download/source directory
 ## ##
 mkdir ~/nav3 mkdir ~/nav3
Line 471: 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 
 +alternatives --install /usr/bin/java java /usr/java/default/bin/java 16180 
 +alternatives --install /usr/bin/javac javac /usr/java/default/bin/javac 16180 
 +# Set environment variables for Java used for installation 
 +export PATH=/usr/java/default/bin:$PATH 
 +export JAVA_HOME=/usr/java/default
  
  
 ## ##
-## 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
-export PATH=/usr/java/default/bin:$PATH 
 make SNMPPackage make SNMPPackage
 cd .. cd ..
Line 498: 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 504: 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 527: 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 536: 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 545: 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 572: 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 588: 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 602: 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 623: 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 648: 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 659: Line 695:
 ## Compile and install NAV ## Compile and install NAV
 ## ##
-export PATH=/usr/java/default/bin:$PATH +export CLASSPATH=/root/nav3/JavaSNMP/snmp.jar 
-#export CLASSPATH=/root/nav3/JavaSNMP/snmp.jar:/usr/share/java/tomcat5-servlet-2.4-api.jar +cd nav-3.5.5
-export JAVA_HOME=/usr/java/default +
-cd nav-3.4.2+
 autoconf autoconf
-./configure+./configure CRICKETDIR=/usr/local/nav/cricket/cricket
 make make
 make install make install
 +cd
  
  
Line 709: Line 744:
 ## ##
 cat << EOF > /etc/profile.d/nav_environ.sh cat << EOF > /etc/profile.d/nav_environ.sh
-JAVA_HOME=/usr/java/default +export JAVA_HOME=/usr/java/default 
-PATH=\$PATH:\$JAVA_HOME/jre/bin +export PATH=\$JAVA_HOME/jre/bin:\$PATH
-export JAVA_HOME +
-CATALINA_OPTS="-Djava.awt.headless=true -Xmx128M -server -Djava.ext.dirs=/usr/local/nav/lib/java" +
-export CATALINA_OPTS+
 EOF EOF
  
Line 723: 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 743: 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 762: 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 777: Line 802:
 EOF EOF
  
 +# Restart service
 service postgresql restart service postgresql restart
-Create a NAV DB user and set a password on it+Become postgresql admin
 su - postgres su - postgres
-createuser --no-createdb --no-adduser --pwprompt nav +Use NAV script to make db user with password, make and init nav db
-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 812: 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 829: 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 839: 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 849: 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 859: Line 872:
 chgrp nav /usr/local/nav chgrp nav /usr/local/nav
 chmod g+sw /usr/local/nav chmod g+sw /usr/local/nav
-su navcron+su navcron
 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 899: Line 912:
 cd cricket cd cricket
 echo "SetHandler none" > .htaccess echo "SetHandler none" > .htaccess
 +
  
  
Line 921: 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
-## start Tomcat and NAV, but not stop them 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 953: 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://heanet.dl.sourceforge.net/sourceforge/nav/nav-3.2.2-1.noarch.rpm +# http://launchpad.net/nav/3.5/3.5.5/+download/nav-3.5.5.tar.gz
-# 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://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/rpm/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/rpm/packages/gammu/gammu-1.11.0-1.el5.rf.i386.rpm 
-# http://dag.wieers.com/packages/gammu/gammu-devel-1.11.0-1.el4.rf.i386.rpm +# http://dag.wieers.com/rpm/packages/gammu/gammu-devel-1.11.0-1.el5.rf.i386.rpm 
-# http://dag.wieers.com/packages/rrdtool/rrdtool-1.0.50-3.el4.rf.i386.rpm +# http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.i386.rpm 
-# http://dag.wieers.com/packages/rrdtool/perl-rrdtool-1.0.50-3.el4.rf.i386.rpm +# http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.23-1.el5.rf.i386.rpm 
-# http://dag.wieers.com/packages/rrdtool/rrdtool-devel-1.0.50-3.el4.rf.i386.rpm +# http://dag.wieers.com/rpm/packages/rrdtool/python-rrdtool-1.2.23-1.el5.rf.i386.rpm 
-# http://dag.wieers.com/packages/perl-TimeDate/perl-TimeDate-1.16-1.2.el4.rf.noarch.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.10.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.815.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/CGI/CGI.pm-3.29.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://cheeseshop.python.org/packages/source/I/IPy/IPy-0.54.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.1219409112.txt.gz · Last modified: by rogeraas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki