Christian

I looks like the make has put the postgres xsl files into
/usr/local/share/openvas, whereas the system seems to be using
/usr/share/openvas.

Possibly something I did wrong with the build?

This was my build command:- cmake -DCMAKE_INSTALL_PREFIX=/usr
-DSYSCONFDIR=/etc -DLOCALSTATEDIR=/var -DBACKEND=POSTGRESQL ..

I had previously installed OpenVAS9 from the package repository for Ubuntu.


FYI, this was the documentation I did for the process I followed for
install :-

--------------------------------------------------------------------------------------------------------------------
Build Process Basic OpenVAS9 This is the basic OpenVAS9 install from the
repositories

   - add-apt-repository ppa:mrazavi/openvas
   - apt-get update
   - apt-get install openvas9

This will install the manager, a scanner and the greenbone security
assistant (gsa), along with some bits and pieces.
Dependencies Postgres

   - apt-get install postgresql-contrib postgresql-server-dev-9.5 libpq-dev

And the rest

   - apt-get install bison flex cmake pkg-config libssh-dev libgnutls-dev
   libglib2.0-dev libpcap-dev libgpgme11-dev uuid-dev libksba-dev
   libhiredis-dev libldap2-dev autoconf libsqlite3-dev libxml2-dev
   libmicrohttpd-dev xsltproc tcl rpm alien nsis perl-base perl-base
   heimdal-dev heimdal-multidev libpopt-dev libxslt-dev zlib gnutls-bin

Postgres Some starting stuff for Postgres

   - cd /tmp
   - sudo -u postgres sh
   - createuser -DRS root
   - createdb -O root tasks

Then, some stuff in psql

   - psql tasks
   - create role dba with superuser noinherit;
   - grant dba to root;
   - create extension "uuid-ossp";

Download Download the latest stable source package from OpenVAS
<http://naggers/foswiki/bin/view/Infrastructure/OpenVAS>

   - wget
   
http://wald.intevation.org/frs/download.php/2420/openvas-libraries-9.0.1.tar.gz
   - wget
   http://wald.intevation.org/frs/download.php/2426/openvas-manager-7.0.1.tar.gz

Build First, we build the libraries

   - tar xvzf openvas-libraries-9.0.1.tar.gz
   - cd openvas-libraries-9.0.1/
   - mkdir build
   - cd build
   - cmake ..
   - make
   - make install

Then we build the Manager

   - tar xvzf openvas-manager-7.0.1.tar.gz
   - cd openvas-manager-7.0.1/
   - mkdir build
   - cd build
   - cmake -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONFDIR=/etc
   -DLOCALSTATEDIR=/var -DBACKEND=POSTGRESQL ..
   - make
   - make doc
   - make doc-full
   - make install

This should put a new binary into /usr/sbin called openvasmd-pg and link it
to openvasmd in the same directory. The default contains only support for
sqlite3.
Starting We need to create some certificates with:-

   - openvas-manage-certs -a -f

Then start 'em up

   - service openvas-scanner start
   - service openvas-manager start
   - service openvas-gsa start

Build all the scap, nvt and cve data using

   - greenbone-certdata-sync
   - greenbone-scapdata-sync
   - greenbone-nvt-sync

Then, rebuild the manager cache

   - openvasmd --progress -v --update

Create a user

   - openvasmd --create-user=Admin --role=Admin
   - openvasmd --new-password=xxxxxx --user=Admin

Let it settle down, maybe restart everything and watch it fly!
Access this installation using https://10.10.10.10:4000

------------------------------------------------------------------------------------------------------------------


Thanks


Roger



2017-04-24 19:46 GMT+01:00 Christian Fischer <
[email protected]>:

> Hi,
>
> On 24.04.2017 14:43, Roger Davies wrote:
> > Thanks Christian
> >
> > Brilliant, I've found those in the source directory.
> >
> > I can't see the process for installing these though, so I'll assume that
> > I just rename the _pg.xsl ones into the /usr/share/openvas/scap and cert
> > directories.
> >
> > Roger
>
> i'm not familiar with cmake and postgresql but when having a look at the
> CMakeLists.txt shipped with the manager source package it looks like
> those files should be already copied and used correctly when installing
> OpenVAS and the postgresql backend.
>
> Regards,
>
> --
>
> Christian Fischer | PGP Key: 0x54F3CE5B76C597AD
> Greenbone Networks GmbH | http://greenbone.net
> Neumarkt 12, 49074 Osnabrück, Germany | AG Osnabrück, HR B 202460
> Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner
>
>
> >
> > 2017-04-24 10:00 GMT+01:00 Christian Fischer
> > <[email protected] <mailto:[email protected]
> >>:
> >
> >     Hi,
> >
> >     On 18.04.2017 10:03, Roger Davies wrote:
> >     > Hi
> >     >
> >     > Just wondering if someone has a Postgres equivalent of
> >     > greenbonde-scapdata-sync and greenbone-certdata-sync.
> >     >
> >     > The xsl SQL uses 'INSERT OR REPLACE" which is sqllite specific, so
> I get
> >     > an error when running them.
> >     >
> >     > Can't seem to find anything online.
> >
> >     most likely because both scripts and the .xls files are already
> >     supporting Postgresql since quite some time and doesn't use INSERT OR
> >     REPLACE when running Postgresql:
> >
> >     https://lists.wald.intevation.org/pipermail/openvas-commits/
> 2014-October/020637.html
> >     <https://lists.wald.intevation.org/pipermail/
> openvas-commits/2014-October/020637.html>
> >
> >     https://lists.wald.intevation.org/pipermail/openvas-commits/
> 2014-October/020601.html
> >     <https://lists.wald.intevation.org/pipermail/
> openvas-commits/2014-October/020601.html>
> >
> >     So the question is why your environment is not using the Postgres
> >     compatible .xls files
> >
> >     Regards,
> >
> >     --
> >
> >     Christian Fischer | PGP Key: 0x54F3CE5B76C597AD
> >     Greenbone Networks GmbH | http://greenbone.net
> >     Neumarkt 12, 49074 Osnabrück, Germany | AG Osnabrück, HR B 202460
> >     Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner
> >     _______________________________________________
> >     Openvas-discuss mailing list
> >     [email protected]
> >     <mailto:[email protected]>
> >     https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/
> openvas-discuss
> >     <https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-
> discuss>
> >
> >
> >
> >
> _______________________________________________
> Openvas-discuss mailing list
> [email protected]
> https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss
>
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to