Friday, 4 July 2014

The Recall

My little Chevrolet Aveo continues to delight me with it's reliability. But a few weeks ago I received a recall letter from the company saying that they wanted to check part of the ABS system as they have seen some with spongy brakes. Part of the recall involved draining the brake system and refilling it even if they didn't need to change the possibly faulty item.

I took the car into FRF motors in Swansea and was completely ignored by the members of staff sitting down by the TV drinking coffee. Admittedly, they hadn't started work at that point but a hello or someone advising me that the person I needed to speak to hand't arrived would have been nice.

The car was then booked in about 5 minutes later and was ready about 15 minutes sooner than they said. I was advised that some tyres were needed for the car and was quite shocked at the cost of £80 a tyre, I then asked how much it would cost for a service?

The suggested service for a car with the mileage mine had done was £290, the only extra thing apart from plugs, filters and oil was replacing the brake fluid. I mentioned that this had already been done as part of this recall and was told that the service for that mileage included the replacement of the fluid again. No suggestion of possibly removing the cost of this was mentioned and I felt that at this point I was actually in the way and should just go. The only other item on the list was adjustment of the rear brakes, this was going to cost £82.50 on top of the service.

I can only say that although the garage was efficient, I would not go there to buy a car and would certainly not take my car there for a service.

Later that day I had two tyres fitted to the car at a total cost of £52. The cost of the service was quoted as being £100 which I consider reasonable.


Monday, 19 May 2014

I've decided to become American

It seem about 4 hours ago that I turned 50, well that's what it seems like anyway. So much has happened since then including a move to Runcorn to be nearer work, then promotion to Rotherham, a change of jobs to go to the dark side and then a move back to South Wales which was part of the original plan to be honest, that is until things started to go wrong.

But now they seem OK, the job is not bad, it could be better as could all jobs but it's not that stressful and it pays enough to ensure that we can live and do things we want to.

And now we come to the part about becoming American. Over there in the colonies, you can't go above 55 and I've now reached that age. It's quite strange that at 54 I had really bad sciatica and had to take pain killers and undergo physio, then suddenly at 55 that seemed to go and although I get a few twinges it's not really there anymore. There's a few other ailments such as a bit of water retention but that's gradually going away and now that I've become American I won't get any older.

What do you mean 55 is the maximum speed limit, oh bugger!

Friday, 18 April 2014

Your very own cloud server

If you've followed the instructions I've written for setting up your own newsgroup indexer, then setting up a cloud server is really very simple.

Get a terminal opened up on the server and su to root, and then type in the following:

mkdir /var/www/cloud
mkdir /var/www/cloud/www
chmod -R -v 0777 /var/www/cloud

Then we need to create the config file:

nano /etc/apache2/sites-available/cloud

Paste the following into the empty file:

<VirtualHost *:8081>
ServerAdmin webmaster@localhost
ServerName localhost

DocumentRoot /var/www/cloud/www
ErrorLog /var/log/apache2/error.log
LogLevel warn
</VirtualHost>

You don't have to use port 8081 but I've decided to for no particular reason.

Save the file and then we need to get the server to listen to the relevant port by editing the ports.conf file with:

nano /etc/apache2/ports.conf

Add a line with:

Listen 8081

Save the file and then run the following:


a2ensite cloud
a2enmod rewrite
service apache2 restart

Then we need to change to the folder for the cloud server with:

cd /var/www/cloud/www

And then run:

wget https://download.owncloud.com/download/community/setup-owncloud.php

Nowe we can configure the server by running

http://servername:8081/setup-owncloud.php

Just follow the instructions, it's really that easy,


My Debian Server, the beginning

I'm going to rebuild my home server using Debian, this is a rolling release and never needs to be re-installed unless you completely break it. I've decided to use the XFCE desktop too as I may want to use it occasionally and it's also lightweight and I can use it with a VNC connection.

I'm going to run samba and nfs sharing  on it along with an ssh an vnc server, then it will also run Newznab, SabNZB, Sickbeard and OwnCloud.

It will have 3 x 3TB external USB drives connected, one for data, one for a backup of data and one to synchronise data from another server so I can be a remote backup. I will also be backing up my data to a remote server just in case things really go wrong.

Let's just start with the basics and get the OS installed

It's not a hard install process and I'm not going to document it that much, but I will document the changes I make to it. I'm not going for seperate partitions for my data as this will all be stored on the external drives.

On the software selection screen I'm going to pick Debian Desktop Environment, File Server, SSH Server and Standard System Utilities. Anything else can be installed later and I will need SQL and Apache amongst other things.

Once the install is completed, all other configuration will be done by ssh or a web browser, you need to be logged on as root to do this.

You need to edit the sources.list file to get some codecs and utilities installed as follows:

nano /etc/apt/sources.list

Add contrb non-free to the end of the lines as shown below.

deb http://ftp.uk.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ wheezy-updates main

Then do an apt-get update followed by apt-get upgrade, then install the following, mc or Midnight Commander is a marvelous utility for navigating the file system from a terminal session. Tight VNC Server is going on to make it easy to control the server remotely and we will also be installing webmin which is another really useful tool.

apt-get install nfs-common
apt-get install nfs-server
apt-get install mc
apt-get install rsync
apt-get install tightvncserver

and now for webmin:

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
cd /tmp
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.580_all.deb
dpkg -i webmin_1.580_all.deb

You should then be able to access webmin from a browser from the url https://servername:10000









Thursday, 17 April 2014

Ubuntu 14.04 LTS

I used to hate Ubunt but I have now got quite used to the Unity desktop and it's way of working, I still love PCLinuxOS for it's rock solid stability and will use it on one of my servers. Now in a short while the latest Long Term Release of Ubuntu will be with us 14.04, it's called Trusty Tahr or some silly name, I've been using the beta for a while and it seems quite stable to be honest. Let's see how it fares once it's released.




Wednesday, 16 April 2014

Newznab Server on Debian

I've put this together with help from a few other websites, it's pretty much the same as an Ubuntu install but with a few slight differences.

All the following stuff is done via ssh terminal and you can copy and paste the commands in to make life easier.

If you are doing this on a fresh install of Debian, you need to edit the sources.list file with:

nano /etc/apt/sources.list

Add contrb non-free to the end of the lines as shown below.

deb http://ftp.uk.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ wheezy-updates main

Add this entry to the bottom of the list:

deb http://www.deb-multimedia.org jessie main non-free

Save it and then run:

apt-get update
apt-get install deb-multimedia-keyring
apt-get update
apt-get upgrade

Now let's get on with the rest.

mkdir /var/www
mkdir /var/www/newznab
chmod 0777 /var/www/newznab

Next we need to install php with the following:

apt-get install php5 php5-dev php-pear php5-gd php5-mysql php5-curl mc subversion

Now we make some changes to the php configuration file:

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:

date,timezone = Europe/London

There are other options depending on where you live, you can find these here.

Now it's time to install SQL and Apache, so we enter the following command:

apt-get install mysql-server-5.5 mysql-client-5.5 libmysqlclient-dev apache2

During the install process, you will be asked to create a password for the database, if you are going to make this publicly available, you need to make it a good password.

Let's finish off the SQL installation with the following:

Once this has all finished, we then need to make some changes to the Apache config file:

nano /etc/php5/apache2/php.ini

We then need to change these settings

  • memory_limit =  -1
  • max_execution_time = 120 
  • date.timezone =  Europe/London
Now we need to create a configuration file for Newznab, so type the following to create an empty file:

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

And then paste the following into the file, you can use another port instead of 8080 if you want:

<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, I want to keep the default port 80 for other things.

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, we installed subversion earlier do we get NewNab with.


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.

We now need to edit an Apache file to it listens to port 8080 for requests, enter the following command:

nano /etc/apache2/ports.conf

Under the line that says Listen 80 we add another line that says:

Listen 8080

Save that file and then one more change to the Apache configuration files before we go on:

nano /etc/apache2/apache2.conf

Find this bit

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

And change it to this:

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

Now let's get it all working.

a2ensite newznab
a2enmod rewrite
service apache2 restart

Now it's time to change some permissions with the following commands:

chmod 777 /var/www/newznab/www/lib/smarty/templates_c
chmod 777 /var/www/newznab/www/covers/movies
chmod 777 /var/www/newznab/www/covers/music
chmod 777 /var/www/newznab/www
chmod 777 /var/www/newznab/www/install
chmod 777 /var/www/newznab/nzbfiles/
chmod 777 /var/www/newznab/www/covers/anime
chmod 777 /var/www/newznab/www/covers/tv


We just need to make sure that some files are also installed:


apt-get update
apt-get install unrar mediainfo ffmpeg lame


When you run the Newznab config and go in to edit the site you will need to put the paths in for these files, they normally are:

/usr/bin/unrar
/usr/bin/mediainfo
/usr/bin/ffmpeg
/usr/bin/lame

And now point your browser to 

http://servername:8080/install 

And just follow the instructions and prompts to configure your very own Newznab server.

Once you have finished the comfiguration, run this following command to change permissions on one of the folders.

chmod 777 /var/www/newznab/nzbfiles/tmpunrar


Once that's all completed, go to the View Groups option and make some groups active.
Then it's back to the command line with

cd  /var/www/newznab/misc/update_scripts

Then run 

php update_binaries_threaded.php

after that it's

php update_releases.php 

That should start populating the indexer, it's up to you how you want to run this, you can it manually but I run a loop with a 10 minute pause each time it restarts.

I've made a file with 

nano /bin/newznabrun

Put this into it


while :
do


# Beginning Update
cd /var/www/newznab/misc/update_scripts/
php update_binaries_threaded.php
php update_releases.php

        echo "Press [CTRL+C] to stop.."
        sleep 360

done

Save the file and then run

chmod +x /bin/newznabrun 

You can then type newznabrun to get it going.


That's it all done, hope it all works for you.



I would like to thank the howtogeek website for helping with most of these instructions.







Friday, 17 January 2014

Another slice of Pi

I've decided to bring my Pi in from the car and use it as a low power terminal server for ssh and vnc access to my house while I'm away.  Things have moved on a little bit since I carried out my original install and you can now carry out out through an ssh connection once you have copied the operating system image onto the SD card. This means no plugging a keyboard into it or a monitor to get the operating system up and running.

I'm running Linux on my desktop so these instructions are based on around that, you can download putty for Windows and use that as your ssh client.

The first thing you need to do is download the latest version of the OS from here.

Then you put the SD card into your PC and type dmesg | tail to find out what device it is, in my case it came up as /dev/sdc. It is important to make sure you have the right drive otherwise you are going to write the image downloaded onto your boot drive.

Once you have that information the next thing to do is to unzip the image by typing:

unzip 2014-01-07-wheezy-raspbian.zip replacing the file name with the one you have downloaded.

Now we come to writing the image to the SD card, you can do this with the command:

sudo dd bs=1M if=20xx-xx-xx-wheezy-raspbian.img of=/dev/sdb

This will create the system disk with which to boot your Pi from. Once this has completed, insert the card into the Pi, start it up with an ethernet lead connected and you should see all the lights coming on. You need need to find out the IP address assigned to it, you can either look at the router connected devices page, this varies from router to router or you can install nmap to scan your network and report back to you, if it's not already installed type in:

sudo apt-get install nmap or whatever it takes to install it on your distro and then:

sudo nmap -sP 192.168.0.1-254

The latter bit depends on the range of IP addresses from your router, if it was Belkin it would be 192.168.2.1-254.

Once you get the report back, one of the entries should list the Pi, in my case it was 192.168.0.8, so in terminal I typed:

ssh pi@192.168.0.8

Pressed enter, said yes to the security warning and entered the default password of rsapberry, I was now connected to the device and then had to finish setting it up.

Type:

sudo raspi-config

This will launch the configuration tool and you should see a screen like the one below.


You need to go down to advanced and once in there press enter on the update option, after that you can expand the file system, ensure that ssh is set to start on boot, change the hostname and then select Finish to write all the changes and reboot the system.

As a watcher of Blakes 7 and since my Pi is in a clear plastic case I have called it Orac, once it's booted back up you can connect via ssh again using the command:

ssh pi@orac

Enter the password raspberry and then create you own user with the command:

sudo adduser username

Then give the user a password with:

sudo passwd username

Then add the user to the sudo group with

sudo adduser username sudo

If the remote username is the same as the one on your desktop, you just need to type ssh orac to connect or whatever the name of your Raspberry Pi is.

The last thing to do is to get a gui running on the Pi so you can control it with a vnc client, you don't have to but it makes life easier.

This is done using the command:

sudo apt-get install tightvncserver

Once it's installed, you can run it using:

vncserver -depth 16 -geometry 1024x768

This will ask you for to enter a password for the connection

Then you can connect to it with a vnc client at orac:1

or vncviewer orac:1

And that's it

I can now setup port forwarding on my router and connect to this from the outside world with ssh or vnc and can send and receive files with sftp.

A big thank you to this page for providing the information which I have used extensively.