Bitcoin Forum
November 26, 2022, 03:02:50 PM *
News: Reminder: do not keep your money in online accounts
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: ubuntu挖礦中文指南  (Read 9510 times)
nakowa (OP)
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
June 11, 2011, 05:55:22 AM
Last edit: June 16, 2011, 02:59:10 PM by nakowa
 #1

http://21bitcoin.com/mining-with-ubuntu-linux-guide-1.html
http://21bitcoin.com/mining-with-ubuntu-linux-guide-2.html
http://21bitcoin.com/mining-with-ubuntu-linux-guide-3.html

挖礦專用機最好使用linux操作系統——這樣有如下幾個好處:

系統佔用空間更小(甚至用一個4G的U盤就可以,連硬盤都可以省下)
對內存要求更少(Windows 7一般至少2G,Linux麼,用別人棄用的512M都可以跑得很歡⋯⋯)
安全性更高(不用擔心木馬、病毒⋯⋯)
運轉更爲穩健(儘管最初安裝有點麻煩,可這畢竟是裝一次跑很久的事情麼。)
便於遠程管理(用ssh遠程管理比用Windows的RDP方便多了,遠程打開礦機的RDP窗口幾乎是不可能的事情⋯⋯)
無需使用虛設插頭(dummy plug)(誰有功夫折騰那東西啊⋯⋯)
1. LiveUSB製作工具
Windows上製作LiveUSB的工具有Lili Live USB Creator和Fedora LiveUSB Creator。

Fedora Live USB creator也有for linux版本,在Ubuntu中可以通過以下命令安裝:

sudo apt-get install liveusb-creator
最通用的大概是UNetbootin,win/mac os/linux上都可以用。

Wikipedia上有個詳細的LiveUSB製作軟件清單,有興趣不妨去看看。

2. 下載Ubuntu安裝鏡像文件並安裝Ubuntu
由於挖礦專用機最好使用AMD/ATI的顯卡,所以,安裝Ubuntu的時候,最好選擇64位操作系統,以下的說明假設讀者用的是ubuntu-11.04-desktop-amd64.iso,並且使用ATI芯片的顯卡。

準備好一個2G大小(或更大)的U盤,製作Ubuntu LiveUSB。而後在計算機啓動之時在BIOS中設定U盤位第一啓動設備。

按照指示逐步完成Ubuntu安裝。

3. 安裝ssh服務
打開terminal,輸入以下命令而後按回車鍵執行:

sudo apt-get install ssh
如此之後,就可以在其它機器上遠程登錄並管理該計算機了(在安裝好ubuntu的機器上用ifconfig命令查看該機器IP地址):

ssh <username>@<IP address>
在測試期間可能會頻繁重新安裝系統。重新安裝系統之後,等經登錄過該計算機的機器上,再用ssh登錄可能出錯,部分出錯信息如下:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
這時候,要在ssh客戶端輸入以下命令解決問題:

ssh-keygen -R <IP address of the remote computer>
以下安裝過程完全可以在遠程終端上執行⋯⋯

4. 安裝必要程序
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install -y screen g++ libboost-all-dev subversion git-core python-numpy
5. 下載並安裝驅動程序
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run (5xxx系列和6xxx系列用得是同一個驅動程序)
wget http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.4-lnx64.tgz
wget http://pypi.python.org/packages/source/p/pyopencl/pyopencl-0.92.tar.gz
sudo sh ./ati-driver-installer-11-4-x86.x86_64.run
sudo tar xvfz AMD-APP-SDK-v2.4-lnx64.tgz -C /opt
sudo tar xvfz /opt/AMD-APP-SDK-v2.4-lnx64/icd-registration.tgz -C /
tar zxfv pyopencl-0.92.tar.gz
echo export DISPLAY=:0 >> ~/.bashrc
cd pyopencl-0.92
sudo sh -c 'echo "/opt/AMD-APP-SDK-v2.4-lnx64/lib/x86_64/" >> /etc/ld.so.conf.d/local.conf'
sudo ./configure.py --cl-inc-dir=/opt/AMD-APP-SDK-v2.4-lnx64/include/ --cl-lib-dir=/opt/AMD-APP-SDK-v2.4-lnx64/lib/x86_64
sudo ldconfig
source ~/.bashrc
make -j3
sudo make install
sudo aticonfig --initial -f --adapter=all
sudo reboot
等待機器重新啓動之後再進行以下步驟⋯⋯

6. 安裝挖礦程序
我們採用的是相對最有效率的poclbm:

cd ~/
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc
python setup.py install
cd ~/
git clone git://github.com/m0mchil/poclbm poclbm
chmod +x poclbm/poclbm.py
7. 開始挖礦!
強烈推荐去礦池挖礦——而不是單獨挖礦(1. 單獨挖礦太難;2. 去礦池挖礦不需要在礦機上安裝bitcoin客戶端)。

去礦池挖礦請使用以下命令:

cd ~/poclbm
./poclbm.py --user=*** --pass=*** --host=********* -d *
poclbm的具體參數設置請參照這篇文章。

注:本文主要參考Inaba的Ubuntu Natty Narwhal 11.04 Mining Guide / HOWTO。
1669474970
Hero Member
*
Offline Offline

Posts: 1669474970

View Profile Personal Message (Offline)

Ignore
1669474970
Reply with quote  #2

1669474970
Report to moderator
1669474970
Hero Member
*
Offline Offline

Posts: 1669474970

View Profile Personal Message (Offline)

Ignore
1669474970
Reply with quote  #2

1669474970
Report to moderator
1669474970
Hero Member
*
Offline Offline

Posts: 1669474970

View Profile Personal Message (Offline)

Ignore
1669474970
Reply with quote  #2

1669474970
Report to moderator
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1669474970
Hero Member
*
Offline Offline

Posts: 1669474970

View Profile Personal Message (Offline)

Ignore
1669474970
Reply with quote  #2

1669474970
Report to moderator
1669474970
Hero Member
*
Offline Offline

Posts: 1669474970

View Profile Personal Message (Offline)

Ignore
1669474970
Reply with quote  #2

1669474970
Report to moderator
bitgold
Sr. Member
****
Offline Offline

Activity: 353
Merit: 250


View Profile
June 15, 2011, 05:32:04 AM
 #2

很有用的信息, 多谢!
robbie
Newbie
*
Offline Offline

Activity: 22
Merit: 0



View Profile
June 29, 2011, 04:20:47 PM
 #3

非常好的信息。多谢
chunglam
Donator
Full Member
*
Offline Offline

Activity: 230
Merit: 106



View Profile
August 19, 2011, 01:32:54 PM
 #4

ubuntu上能用显卡挖吗?
fire123
Full Member
***
Offline Offline

Activity: 146
Merit: 100



View Profile
September 26, 2013, 02:47:40 PM
 #5

ubuntu上能用显卡挖吗?


可以
servicelabs
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


itkylin.com


View Profile WWW
September 26, 2013, 03:02:46 PM
 #6

不错,我也写了ubuntu下的挖矿文章,交流一下!
http://www.service-labs.com/installing-cgminer-on-ubuntu.html

viruscs
Full Member
***
Offline Offline

Activity: 160
Merit: 100


View Profile
September 26, 2013, 03:13:14 PM
 #7

linux挖矿效率低多了!

a137924685
Sr. Member
****
Offline Offline

Activity: 700
Merit: 251


Sports Tournaments on the Blockchain


View Profile WWW
September 27, 2013, 12:51:06 AM
 #8

 Shocked

YAMZU

▄▄▄▄▄▄
  ████
   ███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
  ████
▀▀▀▀▀▀
       eSports Tournaments on the Blockchain     
        Platform Already Active  10K Users  300% revenue  Established Swedish company

▄▄▄▄▄▄
  ████
   ███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
  ████
▀▀▀▀▀▀
¦Facebook   ¦ANN Thread      ¦Bounty Thread 
¦Twitter         ¦Telegram         ¦Youtube
¦Website       ¦Whitepaper    ¦Platform
oldfox126
Full Member
***
Offline Offline

Activity: 127
Merit: 100


View Profile WWW
September 27, 2013, 06:44:14 AM
 #9

linux挖矿效率低多了!

linux挖矿效率低?这是怎么说呢

kmtan
Full Member
***
Offline Offline

Activity: 196
Merit: 100


I love Bitcoin


View Profile
September 27, 2013, 08:01:41 AM
 #10

谢谢分享。。。。。

fire123
Full Member
***
Offline Offline

Activity: 146
Merit: 100



View Profile
September 27, 2013, 11:04:26 PM
 #11

linux挖矿效率低多了!

不是應該微軟系統還要高嗎?

我想應該是參數沒有設定好吧?
bittop100
Full Member
***
Offline Offline

Activity: 181
Merit: 100


View Profile
September 28, 2013, 04:09:36 PM
 #12

看看,跟踪,关注

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!