How to Build OpenSource Coin on Ububtu Linux

本文指导如何在Ubuntu Linux上构建一个基于比特币的SHA256加密货币OpenSourceCoin,包括系统要求、预设更新、依赖安装、源代码下载、构建与安装等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

How to Build OpenSource Coin on Ububtu Linux

Yet another SHA256 crypto-currency based on Bitcoin. According to the developers OpenSource Coin (OCoin) is is a SHA 256 POW/POS cryptocurrency with 1 minute block times, transaction messages and starting diff of 1, and a total of 21 million coins to be minted proof of work and unlimited proof of stake.

To build OpenSource Coin on Ubuntu is very simple as long as you are using the correct version of the operating system.

Requirements

· Ubuntu Linux 10.04.3 LTS Server 32-bit or 64-bit

· About 2 Hours of time

I am installing Ubuntu Server on a VMWare virtual machine. If you are using a regular computer or some other type of vitalization software you may skip the VMWare Tools Installation section. The rest of these instructions assume you have a fresh clean installation of Ubuntu 10.04.3 LTS all ready.

Pre-Setup

Before we continue, lets apply any pending updates and reboot:

sudo -s
apt-get update
apt-get upgrade
reboot

If you are using VMWare, the following commands will install VMWare tools with minimal effort:

sudo -s
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
ls /mnt/cdrom
tar xzvf /mnt/cdrom/VMwareTools-9.0.0-782409.tar.gz -C /tmp/
cd /tmp/vmware-tools-distrib/
./vmware-install.pl -d
reboot

Install Dependencies

Installing all the required libraries and header files is as simple as just copying and pasting each line below into your console.

sudo -s
apt-get install build-essential
apt-get install libssl-dev
apt-get install libdb4.8-dev
apt-get install libdb4.8++-dev
apt-get install libboost-all-dev
apt-get install git-core
apt-get install ntp

We install NTPd to keep our system's time in sync. This is very important for crypto-currencies.

Download Source Code, Build, and Install

Now comes the exciting part. We download the OpenSource Coin source from the GIT repository then build the binary. Just copy and paste each line below into your console.

cd /usr/local/
git clone https://github.com/r3wt/OSC.git 
cd OSC/
cd src/
make -f makefile.unix USE_UPNP=

The build should take about 1 hour to complete depending on the speed of your system. When done, finish up the process by removing the debug symbols from the OpenSource Coin binary. Lastly copy the binary to it's final install location:

strip Ocoind
cp Ocoind ..

Congratulations! OpenSource Coin has been built and installed.

Final Steps

We need to install a configuration file and the startup scripts. Luckily for you this can be done with just a few more commands that you can copy and paste into your console:

wget -qO /etc/init.d/ocoin http://www.unibia.com/unibianet/sites/default/files/ocoin-init.txt 
wget -qO /etc/default/ocoin http://www.unibia.com/unibianet/sites/default/files/ocoin-default.txt 
wget -qO /etc/ocoin.conf http://www.unibia.com/unibianet/sites/default/files/ocoin-conf.txt 
mkdir -p -m 777 /var/db/ocoin
chmod +x /etc/init.d/ocoin

The configuration file needs to be adjusted to your needs. Mostly you need to setup a "rpcpassword". Edit the file /etc/ocoin.conf using your favorite editor. On Ubuntu 10.04.3LTS you can use "nano /etc/ocoin.conf".

rpcuser=admin
rpcpassword=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
rpcport=38532
port=28532
rpcallowip=127.0.0.1
rpcallowip=192.168.0.*
maxconnections=300
addnode=63.247.147.163
gen=0
server=1
listen=1
daemon=1
logtimestamps=1

You should be able to start, stop, and check the status of the OpenSource Coin service with these commands:

service ocoin stop
service ocoin start
service ocoin status

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值