Tutturu 2009-05-alpha3-dev
From Transmission
Doc on building Alpha 2 version of tutturu based on [turnkeylinux drupal6 v. 2009.03]
Security warning: below method will lead to opening for any one write access to folders on your future machine. It might be OK on local network but DO NOT EXPOSE the machine to wild Internet (without firewall) or run it in public area network (eg. wifi hotspot) unless you really know what you are doing.
Contents |
Operating System
- get Turnkeylinux from [here] and install somewhere locally (tutorial for running as virtual machine is [here])
- name the box
- edit etc/hostname change drupal6 into Tutturu-alpha3
- add additional repos
-
apt-get update && apt-get upgrade && apt-get install wget - 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
-
-
- install basic stuff
-
apt-get install mc nmap bzip2 unrar unzip locate gawk php5-cgi php5-common php5-sqlite php5-xmlrpc sqlite php5-curl php5-gd ffmpeg samba php5-cli
-
- temporary hack for php/drupal memory:
- go to webmin: System >> PHP configuration >> Manage >> Resource limits and change "Maximum memory allocation", Maximum HTTP POST size, and Maximum file upload size to 64m.
- That is due to method of passing encoded files from media mover into cck file filed. In futuru it should be done normal way (avoiding limits of browser post method).
- enable cron
- add to /etc/cron.d/cron-apt line: */10 * * * * www-data wget -O /dev/null http://localhost/tutturu/cron.php
- it will run cron every 10 minutes
Drupal CMS
- Install fresh drupal
- cd ~ && mkdir ~/install/ && mkdir ~/install/drupal && cd ~/install/drupal && wget http://ftp.drupal.org/files/projects/drupal-6.11.tar.gz && tar -xvzf drupal-6.11.tar.gz && mkdir /var/www/tutturu/ && cp -R ./drupal-6.11/* /var/www/tutturu/ && cp ./drupal-6.11/.htaccess /var/www/tutturu/ && chown -R www-data /var/www/tutturu/ && cd /var/www/tutturu/ && 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
- get vhost running
- mcedit /etc/drupal/6/apache/
- swap all /usr/shared/drupal6/ for /var/www/ and save
- /etc/init.d/apache2 reload
- setup new mysql database and user phpmyadmin: https://adress-of-your-appliance:12322
- install drupal
- drupal web user propagator pass transmitting77
- secure the site
- cd /var/www/tutturu/ && chmod a-w ./sites/default/settings.php && chmod a-w sites/default && chmod a-r ./CHANGELOG.txt
- modules instalation
- mkdir /var/www/tutturu/sites/all/modules/ && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/admin_menu-6.x-1.3.tar.gz && tar -xvzf admin_menu-6.x-1.3.tar.gz && cp -R ./admin_menu /var/www/tutturu/sites/all/modules/ && 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/tutturu/sites/all/modules/ && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/media_mover-6.x-1.0-beta2.tar.gz && tar -xvzf media_mover-6.x-1.0-beta2.tar.gz && cp -R ./media_mover /var/www/tutturu/sites/all/modules/ && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/mimedetect-6.x-1.1.tar.gz && tar -xvzf mimedetect-6.x-1.1.tar.gz && cp -R ./mimedetect /var/www/tutturu/sites/all/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/tutturu/sites/all/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/tutturu/sites/all/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/tutturu/sites/all/modules/ && cd ~/install/drupal/ && wget http://24b6.net/sites/24b6.net/files/ffmpeg.static.tgz && tar -xvf ffmpeg.static.tgz &&cp ffmpeg.static /var/www/tutturu/sites/all/modules/ffmpeg_wrapper/ && chown www-data /var/www/tutturu/sites/all/modules/ffmpeg_wrapper/ffmpeg.static && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/getid3-6.x-1.2.tar.gz && tar -xvzf getid3-6.x-1.2.tar.gz && cp -R ./getid3 /var/www/tutturu/sites/all/modules/ && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/pathauto-6.x-1.1.tar.gz && tar -xvzf pathauto-6.x-1.1.tar.gz && cp -R ./pathauto /var/www/tutturu/sites/all/modules/ && cd ~/install/drupal/ && wget http://ftp.drupal.org/files/projects/cck-6.x-2.2.tar.gz && tar -xvzf cck-6.x-2.2.tar.gz && cp -R ./cck /var/www/tutturu/sites/all/modules/ && cd ~/install/drupal/ && wget http://voxel.dl.sourceforge.net/sourceforge/getid3/getid3-1.7.7.zip && unzip getid3-1.7.7.zip && rm -rf ./getid3/demos && mkdir /var/www/tutturu/sites/all/modules/getid3/getid3/ && cp -R ./getid3 /var/www/tutturu/sites/all/modules/getid3/getid3/
- modules not coverd with above script: file filed, image filed, swftools,
- enable the new modules, from core: 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/tutturu/sites/all/modules/ffmpeg_wrapper/ffmpeg.static
- “Path to the FFmpeg vhook libraries” into /usr/lib/vhook
Local file sharing
- make input and output directores
- mkdir /var/www/tutturu/sites/default/files/input && mkdir /var/www/tutturu/sites/default/files/output && chown -R www-data /var/www/tutturu/sites/default/files/input && chown -R www-data /var/www/tutturu/sites/default/files/output && chmod 777 /var/www/tutturu/sites/default/files/input && chmod 777 /var/www/tutturu/sites/default/files/output
- make input and output directores
- 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/tutturu/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/tutturu/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
By now underlaying system is installed, drupal with needed modules and samba are working. It is possible to upload files from local network into system via network share. Basically any computer on local network should be able to read, upload, and delete files in network folders.
Torrent client
- get and unpack torrent client (to do: use rtorrent here)
- mkdir ~/install/torrent/ && cd ~/install/torrent/ && wget http://download.berlios.de/tf-b4rt/torrentflux-b4rt_1.0-beta2.tar.bz2 && tar -jxvf ./torrentflux-b4rt_1.0-beta2.tar.bz2 && cd torrentflux-b4rt_1.0-beta2 && mkdir /var/www/torrent/ && cp -R ./html/* /var/www/torrent/ && cp /var/www/torrent/inc/config/config.db.php.dist /var/www/torrent/inc/config/config.db.php
- setup
- make user + database
- cd ~/install/torrent/torrentflux-b4rt_1.0-beta2 && mysql -u torrentflux -p torrentflux < ./sql/mysql/mysql_torrentflux-b4rt-1.0.sql
- mcedit /var/www/torrent/inc/config/config.db.php
- insert db user name and pass
- chown -R www-data /var/www && rm /var/www/torrent/setup.php
- finishing
- go to http://address-of-your-box/torrent/ login with desired data, it will became your future login
- go to http://address-of-your-box/torrent/admin.php?op=serverSettings and setup Document Root Path: to /var/www/torrent/
- Test the clinet by downloading some popular stuff. That way you will test ports and permissions.
Drupal configuration
- Create content types
- video type
- Media mover configs
- here document mm configs
- swf tools
- download [jw 3 player] and copy into modules/swftools/shared/flash_media_player/mediaplayer.swf
- docs on swftools are [here]