Saturday, 22 August 2015

My little EE Box is feeling the strain with all the work it does on top of just file sharing. I've come across a slightly broken Toshiba laptop which works until you try to do anything graphical on it. But just running a text based desktop works fine, so I've decided to offload some of the tasks from the other machine on it.The first thing I'm going to do is install Ubuntu 14.04 server with just the basic packages and the ssh server so I can do the rest remotely. I'll configure the router to give it a static IP. I'm not going to go into any detail on that lot as you really shouldn't be doing the rest of this if you can't do that.But first I'm going to install Midnight Commander and a few other files as I'm going to be accessing an nfs share with this server, it's not essential and if this is going to be a standalone machine then you don't need the following:sudo apt-get install mc nfs-common nfs-serverThen with the help of some instructions from NoobsLabs, I'm going to setup my own cloud server using OwnCloud, it's going to take some time so go with me on this.Quite a few command to type so let's make a start:This is all one line:sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.10/ /' >> /etc/apt/sources.list.d/owncloud.list"And so is this:wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_14.10/Release.keysudo apt-key add - < Release.key

sudo apt-get update

sudo apt-get install owncloud

During the installation it's going to ask you to create a password for the SQL server, please remember this password and if you are going to get access while away from home make sure it's a good password.Then we have to set the permissions for the Owncloud folders:sudo chown -R www-data:www-data /var/www/owncloudandsudo chmod 0777 -R -v /var/www/*

Then we setup SSL to enable an encrypted connection, we are going to use self certification for this so you will get security alerts from some browsers when connecting.sudo apt-get install openssl

Now run ifconfig to find the IP address of the machine, mine is 192.168.0.251

And then past the following text in to the file you are about to create, replacing the IP address with the one for your server:sudo nano /etc/apache2/sites-enabled/owncloud.conf

<VirtualHost 192.168.0.251:80>

#### Redirect to port 443 ###

RewriteEngine on

ReWriteCond %{SERVER_PORT} !^443$

RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

#### End of Redirection configuration ###

DocumentRoot /var/www/owncloud/

<Directory /var/www/owncloud>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Require all granted

</Directory>

</VirtualHost>

<VirtualHost 192.168.0.251:443>

####Configuration for SSL #####

SSLEngine on

SSLCertificateFile /etc/apache2/ssl/owncloud.pem

SSLCertificateKeyFile /etc/apache2/ssl/owncloud.key

#### End of SSL Configuration ####

DocumentRoot /var/www/owncloud/

<Directory /var/www/owncloud>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Require all granted

</Directory>

</VirtualHost>

And now we restart Apache with:sudo service apache2 restartYou should now be able to connect to the server with a browser using:https://machinenameCreate a login and get on with the initial configuration, if you are asked to add the server as a trusted domain just do it.Then you need to setup some port forwarding on your router so you can access the cloud from the outside world. And that's your cloud server all setup.Next up I'm going to install Newznab to index some newsgroups.Now we need to install some files:

Now we create the file structure with:

sudo mkdir /var/www

sudo mkdir /var/www/newznab

sudo chmod 0777 /var/www/newznab

Next we need to install php with the following:

sudo apt-get install php5 php5-dev php-pear

Then we install some php extensions with:

sudo apt-get install php5-gd php5-mysql php5-curl

Now we make some changes to the php configuration file:

sudo nano /etc/php5/cli/php.ini

Under the resource limits section we need to change the maximum execution time to 120:

max_execution_time = 120

Then under Module Settings we need to change the time zone settings, in my case I'm the UK so I'm going to change it to:

Now we need to create a configuration file for Newznab, so type the following to create an empty file:

sudo nano /etc/apache2/sites-available/newznab.conf

And then paste the following into the file:

<VirtualHost *:8080>

ServerAdmin webmaster@localhost

ServerName localhost

DocumentRoot /var/www/newznab/www

ErrorLog /var/log/apache2/error.log

LogLevel warn

</VirtualHost>

This will run Newznab on port 8080, change this if you want it to run on another port.Save this file to continue.We also need to enter another Apache file with:nano /etc/apache2/ports.confAdd Listen 8080 to the list or whatever port you have Newznab on.# If you just change the port or add more ports here, you will likely also# have to change the VirtualHost statement in# /etc/apache2/sites-enabled/000-default.confListen 80Listen 8080<IfModule ssl_module> Listen 443</IfModule><IfModule mod_gnutls.c> Listen 443</IfModule># vim: syntax=apache ts=4 sw=4 sts=4 sr noet

We now need to get hold of Newznab itself, you can get it from here. Newznab classic works but there are some limitations, if you are serious just pay the money for a better product and you get free upgrades too.

Get the file downloaded and then we need to extract it and copy it to the right place, if you have decided to use a graphical desktop you can follow these pictures.

As I have a paid for version I'm going to use a slightly different approach, for this you need to install subversion with the following command:

sudo apt-get install subversion

Then to get Newznab you enter the following command:

svn co svn://svn.newznab.com/nn/branches/nnplus /var/www/newznab

At this point you will be asked for the root password for your system and the SVM login details that have been emailed to you by the Newznab team.

You also need to edit /etc/apache2/apache2.conf and make this change:sudo nano/etc/apache2/apache2.conf

#########################################Now we change the permissions of this file with:

sudo chmod 755 /etc/init.d/deluge-daemon

Now we get it running on startup

sudo update-rc.d deluge-daemon defaults

We can then start it with this command:sudo invoke-rc.d deluge-daemon startAnd stop it with this command:sudo invoke-rc.d deluge-daemon stop

You should now be able to access it with http://machinename:8112Next up is SickRage to track and download the TV series you want to watchThere are some things that we need to install first:sudo apt-get install git-core python python-cheetahNow this bit gets installed as a normal user and not root:cd ~git clone https://github.com/SiCKRAGETV/SickRage.git .sickrageWe now need to create a file to get this working properlycd ~/.sickragecp -a autoProcessTV/autoProcessTV.cfg.sample autoProcessTV/autoProcessTV.cfg

And then we start it with:python ~/.sickrage/SickBeard.py -qNow connect to it with http://machinename:8081 and follow all the configuration steps, once that's done , shut it down from inside it's web interface and then it's time to get it running automatically.cd ~/.sickrage/runscriptsAnd then:sudo cp init.debian /etc/init.d/sickragesudo chmod +x /etc/init.d/sickrageNow we need to edit a file with:sudo nano /etc/default/sickrage

And add the following to it:

# COPY THIS FILE TO /etc/default/sickrage

#########################################################

# Change user below to the username you have installed SickRage into

#########################################################

SR_HOME=/home/user/.sickrage/

SR_DATA=/home/user/.sickrage/

SR_USER=user

SR_GROUP=user

Now we make this file executable

sudo chmod +x /etc/default/sickrage

And then update the boot sequence:

sudo update-rc.d sickrage defaults

We can now start and stop it with the following commands:

sudo service sickrage start

sudo service sickrage stopAnd now we move onto Couchpotato for films, so it's back to root for this lot and first up we run the following command:

sudo git clone https://github.com/RuudBurger/CouchPotatoServer.git /opt/CouchPotatoWe then need to change the file ownership with the following command:sudo chown -R username:username /opt/CouchPotatoReplace username with the username you will be running this under.

Now we make it a script to start it automaticallysudo nano /etc/default/couchpotatoPaste this lot in, replacing username with your usernameCP_HOME=/opt/CouchPotatoCP_USER=usernameCP_PIDFILE=/home/username/.couchpotato.pidCP_DATA=/opt/CouchPotatoNow we copy over the init filesudo cp /opt/CouchPotato/init/ubuntu /etc/init.d/couchpotatoThen we make it executablesudo chmod +x /etc/init.d/couchpotatoAnd finally make it run on startupcd /etc/init.d/sudo update-rc.d couchpotato defaults

Monday, 3 August 2015

July the 23rd in Wolverhampton was the night, Wulfrun Hall was the venue, Camel were the band. The seating was uncomfortable, the hall could have done with some redecoration, the Seleco projector in the lighting rig looked like it had been there for some time and then Camel arrived on stage. There were problems with the sound equipment causing a bit of distortion but the band were fantastic, that is really what I think. The playing by all members was awesome, they were up on stage doing what they do best and they all seemed to be thoroughly enjoying themselves. Ton and Jason on keyboards were superb, Ton's style is different from the late Guy LeBlanc who he took over from on this tour but his piano on Long Goodbyes was brilliant. Jason seemed to be playing various instruments during the show and deserves to be recognised as a brilliant performer in hos own right.

Then there's Denis on drums, I swear he had 4 arms at one point, the man is amazing and he doesn't seem to break into a sweat.

Next we come to Mr Colin Bass of the bass guitar who just stands there effortlessly playing away and is looking good with his new growth of facial hair, he's also done some wonderful solo albums and produces some class bands including 9bach.

And last but not least there's Andy Latimer, the man behind the band. This man can put so many different emotions into a guitar, he is up there with the greatest in my humble opinion.

The band played a selection tracks old and new including some of my favourites, Ice, Mother Road, Drafted and Long Goodbyes. I'd love to say they were perfect, but they weren't. Perfect doesn't even come close to describing how good they were, this was Camel, live and raw, having a good time, playing some of their best tracks.

The last track, Long Goodbyes was dedicated to Chris Rainbow and Guy LeBlanc who had both been members of the band and had regretfully passed away, images of them were projected onto screens as it was played, I have to be honest I cried like a baby.

After the concert I got to meet up with Andy and Colin, I asked Colin if he could sign my ticket for my granny. His face lit up and he looked at me and said "you're Paul Holt". He is a really nice bloke and is fitting in with his local community in North Wales even learning Welsh.

Andy is also a really nice humble person. I mentioned that I met him last at a Liverpool concert, couldn't remember the place but it began with an R. A few minutes later the name came to me, it was the Lomax. This seemed to cause quite a but of humour and references to the Romax.

I look forward to seeing them again hopefully and look forward to any new material they produce.