Ninek Dev

development of Ninek based on lamp turnkey linux 2009.02

  1. Installation to real hardware (if you would like to install it to virtual machine, here is tutorial)
    • Benchmark:
      ab -n 100 -c 50 http://pisuar.labolatorium/phpinfo.php
      Time taken for tests: 0.634211 seconds
  2. add additional repos
    • apt-get update && apt-get upgrade
    • add multiverse to /etc/apt/sources.list.d/sources.list
    • add medibuntu
      wget http://www.medibuntu.org/sources.list.d/hardy.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
  3. install basic stuff
    •  apt-get mc nmap wget bzip2 unrar unzip locate gawk php5-cgi php5-common php5-sqlite php5-xmlrpc sqlite php5-curl php5-gd ffmpeg
  4. turn on modrewrite
    • mcedit /etc/apache2/sites-available/default
    • change AllowOverride None to All
    • cd /etc/apache2/mods-enabled && ln -s  ../mods-available/rewrite.load && /etc/init.d/apache2 restart
  5. go to phpmyadmin, make user + database for drupal, grant permissions, reload todo: cli method
  6. drupal install:
    cd ~ && mkdir ~/install/ && mkdir ~/install/drupal && cd ~/install/drupal && wget http://ftp.drupal.org/files/projects/drupal-6.9.tar.gz &&  tar -xvzf drupal-6.9.tar.gz && mkdir /var/www/drupal/ && cp -R ./drupal-6.9/* /var/www/drupal/ && cp ./drupal-6.9/.htaccess /var/www/drupal/ && chown -R www-data /var/www/drupal/ && cd /var/www/drupal/ && cp ./sites/default/default.settings.php ./sites/default/settings.php && chmod o+w ./sites/default/settings.php && chmod o+w ./sites/default && mkdir ./sites/default/files && chmod o+w ./sites/default/files
  7. insert mysql credits into drupal install
    chmod a-w ./sites/default/settings.php && chmod a-w sites/default && chmod a-r ./CHANGELOG.txt
    • Benchmark:
      ab -n 100 -c 50 http://pisaur.labolatorium/phpinfo.php
      Time taken for tests: 0.646893 seconds
    • Benchmark:
      ab -n 100 -c 50 http://pisaur.labolatorium/dupal/
      Time taken for tests: 16.384856 seconds
  8. instalation of media mover and helper modules (todo: get proper ffmpeg from ubuntu repos)
    • cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/backup_migrate-6.x-1.2.tar.gz && tar -xvzf backup_migrate-6.x-1.2.tar.gz && cp -R ./backup_migrate /var/www/drupal/modules && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/media_mover-6.x-1.x-dev.tar.gz && tar -xvzf media_mover-6.x-1.x-dev.tar.gz && cp -R ./media_mover /var/www/drupal/modules && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/mimedetect-6.x-1.0.tar.gz && tar -xvzf mimedetect-6.x-1.0.tar.gz && cp -R ./mimedetect /var/www/drupal/modules && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/mm_custom_command-6.x-1.0.tar.gz && tar -xvzf mm_custom_command-6.x-1.0.tar.gz && cp -R ./mm_custom_command /var/www/drupal/modules && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/token-6.x-1.11.tar.gz && tar -xvzf token-6.x-1.11.tar.gz && cp -R ./token /var/www/drupal/modules && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/ffmpeg_wrapper-6.x-1.1-beta1.tar.gz && tar -xvzf ffmpeg_wrapper-6.x-1.1-beta1.tar.gz && cp -R ./ffmpeg_wrapper /var/www/drupal/modules && cd ~/install/drupal/ && wget http://mediamover.24b6.net/sites/24b6.net/files/ffmpeg.static.tgz && tar -xvf ffmpeg.static.tgz &&cp ffmpeg.static /var/www/drupal/modules/ffmpeg_wrapper/ && chown www-data /var/www/drupal/modules/ffmpeg_wrapper/ffmpeg.static
    • enable the new modules, from code: upload, from Media Mover all except email and the spooky S3 Media Mover module, from Other all
    • go to admin/settings/ffmpeg_wrapper change:
      • “FFmpeg path:“ into
        /var/www/drupal/modules/ffmpeg_wrapper/ffmpeg.static
      • “Path to the FFmpeg vhook libraries” into
        /usr/lib/vhook
  9. make the input, output dirs
    • mkdir /var/www/drupal/sites/default/files/input && mkdir /var/www/drupal/sites/default/files/output && chown -R www-data /var/www/drupal/sites/default/files/input && chown -R www-data /var/www/drupal/sites/default/files/output
  10. samba share
    • chmod 777 /var/www/drupal/sites/default/files/input && chmod 777 /var/www/drupal/sites/default/files/output
    • adding share definition to samba:
      • or from command line at your new machine:
        mcedit /etc/samba/smb.conf
      • or from your local machine
        gedit sftp://root@pisuar.labolatorium/etc/samba/smb.conf

        insert on the end of file /etc/samba/smb.conf :
        [input]
        comment = here split
        path = /var/www/drupal/sites/default/files/input
        public = yes
        writable = yes
        Create mask = 0777
        directory mask = 0777
        force user = nobody
        force group = nogroup
        
        [output]
        comment = here suck
        path = /var/www/drupal/sites/default/files/output
        public = yes
        writable = yes
        Create mask = 0777
        directory mask = 0777
        force user = nobody
        force group = nogroup
        
    • /etc/init.d/samba restart
  11. import media mover definitions
  12. desired way: (not works for now)
  13. go to add config
    • give a name, for example “Fetch input and encode to avi”
    • describe the action: for example: “Fetch from imput various video and encode to avi, than copy to output and publish on local web”
    • in harvest chose fetch from local dir: “/var/www/drupal/sites/default/files/input”
    • in process take “convert video”, specify your output (lets say avi for now)
    • in complete take "storage to local dir “/var/www/drupal/sites/default/files/output”
    • leave complete empty