Installation

This revision is from 2013/03/03 03:32. You can Restore it.

SD card image for RaspberryPI

Download Image file and write to SD card - more here

  • boot with HDMI display and usb keyboard
  • login as 'pi' to shell with password 'raspberry'
  • run
    sudo raspi-config
    and set expand_rootfs, eventualy enable ssh.

Rsync repository to RaspberryPI

List of commands for Raspian wheezy (without warranty).

Install need package

sudo su
echo 'remoteqth' > /etc/hostname
apt-get install htop iftop mc vim apache2 php5 libhamlib2 libhamlib-utils rsync i2c-tools ser2net python-smbus n2n cwdaemon xplanet rcconf imagemagick gnuplot libqrencode3 php5-gd

Download RemoteQTH server repository

mkdir /home/pi/remoteqth
chown pi:pi /home/pi/remoteqth/
rsync -rva --numeric-ids --delete rsync://192.168.1.200:55873/server/ /home/pi/remoteqth/

File access

echo '/home/pi/remoteqth' > /etc/remoteqth-path
chown pi:www-data /etc/remoteqth-path
chmod 664 /etc/remoteqth-path

chown root:www-data /etc/network/interfaces
chmod 664 /etc/network/interfaces

chown root:www-data /etc/resolv.conf
chmod 664 /etc/resolv.conf

i2c

sed -i s/blacklist\ spi-bcm2708/#blacklist\ spi-bcm2708/g /etc/modprobe.d/raspi-blacklist.conf
sed -i s/blacklist\ i2c-bcm2708/#blacklist\ i2c-bcm2708/g /etc/modprobe.d/raspi-blacklist.conf
echo 'i2c-dev' >> /etc/modules

apache

open

vim /etc/apache2/sites-available/remoteqth

and paste

<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride all
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

site enable

rm /etc/apache2/sites-enabled/000-default
ln -s /etc/apache2/sites-available/remoteqth /etc/apache2/sites-enabled/001-remoteqth
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
/etc/init.d/apache2 restart
rm /var/www/index.html
rmdir /var/www/
ln -s /home/pi/remoteqth/www /var/www

sudo

enter

visudo

and paste

www-data ALL = NOPASSWD: /sbin/shutdown
www-data ALL = NOPASSWD: /sbin/ifconfig
www-data ALL = NOPASSWD: /etc/init.d/ser2net
www-data ALL = NOPASSWD: /etc/init.d/n2n
www-data ALL = NOPASSWD: /usr/sbin/i2cdetect
www-data ALL = NOPASSWD: /usr/sbin/i2cget
www-data ALL = NOPASSWD: /usr/bin/rsync

n2n

open

vim /etc/init.d/n2n

and paste (configure later from web interface)

#!/bin/sh

### BEGIN INIT INFO
# Provides:        edge
# Required-Start:  $network $remote_fs $syslog
# Required-Stop:   $network $remote_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop: 
# Short-Description: Start n2n daemon
### END INIT INFO

PROGDIR="/usr/sbin"
PROGNAME="edge"

MYIP="10.0.11.173"
USR="demo"
PASSWORD="pass"
SUPERNODE="remoteqth.com"
PORT="82"

###

COMMAND="$PROGDIR/$PROGNAME -a $MYIP -c $USR -k $PASSWORD -l $SUPERNODE:$PORT -f -d edge0"

###

PATH=/bin:/usr/bin:/sbin:/usr/sbin

case "" in
  start)
    echo "Starting $COMMAND."
    $COMMAND &
    ;;
  stop)
    echo "Stoping $PROGNAME."
    killall $PROGNAME
    ;;
  restart)
    
chown root:www-data /etc/init.d/n2n
chmod 774 /etc/init.d/n2n
update-rc.d n2n defaults
 stop
    
vim /etc/init.d/gpio
 start
    ;;
  *)
    echo "Usage: ... {start|stop|restart}"
    exit 1
    ;;
esac
exit 0

set daemon

#!/bin/sh
### BEGIN INIT INFO
# Provides:        gpio
# Required-Start:  $local_fs $syslog
# Required-Stop:   $local_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop:
# Short-Description: Start gpio
### END INIT INFO

echo "4" > /sys/class/gpio/export
echo "17" > /sys/class/gpio/export
echo "18" > /sys/class/gpio/export
echo "21" > /sys/class/gpio/export
echo "22" > /sys/class/gpio/export
echo "23" > /sys/class/gpio/export
echo "24" > /sys/class/gpio/export
echo "25" > /sys/class/gpio/export

echo "out" > /sys/class/gpio/gpio4/direction
echo "out" > /sys/class/gpio/gpio17/direction
echo "out" > /sys/class/gpio/gpio18/direction
echo "out" > /sys/class/gpio/gpio21/direction
echo "out" > /sys/class/gpio/gpio22/direction
echo "out" > /sys/class/gpio/gpio23/direction
echo "out" > /sys/class/gpio/gpio24/direction
echo "out" > /sys/class/gpio/gpio25/direction

chmod 666 /sys/class/gpio/gpio4/value
chmod 666 /sys/class/gpio/gpio17/value
chmod 666 /sys/class/gpio/gpio18/value
chmod 666 /sys/class/gpio/gpio21/value
chmod 666 /sys/class/gpio/gpio22/value
chmod 666 /sys/class/gpio/gpio23/value
chmod 666 /sys/class/gpio/gpio24/value
chmod 666 /sys/class/gpio/gpio25/value

chmod 666 /sys/class/gpio/gpio4/direction
chmod 666 /sys/class/gpio/gpio17/direction
chmod 666 /sys/class/gpio/gpio18/direction
chmod 666 /sys/class/gpio/gpio21/direction
chmod 666 /sys/class/gpio/gpio22/direction
chmod 666 /sys/class/gpio/gpio23/direction
chmod 666 /sys/class/gpio/gpio24/direction
chmod 666 /sys/class/gpio/gpio25/direction

exit 0

gpio

open

chmod 774 /etc/init.d/gpio
update-rc.d gpio defaults

and paste

echo ' ' > /etc/udev/rules.d/99-remoteqth.rules
chown pi:www-data /etc/udev/rules.d/99-remoteqth.rules
chmod 664 /etc/udev/rules.d/99-remoteqth.rules

enabled with

vim /etc/crontab

udev

# xplanet
*/15 *  * * *   pi      /home/pi/remoteqth/script/azimuth-map.sh
*  *    * * *   pi      ip addr show eth0 | grep inet | awk '{print}' > /tmp/eth0ip
*  *    * * *   root    /home/pi/remoteqth/script/lcd.sh

xplanet

open

ln -s /home/pi/remoteqth/script/.xplanet /home/pi/.xplanet
ln -s /home/pi/remoteqth/script/.xplanet/images/sun.png /usr/share/xplanet/images/sun.png

and paste

sed -i s/DEVICE=\"parport0\"/DEVICE=\"ttyUSB.cw\"/g /etc/default/cwdaemon

symlinks

chown pi:www-data /etc/ser2net.conf
chmod 664 /etc/ser2net.conf

cwdaemon

set config

apt-get update && apt-get install apache2 php5 ser2net n2n rsync cwdaemon nc

ser2net

set access

wget http://www.bitplanet.de/files/ledblink-0.85.tar.gz

Alix (in principle any x86 platform) - not complete!

Copy actual ALIX to CF card and boot it.

Dependency package

sudo echo '/path/to/remoteqth/' > /etc/remoteqth-path

mkdir ~/remoteqth
rsync -rva --numeric-ids rsync://remoteqth.com/server/ ~/remoteqth

remoteqth server

{CODE}