First prepare a clean ubuntu-16.04.1-desktop-amd64 system.
Install Necessary Packages
- udpate source
sudo apt update
sudo apt upgrade
- install necessary packages by apt
sudo apt install ssh libevent-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libmysqlclient-dev libarchive-dev libtool libjansson-dev valac libfuse-dev python-dateutil cmake re2c flex sqlite3 python-pip python-simplejson git libssl-dev libldap2-dev
- install libevhtp from source
cd ~/Downloads/
wget https://github.com/haiwen/libevhtp.git
(git clone https://github.com/haiwen/libevhtp.git libevhtp)
cd libevhtp/
cmake -DEVHTP_DISABLE_SSL=OFF -DEVHTP_BUILD_SHARED=ON .
(cmake -DEVHTP_DISABLE_SSL=ON -DEVHTP_BUILD_SHARED=OFF .)
make
sudo make install
- install libzdb from source
cd ~/Downloads/
wget http://tildeslash.com/libzdb/dist/libzdb-3.1.tar.gz
tar xf libzdb-3.1.tar.gz
cd libzdb-3.1/
./configure
make
sudo make install
Download and Build Seafile
- create project root directory dev
cd
mkdir dev
- download and install libsearpc
cd ~/dev/
git clone https://github.com/haiwen/libsearpc.git
cd libsearpc/
./autogen.sh
./configure
make
sudo make install
- download and install ccnet
cd ~/dev/
git clone https://github.com/haiwen/ccnet.git
cd ccnet/
git checkout -b v6.0.0-server v6.0.0-server
./autogen.sh
./configure --disable-client --enable-server --enable-ldap
make
sudo make install
sudo ldconfig
- download and install seafile
编译seafile之前应该先执行下面的,因为c的头文件没有包含全
export C_INCLUDE_PATH=”$C_INCLUDE_PATH:/root/Downloads/libevhtp/oniguruma”
cd ~/dev/
git clone https://github.com/haiwen/seafile.git
cd seafile/
git checkout -b v6.0.0-server v6.0.0-server
./autogen.sh
./configure --disable-client --enable-server
make
sudo make install
- download seahub
cd ~/dev/
git clone https://github.com/haiwen/seahub.git
cd seahub/
git checkout -b v6.0.0-server v6.0.0-server
Start ccnet-server and seaf-server
运行seafile.sh之前,先编辑它,并删除关于gnome-terminal -e的指令,而直接运行后面的指令。
cd ~/dev/seafile/tests/basic
./seafile.sh 2
NOTE: if error while loading shared libraries: libzdb.so.11: cannot open shared object file: No such file or directory, you should sudo ldconfig
Start Seahub
- install requirements
cd ~/dev/seahub/
sudo pip install -r requirements.txt
NOTE: if locale.Error: unsupported locale setting, you should export LC_ALL=en_US.UTF-8
- set environment
cd ~/dev/seahub/
cat > setenv.sh << EOF
export CCNET_CONF_DIR=/home/plt/dev/seafile/tests/basic/conf2
export SEAFILE_CONF_DIR=/home/plt/dev/seafile/tests/basic/conf2/seafile-data
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages:thirdpart:$PYTHONPATH
EOF
NOTE: change plt to your linux user name
- create database and admin account
. setenv.sh
python manage.py migrate
python tools/seahub-admin.py
NOTE: currently, your ccnet directory is /home/plt/dev/seafile/tests/basic/conf2
- run seahub
python manage.py runserver 0.0.0.0:8000
then open browser and navigate to http://127.0.0.1:8000
感谢楼主的分享。我在centos7中部署了seafile-6.0.8版本程序,然后现在修改了/seahub/templates/snippets/file_share_popup.html页面,重启后,也没效果。请问我需要怎么操作,才能让修改后的代码生效。
在安装libevhtp 地方有问题,最新的安装教程中已经修改了cmake的参数,
cmake -DEVHTP_DISABLE_SSL=ON -DEVHTP_BUILD_SHARED=OFF . 详见https://manual.seafile.com/build_seafile/server.html#libevhtp
使用楼主的命令会在make seafile server的时候报错。今天踩了坑了,希望后面的同学可以避免这个错误