Installation guide of Astrophoto program for Raspbian (Raspberry Pi2)

Download and install Raspbian first and then follow the guide for installation.

Download Raspbian at https://www.raspberrypi.org/downloads/
Download Win32DiskImager at http://sourceforge.net/projects/win32diskimager/

Write the image file into a 16G or above (class 10) micro SD card using the Windows tool “Win32DiskImager”
Boot up the Raspberry pi2 and open the terminal to install the programs by following the guide.
Update the apt packages
################################################
sudo apt-get update
Install oacapture
################################################
#Goto http://www.openastroproject.org/wp-content/uploads/2015/03/oacapture-0.4.0-raspbian.tar.bz2
#Download and extract oacapture-0.4.0-raspbian.tar.bz2
cd /home/pi
wget http://www.openastroproject.org/wp-content/uploads/2015/05/oacapture-0.5.0-raspbian.tar.bz2
sudo tar -vxf oacapture-0.5.0-raspbian.tar.bz2
sudo apt-get install libqtcore4 libqtgui4 libv4l-0 libv4lconvert0 fxload libcfitsio3 libdc1394-22
cd oacapture-0.5.0-raspbian
sudo ./install-binaries.sh
#Create a Launcher on the desktop that runs /usr/local/bin/oacapture
sudo ln -s /usr/local/bin/oacapture /home/pi/Desktop/Oacapture
Compile/Install LinGuider
################################################
#Goto http://sourceforge.net/projects/linguider/
#http://ncu.dl.sourceforge.net/project/linguider/3.1.0/lin_guider-3.1.0.tar.bz2
#Download and extract lin_guider-3.1.0.tar.bz2
#Goto http://sourceforge.net/projects/cccd/files/firmware/
#http://jaist.dl.sourceforge.net/project/cccd/firmware/firmware-ccd_1.2_all.deb
#Download firmware-ccd_1.2_all.deb
cd /home/pi
wget http://ncu.dl.sourceforge.net/project/linguider/3.1.0/lin_guider-3.1.0.tar.bz2
wget http://jaist.dl.sourceforge.net/project/cccd/firmware/firmware-ccd_1.2_all.deb
sudo dpkg -i firmware-ccd_1.2_all.deb
sudo tar -xvf lin_guider-3.1.0.tar.bz2
cd lin_guider_pack/io_ftdi/
sudo apt-get install libftdi-dev g++
./build.sh
cd /home/pi/lin_guider_pack/lin_guider/
sudo apt-get install fxload libusb-dev libqt4-dev libusb-1.0
./configure
make
sudo cp ./lin_guider /usr/local/bin/
#Create a Launcher on the desktop that runs /usr/local/bin/lin_guider
sudo ln -s /usr/local/bin/lin_guider /home/pi/Desktop/LinGuider
Install OpenSkyImager
################################################
#Goto https://github.com/OpenSkyProject/OpenSkyImager/archive/master.zip
#Download and extract master.zip
cd /home/pi
wget https://github.com/OpenSkyProject/OpenSkyImager/archive/master.zip
unzip master.zip
cd OpenSkyImager-master
#install_OSI.bash will install all that is needed to use QHY camera series
#install_OSI_full.bash will add SBIG (unidrv) support
#sudo ./install_OSI_full.bash
sudo ./install_OSI.bash
Install x11vnc
################################################
sudo apt-get install x11vnc
x11vnc -forever -display :0
#x11vnc auto start up on boot
cd /home/pi/.config
sudo mkdir autostart
cd autostart
sudo nano x11vnc.desktop
### Paste the following text into the file #####
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -display :0
StartupNotify=false
Terminal=false
Hidden=false
################################################
### Save the file and logout
### Reboot the pi
### Connecting to the Raspberry Pi with Real VNC Viewer on Andriod or Windows
#Setup AP mode using Edimax EW 7811un
wget https://github.com/jenssegers/RTL8188-hostapd/archive/v2.0.tar.gz
tar -zxvf v2.0.tar.gz
cd RTL8188-hostapd-2.0/hostapd
sudo make
sudo make install
sudo service hostapd restart
sudo nano /etc/hostapd/hostapd.conf
### Paste the following text into the file #####
# Basic configuration
interface=wlan0
ssid=RPi2
channel=1
#bridge=br0
# WPA and WPA2 configuration
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wpa_passphrase=1234512345123
# Hardware configuration
driver=rtl871xdrv
ieee80211n=1
hw_mode=g
device_name=RTL8192CU
manufacturer=Realtek
################################################
sudo apt-get install dnsmasq
sudo nano /etc/dnsmasq.conf
############# ADD #############
interface=wlan0
expand-hosts
domain=local
dhcp-range=10.0.0.10,10.0.0.20,24h
dhcp-option=3,10.0.0.1
###############################
sudo nano /etc/network/interfaces
###############################
auto lo
iface lo inet loopback
iface eth0 inet dhcp
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
iface wlan0 inet static
address 10.0.0.1
network 10.0.0.0
netmask 255.255.255.0
broadcast 10.0.0.255
###############################
sudo nano /etc/rc.local
###############################
ifup wlan0
sudo service dnsmasq restart
sudo service hostapd restart
echo 1 > /proc/sys/net/ipv4/ip_forward
#iptables -t nat -A POSTROUTING -j MASQUERADE
###############################