Installation

[WORK IN PROGRESS]

This installation guide uses gentoo like OS and is tested to work also in a virtual machine. To install a virtual machine in a Debian environment, you can follow these guides. 1) https://wiki.debian.org/LXC#Installation 2) https://wiki.debian.org/LXC/SimpleBridge#Using_lxc-net

Installation on Gentoo

$ emerge eix
$ emerge sudo
$ emerge -av mediainfo
$ emerge -av exiftool
$ emerge imagemagick
$ USE="-drm -opengl" emerge -av ufraw
$ emerge -av mysql
$ emerge --config dev-db/mysql

Insert your password and remember it!

$ nano /etc/portage/make.conf

Add this configuration to make.conf:

## /etc/portage/make.conf
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-march=native -O2 -pipe"
# Use the same settings for both variables
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j17"
# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
CPU_FLAGS_X86='aes avx avx2 f16c fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3'
USE="bindist mmx sse sse2 mmxext sse4_1 sse4_2 ssse3 x265 jpeg2k mp3 \
-opengl -drm opus oss postproc bluray rtmp schroedinger sdl theora v4l vorbis x264 xvid zlib \
jpeg tiff png faac network aac aacplus alsa amr amrenc \
lm_sensors libcaca gnutls vaapi ffmpeg apache2 -X"
GENTOO_MIRRORS="http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"

Be careful not to paste strange characters, even if not visible.

MAKEOPTS="-j17" is refered to the numbers of your processors.
You can find this information typing:
$ cat /proc/cpuinfo
So if your machine, for example, have 4 processor you can edit this line like:
MAKEOPTS="-j4"
$ nano /etc/portage/package.use/php

Add this configuration to php:

dev-lang/php acl apache2 bcmath berkdb bzip2 cdb cgi cjk cli crypt ctype curl fileinfo filter ftp gd gdbm gmp hash iconv ipv6 json mysql mysqli nls odbc opcache pdo phar posix readline session simplexml ssl tokenizer unicode xml xmlreader xmlrpc xmlwriter zip zlib

$ emerge -av =dev-lang/php-5.6.35-r1

These are the packages that would be merged, in order:

Calculating dependencies... done! [ebuild N ] dev-libs/oniguruma-6.7.1:0/4::gentoo USE="-combination-explosion-check -crnl-as-line-terminator -static-libs" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] dev-db/unixODBC-2.3.5-r1::gentoo USE="minimal unicode -odbcmanual -static-libs" ABI_X86="(64) -32 (-x32)" 1,596 KiB [ebuild N ] dev-libs/libmcrypt-2.5.8-r4::gentoo 0 KiB [ebuild N ] dev-lang/nasm-2.13.01::gentoo USE="-doc" 0 KiB [ebuild N ] dev-db/cdb-0.75-r4::gentoo 53 KiB [ebuild N ] app-eselect/eselect-php-0.9.4-r5::gentoo USE="apache2 -fpm" 0 KiB [ebuild N ] media-libs/libjpeg-turbo-1.5.1::gentoo USE="-java -static-libs" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] virtual/jpeg-0-r2::gentoo USE="-static-libs" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] dev-lang/php-5.6.35-r1:5.6::gentoo USE="acl apache2 bcmath berkdb bzip2 cdb cgi cjk cli crypt ctype curl fileinfo filter ftp gd gdbm gmp hash iconv ipv6 json mysql mysqli nls odbc opcache pdo phar posix readline session simplexml ssl tokenizer unicode xml xmlreader xmlrpc xmlwriter zip zlib -calendar -coverage -debug -embed -enchant -exif (-firebird) -flatfile -fpm -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit -libmysqlclient -libressl -mhash -mssql -oci8-instant-client -pcntl -postgres -qdbm -recode (-selinux) -sharedmem -snmp -soap -sockets -spell -sqlite -sybase-ct -systemd -sysvipc -threads -tidy -truetype -vpx -wddx -xpm -xslt" 12,175 KiB

Total: 9 packages (9 new), Size of downloads: 13,823 KiB

Would you like to merge these packages? [Yes/No]

[Type yes if sodisfied]

$ emerge --update --newuse --deep --ask world
$ eix-update
$ nano /etc/portage/package.use/mysql

Add this line to file mysql:

dev-db/mysql extraengine

$ emerge -av apache
$ visudo

The part below, and only this section is to modifie in /etc/sudoers. In this manner will be abilitate all user for group wheel (to confront with gpasswd) Remember that you must open this file with visudo.

Uncomment %wheel ALL=(ALL) NOPASSWD: ALL Uncomment %sudo ALL=(ALL) ALL

$ eix-update
$ eix dev-lang/php
$ emerge -av =dev-lang/php-5.6.35-r1

If you emerge also php7. in a new SLOT (cfr. portage) is necessary to verify wich ambient is set with. This version of software require php 5.6

$ eselect php list apache2
[1] php5.6 *
[2] php7.1
$ nano /etc/conf.d/apache2

Add at the finish, in line APACHE2_OPTS

-D PHP

$ rc-service apache2 restart
$ nano /etc/php/apache2-php5.6/php.ini

Add and change in php.ini: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE display_errors = On date.timezone = "Europe/Rome"

$ rc-service mysql start
$ mysql -u root -p
CREATE DATABASE DAM2;
CREATE DATABASE asset09;
CREATE DATABASE flow_bins;
\q
$ wget http://git.cubotto.org/db_structure.zip
$ unzip db_structure.zip
$ mysql -u root -p asset09 < asset09.sql
$ mysql -u root -p flow_bins < flow_bins.sql
$ mysql -u root -p DAM2 < DAM2.sql

The table asset09.admgoups it must never be changed, contains the numerical values of the levels of permissions associated with the users contained in the table asset09.administrators

The table asset09.support it must never be changed, contains information for treatments of media assets associated with the different types of devices.

$ nano /etc/portage/package.use/ffmpeg

Add this line media-video/ffmpeg openh264 libv4l -drm -opengl x11-libs/libva -drm -opengl

(si devono riverificare queste linee emerge -av libva
416 USE="drm" emerge -av libva
417 USE="drm" emerge -av libva
418 etc-update
419 USE="drm" emerge -av libva
420 emerge -av ffmpeg
421 emerge -av ffmpeg)
$ emerge -av ffmpeg
$ emerge -av ffmpegthumbnailer
$ emerge --ask dev-vcs/git
$ git config --global user.email "<your@email.org>"
$ git config --global user.name "<your_user_name>"
$ cd /var/www/localhost/htdocs
$ git clone http://git.cubotto.org:/cranio/Kegmmav.git
$ chown -R apache:apache Kegmmav/
$ nano /etc/apache2/vhosts.d/00_default_vhost.conf

Add after ServerName DocumentRoot /var/www/localhost/htdocs/Kegmmav/public_html

rc-service apache2 restart
gpasswd -a apache wheel
crei la dir source sotto usr/local/ e ci metti i sorgenti del modulo di streaming
cd ~/mod_h264_streaming-2.2.7
./configure --with-apxs=`which apxs2`
make
sudo make install
add in httpd.conf this line
LoadModule h264_streaming_module /usr/lib/apache2/modules/mod_h264_streaming.so
AddHandler h264-streaming.extensions .mp4
rc-service apache2 restart
ricordarsi prima di installare ffmpeg di creare in package.use il file con le sue istruzioni