Skip to content
This repository has been archived by the owner on Jan 19, 2020. It is now read-only.

Setting up OSID v1.0 on Raspbian using Apache

Yannick Jost edited this page Mar 28, 2017 · 5 revisions

If you would like to provide feedback or amends to these instructions please contact us through Github:

  1. Write latest Raspbian to a suitably sized memory card.
  2. Run raspi-config and set the following options: a) hostname set to osid. b) expand the file system to fit memory card. c) change graphic memory to 16Mb to maximise available memory to the processor.
  3. Make the directory where you'll upload the source files. sudo mkdir /etc/osid.
  4. Copy the files contained in this project to the path /etc/osid.
  5. Run the following commands to ensure the web server and samba have access to the OSID files.
    • sudo chown www-data:www-data /etc/osid/imgroot -R
    • sudo chown www-data:www-data /etc/osid/www -R
    • sudo chown www-data:www-data /etc/osid/system/*.info
  6. Run sudo apt-get update and sudo apt-get upgrade —show-upgraded.
  7. Run sudo apt-get install apache2.
  8. Modify the Apache2 default configuration to point to /etc/osid/www/public_html directory (You should edit /etc/apache2/sites-available/default using nano or vi and change the DocumentRoot setting to match the osid public_html path). Make sure to run sudo /etc/init.d/apache2 reload to ensure changes are applied.
  9. Next run sudo apt-get install php5 php-pear to install PHP.
  10. Restart Apache2 using sudo /etc/init.d/apache2 restart.
  11. You will also need to install the dcfldd package using sudo apt-get install dcfldd.
  12. Add a cron job to the root crontab by typing sudo crontab -e and then putting in this rule: * * * * * /etc/osid/system/write.sh.
  13. You will also need to install the samba package using sudo apt-get install samba (you will save images to be written to the Pi at \\osid\Images (Windows) or smb://osid/Images (Mac/Linux) Make sure your /etc/samba/smb.conf matches the configuration at the bottom of this page and once this is done restart the raspberry pi.
  14. You're done! Upload your image file(s) to your samba share and then visit http://osid in your web browser to get started!

/etc/samba/smb.conf:

[global]
workgroup = WORKGROUP
server string = Open Source Image Duplicator
map to guest = Bad User
security = user

log file = /var/log/samba/%m.log
max log size = 50

interfaces = lo eth0
guest account = www-data

dns proxy = no

[Images]
path = /etc/osid/imgroot
public = yes
only guest = yes
writable = yes