# Linux
#### Preparation
The following list is what you need to install on your development machine. **You should install all of them before you build seafile**.
Package names are according to Ubuntu 12.04. For other Linux distros, please find their corresponding names yourself.
- autoconf/automake/libtool
- libevent-dev ( 2.0 or later )
- libcurl4-openssl-dev (1.0.0 or later)
- libgtk2.0-dev ( 2.24 or later)
- uuid-dev
- intltool (0.40 or later)
- libsqlite3-dev (3.7 or later)
- valac (only needed if you build from git repo)
- libjansson-dev
- libqt4-dev
- valac
- cmake
- libfuse-dev (for seafile >= 2.1)
- python-simplejson (for seaf-cli)
~~~
sudo apt-get install autoconf automake libtool libevent-dev libcurl4-openssl-dev libgtk2.0-dev uuid-dev intltool libsqlite3-dev valac libjansson-dev libqt4-dev cmake libfuse-dev
~~~
For a fresh Fedora 20 installation, the following will install all dependencies via YUM:
~~~
$ sudo yum install wget gcc libevent-devel openssl-devel gtk2-devel libuuid-devel sqlite-devel jansson-devel intltool cmake qt-devel fuse-devel libtool vala gcc-c++
~~~
#### Building
First you should get the latest source of libsearpc/ccnet/seafile/seafile-client:
Download the source tarball of the latest tag from
- [https://github.com/haiwen/libsearpc/tags](https://github.com/haiwen/libsearpc/tags) (use v3.0-latest)
- [https://github.com/haiwen/ccnet/tags](https://github.com/haiwen/ccnet/tags)
- [https://github.com/haiwen/seafile/tags](https://github.com/haiwen/seafile/tags)
- [https://github.com/haiwen/seafile-client/tags](https://github.com/haiwen/seafile-client/tags)
For example, if the latest released seafile client is 3.0.2, then just use the **v3.0.2** tags of the four projects. You should get four tarballs:
- libsearpc-v3.0-latest.tar.gz
- ccnet-3.0.2.tar.gz
- seafile-3.0.2.tar.gz
- seafile-client-3.0.2.tar.gz
~~~
export version=3.0.2
alias wget='wget --content-disposition -nc'
wget https://github.com/haiwen/libsearpc/archive/v3.0-latest.tar.gz
wget https://github.com/haiwen/ccnet/archive/v${version}.tar.gz
wget https://github.com/haiwen/seafile/archive/v${version}.tar.gz
wget https://github.com/haiwen/seafile-client/archive/v${version}.tar.gz
~~~
Now uncompress them:
~~~
tar xf libsearpc-v3.0-latest.tar.gz
tar xf ccnet-${version}.tar.gz
tar xf seafile-${version}.tar.gz
tar xf seafile-client-${version}.tar.gz
~~~
To build Seafile client, you need first build **libsearpc** and **ccnet**, **seafile**.
##### set paths
~~~
export PREFIX=/usr
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH="$PREFIX/bin:$PATH"
~~~
##### libsearpc
~~~
cd libsearpc-${version}
./autogen.sh
./configure --prefix=$PREFIX
make
sudo make install
~~~
##### ccnet
~~~
cd ccnet-${version}
./autogen.sh
./configure --prefix=$PREFIX
make
sudo make install
~~~
##### seafile
~~~
cd seafile-${version}/
./autogen.sh
./configure --prefix=$PREFIX --disable-gui
make
sudo make install
~~~
#### seafile-client
~~~
cd seafile-client-${version}
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .
make
sudo make install
~~~
#### custom prefix
when installing to a custom `$PREFIX`, i.e. `/opt`, you may need a script to set the path variables correctly
~~~
cat >$PREFIX/bin/seafile-applet.sh <<END
#!/bin/bash
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
export PATH="$PREFIX/bin:$PATH"
exec seafile-applet $@
END
cat >$PREFIX/bin/seaf-cli.sh <<END
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
export PATH="$PREFIX/bin:$PATH"
export PYTHONPATH=$PREFIX/lib/python2.7/site-packages
exec seaf-cli $@
END
chmod +x $PREFIX/bin/seafile-applet.sh $PREFIX/bin/seaf-cli.sh
~~~
you can now start the client with `$PREFIX/bin/seafile-applet.sh`.
- 介紹
- 概覽
- Seafile 組件
- 研發路線圖
- 常見問題解答
- 修改日志
- 我要參與
- Linux 下部署 Seafile 服務器
- 部署 Seafile 服務器(使用 SQLite)
- 部署 Seafile 服務器(使用 MySQL)
- Nginx 下配置 Seahub
- Nginx 下啟用 Https
- Apache 下配置 Seahub
- Apache 下啟用 Https
- Seafile LDAP 配置
- 開機啟動 Seafile
- 防火墻設置
- Logrotate 管理系統日志
- 使用 Memcached
- 使用 NAT
- 非根域名下部署 Seahub
- 從 SQLite 遷移至 MySQL
- 安裝常見問題
- 升級
- Windows 下部署 Seafile 服務器
- 下載安裝 Windows 版 Seafile 服務器
- 安裝 Seafile 為 Windows 服務
- 所用端口說明
- 升級
- 從 Windows 遷移到 Linux
- 垃圾回收
- 部署 Seafile 專業版服務器
- 下載安裝 Seafile 專業版服務器
- 從社區版遷移至專業版
- 升級
- Amazon S3 下安裝
- OpenStackSwift 下安裝
- Ceph 下安裝
- 配置選項
- 文件搜索說明
- 集群部署
- 集群中啟用搜索和后臺服務
- NFS 下集群安裝
- 常見問題解答
- 軟件許可協議
- 服務器個性化配置
- ccnet.conf
- seafile.conf
- seahub_settings.py
- 發送郵件提醒
- 個性化郵件提醒
- 用戶管理
- 存儲容量與文件上傳/下載大小限制
- 自定義 Web
- 管理員手冊
- 賬戶管理
- 日志
- 備份與恢復
- Seafile FSCK
- Seafile GC
- WebDAV 和 FUSE 擴展
- WebDAV 擴展
- FUSE 擴展
- 安全選項
- 安全特性
- 日志和審計
- 開發文檔
- 編譯 Seafile
- Linux
- Windows
- Max OS X
- Server
- 開發環境
- 編程規范
- Web API
- Python API
- 數據模型
- 服務器組件
- 同步算法