Great contribution! This document should definitely be "wikified" and made public for all NAV users to read and edit when necessary.
- Fredrik
On Wed, Sep 17, 2008 at 16:43, Rikard Stemland Skjelsvik rskjels@pogostick.net wrote:
Be warned that this is NOT a official documentation.
This document contains information from both the "Debian README for NAV" and the following document on MetaNAV: http://metanav.uninett.no/installing_from_source_on_debian
Well, it seems to me that i have NAV up and running on a clean debian installation, and for once, i tried to document the process. It could be things that I have missed, but i hope that this perhaps can make life easier for someone. This small document assumes that you are running Debian (etch) and intend to install NAV with the debian packages.
Thanks to all those wonderfull people behind NAV!
Install a clean Debian installation. I installed with minimum packages, just with openssh-server.
- Edit /etc/apt/sources.list:
Your Debian repository would probably be some other server What you need to add is contrib. and non-free to the end of the lines below #--------------------------------------------------------------------- deb http://ftp.no.debian.org/debian/ etch main contrib non-free deb-src http://ftp.no.debian.org/debian/ etch main contrib non-free deb http://security.debian.org/ etch/updates main contrib non-free deb-src http://security.debian.org/ etch/updates main contrib non-free
# This is for NAV deb http://pkg-nav.alioth.debian.org/debian/ etch local #----------------------------------------------------------------------
Install Java
# apt-get install sun-java5-jre # apt-get install sun-java5-jdk # apt-get install sun-java5-bin # probably not nessacary
I would like to add that i do have a problem with Java and vlanpot that hangs. Any comments would be most helpfull!
Install NAV
# apt-get install nav-deps --fix-missing # This is probably not
necessary! # apt-get install nav
- Edit /etc/postgresql/8.1/main/pg_hba.conf conf according to the "Debian
README for NAV" local all postgres ident sameuser local all all md5 host all all 127.0.0.1 255.255.255.255 md5 host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff md5 host all all ::ffff:127.0.0.1/128 md5 host all all 0.0.0.0 0.0.0.0 reject
5.Edit /etc/postgresql/8.1/main/postgresql.conf according to the "Debian README for NAV"
line 93: shared_buffers = 1000 # min 16or max_connections*2, 8KB each line 93: shared_buffers = 1024 # min 16or max_connections*2, 8KB each
uncomment line 104 and replace 20000 with 500000
line 104: #max_fsm_pages = 20000 # minmax_fsm_relations*16, 6 bytes each line 104: max_fsm_pages = 500000 # minmax_fsm_relations*16, 6 bytes each
uncomment line 105 and replace 1000 with 2000
line 105: # max_fsm_relations = 1000 # min 100, ~70bytes each line 105: max_fsm_relations = 2000 # min 100, ~70bytes each
uncomment line 144 and replace 8 with 128
line 144: #wal_buffers = 8 # min 4, 8KB each line 144: wal_buffers = 128 # min 4, 8KB each
uncomment line 403 and replace 64 with 512
line 403: #max_locks_per_transaction = 64 # min 10 line 403: max_locks_per_transaction = 512 # min 10
Restart PostgreSQL
# /etc/init.d/postgresql-8.1 restart
Apache
# vi /etc/apache2/sites-available/default-nav
#------------------------------------------------------------------ ServerName nav.example.com # Change this to reflect your site ServerAdmin webmaster@example.com # Change this to reflect your site
DirectoryIndex index.html index.html index.php index.cgi index.py AccessFileName .htaccess AddDefaultCharset UTF-8 AddHandler cgi-script .cgi
DocumentRoot /var/www/nav
<Directory /> Options FollowSymLinks AllowOverride None </Directory>
<Directory /var/www/nav"> Options Indexes FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all
</Directory>
LogLevel warn
<Location /> # Let NAV authorize all access to this location PythonHeaderParserHandler nav.web PythonDebug on </Location> #------------------------------------------------------------------
Run the following command in order to compete the apache configuration # a2dissite default # a2ensite default-nav # #a2enmod php4 # a2enmod php5 # a2enmod mod_python # invoke-rc.d apache2 force-reload
Restart Apache
# apache2ctl restart
Tomcat
Uncomment the following line:
#CATALINA_OPTS="-Djava.awt.headless=true -Xmx128M -server" CATALINA_OPTS="-Djava.awt.headless=true -Xmx128M -server"
Uncomment the following line and change the value from yes to no
#TOMCAT5_SECURITY=yes TOMCAT5_SECURITY=no
Restart Tomcat:
# /etc/init.d/tomcat5.5 restart
Cricket
Uncomment the following line in /etc/cron.d/cricket
*/5 * * * * cricket test -x /usr/share/cricket/collect-subtrees && /usr/share/cricket/collect-subtrees ALL
#*/5 * * * * cricket test -x /usr/share/cricket/collect-subtrees && /usr/share/cricket/collect-subtrees ALL
Copy the following: # cp /usr/share/doc/nav/cricket/cricket/subtree-sets /etc/cricket/subtree-sets Edit the /etc/cricket/cricket-conf.pl and set these variables: $gConfigRoot = "/etc/cricket/config"; $gLogDir = "/var/log/cricket"; to $gConfigRoot = "/etc/nav/cricket-config"; $gLogDir = "/var/log/nav/cricket"; # Su to navcron $ cricket-compile $ /usr/lib/nav/makecricketconfig.pl
Syslog
Edit /etc/syslog.conf
#-------------------------------------------------------------- # # Cisco # local6.* /var/lib/nav/log/cisco.log #--------------------------------------------------------------
You can test with the logger command # logger -p local6.notice -t CISCO test # cat /var/lib/nav/log/cisco.log Sep 17 15:33:57 hostname CISCO: test Make sure that sysklogd accepts foreign syslogmessages: # vi /etc/default/syslogkd Change value of SYSLOGD="" to SYSLOGD="-r" Restart syslogd # /etc/init.d/sysklogd restart
Configuring NAV to start
# vi /etc/init.d/nav Change RUN_NAV = 0 to RUN_NAV = 1
Any comments are most welcome!
Happy Nav'ing!
Rikard