Install Zoneminder 1.25 source wi Ubuntu Server 11.10 64bit, libjpeg-turbo, Cambozola

Discussion in 'HOWTO-Related Questions' started by letsharehowto, Nov 15, 2011.

  1. letsharehowto

    letsharehowto New Member

    This is not mine. I use this: http://www.zoneminder.com/wiki/inde...iew,_FFmpeg,_libjpeg-turbo,_Webmin,_Cambozola and this: http://www.zoneminder.com/wiki/index.php/Ubuntu_10.10_(Maverick_Meerkat)_Desktop then I cut and paste. Because I cut and paste, some packets, ZM don't need it.

    My dvr card like this: http://www.zoneminder.com/wiki/index.php/Kodicom_8800

    Install new box with Ubuntu server 11.10 64bit. At software selection, select OpenSSH.

    Create root account:

    Code:
    sudo passwd root
    And later do everything with root too.

    Set static IP:

    Code:
    nano /etc/network/interfaces
    Cut and paste this quote into file:

    ctrl-o to save ctrl-x to exit nano

    Restart NIC:

    Code:
    sudo ifdown -a
    sudo ifup -a
    Update system software:

    Code:
    sudo apt-get update
    sudo apt-get upgrade
    Install bttv driver:

    Code:
    nano /etc/modprobe.d/bttv.conf
    Cut and paste this quote into file:

    Reboot box:

    Code:
    reboot
    Do something for Zoneminder:

    Code:
    export CFLAGS="-march=native -O2 -pipe" && export CXXFLAGS="${CFLAGS}" && export CPPFLAGS="${CFLAGS}"
    Code:
    aptitude install acpid build-essential linux-headers-`uname -r` automake perl libauthen-pam-perl apache2 libpam-runtime libio-pty-perl libmysqlclient-dev php5 php5-cli libapache2-mod-php5 php5-mysql libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libjpeg62 libmime-perl libstdc++6 libwww-perl zlib1g zip unzip patch ntp openssl libpcre3-dev libssl-dev libjpeg-progs libcurl4-gnutls-dev munin munin-node libmime-lite-perl netpbm libbz2-dev subversion yasm libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions git-core mysql-server mysql-client mc htop -y
    Code:
    apt-get install libmysqlclient-dev libjpeg-dev libpcre3-dev build-essential -y
    Install Webmin:

    Code:
    wget http://downloads.sourceforge.net/project/webadmin/webmin/1.570/webmin_1.570_all.deb?use_mirror=voxel
    mv webmin_1.570_all.deb\?use_mirror=voxel webmin_1.570_all.deb && dpkg -i webmin_1.570_all.deb
    Install libjpeg-turbo (AMD64):

    Code:
    wget http://downloads.sourceforge.net/project/libjpeg-turbo/1.1.1/libjpeg-turbo_1.1.1_amd64.deb?use_mirror=voxel
    mv libjpeg-turbo_1.1.1_amd64.deb?use_mirror=voxel libjpeg-turbo_1.1.1_amd64.deb && dpkg -i libjpeg-turbo_1.1.1_amd64.deb
    Code:
    ln -s /opt/libjpeg-turbo/lib/libjpeg.a /usr/lib/libjpeg.a && ln -s /opt/libjpeg-turbo/include/jconfig.h /usr/include/jconfig.h && ln -s /opt/libjpeg-turbo/include/jerror.h /usr/include/jerror.h && ln -s /opt/libjpeg-turbo/include/jmorecfg.h /usr/include/jmorecfg.h && ln -s /opt/libjpeg-turbo/include/jpeglib.h /usr/include/jpeglib.h
    Configure Lib Paths:

    Code:
    echo "/opt/libjpeg-turbo/lib" > /etc/ld.so.conf.d/libjpeg-turbo.conf && echo "/usr/local/lib" > /etc/ld.so.conf.d/ffmpeg.conf && echo "LD_LIBRARY_PATH=/usr/local/lib:/opt/libjpeg-turbo/lib:$LD_LIBRARY_PATH" >> /etc/bash.bashrc && echo "export LD_LIBRARY_PATH" >> /etc/bash.bashrc
    
    ldconfig
    Install Perl Modules:

    Code:
    perl -MCPAN -e shell
    
    install CPAN
    
    exit
    Code:
    perl -MCPAN -e shell
    
    install YAML PHP::Serialization Module::Load X10::ActiveHome
    
    exit
    Code:
    perl -MCPAN -e shell
    
    install Sys::Mmap
    
    install DBI
    
    install DBD::mysql
    
    install Date::Manip
    
    install PHP::Serialization
    
    exit
    Install FFmpeg:

    Code:
    apt-get install ffmpeg -y

    Install Zoneminder:

    Code:
    cd /usr/src && svn co http://svn.zoneminder.com/svn/zm/trunk zm
    Code:
    cd /usr/src/zm && ./configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass ZM_SSL_LIB=openssl --enable-debug=no --with-webgroup=www-data --with-webuser=www-data --enable-mmap=yes CPPFLAGS="-D__STDC_CONSTANT_MACROS ${CPPFLAGS}"
    Code:
    autoconf
    
    aclocal
    
    automake
    Code:
    make
    Code:
    mysql -u root -p < db/zm_create.sql
    Password that is requested is Mysql root password that was entered during install, not your ubuntu password.

    Code:
    mysql -u root -p
    Code:
    mysqladmin -p reload
    Code:
    make install
    Install Cambozola:

    Code:
    cd /usr/src && wget http://www.charliemouse.com:8080/code/cambozola/cambozola-latest.tar.gz
    tar -xzvf cambozola-latest.tar.gz
    cp cambozola-0.92/dist/cambozola.jar /var/www/zm
    Create Zoneminder startup script:

    Code:
    nano -w /etc/init.d/zm
    Paste everything BETWEEN the lines below.

    ctrl-o to save, ctrl-x to exit nano

    Code:
    chmod 755 /etc/init.d/zm
    Zoneminder Startup:

    In firefox, go to https://YOUR_ZoneMinder.IP.ADDRESS.HERE:10000 to reach the Webmin interface.(Login with Ubuntu username and password)
    In left menu, select System>Bootup and Shutdown. Tick the box next to zm and click StartNow and On Boot.

    In left menu, select Servers>Apache Webserver. Click virtual server under Existing virtual hosts tab. Under Virtual Server Details, change Document Root to /var/www/zm and then save.
    Click apply changes at top left of page.

    Go to http://YOUR_ZoneMinder.IP.ADDRESS.HERE to reach the Zoneminder interface.

    If you want better quality video, cut -r 25 in Option->Images->FFMPEG_OUTPUT_OPTIONS ad replace with:

    Note: If you add New Monitor by hand, when you restart box, only Monitor 1 be green, monitor 2,3,4,5,6,7,8 still red. If you add New Monitor by Presets->BTTV Video (V4L2), PAL, 320x240->Save, everything works OK.

    Please do not ask me how the box run.

    Thanks:

    http://www.ubuntu.com/
    http://www.howtoforge.com/
    http://www.zoneminder.com/
     

Share This Page