說明:做爲一名誠實的搬運工,這裏貼上官方部署文檔,本文僅做一些梳理,算是做個筆記了
1,到下載頁面下載最新的服務器安裝包
2,使用ssh工具(本如xshell)連接至遠程服務器,創建安裝目錄(如vicfile)
cd /home
mkdir vicfile
3,打開本地cmd,將使用scp命令將文件從本地上傳至服務器。
scp C:\Users\vicdor\Downloads\seafile-server_6.3.1_x86-64.tar.gz [email protected]:/home/vicfile/
4,待數據傳遞完畢,切換到xshell,進入到vicfile文件夾,可以看到我們的安裝包已經上傳成功了
5,解壓,並把安裝包移動到installed文件夾
tar -xzf seafile-server_*
mkdir installed
mv seafile-server_* installed
6,安裝
cd seafile-server-*
./setup-seafile-mysql.sh #運行安裝腳本並回答預設問題
7,可以看到安裝腳本運行的時候便報錯了,這是因爲缺少了seafile依賴的一些工具包,如果不嫌多,也可以報一次錯,就複製執行一次紅框中提示的命令。這裏我們可以執行官方文檔中的安裝命令,將seafile服務安裝的先決條件準備好
# on Debian/Ubuntu 14.04 server
apt-get update
apt-get install python2.7 libpython2.7 python-setuptools \
python-ldap python-mysqldb python-memcache python-urllib3
# on Ubuntu 16.04 server
# As the default python binary on Ubuntu 16.04 server is python 3, we need to install python (python 2) first.
apt-get update
apt-get install python
apt-get install python2.7 libpython2.7 python-setuptools python-ldap python-urllib3 ffmpeg python-pip python-mysqldb python-memcache
pip install pillow moviepy
# on CentOS 7
yum -y install epel-release
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
yum -y install MySQL-python python-memcached python-ldap python-urllib3 ffmpeg ffmpeg-devel
pip install pillow moviepy
8,下圖爲ubuntu執行官方腳本報錯提示,這裏我按提示將原來的python-imaging替換爲python-pil,再重新執行了一次。後又在執行安裝腳本的時候提示python-imaging爲必須,我便把官方腳本中的python-imaging在上面代碼中移除了
9,後來幾經查探安裝pillow來代替python-imaging
apt-get install python-dev python-setuptools
apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
pip install pillow
9,準備好先決環境後再次執行第6步安裝腳本,結果還是提示我存在遺漏,繼續按照提示CV
10,安裝好後再次執行第6步安裝腳本,按提示敲回車繼續操作,設置服務名,配置ip和端口
11,後續過程無法繼續,這裏不得不暫時退出先來安裝個mysql了。
apt-get install mysql-server
12,登錄mysql修改root密碼,並設置允許遠程訪問
mysql -uroot -p(輸入密碼處直接回車)
set password for root@localhost = password('這裏填密碼');
exit;
編輯文件/etc/mysql/mysql.conf.d/mysqld.cnf:
vi /etc/mysql/mysql.conf.d/mysqld.cnf
註釋掉bind-address = 127.0.0.1:(用鼠標定位到相應行首,敲擊鍵盤i,查看確認光標位置,輸入#註釋當前行,然後敲擊esc 後輸入:wq保存並退出)
然後進入mysql服務,執行授權命令:
grant all on *.* to root@'%' identified by '你的密碼' with grant option;
flush privileges;
然後執行quit或exit命令退出mysql服務後重啓mysql。
service mysql restart
13,現在繼續執行第6步,按提示進行操作
14,按照提示配置默認超管用戶,直到最後提示操作成功
15,最後啓動seafile服務
啓動 Seafile:
./seafile.sh start # 啓動 Seafile 服務
- 1
- 2
啓動 Seahub
./seahub.sh start <port> # 啓動 Seahub 網站 (默認運行在8000端口上)
16,瀏覽器輸入http://你的ip:8000 即可訪問