This repository has been archived by the owner on Jan 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Setting up OSID v1.0 on Arch Linux ARM
Francis Hart edited this page May 14, 2015
·
1 revision
We recommend using Arch Linux ARM due to it's small foot print and quick boot time when compared to Raspbian:
Currently these instructions are un-tested but will be updated when time permits, if you would like to provide feedback or amends to these instructions please contact us through Github:
- Write latest Arch Linux ARM to a 2Gb or larger SD card.
- Run
hostnamectl set-hostname osid
to change the hostname. - Make the imgroot directory
mkdir /etc/osid/imgroot -p
. - Download the latest code
wget https://github.com/rockandscissor/osid/archive/master.zip
. - Update the system and install the unzip utility
pacman -Syu unzip
. - Run
unzip master.zip
and thenmv osid-master/* /etc/osid
to move the contents to the osid directory. - Install Nginx
pacman -S nginx
and then runsystemctl enable nginx
to enable it to run on startup. - Install PHP-FPM
pacman -S php-fpm
and then runsystemctl enable php-fpm
to enable it to run on startup. - Edit
/etc/nginx/nginx.conf
and replace the contents with the configuration information at the bottom of this page. - Edit
/etc/php/php.ini
and add:/etc/osid/www/public_html/
to the end of theopen_basedir
line. - Run
chown http:http /etc/osid/imgroot -R
andsudo chown http:http /etc/osid/www -R
to ensure the web server and samba have access to the OSID files. - You will also need to install the
dcfldd
package usingpacman -S dcfldd
. - Add a cron job to the root crontab by typing
crontab -e
and then putting in this rule:* * * * * /etc/osid/system/write.sh
. N.B. If you want to use nano on Arch Linx runexport EDITOR="nano"
before editing the crontab. - You will also need to install the samba package using
pacman -S samba
(you will save images to be written to the Pi at\\osid\Images
(Windows) orsmb://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. - Make sure Samba starts on boot
systemctl enable samba
. - If you're SD card is bigger than 2Gb you will need to expand the filesystem to fill the card. Follow the guide at http://raspberry-hosting.com/faq/how-expand-arch-linux-root-partition to do this.
- Your done! Upload your image file(s) to your samba share and then visit http://osid in your web browser to get started!
/etc/nginx/nginx.conf:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
root /etc/osid/www/public_html;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
#fastcgi_pass 127.0.0.1:9000; (depending on your php-fpm socket configuration)
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
}
/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 = http
dns proxy = no
[Images]
path = /etc/osid/imgroot
public = yes
only guest = yes
writable = yes