Setup Seafile Server Development Environment
install necessary packages by apt
install libevhtp
from source
cd ~/Downloads/
git clone https://github.com/haiwen/libevhtp.git
cd libevhtp/
cmake -DEVHTP_DISABLE_SSL=ON -DEVHTP_BUILD_SHARED=OFF .
sudo make install
sudo ldconfig
create project root directory dev
cd
mkdir dev
download and install libsearpc
cd ~/dev/
git clone https://github.com/haiwen/libsearpc.git
cd libsearpc/
./configure
make
sudo make install
sudo ldconfig
download and install ccnet-server
download and install seafile-server
cd ~/dev/
git clone https://github.com/haiwen/seafile-server.git
cd seafile-server/
./autogen.sh
./configure
make
sudo make install
download seahub
git clone https://github.com/haiwen/seahub.git
cd seahub/
Start ccnet-server
and seaf-server
in two separate terminals.
cd ~/dev/seafile-server/tests
ccnet-server -c conf -f -
Seahub
is the web front end of Seafile. It is written in the Django framework, requires Python 2.7 installed on your server.
set environment
cd ~/dev/seahub/
cat > setenv.sh << EOF
export CCNET_CONF_DIR=~/dev/seafile-server/tests/conf
export SEAFILE_CONF_DIR=~/dev/seafile-server/tests/conf/seafile-data
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages:thirdpart:\$PYTHONPATH
EOF
sudo chmod u+x setenv.sh
install requirements
# Expand setenv.sh in the current shell
. setenv.sh
cd ~/dev/seahub/
sudo pip install -r requirements.txt
create database and admin account
. setenv.sh
python manage.py migrate
NOTE: currently, your ccnet directory is ~/dev/seafile-server/tests/conf
run seahub
If you have set up Nginx/Apache to run Seafile, you should run seahub in fastcgi mode.
python manage.py runfcgi host=127.0.0.1 port=8000