請教有關Synology DS212+ 如何安裝git server

DS212+規格
• CPU 頻率:2.0GHz
• 記憶體:512MB
• 內部硬碟:2X 3.5” or 2X 2.5” SATA/SSD
• 最大內部儲存容量:6TB (2X 3TB 硬碟) (不包含硬碟)
• 熱插拔硬碟
• 大小 (高度x寬度x厚度):165mm x 108mm x 233.2mm
• 外接儲存介面:USB 3.0 X 2、USB 2.0 X 1、eSATA 埠 X 1、SD 卡插槽 X 1
• 網路喚醒
• 重量:1.25 公斤
• 網路:Gigabit X1
• 無線網卡支援 (不含無線網卡)
• 硬體加密引擎
• 風扇:X1(92 X 92mm)
• 電源自動回復
• AC輸入電壓:100V 到 240V
• 電源消耗功率 1 :18.7W (存取);7.9W (硬碟休眠)

大家好我想在DS212+上面袈git server

我參考了以下這篇架設SVN的文章開始操作但是我一直遇到一些問題
http://taiwanwolf.blogspot.com/2011/03/synology-ds411-ipkg-svn.html
文章說明安裝SVN前必須先安裝ipkg,於是我
1.先用root ssh登入主機,
2.cd /volume1/@tmp
3.wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh
4.chmod +x syno-i686-bootstrap_1.2-7_i686.xsh
5.sh ./syno-i686-bootstrap_1.2-7_i686.xsh

但在執行script時出現了一些錯誤訊息不像該篇文章那麼順利可以完成安裝ipkg:
Optware Bootstrap for syno-i686.
Extracting archive... please wait
bootstrap/
bootstrap/bootstrap.sh
bootstrap/ipkg-opt.ipk
bootstrap/ipkg.sh
bootstrap/optware-bootstrap.ipk
bootstrap/wget.ipk
1215+1 records in
1215+1 records out
Creating temporary ipkg repository...
Installing optware-bootstrap package...
Unpacking optware-bootstrap.ipk...Done.
Configuring optware-bootstrap.ipk...mount: mounting /volume1/@optware on /opt failed: No such file or directory
mkdir: can't create directory '/opt/etc': No such file or directory
chmod: /opt/etc: No such file or directory
mkdir: can't create directory '/opt/var/': No such file or directory
chmod: /opt/var: No such file or directory
mkdir: can't create directory '/opt/tmp': No such file or directory
chmod: /opt/tmp: No such file or directory
mkdir: can't create directory '/opt/lib': No such file or directory
chmod: /opt/lib: No such file or directory
//tmp/ipkg/info/optware-bootstrap.ipk.preinst failed. Aborting installation of optware-bootstrap.ipk
Installing ipkg...
Unpacking ipkg-opt.ipk...Done.
Configuring ipkg-opt.ipk...WARNING: can't open config file: /usr/syno/ssl/openssl.cnf
tar: can't make dir ./opt/share: No such file or directory
tar: can't create directory './opt/share': No such file or directory
tar: can't make dir ./opt/share/ipkg: No such file or directory
tar: can't create directory './opt/share/': No such file or directory
tar: can't make dir ./opt/share/: No such file or directory
tar: can't create directory './opt/share/': No such file or directory
tar: can't open './opt/share/': Is a directory
Done.
Removing temporary ipkg repository...
Installing wget...
bootstrap.sh: line 55: /opt/bin/ipkg: not found


BusyBox v1.16.1 (2011-11-26 14:58:46 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

我也曾依照這篇文章的方式操作
http://www.synology-forum.nl/viewtopic.php?t=7517&p=35737

也是遇到一樣的現象
Optware Bootstrap for syno-mvkw.
Extracting archive... please wait
bootstrap/
bootstrap/optware-bootstrap.ipk
bootstrap/wget.ipk
bootstrap/bootstrap.sh
bootstrap/ipkg.sh
1227+1 records in
1227+1 records out
bootstrap/ipkg-opt.ipk
Creating temporary ipkg repository...
Installing optware-bootstrap package...
Unpacking optware-bootstrap.ipk...Done.
Configuring optware-bootstrap.ipk...mount: mounting /volume1/@optware on /opt failed: No such file or directory
mkdir: can't create directory '/opt/etc': No such file or directory
chmod: /opt/etc: No such file or directory
mkdir: can't create directory '/opt/var/': No such file or directory
chmod: /opt/var: No such file or directory
mkdir: can't create directory '/opt/tmp': No such file or directory
chmod: /opt/tmp: No such file or directory
mkdir: can't create directory '/opt/lib': No such file or directory
chmod: /opt/lib: No such file or directory
//tmp/ipkg/info/optware-bootstrap.ipk.preinst failed. Aborting installation of optware-bootstrap.ipk
Installing ipkg...
Unpacking ipkg-opt.ipk...Done.
Configuring ipkg-opt.ipk...WARNING: can't open config file: /usr/syno/ssl/openssl.cnf
tar: can't make dir ./opt/share: No such file or directory
tar: can't create directory './opt/share': No such file or directory
tar: can't make dir ./opt/share/ipkg: No such file or directory
tar: can't create directory './opt/share/': No such file or directory
tar: can't make dir ./opt/share/: No such file or directory
tar: can't create directory './opt/share/': No such file or directory
tar: can't open './opt/share/': Is a directory
Done.
Removing temporary ipkg repository...
Installing wget...
bootstrap.sh: line 55: /opt/bin/ipkg: not found


BusyBox v1.16.1 (2011-11-26 14:58:46 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

由於我找不到ds212+有人成功安裝ipkg相關的討論

請問有誰知道該如何解決這個問題嗎?
2011-12-13 23:13 發佈
第二個才是對的。
你是用 root 登入嗎?要用 root 不是 admin 帳號。但是密碼是 admin 密碼。
數位天堂 http://digiland.tw/

若雪 wrote:
第二個才是對的。你是...(恕刪)


嗯嗯 我用的是root登入時key in 的也是admin的密碼,
我也下載過好幾個script檔實驗過,
但每次在執行script檔時都不像別人有安裝ipkg完成的訊息
一個真正的朋友是向著你伸手,觸動你心靈的人,但這個世界永遠也會有一些傷害你的人,你要做的就是繼續去相信
Aven138 wrote:
先查閱CPU
What kind of CPU does my NAS have

再安裝Bootstrap.
Bootstrap
How to Install Bootstrap


1.我查閱過DS212+ 的CPU是Marvell Kirkwood mv6282 2.0Ghz ARM Processor (Marvell ARMADA 300)

2.依照bootstrap教學
我的CPU是Marvell Kirkwood mv6282 所以我就在我的FTP資料夾下下載了wget
http://wizjos.endofinternet.net/synology/archief/syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh 這個script

WTDiskStation> wget http://wizjos.endofinternet.net/synology/archief/syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh(不可斷行要注意喔!!)
--12:22:19-- http://wizjos.endofinternet.net/synology/archief/syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh
=> `syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh'
Resolving wizjos.endofinternet.net... 94.212.230.66
Connecting to wizjos.endofinternet.net|94.212.230.66|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 251,866 (246K) [text/plain]

100%[====================================>] 251,866 108.42K/s

12:22:22 (108.33 KB/s) - `syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh' saved [251866/251866]

WTDiskStation>
WTDiskStation> ls -al
drwxrwxrwx 2 root root 4096 Dec 14 12:22 .
drwxr-xr-x 15 root root 4096 Dec 14 12:11 ..
-rw-rw-rw- 1 root root 251866 Nov 25 2010 syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh


3.install bootstrap
我使用ssh 用 root帳號 登入我的nas後,進到FTP資料夾(與script檔案一起的資料夾)下了指令
sh syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh

之後這次竟然成功了


WTDiskStation> sh syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh
Optware Bootstrap for syno-mvkw.
Extracting archive... please wait
bootstrap/
bootstrap/optware-bootstrap.ipk
bootstrap/wget.ipk
bootstrap/bootstrap.sh
bootstrap/ipkg.sh
1227+1 records in
1227+1 records out
bootstrap/ipkg-opt.ipk
Creating temporary ipkg repository...
Installing optware-bootstrap package...
Unpacking optware-bootstrap.ipk...Done.
Configuring optware-bootstrap.ipk...Done.
Installing ipkg...
Unpacking ipkg-opt.ipk...Done.
Configuring ipkg-opt.ipk...WARNING: can't open config file: /usr/syno/ssl/openssl.cnf
Done.
Removing temporary ipkg repository...
Installing wget...
Installing wget (1.12-2) to root...
Configuring wget
Successfully terminated.
Creating /opt/etc/ipkg/cross-feed.conf...
Setup complete.


BusyBox v1.16.1 (2011-11-26 14:58:46 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

4. ipkg update
WTDiskStation> ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/cross
Successfully terminated.

5,WTDiskStation> ipkg upgrade
Nothing to be done
Successfully terminated.


我一樣的步驟今天試了兩次,本來都在/Volume1/@tmp下試驗,後來換到/Volume1/FTP下實驗,不知道為什麼第一次還是失敗,後來我再試一次這次就然就成功了 終於可以做下一步了 感謝大家的幫忙
一個真正的朋友是向著你伸手,觸動你心靈的人,但這個世界永遠也會有一些傷害你的人,你要做的就是繼續去相信
成功安裝了ipkg之後,接著利用ipkg來安裝git程式

輸入ipkg install git 接著就會自動安裝git相關的套件

6.ipkg install git

當git安裝完成之後就可以開始使用了! :D

PS:順便提供一個在使用DS212+當git server時遇到的問題

當我在DS 212+ 上面建立好一個git server 資料庫時
ex:

mkdir git_server
cd git_server
git init --bare

在遠端的使用者要push 資料回到資料庫竟然會顯示
git push origin master
ash: git-receive-pack: not found

原因:
找不到NAS上的git-receive-pack檔案位置
我的NAS裝完git之後預設的git-receive-pack位置在/opt/bin 底下

解法
遠端使用者必須編輯.git/config 檔案
增加git-upload-pack檔案路徑
增加git-receive-pack檔案路徑

ex:
在遠端使用者欲push到git server的資料夾下
vim .git/config
.git/config 原来的内容:

[remote "origin"]
url = <the repo address>
fetch = +refs/heads/*:refs/remotes/origin/*

找到remote "origin" 修改之后的内容:

[remote "origin"]
url = <the repo address>
fetch = +refs/heads/*:refs/remotes/origin/*
uploadpack = </opt/bin/git-upload-pack>
receivepack = </opt/bin/git-receive-pack>

修改完之後存檔
再push 一次應該就可以解決這問題了

git push origin master

詳細資料可以參考以下網頁
http://liuhui998.com/2010/10/25/git-over-ssh-config-problem/
一個真正的朋友是向著你伸手,觸動你心靈的人,但這個世界永遠也會有一些傷害你的人,你要做的就是繼續去相信
感謝分享,原來還可以把Git Server裝在NAS上啊...

不知道如果是atom CPU的也可以裝嗎?

市集達人 wrote:
感謝分享,原來還可以...(恕刪)


不客氣啦我也只是個NAS新手很多東西都還在摸索

若是使用atom cpu 應該也是可以安裝git但我是沒有安裝過

不過你可以參考看看底下這一篇文章喔
http://www.mobile01.com/topicdetail.php?f=494&t=1445267
一個真正的朋友是向著你伸手,觸動你心靈的人,但這個世界永遠也會有一些傷害你的人,你要做的就是繼續去相信
內文搜尋
X
評分
評分
複製連結
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?