Articles Hierarchy

Articles Home » RPI » RASPBERRY PI 02

RASPBERRY PI 02

after all test you find in RASPBERRY PI and RASPBERRY PI and ARDUINO
i start again:

now i begin with the image from ladyada
called Occidentalis v0.2. Rubus occidentalis info

mainly i see in the webpage some tools for GPIO / esp. to use some of the gadgets she wants to sell / installed, but about system?
ssh enabled and bonjour installed

with ping i found the ip and putty SSH login ok ( slow?? )

this time use a smaller / NC like / filemanager what is supposed to run via SSH
sudo apt-get install mc

using sudo /usr/bin/raspi-config
is make first adjustments:
- SD use all 8GB ( but it is supposed to run on 4GB also )
- local time
- update

and a different VNC: NX_Server
and on win7 NX client
sudo apt-get update
sudo apt-get install xutils-dev expect xorg-dev libjpeg8-dev libpng12-dev
get error, do both again, ok.
sudo apt-get install cups
sudo apt-get install xfonts-base
sudo apt-get install x11-xserver-utils
and now it gets tricky

after
mkdir work
cd work
mkdir nx
cd nx

you should be here: pi@raspberrypi ~/work/nx $
now get source from nomachine.com
select version 3.5.0

wget http://64.34.173.142/download/3.5.0/sources/nxproxy-3.5.0-1.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nxcomp-3.5.0-2.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nxcompext-3.5.0-1.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nxcompshad-3.5.0-2.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nx-X11-3.5.0-2.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nxauth-3.5.0-1.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nxagent-3.5.0-9.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nxscripts-3.5.0-1.tar.gz

then should have this
pi@raspberrypi ~/work/nx $ ls -l
total 22180
-rw-r--r-- 1 pi pi 1510400 Jul 12 2012 nxagent-3.5.0-9.tar.gz
-rw-r--r-- 1 pi pi 30671 Jul 12 2012 nxauth-3.5.0-1.tar.gz
-rw-r--r-- 1 pi pi 532999 Jul 12 2012 nxcomp-3.5.0-2.tar.gz
-rw-r--r-- 1 pi pi 91725 Jul 12 2012 nxcompext-3.5.0-1.tar.gz
-rw-r--r-- 1 pi pi 77293 Jul 12 2012 nxcompshad-3.5.0-2.tar.gz
-rw-r--r-- 1 pi pi 80194 Jul 12 2012 nxproxy-3.5.0-1.tar.gz
-rw-r--r-- 1 pi pi 25664 Jul 12 2012 nxscripts-3.5.0-1.tar.gz
-rw-r--r-- 1 pi pi 20345475 Jul 12 2012 nx-X11-3.5.0-2.tar.gz
pi@raspberrypi ~/work/nx $


tar -xzvf nxagent-3.5.0-9.tar.gz
tar -xzvf nxauth-3.5.0-1.tar.gz
tar -xzvf nxcomp-3.5.0-2.tar.gz
tar -xzvf nxcompext-3.5.0-1.tar.gz
tar -xzvf nxcompshad-3.5.0-2.tar.gz
tar -xzvf nxproxy-3.5.0-1.tar.gz
tar -xzvf nxscripts-3.5.0-1.tar.gz
tar -xzvf nx-X11-3.5.0-2.tar.gz

cd nxcomp
./configure
make
cd ..

cd nxcompext
./configure
make 1 ERROR
cd ..


cd nxcompshad
./configure
make
cd ..

cd nxproxy
./configure
make
cd ..

cd nx-X11
make World
if it works, tomorrow more

cd work
cd nx
wget http://prdownload.berlios.de/freenx/freenx-server-0.7.3.tar.gz
tar -xzvf freenx-server-0.7.3.tar.gz

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now


wget http://prdownload.berlios.de/freenx/freenx-server-0.7.3.tar.gz not work get 7kb bad file
download sourceforge on PC worked,
use usb stick for copy

tar -xzvf freenx-server-0.7.3.tar.gz
cd freenx-server-0.7.3
patch < gentoo-nomachine.diff


nano nx_3.5.0.patch
--- nxloadconfig.orig 2009-05-26 16:13:02.000000000 -1000
+++ nxloadconfig 2009-05-26 16:13:22.000000000 -1000
@@ -606,8 +606,8 @@
[ -z $(echo "$ENABLE_ROOTLESS_MODE" | egrep "^[0|1]$") ] && \
ERROR="yes" && echo "Error: Invalid value \"ENABLE_ROOTLESS_MODE=$ENABLE_ROOTLESS_MODE\""

- [ -z "$(strings $PATH_BIN/nxagent | egrep 'NXAGENT - Version 1.5.0|NXAGENT - Version 2.[01].0|NXAGENT - Version 3.[012].0')" ] && \
- WARNING="yes" && echo "Error: Could not find 1.5.0 or 2.[01].0 or 3.[01].0 version string in nxagent. NX 1.5.0 or 2.[01].0 or 3.[012].0 backend is needed for this version of FreeNX."
+ [ -z "$(strings $PATH_BIN/nxagent | egrep 'NXAGENT - Version 1.5.0|NXAGENT - Version 2.[01].0|NXAGENT - Version 3.[012345].0')" ] && \
+ WARNING="yes" && echo "Error: Could not find 1.5.0 or 2.[01].0 or 3.[012345].0 version string in nxagent. NX 1.5.0 or 2.[01].0 or 3.[012345].0 backend is needed for this version of FreeNX."

[ -z $(echo "$ENABLE_USESSION" | egrep "^[0|1]$") ] && \
ERROR="yes" && echo "Error: Invalid value \"ENABLE_USESSION=$ENABLE_USESSION\""


patch --ignore-whitespace < nx_3.5.0.patch

make

sudo make install

cd /work/nx
sudo cp -a nx-X11/lib/X11/libX11.so* /usr/NX/lib
sudo cp -a nx-X11/lib/Xext/libXext.so* /usr/NX/lib
sudo cp -a nx-X11/lib/Xrender/libXrender.so* /usr/NX/lib
sudo cp -a nxcomp/libXcomp.so* /usr/NX/lib
sudo cp -a nxcompext/libXcompext.so* /usr/NX/lib
sudo cp -a nxcompshad/libXcompshad.so* /usr/NX/lib
sudo cp -a nx-X11/programs/Xserver/nxagent /usr/NX/bin
sudo cp -a nxproxy/nxproxy /usr/NX/bin


sudo ln -s /usr/NX/lib/libXrender.so.1.2.2 /usr/NX/lib/libXrender.so.1.2

sudo /usr/NX/bin/nxsetup --install

sudo cp freenx-server-0.7.3/node.conf.sample /usr/NX/etc/node.conf

sudo nano /usr/NX/etc/node.conf

old #COMMAND_MD5SUM="openssl md5" new COMMAND_MD5SUM="md5sum"

cat: /usr/NX/var/db/running/sessionId{(STDIN)}: No such file or directory
! new line at end of file
but still the window just flushes,
sometimes error or nothing
WASTED A DAY!



in one minute
sudo apt-get install tightvncserver
vncserver :1




sudo apt-get update
sudo apt-get upgrade


i leave the not working installation of NX11 server on this system,
possibly can repair it later,
now want test a faster webserver

follow http://www.raspberrypi.org/phpBB3/viewtopic.php?f=2&t=4697


sudo ifconfig 192.168.1.5
sudo aptitude install mysql-server mysql-client PIsql
sudo aptitude install nginx
sudo aptitude install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

sudo nano /etc/nginx/sites-available/default


server {
listen 80; ## listen for ipv4
server_name localhost;
access_log /var/log/nginx/localhost.access.log;

location / {
root /var/www;
index index.php index.html index.htm;
}

## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
root /var/www;
}

## Parse all .php file in the /var/www directory
location ~ .php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}

## Disable viewing .htaccess & .htpassword
location ~ /\.ht {
deny all;
}
}
upstream backend {
server 127.0.0.1:9000;
}


sudo apt-get update
sudo apt-get install php5-cli php5-common ( php5-suhosin ERROR )
sudo apt-get install php5-fpm php5-cgi
sudo nano /etc/php5/fpm/pool.d/www.conf
change to listen = 127.0.0.1:9000

sudo mkdir /var/www
sudo groupadd www-data
sudo /etc/init.d/nginx restart
sudo /etc/init.d/php5-fpm restart
sudo echo ?php phpinfo(); ?> >> /var/www/test.php
permission problem
sudo chown -R pi:pi /var/www
sudo chmod -R 755 /var/www

sudo echo ?php phpinfo(); ?> >> /var/www/test.php ok
from PC browser
http://192.168.1.5/test.php file not found
http://192.168.1.5/ 403 forbidden nginx/1.2.1
reboot not help
test from inside rpi 127.0.0.1 same
check file and permissions ok
make new
sudo nano /etc/nginx/sites-available/default later copy
and it works

now do some more things as with the apache server

sudo nano /etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet dhcp


auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "my-network-ssid"
wpa-psk "my-wifi-password"

change to

auto lo

iface lo inet loopback
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1


auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "my-network-ssid"
wpa-psk "my-wifi-password"



sudo reboot
PUTTY SSH on 192.168.1.101 ok
http://192.168.1.101/test.php ok

for a full server FTP missing
sudo apt-get install vsftpd

sudo nano /etc/vsftpd.conf
Edit your vsftpd.conf file, and change
anonymous_enable=YES to anonymous_enable=NO,
Uncomment local_enable=YES and write_enable=YES,
then go to the bottom of the file and add
force_dot_files=YES.
Now save and exit the file.


sudo service vsftpd restart

and need PHPMYADMIN also

sudo apt-get install phpmyadmin

non auto config apache2 light..
PIsql

http://192.168.1.101/phpmyadmin 500 Internal Server Error nginx/1.2.1


sudo nano /etc/nginx/sites-available/default add

location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}


http://192.168.1.101/phpmyadmin ok

login: root PIsql


copy index.php by FTP
chmod 755 /var/www/index.php