201311221806建立自己的雲端硬碟 - Seafile 安裝 - CentOS

之前介紹過「OwnCloud IIIIII」可以架設一個類似 Dropbox 的雲端硬碟空間,今天換來玩玩看另外一套由中國所開發的「Seafile」,這套軟體的 client 端同步程式,並不需要額外的費用,以初步來看是跟 owncloud 不一樣的地方。

[20140505] 增加 Seafile 3.0.2 安裝說明 http://blog.xuite.net/tolarku/blog/212666442 

官方說明 http://seafile.com/home/

★文件同步與共享
你可以創建不同的資料庫來分類組織文件。可以在私人間或群組中共享這些資料庫。每個資料庫都可以選擇性的在多台設備上同步。

在線協同合作
你可以在線編輯文件,對文件進行評論,在私人間或群組展開討論。事件通知、版本管理使得文件協作異常的方便和安全。

移動辦公
移動客戶端使得你可以在移動設備上查看最新改動、訪問文件資料、進行群組討論等等,方便的完成移動辦公。

下載點:

Server 安裝程式:Linux 2.0.3 64bit、Linux 2.0.3 32bit、Windows 2.0.3 說明

Client 安裝程式:Window 2.0.8、Linux 2.0.8 64bit2.0.8 32bit、MAC 2.0.8
Android 、           Apple IOS

----------------------------------------------------------

哈哈哈~自己先笑三聲

一般這類型的套件,都會先進行『LAMP』的環境安裝,才會進行套件的安裝,但這套安裝很大的不同,就請各位不要落入跟我一樣的錯誤,因為我一直想說怎麼把他安裝到 /var/www/html 底下,而網路上找到的說明都在怪怪的目錄,那這樣 web server 怎麼找得到阿?

答案是不用安裝LAMP環境,他自己有 seahub 具有 webserver 功能,所以無須額外安裝 Apache 也不需放在 /var/www/html 這目錄~ Orz....

----------------------------------------------------------

底下來做安裝的說明 (我的環境是安裝在 CentOS 6.4 x64)

安裝前的必要安裝

python 2.6 或 2.7
python-setuptools
python-simplejson
python-imaging
sqlite3

sudo 
yum install -y python python-devel python-setuptools python-simplejson python-imaging sqlite

 

下載 seafile 及解壓縮 (假設你要將程式及以後要存檔案的路徑位置放在 /data/seafile )

sudo mkdir /data/seafile
cd /data/seafile 
sudo wget 
http://seafile.googlecode.com/files/seafile-server_2.0.3_x86-64.tar.gz
sudo tar zxvf  
seafile-server_2.0.3_x86-64.tar.gz
// 他會解壓縮到 /data/seafile/
seafile-server-2.0.3 目錄下 

 

進行安裝設定

sudo ./setup-seafile.sh
#sudo ./setup-seafile.sh

You are running this script as ROOT. Are you sure to continue?
[yes|no] yes
// 這行是用 sudo 執行才會出現的提示
-----------------------------------------------------------------
This script will guide you to config and setup your seafile server.
Make sure you have read seafile server manual at
        https://github.com/haiwen/seafile/wiki
Press [ENTER] to continue
-----------------------------------------------------------------
<Enter>
Checking packages needed by seafile ...
// 基本環境檢查
Checking python on this machine ...
Find python: python2.6

  Checking python module: setuptools ... Done.
  Checking python module: python-simplejson ... Done.
  Checking python module: python-imaging ... Done.
  Checking python module: python-sqlite3 ... Done.

Checking for sqlite3 ...Done.
Checking Done.

What do you want to use as the name of this seafile server?
Your seafile users would see this name in their seafile client.
You can use a-z, A-Z, 0-9, _ and -, and the length should be 3 ~ 15
[server name]: nthufile
// 伺服器的名稱,將來會顯示在 client 程式端
What is the ip or domain of this server?
For example, www.mycompany.com, or, 192.168.1.101

[This server's ip or domain]: nthufile.nthu.edu.tw
// 伺服器的主機或IP
What tcp port do you want to use for ccnet server?
10001 is the recommended port.
[default: 10001 ] <Enter>

Where do you want to put your seafile data?
Note: Please use a volume with enough free space.
[default: /data/seafile/seafile-data ] <Enter>

What tcp port do you want to use for seafile server?
12001 is the recommended port.
[default: 12001 ] <Enter>

What tcp port do you want to use for seafile httpserver?
8082 is the recommended port.
[default: 8082 ] <Enter>

This is your config information:

server name:        nthufile
server ip/domain:   nthufile.nthu.edu.tw
server port:        10001
seafile data dir:   /data/seafile/seafile-data  // 將來存放檔案的位置
seafile port:       12001
httpserver port:    8082

If you are OK with these configuration, press [ENTER] to continue. <Enter>
Generating ccnet configuration in /data/seafile/ccnet...
done
Successly create configuration dir /data/seafile/ccnet.
Generating seafile configuration in /data/seafile/seafile-data ...
Done.
-----------------------------------------------------------------
Seahub is the web interface for seafile server.
Now let's setup seahub configuration. Press [ENTER] to continue
-----------------------------------------------------------------
<Enter>
Please specify the email address and password for seahub admininstrator.
You would use them to login as admin on your seahub website.

// 這邊輸入的 email 及密碼,就是以後管理者的帳號及密碼

Please specify the email address for seahub admininstrator:
[seahub admin email]: good@nthu.edu.tw

Please specify the passwd you want to use for seahub admininstrator:
[seahub admin password]: <your_password>
Please ensure the passwd again:
[seahub admin password again]: <your_password>

This is your seahub admin username/password

admin user name:        good@nthu.edu.tw
admin password:         **************

If you are OK with these configuration, press [ENTER] to continue.
<Enter>
Now create seahub database ...
// 如果不是用 sudo root 方式執行,在這個階段可能會產生錯誤,
Loading ccnet config from /data/seafile/ccnet
Loading seafile config from /data/seafile/seafile-data
Creating tables ...
Creating table django_content_type
Creating table django_session
Creating table registration_registrationprofile
Creating table api2_token
Creating table avatar_avatar
Creating table avatar_groupavatar
Creating table base_uuidobjidmap
Creating table base_filediscuss
Creating table base_filecontributors
Creating table base_userstarredfiles
Creating table base_dirfileslastmodifiedinfo
Creating table base_filelastmodifiedinfo
Creating table base_userenabledmodule
Creating table base_groupenabledmodule
Creating table base_userlastlogin
Creating table base_innerpubmsg
Creating table base_innerpubmsgreply
Creating table contacts_contact
Creating table wiki_personalwiki
Creating table wiki_groupwiki
Creating table group_groupmessage
Creating table group_messagereply
Creating table group_messageattachment
Creating table group_publicgroup
Creating table message_usermessage
Creating table message_usermsglastcheck
Creating table message_usermsgattachment
Creating table notifications_notification
Creating table notifications_usernotification
Creating table profile_profile
Creating table share_anonymousshare
Creating table share_fileshare
Creating table share_privatefiledirshare
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Done.

-----------------------------------------------------------------
Your seafile server configuration has been finished successfully.
-----------------------------------------------------------------
// 執行服務的方式
run seafile server:     ./seafile.sh { start | stop | restart }
run seahub  server:     ./seahub.sh  { start <port> | stop | restart <port> }
// seafile 是用上面這兩個指令來執行,跟一般用 service / chkconfig 是不同的,當然他也就不是用 /etc/init.d/xxxx start/restart 來處理
-----------------------------------------------------------------
If you are behind a firewall, remember to allow input/output of these tcp ports:
-----------------------------------------------------------------

port of ccnet server:         10001
port of seafile server:       12001
port of seafile httpserver:    8082
port of seahub:               8000    // 這個才是你對外提供服務的連接埠

When problems occur, Refer to
      https://github.com/haiwen/seafile/wiki
for information.

 

 

到這邊~~你的 seafile 就已經安裝完成了

 

執行 seafile

// ./seafile.sh { start | stop | restart }
sudo ./seafile.sh start
// ./seahub.sh  { start <port> | stop | restart <port> }
// sudo ./seahub.sh start 8080

sudo  ./seahub.sh start

 

使用者Web 介面預設是走 8000 port ,你也可以用 sudo ./seahub.sh start + port num 來指定

登入畫面


 

登入後的畫面


比較有趣的是,這套軟體是由中國所開發,所以安裝完之後就會有繁體中文的畫面,但對於上圖「資料庫」這一詞就會讓我會錯意,雖然說用資料夾來形容他的功能尚且不夠,但是資料庫的聯想又太大了,改天想到什麼好的形容方式在上來跟大家報告。

 

 ------------------------------------------------------------------

20140421 updated!

QQ:預設檔案上傳的大小為 100MB,如何修改上傳的檔案上限呢?

ANS:
Step1:修改 seafile.conf 檔案(請注意 seafile.conf 這個檔案不只在一個目錄有,請修改 seafile-data 目錄下的才對唷)
sudo vi  [seafile_directory]/seafile-data/seafile.conf
原本的 httpserver 區段只有
[httpserver]
port=8082

在底下增加一行,這意思是放寬上傳上限到500MB

max_upload_size=500

 

Step2:重新啟動 Seafile
sudo [seafile_directory]/seafile-server-2.0.3/seahub.sh restart

~End

回應
Google Search
Google
累積 | 今日
loading......
平均分數:0 顆星
投票人數:0
我要評分:
Google