Preparare la microSD per Arietta G25

Aggiornare l'index dei package

# apt-get update

WiFi

# apt-get install usbutils
# apt-get install iw
# apt-get install firmware-ralink
# apt-get install wpasupplicant

/etc/network/interfaces

auto lo
iface lo inet loopback

pre-up modprobe g_ether
auto usb0
iface usb0 inet static
metric 1000
address 192.168.10.10
netmask 255.255.255.0
#gateway 192.168.10.20

auto wlan0
iface wlan0 inet dhcp
    wireless-essid any
    pre-up wpa_supplicant -i wlan0 -c /boot/wpa_supplicant.conf -B
    post-down killall -q wpa_supplicant

/boot/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
    ssid="Vodafone-Guest"
    psk="ariettag25"
    scan_ssid=1
    proto=WPA RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
}

Installare Apache2 e PHP5

# apt-get install apache2 php5

Installare git

# apt-get install git

Aggiungere un utente di default

# adduser acme
Enter new UNIX password: acmesystems

Installa la pagina web di default

# cd /var/www
/var/www # git clone git://github.com/AcmeSystems/arietta-www
/var/www # rm -Rf html
/var/www # mv arietta-www html

Installare gli esempi

# cd /home/acme
/home/acme # git clone git://github.com/AcmeSystems/arietta4click
/home/acme # rm -R o+w arietta4click

Installare NTP

Installare Codiad

Installare Bonjour

# apt-get install libnss-mdns

Installare c e c++

# apt-get install gcc
# apt-get install g++

Installare python

# apt-get install python
# apt-get install python-serial
# apt-get install python-smbus

Installare sudo

# apt-get install sudo

e aggiungere l'utenza acme nel file /etc/sudoers

acme   ALL=(ALL:ALL) ALL

Installare sqLite3

# apt-get install sqlite3

Installare Tornado

# apt-get install python-tornado
# apt-get install sqlite3

Pulizia prima di pubblicare

root@arietta:~# apt-get clean
root@arietta:~# cat /dev/null > /var/log/lastlog
root@arietta:~# cat /dev/null > .bash_history

/etc/ssh/sshd.conf

Change PermitRootLogin without-password

in PermitRootLogin yes

Configurazione lighttpd

server.modules = (
    "mod_access",
    "mod_alias",
    "mod_compress",
    "mod_redirect",
    "mod_proxy",
    "mod_fastcgi",
#       "mod_rewrite",
)

server.document-root        = "/var/www"
server.upload-dirs          = ("/var/cache/lighttpd/uploads")
#server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80


index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"


fastcgi.server = ( 
    ".php" => ((
         "bin-path" => "/usr/bin/php-cgi",
         "socket" => "/tmp/php.socket"
)))

proxy.server = ( 
    "/shell" => 
    ( ( 
        "host" => "127.0.0.1",
        "port" => 4200
    ) )
)