Thursday 15 December 2016

Riders paradise - 5 B's of Bikerism

Becoming a rider is not an easy task, you have to be an engineer, a manager, a mechanic, a cook, a guide and many others qualities.
Its not just by riding a bike and having a destination in your mind will make you a rider. Somethings only comes with passion. So you don't require any degree just require that passion with few qualities and respect for other riders.

The basic requirements for becoming a rider are 5 B's, else you will be called a traveler.


5 B's of Bikerism and their significance


Bullet - All other bikes will serve the purpose of taking you from your start point to destination but if you are riding a Royal Enfield then whole route will become more travel worthy. That sturdy look of the bike itself will say that anything comes into my way I am gonna get through it. That thudding sound will make you feel like a roaring beast on the highway. When a rider controls the massiveness of a bullet while making turns, that feeling is something out of this world.

Beard - It's easier to grow but difficult to maintain. A normal man can grow a beard ranging from an inch to 2-3 feets depending upon his genes and surely on his strengthened thoughts. The beard lover likes the things raw, they don't like artificial make-ups. In ancient times, Beard was a symbol of royalness, strength and position in society.
It projects one's traits like Patience, Perseverance and exudes his wisdom.
Beard will not only completes a rider look but it will also protects him from cold chilly winds.
Trust me while riding in colder areas the snowflakes that are stuck in your beard will look like a diamond studded in some finest jewelry.

Boots - Boots can be of many types and brands, but a rider will always choose a pair of boots that are old school and rugged in looks at the same time can sustain the roughness of the route. You'll feel heavy initially but later when you'll ride, they will go best with the biker attire.
Boots make people look at you from bottom to top, instead of looking from top to bottom. Choose very wisely as this is an essential part of your biker attire.

Biker Jacket - Like in the war between 2 countries how soldiers distinguish the soldiers from other country, just by looking at their uniform.
Similarly for rider to be in a perfect attire, he needs to wear a jacket that must be different from his regular jackets, to distinguish him from the crowd.
It will not only provide you safety with the padded armour but will also gives a rider a sense of mission accomplishment. That pride ahhaa!!!

Biker Tattoo - Tattoo is an art, who doesn't loves art can not be a nature lover. It's a symbol of commitment to anything, whether it can be your loved ones, role model or your passion.
Don't rush in choosing one, even the tattoo artist matters a lot.
Good luck in finding that perfect tattoo design that you can wear for the rest of your life!


Information regarding my Leh-Ladakh expedition and route yet to be shared in next blog, stay tuned RIDERS!!

Monday 29 August 2016

Configuring Raspberry Pi as NAS,VNC,Samba,Apache server

The Raspberry Pi is a small, credit card sized computer that doesn’t require a lot of power to use.
It can be used for solving many purposes in day to day technical life and building many IOT (Internet Of Things) systems.

Here we are going to discuss about the configurations to be done after you have bought the RPi. It comes without any OS to boot and test the device. First we need a 16 GB Class 10 micro SD card. (Preferably Sandisk Ultra UHS-I)


Creating bootable Raspbian OS image

Download the Raspbian Jessie OS image:
https://www.raspberrypi.org/downloads/raspbian/

For Linux: DD command is use for bit-by-bit copying the image on the memory card
umount /dev/sdx (For unmounting the SD card)
dd bs=10M if=~/2015-02-16-raspbian-jessie.img of=/dev/sdx

For Windows:
Install this software - Win32DiskImager

First thing First!

After installation of Jessie Raspbian first thing should be connecting to RPi via SSH and upgrading Package & Firmware
Default Username/Password : pi / raspberry

sudo apt-get update
sudo raspi-update
sudo raspi-config -> Expand File System (requires reboot)


Configuring Static IP Address on RPi

sudo nano /etc/network/interfaces
Replace iface eth0 inet dhcp with static
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.1

(Reboot again)  This will assign the RPi 192.168.0.2 IP everytime it boots.

Automatically connecting to a WiFi network

sudo nano /etc/network/interfaces
on wlan0
# allow-hotplug wlan0
         iface wlan0 inet manual
         wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
         iface default inet dhcp

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add this in the end of file
network={
ssid="WiFi_name"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="wifi_password"
}

(Reboot again)  This is very useful configuration when you don't have access to UI and you have to connect the RPi to a Wireless network everytime it boots. No need to connect it through LAN.



Now the networking part is over, we are ready to install the services on RPI now.

Services you can run on your RPi

Wireless printer using Rpi
Samba share drive on Rpi
VNC server on Rpi
Apache server with PHP & mysql
NAS server
Running boot scripts & commands at startup (Editing /etc/rc.local)

Installing Samba server

sudo apt-get install samba samba-common-bin
sudo vi /etc/samba/smb.conf
Paste in the end of Share Definitions :-

[pihome]
   comment= Pi Home
   path=/home/pi
   browseable=Yes
   writeable=Yes
   only guest=no
   create mask=0777
   directory mask=0777
   public=no

sudo smbpasswd -a pi (Adding a pi share user)
service samba restart

Installing VNC server (Remote Desktop)

sudo apt-get install xrdp

On Windows Run > mstsc (for Remote Desktop connection)

This service is very useful when you don't have a external keyboard/mouse to operate the UI of Raspbian OS, so we utilize laptop's keyboard via RDP connection.

Installing Apache MySql Server

sudo apt-get install apache2
sudo apt-get install mysql-server

verify the verison when installation is done
mysql –version
mysql -u root –p
mysql> show databases;

Install PHP & MySql driver for PHP

sudo apt-get install php5 php5-mysql
Testing PHP : 
sudo nano /var/www/hello.php

Converting Raspberry Pi into a NAS device


Add support to Raspbian for NTFS-formatted disks. To do so type the following command:
sudo apt-get install ntfs-3g (This is present on OS but still to upgrade the package)

Look for the unmounted partitions of the attached external hard drives.
sudo fdisk –l
umount /dev/sda1 (Suppose you external hard disk is sda1)
sudo mkdir /media/USBHDD

sudo mount -t auto /dev/sda1 /media/USBHDD

sudo nano /etc/samba/smb.conf


[NAS HDD]
comment = NAS Drive
path = /media/USBHDD
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

Creating a Pi share user

sudo useradd nas -m -G users (Adding a user “nas”)
sudo passwd nas

sudo smbpasswd -a nas (Adding “nas” user to smb)

When Rpi restarts it will automatically mount the external hard drives:

sudo nano /etc/fstab

/dev/sda1 /media/USBHDD auto noatime 0 0