Pi Server Setup capable of hosting SellerDeck sites.
This demo used Raw Images / Raspbian from http://www.raspberrypi.org/downloads
Install Raspbian:
Enabling SSH as part of the initial configuration / Advanced Options).
Also set a hostname like raspberrypi.
Now install Samba so we can see the Pi from Windows PC's on our LAN and connect to it by name:
You can set up shares, etc but they aren't needed - we just want the hostname to show up on our LAN.
The Pi should appear on the LAN some time after this.
Alternatively / or (you can have both) we could set up static IP as per http://elinux.org/RPi_Setting_up_a_static_IP_in_Debian
This may be useful if you want to port forward on your router so to make the Pi accessible from the Internet at large.
Be wary of security implications if you let the world in.
My LAN is 192.168.0.nnn so I chose 192.168.0.141
From this point on, you no longer need a mouse, keyboard or screen on the Pi and can connect to it by SSH via putty.
See http://www.chiark.greenend.org.uk/~sgtatham/putty/
Run putty on your PC, select SSH and enter raspberrypi into Hostname. Open and login.
Setting up server as per http://www.wikihow.com/Make-a-Raspberry-Pi-Web-Server
Part 1 of 7: Skipped as the pi is already running.
Part 2 of 7: Did all of this as I'm using a freshly baked pi.
Part 3 of 7: Skipped this but you can do it if you want auto updating
Part 4 of 7: Skipped this as I enabled SSH when initially configuring Pi.
And I already have putty installed on my main machine.
Do the putty bit if you want SSH access.
Part 5 of 7: Did all of this.
Part 6 of 7: Skipped this as Mysql isn't needed for SD to run and we've a only a 512Mb machine.
Part 7 of 7: Did all of this.
That's the server and FTP up and running.
You should get the default page from http://raspberrypi or http://192.168.0.141
A change is needed to the FTP server to fix file permissions.
Scroll down (using down arrow keys) until you see a line:
Delete the inital # to get:
Now save and exit the file by pressing CTRL-O, Enter, CTRL-X
Now we need to get Perl scripts running from the default cgi-bin that's in /usr/lib/cgi-bin
And make sure permissions are good on our www folder.
However the SellerDeck Search will fail with an internal server error message so we need to load some missing Perl modules.
First get cpanm installed:
Then the modules we need are loaded via:
Probably a good idea to reboot the pi after all this.
To create a site, FTP to to e.g. raspberrypi and move to the www directory.
I'm expecting to upload more than 1 site so each one will go in it's own directory within www.
Create a new directory for your site. E.g. "testsite" within www.
Change permissions on testsite to be 777 (check any option to recurse these settings into sub-directories).
Now SD should run using these network settings.
Change SCRIPTID, all raspberrypi and FTPPASSWORD to suit.
Then copy them to a textfile and import them into network settings:
Note that no SMTP server is set-up so I've just used a dummy entry.
Upload your site.
Now you should be able to properly browse your site via http://raspberrypi/testsite
This demo used Raw Images / Raspbian from http://www.raspberrypi.org/downloads
Install Raspbian:
Enabling SSH as part of the initial configuration / Advanced Options).
Also set a hostname like raspberrypi.
Now install Samba so we can see the Pi from Windows PC's on our LAN and connect to it by name:
Code:
sudo apt-get update sudo apt-get install samba samba-common-bin
The Pi should appear on the LAN some time after this.
Alternatively / or (you can have both) we could set up static IP as per http://elinux.org/RPi_Setting_up_a_static_IP_in_Debian
This may be useful if you want to port forward on your router so to make the Pi accessible from the Internet at large.
Be wary of security implications if you let the world in.
My LAN is 192.168.0.nnn so I chose 192.168.0.141
From this point on, you no longer need a mouse, keyboard or screen on the Pi and can connect to it by SSH via putty.
See http://www.chiark.greenend.org.uk/~sgtatham/putty/
Run putty on your PC, select SSH and enter raspberrypi into Hostname. Open and login.
Setting up server as per http://www.wikihow.com/Make-a-Raspberry-Pi-Web-Server
Part 1 of 7: Skipped as the pi is already running.
Part 2 of 7: Did all of this as I'm using a freshly baked pi.
Part 3 of 7: Skipped this but you can do it if you want auto updating
Part 4 of 7: Skipped this as I enabled SSH when initially configuring Pi.
And I already have putty installed on my main machine.
Do the putty bit if you want SSH access.
Part 5 of 7: Did all of this.
Part 6 of 7: Skipped this as Mysql isn't needed for SD to run and we've a only a 512Mb machine.
Part 7 of 7: Did all of this.
That's the server and FTP up and running.
You should get the default page from http://raspberrypi or http://192.168.0.141
A change is needed to the FTP server to fix file permissions.
Code:
sudo nano /etc/vsftpd.conf
Code:
#local_umask=022
Code:
local_umask=022
Now we need to get Perl scripts running from the default cgi-bin that's in /usr/lib/cgi-bin
Code:
sudo chown pi /usr/lib/cgi-bin
Code:
sudo chmod 0777 -R /var/www
First get cpanm installed:
Code:
sudo apt-get install curl gcc-4.7 sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus
Code:
sudo cpanm HTML::Entities Exporter File::Temp LWP::UserAgent CGI CGI::Carp Digest::MD5
Code:
sudo shutdown -r now
I'm expecting to upload more than 1 site so each one will go in it's own directory within www.
Create a new directory for your site. E.g. "testsite" within www.
Change permissions on testsite to be 777 (check any option to recurse these settings into sub-directories).
Now SD should run using these network settings.
Change SCRIPTID, all raspberrypi and FTPPASSWORD to suit.
Then copy them to a textfile and import them into network settings:
Code:
HTTPPROXYMODE 0 HTTPPROXYADDRESS HTTPPROXYPORT 80 HTTPPROXYUSER HTTPPROXYPASSWORD FTPPROXYMODE 0 FTPPROXYADDRESS FTPPROXYPORT 21 FTPPROXYUSER FTPPROXYPASSWORD SCRIPTID 12011 SCRIPTEXT .pl SMTPHOST dummy WEBSITEURL http://raspberrypi/testsite/index.html IGNOREPASSIVEERRORS true USERELATIVECGIURLS false PATHTOPERL /usr/bin/perl -X USEENHANCEFTP true FTPBUFFERSIZE 4 FTPCLIENTTIMEOUT 5000 FTPRETRYDELAY 3000 FTPKEEPALIVEINTERVAL 30000 FTPSILENT false FTPMAXRETRIES 3 FTPCONNECTTIMEOUT 15000 SMTPAUTHREQUIRED false SMTPUSERNAME SMTPPASSWORD COMPRESSIONPACKETSIZE 1024 COMPRESSEDUPLOAD false CATALOGURL http://raspberrypi/testsite/acatalog/ ONLINESTOREFOLDERNAME acatalog CGIBINURL http://raspberrypi/cgi-bin/ PATHFROMCGITOCATALOG /home/pi/www/testsite/acatalog/ FTPHOST raspberrypi FTPUSERNAME pi FTPPASSWORD ********* PATHTOCGIBIN /usr/lib/cgi-bin/ USEPASSIVEFTP true FTPPATHFROMCGITOCATALOG
Upload your site.
Now you should be able to properly browse your site via http://raspberrypi/testsite
Comment