This site is closing

This site will close soon, probably at the end of this months billing cycle, in around 3 weeks.

The reasons:

  1. Constant hacking attempts, as many as 200 per day. They’re coming from all over the world, so a script kiddie trying to get access by using incorrect usernames. I have a firewall in place that bans them after one failed attempt, this is fast becoming a very large part of the database and .htaccess file.
  2. The site at certain times of the day can take an age to load. This is unnaceptable and throwing money at the problem won’t help.
  3. I’ve contacted several retailers and manufacturers to see if they’ll loan me a bike for a few days so I can expand the reviews to cover other models… none have called me or emailed me back.
  4. I can’t be arsed updating with new posts. There’s also little to cover if I can’t get hold of loan bikes to test and review.
  5. I might one day setup the site on my local network on a raspberry pi, and yes believe it or not, it would be faster than the current host.
  6. I’m also considering selling my bike. I am a carer for my uncle who is mentally handicapped, I get 3 days a week when I have a respite carer come in and look after him for a few hours. So of course riding is dependent on the weather and if I have other errands to run in my spare time. As things are. I don’t want to get soaked, cold and miserable during this time.

PHPMYADMIN Root reset

The latest version of PHPMYADMIN won’t allow root to login without a password, and you can only login to the phpmyadmin user.

Here’s how you work around it.

 

 

 

 

sudo mysql -u root

 

CREATE USER 'set-new-user'@'localhost' IDENTIFIED BY 'set-your-password';

GRANT ALL PRIVILEGES ON *.* TO 'your-suername'@'localhost';

FLUSH PRIVILEGES;

exit

sudo service service mysql restart

If that fails, try this:

 
sudo mysql -u root
use mysql;
update user set plugin='' where User='root';
flush privileges;
\q

Install TightVNC Server on the Asus Tinker board

I’m making this post for my own reference, though you can obviously use it as you wish.
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install xfonts-base
sudo apt-get install tightvncserver
sudo apt-get install nano

Run: vncserver
Add a password
My preferred command line option is vncserver -geometry 1280x720 (this sets the resolution to 720P)

I’m currently running Asus Linaro 1.8 debian based OS from a 120GB SSD and a using it as a Plex media server, for the most part it seems to work just fine, though some high bit rate 1080p movies struggle a little. I’m investigating further.

 

Installing a solid state drive or USB drive is as easy as the Raspberry Pi with just one slight difference. Plex Media server, HTOP, Webmin, Nextcloud and more are exactly the same, they just run a little better with the extra CPU power and extra 1GB of RAM.

Install Webmin on a Raspberry Pi

Webmin is a graphical user interface that can help you install, maintain and control your Raspberry Pi, all from a nice and simple GUI.

It’s also pretty easy to install and keep working, there are two methods to the install, I prefer the slightly longer but more thorough version, and that’s what I’ll be doing here.

  •  edit the sources list to add a new repository with:

sudo nano /etc/apt/sources.list

and add: deb http://download.webmin.com/download/repository sarge contrib

This has the benefit if updating Webmin in future when you type sudo apt-get update && sudo apt-get upgrade.

Type/Copy these line one at a time:

  • sudo su
    cd /root
    wget http://www.webmin.com/jcameron-key.asc
    apt-key add jcameron-key.asc

You’ve now added a security key to your Pi for the repo.

Same again, type/copy these lines one at a time.

 

  • apt-get update
    apt-get install apt-transport-https
    apt-get install webmin

BOOM! And about 10 minutes later you should be able to login via a web browser. Use the raspberry Pi IP address.

Example: https://192.168.1.20:10000 and you’re in 🙂

Use 1GB of Raspberry Pi RAM as a SWAP drive

If you have little use for the 2GB of RAM in a Raspberry Pi, then you could always use 1GB of it for a SWAP drive, this should improve performance for anyone running their Pi on a SD card.

If you want to use a SSD or USB Drive then checkout my easy as Pi tutorials here: https://the-bionic-cyclist.co.uk/category/raspberry-pi-tutorials/

As usual this is a quick and easy setup:
install ZRAM

sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/ric96/zram_rpi3/master/zram.sh

Make it executable.

sudo chmod +x /usr/bin/zram.sh

Edit this file to run on startup

sudo nano /etc/rc.local add line before exit 0 /usr/bin/zram.sh &

Source: (always check before installing from any source) https://github.com/ric96/zram_rpi3

HTOP – Real time feedback from your Raspberry Pi

 

 

 

 

 

What is HTOP? Simply put, it’s a real-time feedback system to let you see what your Raspberry Pi is doing, what applications are running, and how much processing power is being used as well as where your RAM is being accessed and by what.

 

 

 

 

 

 

sudo apt-get install htop

It’s tiny and installs in seconds.

After that run htop by typing….

htop

 

Simples 🙂

Install Plex Server on a Raspberry Pi

Combine this with an SSD and even SSL to reap even more benefits https://the-bionic-cyclist.co.uk/raspberry-pi-tutorials/

 

 

Another easy tutorial from yours truly.

First the update:

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get upgrade

Now make sure HTTPS is installed

Code: Select all

sudo apt-get install apt-transport-https

Add a crypto key for the day2dev repository

Code: Select all

wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key  | sudo apt-key add -

Now add the repository

Code: Select all

sudo nano /etc/apt/sources.list

or if that fails:

Code: Select all

sudo nano /etc/apt/sources.list.d/pms.list

add this line:

Code: Select all

deb http://dev2day.de/pms/ jessie main

update the repository list

Code: Select all

sudo apt-get update

Finally install Plex

Code: Select all

sudo apt-get install -t jessie plexmediaserver

Total time around 3 minutes

Now visit your server your rapberry pi’s IP and port 32400

Example: https://192.168.1.2:32400

Install Nextcloud cloud server on a Raspberry Pi

Nextcloud is a personal cloud server, you’re not relying on Apple cloud or Google or Dropbox to hold and secure (laughable) your data. If you have a Raspberry Pi at home you can host your own cloud server. There are desktop apps for Windows and Macs and apps for almost ALL mobile operating systems too.

The most popular self-hosted file share and collaboration platform

I’ve gone for the personal route because I find the free cloud server really don’t offer enough storage space, and security is a joke for most of them. Plus with the SSL guide you can make sure your is as secure as possible.

For easy reference:

Code:

sudo apt-get update

Code:

sudo apt-get install apache2

Code:

sudo apt-get install apache2 php7.0 php7.0-curl php7.0-gd php7.0-imap php7.0-json php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-xmlrpc libapache2-mod-php7.0

Code:

sudo service apache2 restart

Download link: https://download.nextcloud.com/server/releases/nextcloud-14.0.0.zip

Code:

sudo wget https://download.nextcloud.com/server/releases/nextcloud-11.0.2.zip

Code:

sudo mv nextcloud-11.0.2.zip /var/www/html

Code:

cd /var/www/html

Code:

sudo unzip -q nextcloud-11.0.2.zip

Make a folder for the data!!!

Code:

sudo mkdir -p /var/www/html/nextcloud/data

Code:

sudo chown www-data:www-data /var/www/html/nextcloud/data

Code:

sudo chmod 750 /var/www/html/nextcloud/data

Next, set the correct ownerships on Nextcloud “config” and “apps” directories:

Code:

cd /var/www/html/nextcloud

Code:

sudo chown www-data:www-data config apps

Create a Login for Nextcloud

In a browser, surf to your new Owncloud web page. Use the URL:
http://your Pis IP address/nextcloud

For example, the address of my Pi is 192.168.1.9. So I go the the URL: http://192.168.1.9/nextcloud

Increase upload size from 2mb

Code:

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

Change these two lines:
post_max_size = 8M
upload_max_filesize = 2M
to:
post_max_size = 20M
upload_max_filesize = 20M

Code:

sudo service apache2 restart

Now setting up your own cloud isn’t good enough, you also need to secure all traffic and data, to encrypt the data on the drive use the plugin in the admin panel, for SSL use this tutorial.
Check domain and hostname

Code: Select all

domainname -b mysite.ddns.net

Code: Select all

sudo nano /etc/hostname

Make the domain name stick

Code: Select all

sudo nano /etc/sysctl.conf

Setup SSL on a Raspberry Pi in 2 minutes

UPDATE: Lets Encypt have an auto install bot and it’s a signed certificate, meaning no warning! https://letsencrypt.org/

 

Granted this is a self signed certificate and not one from an issuing authority, but for most domestic uses it’s fine.

Make a directory called ssl

Code: Select all

sudo mkdir /etc/apache2/ssl

Create the certificate

Code: Select all

sudo openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -out /etc/apache2/ssl/server.crt -keyout /etc/apache2/ssl/server.key

for the domain name I used my ddns.net domain, and that’s fine, but it has to be a domain name and not an IP.

Here’s my ouput

Generating a 2048 bit RSA private key
………………………+++
………………………………………………………………+++
writing new private key to ‘/etc/apache2/ssl/server1.key’
—–
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—–
Country Name (2 letter code) [AU]:UK
State or Province Name (full name) [Some-State]:Yorkshire!
Locality Name (eg, city) []:Home
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Dazbobaby inc.
Organizational Unit Name (eg, section) []:Admin
Common Name (e.g. server FQDN or YOUR name) []:mydomain.ddns.net
Email Address []:admin@mydomain.ddns.net

Install the SSL mod for Apache2

Code: Select all

sudo a2enmod ssl

Restart Apache:

Code: Select all

sudo service apache2 restart

Create a file and symbolic link to the sites-enabled and sites-default folders

Code: Select all

sudo ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/000-default-ssl.conf

Edit the file.

Code: Select all

sudo nano /etc/apache2/sites-enabled/000-default-ssl.conf

Insert these two lines before </VirtualHost>

Code: Select all

SSLCertificateFile    /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key

Now browse to your site with HTTPS:// and accept the new security certificate

Source: https://hallard.me/enable-ssl-for-apach … 5-minutes/

Setup redirection from port 80 (insecure) to 443
Edit /etc/apache2/sites-enabled.conf
Add this:

Code: Select all

<VirtualHost *:80>
   ServerName http://mydomain.ddns.net
   Redirect permanent / https://mydomain.ddns.net/
</VirtualHost>

Restart apache

Raspberry Pi Ad Blocker

I remember seeing something about an advert blocker for the raspberry pi but I can’t find the original post, so some googling later and I found pi-hole.
https://pi-hole.net/
It took less than a minute and it kicks Ad Blocker Pro’s arse then beats it while it’s down. It’s amazing, not one single damn advert gets through, and those that do you can add to a black list.

So if like me you’re sick to death of adverts and you don’t mind spending a few quid getting a raspberry pi then this is a must.

Once complete, change the DNS server of the client (PC, phone, laptop, tablet or just about anything that uses your internet connection) to your rasperry Pi’s IP address.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

curl -sSL https://install.pi-hole.net | bash

change the pi-hole password:

pihole -a -p newpasswordhere