Debian Jessie compiling PHP with OCI8 & PDO OCI

First we need to grab instant client from oracle..
Basic and Devel RPM packages is enough.

Before we install PHP we need to install prerequisites.

sudo apt-get install gcc libbz2-dev libpng12-dev libc-client2007e-dev libmcrypt-dev libxml2-dev libcurl4-openssl-dev libxslt1-dev libaio1 apache2-dev alien

Turn rpm packages to debian packages with alien.

sudo alien -d oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
sudo alien -d oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

Install instant client packages we freshly converted.

sudo dpkg -i oracle-instantclient12.1-basic_12.1.0.2.0-2_amd64.deb
sudo dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb

Download latest php source from php.net; for example;

wget http://php.net/distributions/php-5.6.19.tar.bz2

tar -jxvf php-5.6.19.tar.bz2

cd php-5.6.19

export paths to system;

export PATH=/usr/lib/oracle/12.1/client64/bin:$PATH
export ORACLE_HOME=/usr/lib/oracle/12.1/client64/
export C_INCLUDE_PATH=/usr/include/oracle/12.1/client64/

now we configure to generate make files;

./configure --with-pdo-oci --with-oci8 --with-pdo-oci --with-apxs2=/usr/bin/apxs2 --with-kerberos --with-mysql --with-pdo-mysql --with-bz2 --with-curl --with-gd --with-imap --with-imap-ssl --enable-mbstring --with-mcrypt --with-openssl --enable-zip --with-zlib --disable-phar

(if you need phar, delete last option).

make & install

make
sudo make install

Install OpenVAS 8 on Debian 8 Jessie

OpenVAS is a framework of several services and tools offering a comprehensive and powerful vulnerability scanning and vulnerability management solution.

You can find all source packages for OpenVAS here.

first im gonna prepare system for openVAS;

sudo apt-get update
sudo apt-get install build-essential cmake bison flex libpcap-dev pkg-config libglib2.0-dev libgpgme11-dev uuid-dev \
sqlfairy xmltoman doxygen libssh-dev libksba-dev libldap2-dev \
libsqlite3-dev libmicrohttpd-dev libxml2-dev libxslt1-dev \
xsltproc clang rsync rpm nsis alien sqlite3 libhiredis-dev libgcrypt11-dev libgnutls28-dev redis-server texlive-latex-base

edited upon Thomas Frederiksen‘s suggestion

download sources;

wget http://wald.intevation.org/frs/download.php/2067/openvas-libraries-8.0.3.tar.gz
wget http://wald.intevation.org/frs/download.php/2071/openvas-scanner-5.0.3.tar.gz
wget http://wald.intevation.org/frs/download.php/2075/openvas-manager-6.0.3.tar.gz
wget http://wald.intevation.org/frs/download.php/2079/greenbone-security-assistant-6.0.3.tar.gz
wget http://wald.intevation.org/frs/download.php/1987/openvas-cli-1.4.0.tar.gz

open packages;

tar xvf greenbone-security-assistant-6.0.3.tar.gz
tar xvf openvas-libraries-8.0.3.tar.gz
tar xvf openvas-scanner-5.0.3.tar.gz
tar xvf openvas-manager-6.0.3.tar.gz
tar xvf openvas-cli-1.4.0.tar.gz

compile sources;


cd openvas-libraries-8.0.3
cmake .
make
make doc
sudo make install
cd ..

cd openvas-manager-6.0.3/
cmake .
make
make doc
sudo make install
cd ..

cd openvas-scanner-5.0.3/
cmake .
make
make doc
sudo make install
cd ..

cd openvas-cli-1.4.0/
cmake .
make
make doc
sudo make install

cd greenbone-security-assistant-6.0.3/
cmake .
make
make doc
sudo make install

configuration step;

sudo ldconfig

cd ~ && wget --no-check-certificate https://svn.wald.intevation.org/svn/openvas/trunk/tools/openvas-check-setup &&
chmod +x openvas-check-setup && sudo ./openvas-check-setup --v8

# Create openvas certificates:

sudo openvas-mkcert# NVT feed:
sudo openvas-nvt-sync#SCAP feed:
sudo openvas-scapdata-sync#CERT feed:
sudo openvas-certdata-sync# Generate client certificates:
sudo openvas-mkcert-client -n -i

# Signature checking of NVTs:

sudo apt-get install gnupg
wget http://www.openvas.org/OpenVAS_TI.asc
sudo gpg --homedir=/usr/local/etc/openvas/gnupg --gen-key
sudo gpg --homedir=/usr/local/etc/openvas/gnupg --import OpenVAS_TI.asc
sudo gpg --homedir=/usr/local/etc/openvas/gnupg --lsign-key 48DB4530

to help generate a lot of random bytes on another shell:

sudo dd if=/dev/zero of=/tmp/500m.tmp bs=500M count=5

or install haveged deamon:

sudo apt-get install haveged

# enable sign check:

echo "nasl_no_signature_check = no" >> /usr/local/etc/openvas/openvassd.conf

#Update portnames:

wget http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
openvas-portnames-update service-names-port-numbers.xml
rm service-names-port-numbers.xml

# Create admin password:

sudo openvasmd --create-user=adminuser --role=Admin

write down the password

# Set passwd policy
sudo vim /usr/local/etc/openvas/pwpolicy.conf

# install nmap 5.51:

wget http://nmap.org/dist/nmap-5.51.6.tgz &&
tar xvf nmap-5.51.6.tgz &&
cd nmap-5.51.6 &&
./configure &&
make &&
make install

# Start OpenVAS Scanner
sudo openvassd

# Initialize the Database
sudo openvasmd --rebuild --progress

# Launch OpenVAS Scanner as root
openvassd

# Launch OpenVAS Manager daemon
openvasmd

# Launch OpenVAS Greenbone Security Assistant

gsad

configure redis-server with

http://download.redis.io/redis-stable/redis.conf
changes in redis.conf

unixsocket /tmp/redis.sock
unixsocketperm 777
dir /var/dump # create and chmod with root

comment and close below;

#repl-diskless-sync no
#repl-diskless-sync-delay 5
# repl-ping-slave-period 10

connect to website with “adminuser” and the password you wrote down:

https://localhost