forked from gboudreau/Greyhole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
USAGE
76 lines (55 loc) · 2.87 KB
/
USAGE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Greyhole Configuration Instructions
===================================
The following are instructions on how to configure and run Greyhole.
You need Greyhole installed for those instructions to make sense.
See https://github.com/gboudreau/Greyhole/wiki/Installing for details.
Most of the commands below require root access, so now would be a good time
to become root, if you're not already (use `sudo -i` if you don't have the root password).
1. Read the following documentation pages.
The first page will help you understand why you're doing the next steps.
The second page will help you choose your Landing Zones (/path/to/share, in the next step) correctly.
How Greyhole Works: https://github.com/gboudreau/Greyhole/wiki/HowGreyholeWorks
About the Landing Zone: https://github.com/gboudreau/Greyhole/wiki/AboutLZ
2. Setup Samba:
Edit /etc/samba/smb.conf
Change or add the following values in the [global] section:
unix extensions = no
wide links = yes
For each of your shares, add a 'dfree command' and 'vfs objects' lines, as seen below.
Example share definition:
[share_name]
path = /path/to/share
create mask = 0770
directory mask = 0770
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
printable = no
dfree command = /usr/bin/greyhole-dfree
vfs objects = greyhole
Fedora: service smb restart
Ubuntu (< 10): /etc/init.d/samba restart
Ubuntu (10+): restart smbd
Debian: service samba restart
3. Setup the database:
# Make sure your MySQL server service (mysqld) is running, and runs on boot.
Fedora: service mysqld start; chkconfig mysqld on
Ubuntu (< 10): /etc/init.d/mysqld start; update-rc.d mysqld defaults
Ubuntu (10+): start mysql
Debian: service mysql start
# Remove the -p parameter if your MySQL root user doesn't require a password for local connections.
mysql -u root -p -e "create database greyhole; grant all on greyhole.* to greyhole_user@localhost identified by '89y63jdwe';"
mysql -u greyhole_user -p89y63jdwe greyhole < /usr/share/greyhole/schema-mysql.sql
4. Customize the Greyhole configuration file, /etc/greyhole.conf, as needed.
Important: you need to either use the `date.timezone` setting in your php.ini, or specify your timezone in greyhole.conf, using the `timezone` config option.
5. Start the Greyhole service:
Fedora: service greyhole start
Ubuntu (< 10): /etc/init.d/greyhole start
Ubuntu (10+): start greyhole
Debian: service greyhole start
Check for errors in the Greyhole log: greyhole --logs
If you use any application that needs to use files on your shares, you'll need to mount the shares locally, and point your applications to those mounts.
You should never work on the files in your storage pool directories, or the symlinks in your shared directories.
Ref: https://github.com/gboudreau/Greyhole/wiki/Mountshareslocally