-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Currently there are no pre-build binary packages of PeerDrive available. But building it yourself shouldn’t be too difficult, at least on a decent Linux distribution.
To build PeerDrive you need the following external packages:
- make
- git
- Protocol buffers (http://code.google.com/p/protobuf/)
- Compiler (protoc)
- Python binding
- Python 2.6
- PyQt >=4.6.x
- libmagic binding (optional)
- Erlang >= R14A (Windows: >= R14B03)
- rebar (http://github.com/basho/rebar)
- fuserl (optional, http://code.google.com/p/fuserl/)
- Fuse library
- erldokan (optional, http://github.com/jkloetzke/erldokan)
- Dokan driver (http://dokan-dev.net/en/)
Depending on your target platform you either have to build fuserl (Unix) or erldokan (Windows). Note that both are optional but PeerDrive won’t be much fun when no application (expect PeerDrive aware ones) can access the files.
Unfortunately fuserl, the FUSE Erlang binding is not available as package. Follow the build instructions given in the Wiki and make sure that you build and install fuserl with the same prefix as your Erlang installation.
Pre-built packages of erldokan are available here. Just extract the contents of the archive into your Erlang installation’s “lib” directory, that is “%ERL_INSTALL_DIR%\lib”. If you instead want to build erldokan yourself you can clone the repository at https://github.com/jkloetzke/erldokan and follow the build instructions from the README.
In any case you must have the Dokan 0.6.0 library and driver installed on your system. The package does also install the header files to compile the erldokan binding.
First clone the repository:
git clone git://github.com/jkloetzke/peerdrive.git
and then build everything with a simple
cd peerdrive make
This should fetch any missing dependencies and build the PeerDrive server. While building PeerDrive the rebar script should detect the presence of fuserl or erldokan if they are installed correctly:
rebar.config.script: fuserl: enabled rebar.config.script: erldokan: disabled
To run the PeerDrive server just execute ./peerdrive.sh resp. peerdrive.bat This will start the PeerDrive server in the foreground. To gracefully shut down the server type
q().
Instead of running the PeerDrive server manually every time you can also run it as daemon in the background.
Generating an Erlang release of the PeerDrive application (server) creates a stand alone package that contains all necessary libraries and executables. The release can be kept anywhere in the system because it is self contained.
To build the release go into the server directory and generate the release:
cd server rebar generate force=1
After this you will find the release in server/rel/peerdrive/. Copy the release to where you like (e.g. /usr/local/lib/peerdrive or C:\PeerDrive) in your system.
Just run bin/register-service.bat as administrator. This registers and starts the PeerDrive service. To de-register the service simply run bin/remove-service.bat.
There is a minimal installation script available: server/install.sh. Execute this script as root after you’ve built the server. The script will install the server to /usr/local/lib/peerdrive, place some template configuration files in /etc/peerdrive and install an init script starting the server in the default runlevels.