Changes between Version 22 and Version 23 of WikiStart


Ignore:
Timestamp:
Dec 14, 2014, 4:41:06 PM (9 years ago)
Author:
huub
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v22 v23  
    105105Het gebruik van ports gaf problemen ivm perl port. Daarom hebben we pacakages gebruikt:
    1061061. mysql
    107 pkg install mysql
     107
     108{{{
     109pkg install mysql-server
    108110echo 'mysql_enable="YES"' >> /etc/rc.conf
    109111/usr/local/etc/rc.d/mysql-server start
    110112mysqladmin -u root password "newpassword"
     113}}}
    1111142. apache
     115{{{
    112116pkg install apache24
    113 echo 'apache22_enable="YES"' >> /etc/rc.conf
    114 
     117php-module is in /usr/ports/www, install separately
     118cd /usr/ports/lang/php52-extensions
     119make install clean
     120
     121echo 'apache24_enable="YES"' >> /etc/rc.conf
     122test apache (browser to http://<ip-adres>)
     123}}}
     1243. php
     125{{{
     126- pkg install php54 en php54-extensions
     127- activeer php configuration cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
     128- configureer apache voor php
     129edit /usr/local/etc/apache22/httpd.conf:
     130LoadModule cgi_module
     131DirectoryIndex index.php index.html index.htm
     132AddType application/x-httpd-php .php
     133AddType application/x-httpd-php-source .phps
     134AddHandler cgi-script .cgi
     135- check php info pagina. De standaard document root in apache24 is /usr/local/www/apache22/data. Maak een php-testbestand aan
     136(echo “<? phpinfo(); ?>” >> /usr/local/www/apache22/data/test.php
     137check de pagina http://<ip-sdres>/test.php
     138}}}
     1394. installeer nagios
     140{{{
     141cd /usr/ports/net-mgmt/nagios
     142make install clean
     143default installatie, voeg NETSNMP toe aan nagios group en user.
     144echo 'nagios_enable="YES"' >> /etc/rc.conf
     145kopieer de voorbeeld pagina naar de config files
     146cd /usr/local/etc/nagios/
     147cp cgi.cfg-sample cgi.cfg
     148cp nagios.cfg-sample nagios.cfg
     149cp resource.cfg-sample resource.cfg
     150
     151Idem in /usr/local/etc/nagios/objects/:
     152cp commands.cfg-sample commands.cfg
     153cp contacts.cfg-sample contacts.cfg
     154cp localhost.cfg-sample localhost.cfg
     155cp printer.cfg-sample printer.cfg
     156cp switch.cfg-sample switch.cfg
     157cp templates.cfg-sample templates.cfg
     158cp timeperiods.cfg-sample timeperiods.cfg
     159
     160check de nagios configuratie op fouten:
     161#  nagios -v  /usr/local/etc/nagios/nagios.cfg
     162
     163Maak een admin password aam voor de nagios home page (admin is nagiosadmin)
     164htpasswd -c /usr/local/etc/nagios/htpasswd.users nagiosadmin
     165
     166Voeg Nagios toe aan de apache  configuratie:
     167
     168edit  /usr/local/etc/apache24/httpd.conf, voeg toe aan het einde van het bestand:
     169
     170ScriptAlias /nagios/cgi-bin/ /usr/local/www/nagios/cgi-bin/
     171Alias /nagios /usr/local/www/nagios/
     172<Directory /usr/local/www/nagios>
     173Options None
     174AllowOverride None
     175Order allow,deny
     176Allow from all
     177AuthName “Nagios Access”
     178AuthType Basic
     179AuthUSerFile /usr/local/etc/nagios/htpasswd.users
     180Require valid-user
     181
     182</Directory>
     183<Directory /usr/local/www/nagios/cgi-bin>
     184Options ExecCGI
     185AllowOverride None
     186Order allow,deny
     187Allow from all
     188AuthName “Nagios Access”
     189AuthType Basic
     190AuthUSerFile /usr/local/etc/nagios/htpasswd.users
     191Require valid-user
     192</Directory>
     193
     194Opnieuw starten van apache en controleren op fouten
     195/usr/local/etc/rc.d/apache24 restart
     196
     197Open de nagios pagina http://ip/nagios, gebruik login en password
     198}}}
    115199= Welcome to Trac 0.11.2 =
    116200