installingoncentos5
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| installingoncentos5 [2008/11/20 08:14] – spunkmeyer | installingoncentos5 [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. |
| < | < | ||
| ### | ### | ||
| 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, | ||
| + | ### 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 " | # I have selected to do a " | ||
| # 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: | ||
| # | # | ||
| # | # | ||
| - | # dns server ip-addresses | + | # dns server ip-address(es) |
| + | # root password | ||
| # | # | ||
| - | # Boot from CentOS 5.2 i386 DVD | + | # Boot from CentOS 5.4 i386 DVD |
| # " | # " | ||
| # "CD Found", | # "CD Found", | ||
| - | # Screen 1: "Welcome" | + | # Screen 1: "CentOS" |
| - | # " | + | # Press Next |
| # Screen 2: " | # Screen 2: " | ||
| # 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 | + | # (d) if you need any advanced |
| + | # (e) if you want to review and modify | ||
| # | # | ||
| # Press Yes | # Press Yes | ||
| Line 93: | Line 106: | ||
| # | # | ||
| + | # 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: | ||
| # | # | ||
| - | # Run Tool () | + | # Press Run Tool |
| - | # | + | # Select |
| - | # | + | # Select |
| - | # 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 |
| ## | ## | ||
| ## 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 |
| ## | ## | ||
| # 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 |
| + | # 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" | echo "root: yourlogemail@yourdomain.tld" | ||
| 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 |
| ## | ## | ||
| sed -e '/ | sed -e '/ | ||
| - | 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 | + | ## Root privileges |
| ## | ## | ||
| su - | su - | ||
| Line 365: | Line 390: | ||
| ## | ## | ||
| - | ## Install and configure Apache, mod_ssl, mod_python | + | ## 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 |
| # Remove autocreated cert and make a new certificate. | # Remove autocreated cert and make a new certificate. | ||
| rm -f / | rm -f / | ||
| 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 | + | cat << EOF > openssl.conf |
| - | -x509 -days 3652 -out / | + | [ req ] |
| - | NO | + | default_bits |
| - | Rogaland | + | distinguished_name |
| - | Haugesund | + | prompt |
| - | Ementor Norge AS | + | |
| - | hostname.yourdomain.tld | + | [ req_distinguished_name ] |
| - | webmaster@yourdomain.tld | + | countryName |
| + | stateOrProvinceName | ||
| + | localityName | ||
| + | organizationName | ||
| + | organizationalUnitName = Haugesund | ||
| + | commonName | ||
| + | emailAddress | ||
| + | EOF | ||
| + | openssl req -new -key / | ||
| + | -x509 -days 3652 -out / | ||
| chmod go-rwx / | chmod go-rwx / | ||
| # 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 | + | yum -y install postgresql postgresql-server postgresql-jdbc |
| - | yum -y install | + | yum -y install python-ldap # NAV dependency |
| - | yum -y install | + | yum -y install |
| - | yum -y install | + | yum -y install |
| - | yum -y install | + | yum -y install |
| - | yum -y install | + | yum -y install postgresql-devel # psycopg |
| - | yum -y install perl-libwww-perl # Cricket | + | yum -y install |
| - | yum -y install db4-devel # Checked out, DB_File needs it to compile | + | yum -y install |
| - | yum -y install | + | yum -y install perl-libwww-perl # Cricket |
| - | yum -y install | + | yum -y install db4-devel # Cricket dependency |
| - | yum -y install pkgconfig # python-gammu | + | yum -y install |
| - | yum -y install ant | + | yum -y install |
| - | yum -y install autoconf | + | yum -y install pkgconfig # python-gammu |
| - | yum -y install perl-TimeDate | + | |
| - | yum -y install tomcat5 | + | |
| Line 467: | Line 497: | ||
| ## | ## | ||
| - | ## Make download directory | + | ## Make download/ |
| ## | ## | ||
| 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/ | + | 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/ | + | 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 / | + | alternatives --install / |
| - | alternatives --install / | + | alternatives --install / |
| # Set environment variables for Java used for installation | # Set environment variables for Java used for installation | ||
| export PATH=/ | export 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/ | + | wget http://www.pannekake.net/nav/ |
| 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/ | + | wget http://www.pannekake.net/nav/ |
| 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/ | + | wget http://www.pannekake.net/nav/ |
| 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/ | + | wget http://www.pannekake.net/nav/ |
| 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 | + | ## Install rrdtool, NAV dependency |
| ## | ## | ||
| - | wget http://ans.hsh.no/home/ | + | 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:// |
| - | 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/ |
| - | wget http:// | + | rpm -ivh 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/ | + | # Cricket dependency |
| - | wget http://ans.hsh.no/ | + | wget http://www.pannekake.net/nav/ |
| 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/ | + | wget http://www.pannekake.net/nav/ |
| 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/ | + | # Cricket dependency |
| - | wget http://ans.hsh.no/home/ | + | 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:// | + | |
| - | tar xvzf FCGI-0.67.tar.gz | + | |
| - | cd FCGI-0.67 | + | |
| - | perl Makefile.PL | + | |
| - | make | + | |
| - | make install | + | |
| - | cd .. | + | |
| - | + | ||
| - | # CGI CPAN Perl module | + | |
| - | wget http:// | + | |
| - | 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/ | + | # NAV dependency |
| - | wget http://ans.hsh.no/ | + | wget http://www.pannekake.net/nav/ |
| 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/ | + | wget http://www.pannekake.net/nav/ |
| 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/ | + | 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/ | + | 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/ | + | wget http://www.pannekake.net/nav/ |
| 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/ | + | 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/ | + | wget http://www.pannekake.net/nav/ |
| - | tar xvzf forgethtml-cvs-2004-10-21.tar.gz | + | |
| - | cd forgethtml | + | |
| - | python setup.py install | + | |
| - | cd .. | + | |
| - | + | ||
| - | # thresholdMon.py | + | |
| - | wget http:// | + | |
| 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/ | + | cp nav-3.5.5/ |
| cd forgetSQL-0.5.1/ | cd forgetSQL-0.5.1/ | ||
| patch < | patch < | ||
| Line 658: | Line 663: | ||
| cd .. | cd .. | ||
| - | # Install Python bindings for gammu | + | # pyrad dependency |
| - | wget http://ans.hsh.no/home/roger/nav3/ | + | 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:// | ||
| + | tar xvzf pyrad-1.2.tar.gz | ||
| + | cd pyrad-1.2 | ||
| + | python setup.py install | ||
| + | cd .. | ||
| + | |||
| + | # NAV dependency | ||
| + | wget http:// | ||
| + | tar xvzf Django-1.1.1.tar.gz | ||
| + | cd Django-1.1.1 | ||
| + | python setup.py install | ||
| + | cd .. | ||
| + | |||
| + | # gammu dependency | ||
| + | wget http:// | ||
| 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=/ | + | export CLASSPATH=/ |
| - | cd nav-3.4.2 | + | cd nav-3.5.5 |
| autoconf | autoconf | ||
| - | ./configure | + | ./ |
| make | make | ||
| make install | make install | ||
| Line 720: | Line 746: | ||
| export JAVA_HOME=/ | export JAVA_HOME=/ | ||
| export PATH=\$JAVA_HOME/ | export PATH=\$JAVA_HOME/ | ||
| - | export CATALINA_OPTS=" | ||
| EOF | EOF | ||
| Line 730: | Line 755: | ||
| ## | ## | ||
| ln -s / | ln -s / | ||
| + | |||
| ## | ## | ||
| Line 750: | Line 776: | ||
| cat << EOF > / | cat << EOF > / | ||
| import sys | import sys | ||
| - | sys.path.append(' | + | __navpath = "/ |
| + | if __navpath not in sys.path: | ||
| + | sys.path.append(__navpath) | ||
| EOF | EOF | ||
| - | |||
| - | ## | ||
| - | ## Configure Tomcat | ||
| - | ## | ||
| - | # Let Tomcat only listen to the localhost address | ||
| - | sed -e ' | ||
| - | # Link in the NAV servlets | ||
| - | ln -s / | ||
| - | chkconfig tomcat5 on | ||
| Line 768: | Line 787: | ||
| # | # | ||
| # Site-specific: | # Site-specific: | ||
| - | # nav user password | + | # navdbpassword |
| # | # | ||
| - | # Start postgres | + | # Start postgres |
| chkconfig postgresql on | chkconfig postgresql on | ||
| service postgresql start | service postgresql start | ||
| - | # Configure postgres with net authorization | + | # Configure postgres with correct |
| sed -e ' | sed -e ' | ||
| sed -e ' | sed -e ' | ||
| 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 | + | |
| - | createlang plpgsql manage | + | |
| - | createlang plpgsql navprofiles | + | |
| cd / | cd / | ||
| - | # 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 ' | + | sed -e ' |
| Line 821: | Line 825: | ||
| # | # | ||
| # First you have to edit the / | # First you have to edit the / | ||
| + | # | ||
| + | # Check out the original / | ||
| + | # | ||
| + | # Two examples: | ||
| # | # | ||
| Line 838: | Line 846: | ||
| # | # | ||
| - | # Check out the original / | + | # 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 " | + | # Since the NAV program runs as the navcron user it needs permissions to use |
| - | # | + | # the /dev/tty* device |
| - | # 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 | + | |
| - | # 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' | # Now you can test the smsd.py module to see that it will send SMS' | ||
| # | # | ||
| + | su - navcron | ||
| / | / | ||
| - | # | + | exit |
| - | # Again change " | + | |
| Line 871: | Line 875: | ||
| mkdir ~/cricket | mkdir ~/cricket | ||
| cd ~/cricket | cd ~/cricket | ||
| - | wget http://ans.hsh.no/home/ | + | wget http://www.pannekake.net/nav/ |
| 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 | ||
| ## | ## | ||
| - | / | ||
| - | |||
| - | # Check the startup by using this command: | ||
| - | / | ||
| - | |||
| - | # I sometimes have problems starting servicemon and/or pping. I then use this command: | ||
| - | / | ||
| - | # Maybe even two times to get it going | ||
| - | # or I stop NAV and start it again this way: | ||
| - | / | ||
| / | / | ||
| ## 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 | + | ## Go to the webpage and log in as admin with password |
| - | ## and go to Toolbox, Edit database | + | ## the password!) |
| ## 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 (I 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:// | + | # http:// |
| # http:// | # http:// | ||
| # http:// | # http:// | ||
| Line 974: | Line 968: | ||
| # http:// | # http:// | ||
| # http:// | # http:// | ||
| - | # http:// | + | # http:// |
| - | # http:// | + | # http:// |
| - | # http:// | + | # http:// |
| + | # http:// | ||
| # http:// | # http:// | ||
| # ftp:// | # ftp:// | ||
| - | # ftp:// | + | # ftp:// |
| - | # ftp:// | + | |
| - | # ftp:// | + | |
| # ftp:// | # ftp:// | ||
| - | # http:// | + | # http://www.initd.org/ |
| - | # 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:// | # http:// | ||
| - | # http:// | + | # http:// |
| - | # http:// | + | |
| # http:// | # http:// | ||
| + | # http:// | ||
| + | # http:// | ||
| + | # http:// | ||
| # http:// | # http:// | ||
| # http:// | # http:// | ||
installingoncentos5.1227168892.txt.gz · Last modified: by spunkmeyer
