======Data Communications Journal======
====August 26, 2014====
Today is the first day of class.
* We went to the Lazy Foo website which has SDL tutorials.
* We created our first SDL image of hello
* g++ -o imageonscreen imageonscreen.cc -lSDL was used to compile it
======HPC Experience I Journal======
=====September 9th, 2014=====
* We spent time working on dragonfly bsd in class
* I managed to break the system by changing the root users shell into a non existent one
=====Personal Project Planning=====
* I have a love for movies.
* I have a love for music.
* The only solution to this is to set up servers to handle my massive collection
===Subsonic===
* For years I have used subsonic as my main music server
http://www.subsonic.org/pages/index.jsp
* Subsonic is a java web application, so I will need a Tomcat or jetty environment
* I will go with Tomcat due to familiarity
* Will use lamemp3 and ffmpeg for my transcoding
===Plex===
* A newer addition to my server collection is plex
https://plex.tv/
* Plex can be thought of a movie version of subsonic
* I can stream my movies either directly or transcoded to anywhere
* The plex package contains its own web server
===Debian===
* I decided debian would be the best choice for this project
* I have had more experience with debian that I have with any other distro
* Subsonic and Plex packages are tested and stable for debian
===Transmission===
* I already have transmission running on another VM, but I may consolidate into this
=====Generic Debian Installation=====
- Went to the website a few days ago and obtained the newest copy of debian. At the time of writing this, the newest version is 7.6.0 .
- Normal Installation Process nothing special
- Hostname - SERVER-SERVICES
- Domain - internal.kosty.us
- DNS - 192.168.1.254
- NTP - 192.168.1.254
- IP - 192.168.1.252
- Finally made it to the login
{{:opus:fall2014:jkosty6:project1.jpg|}}
===Prereq checks===
* First things first is to check for updates and install them
{{:opus:fall2014:jkosty6:project2.jpg|}}
{{:opus:fall2014:jkosty6:project3.jpg|}}
* No updates available from our selected repos
* To make things easier for us there are two things to install first
* Sudo is the first obviously, since our programs may require control outside of root
{{:opus:fall2014:jkosty6:project4.jpg|}}
* Vim is the second. The included vi is not vim.
{{:opus:fall2014:jkosty6:vim.jpg|}}
* Edited the .vimrc file in my home directory to better match what I am used to
{{:opus:fall2014:jkosty6:vim2.jpg|}}
=====Media File Shares=====
* Setting up a way to reach the media files is probably priority one
* I have my files stored on an SMB share on a Windows Server 2012 R2 box
* They are reachable by \\SERVER-FILES\Multimedia\music and \\SERVER-FILES\Multimedia\movies
* I need to establish a way to reach them effectively
* I could join the media server to the active directory domain I have, but it is not nessessary (incompatible with the services that plex requires anyway)
* The solution is CIFS
===CIFS===
* CIFS or Common Internet File System, is a way for me to easily reach my SMB shares as it runs the SMB protocol
* CIFS will allow me to mount a share using a single credential.
* I am sure there are better ways to do this
* I begin by install it
{{:opus:fall2014:jkosty6:cifs.jpg|}}
* This installs almost all of the samba tools as well
* Decided I would place the mount points in /mnt and made the directories
{{:opus:fall2014:jkosty6:mnt1.jpg|}}
* Next I need to specify the way that the share is being mounted
* This is specified in /etc/fstab to make it automatic
* I added the lines with 192.168.1.253
{{:opus:fall2014:jkosty6:mnt12.jpg|}}
- The IP is the IP of the file server the files are stored on, SERVER-FILES
- Multimedia and Downloads are the shares the file folders are in
- \040 is the way of representing a space in a address
- /mnt/abcd specifies the location the share will be mounted on the file system
- cifs specifies the mount type
- credentials are stored in a separate file /etc/cifspasswd .. really not needed but I like to
- file mode and directory mode decide the control over the mount .. 777 may not be the best for production but fine for testing
* To mount without restart I do a mount -a
* Upon checking the mount locations, I can see it was successful all my "legitimate" movies are there
{{:opus:fall2014:jkosty6:mountfinished.jpg|}}
* The same can be said for the music
{{:opus:fall2014:jkosty6:mountfinished2.jpg|}}
* Something always important to check is that the special characters are coming in right. Dont want half you music to not show up
{{:opus:fall2014:jkosty6:specialchars1.jpg|}}
* Although it shows up, I may have to change settings in subsonic and plex itself later on
=====Transmission=====
* Figured I would get the easiest one out of the way
* Transmission is a torrenting daemon that contains a webgui if I desire. I do desire it
* The install is very straight forward thanks to the debian package being sufficient
{{:opus:fall2014:jkosty6:trans1.jpg|}}
* First we are going to want to stop the daemon and setting we will want to edit its settings.json file
{{:opus:fall2014:jkosty6:trans12.jpg|}}
* Here is the contents of the file - some settings I am not worried about at the moment
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": true, - I want block lists on to evade some trackers
"blocklist-url": "my block list", - URL to the block list I want to use
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/mnt/finished", - Put finished files in our finished folder we mounted earlier
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/mnt/incomplete", - Files that are currently downloading are placed here
"incomplete-dir-enabled": true, - Enables the directory for incomplete files
"lpd-enabled": false,
"max-peers-global": 1000,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-limit-global": 1000,
"peer-limit-per-torrent": 200,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": false,
"preallocation": 1,
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "esgsg", - password for remote connection
"rpc-port": 9091, - port number that the remote connection goes over
"rpc-url": "/transmission/", - word to include in url for connection
"rpc-username": "username", - User name for remote connection
"rpc-whitelist": "*.*.*.*", - enables remote connection from any IP
"rpc-whitelist-enabled": true,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 750,
"speed-limit-down-enabled": false,
"speed-limit-up": 5,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 14,
"utp-enabled": true,
"watch-dir": "/mnt/auto", - enables a folder which .torrents can be placed in for automatic download
"watch-dir-enabled": true - ables auto function
}
* After setting the settings for transmission, we must restart the daemon using the following
root@SERVER-SERVICES:~# service transmission-daemon start
[ ok ] Starting bittorrent daemon: transmission-daemon.
root@SERVER-SERVICES:~#
* Now I can go to, on the local network only at the moment, http://192.168.1.252:9091/transmission/web/
* I should be greeted with
{{:opus:fall2014:jkosty6:trans122.jpg|}}
* If all things went well, I should be to the transmission gui
{{:opus:fall2014:jkosty6:trans1223.jpg|}}
* I can now download anything I want either through magnetic link or from the auto add folder.
* I will test the auto-add folder using a .torrent for debian
{{:opus:fall2014:jkosty6:trans12238ygui.jpg|}}
* As shown the torrent file had the .added suffix appended to it, it was added to the download queue, was placed in the incomplete folder, and moved to the finished when done.
* Transmission is all set
=====Subsonic=====
* At this point I know something could go wrong, so I created a simple copy of the VM. ( I know.. I know.. I am using hyper V but its just easier given my setup )
{{:opus:fall2014:jkosty6:backup.jpg|}}
* Subsonic is the second thing I will be installing
* I am going to need a few things before I can move on depending on how I install it
* If i go with the standalone method I will need
- Subsonic.war provided by website
- Apache tomcat
- Java 7
- lamemp3
- FFmpeg
* If I decide to use the package I will need
- Java 7
- subsonic.deb
* I have decided to go with the standalone
====Java====
* I have to install java 7
* Even though java 8 is out, I wont be using it
root@SERVER-SERVICES:~# sudo apt-get install openjdk-7-jre-headless
* Installs java 7 without the desktop junk
====Tomcat====
* Tomcat is pretty easy to install thanks to the repo version being decent
root@SERVER-SERVICES:~# sudo apt-get install tomcat7
* That is all it takes to have tomcat7 installed
* I check that it is working by going to its default port, 8080
{{:opus:fall2014:jkosty6:tomcat.jpg|}}
====Subsonic WAR Setup====
* Now that I have a working tomcat and java setup, I need to obtain the actual subsonic server
* Put it in webapps folder and we are up and running
* The server is pretty much all ready to run now considering the earlier setup
* I need to specify the location of the music files
{{:opus:fall2014:jkosty6:subsonic1.jpg|}}
* After a long scan of the music share, subsonic finds and sorts all of my music.
{{:opus:fall2014:jkosty6:subsonic2.jpg|}}
=====Plex=====
* Plex is really easy to setup which is good I guess?
* First thing we need to get is curl
sudo apt-get install curl
* Next need to add the repo to our sources list
echo "deb http://shell.ninthgate.se/packages/debian squeeze main" | sudo tee -a /etc/apt/sources.list.d/plexmediaserver.list
sudo curl http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key | sudo apt-key add -
* Update and search for plex
sudo apt-get update
sudo apt-get install plexmediaserver
* Plex is now installed