壹比特移动版 (返回桌面版)
壹比特»壹比特论坛 数字资产社区 挖矿交流专区 How to quickly get Litecoin up and running on a Linu ...
返回列表 发新帖
查看: 1308|回复: 0

How to quickly get Litecoin up and running on a Linux server

[复制链接]
发表于 2012-11-20 17:37:23 | 显示全部楼层 |阅读模式
In this guide, you'll learn how to Obtain packages needed for compiling, Download the source code, how to actually Compile and install Litecoin, and alsoConfiguring litecoin
This guide will be for Debian and *buntu distro's, so if you're using a redhat based distro such as fedora, or something like gentoo, you'll have to figure out the packages by yourself.

Step 1 - Obtaining the packages
The instructions slightly differ whether you're running an Ubuntu based distro, or a Debian stable based distro:
For Ubuntu:
Code: [Select]
sudo apt-get install build-essential libssl-dev libdb5.1-dev libdb5.1++-dev libboost-all-dev gitFor Debian (stable)
Code: [Select]
sudo apt-get install build-essential libssl-dev libdb4.8-dev libdb4.8++-dev libboost-all-dev git
Step 2 - Downloading the source code for Litecoin
This step will download the required files from coblee's Github repository, this same line can be used across all distro's if the git package is installed.
Code: [Select]
git clone git://github.com/litecoin-project/litecoin.git
Step 3 - Compiling and installing Litecoin
So, you've downloaded the source code, obtained the prequisites, and now you're ready for compiling.
The files should've been saved into the current directory under the folder name "litecoin"
First, you must Change Directory into the src folder which is within the litecoin folder
Code: [Select]
cd litecoin/srcNext we must find out how many cores we have
Code: [Select]
cat /proc/cpuinfo | grep -i "model name"You should get output similar to this:
Code: [Select]
someguy@master:~/litecoin/src $ cat /proc/cpuinfo | grep -i "model name"
model name      : Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
model name      : Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
model name      : Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
model name      : Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
If you have 4 lines of "model name:", then this means you have 4 cores or CPU's. If you have just 1, you only have a single core available.

Now that we know this, we can continue to compile Litecoin
Change -j4 to the amount of cores you have, you can find this out by following the previous instructions above ^^^^
Code: [Select]
make -j4 -f makefile.unix USE_UPNP=If there were no errors, we can continue to the last part, if you saw something similar to "exiting: error" or "make error", you may need to make sure you've installed all of the prequisites, and that your system is up to date ( sudo apt-get upgrade )
We're almost done, the last step is to copy litecoind into /usr/bin
Code: [Select]
sudo cp litecoind /usr/bin/litecoind
Now that litecoind is installed, we just need to create a config file.
First, create the .litecoin dir to ensure it exists.
Code: [Select]
mkdir ~/.litecoinYou can create the ~/.litecoin/litecoin.conf from another computer and upload it via FTP or SCP if needed.

To create and edit the config, we're going to use nano, if you have a different editor in mind, feel free to use that instead.
Code: [Select]
nano ~/.litecoin/litecoin.conf
Enter the following text:
Code: [Select]
server=1
rpcallowip=127.0.0.1
rpcuser=HardToGuessUsername
rpcpassword=Str0ngS3cur3Passw0rd1
REMEMBER TO CHANGE THE USERNAME AND PASSWORD TO SOMETHING DIFFERENT, THIS IS JUST AN EXAMPLE.
(OPTIONAL):
If you're going to be accessing the daemon remotely, you should remove the rpcallowip= line, or add another line which says

Code: [Select]
rpcallowip=YOURIPADDRESS
We can finally start the daemon:
Code: [Select]
litecoind -daemonYou will get a message that saysCode: [Select]
litecoin server starting
We can now check that this is working properly using:
Code: [Select]
litecoind getinfo
This should output something similar to:
Code: [Select]
{
    "version" : 60300,
    "protocolversion" : 60001,
    "walletversion" : 10500,
    "balance" : 0.00000000,
    "blocks" : 1234,
    "connections" : 9,
    "proxy" : "",
    "difficulty" : 10.43114940,
    "testnet" : false,
    "keypoololdest" : 1328988194,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "mininput" : 0.00010000,
    "errors" : ""
}

You can repeat the command to check how many blocks your daemon has retrieved so far, once your block count is the same as the most recent block onhttp://explorer.litecoin.net you can now use the daemon in your server programs, or for a pool.

If you need any help, simply post in the thread, PM me on here/bitcointalk, or message me on Freenode IRC (I'm someguy123)
回复

使用道具 举报

返回列表 发新帖
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|www.yibite.com ( 浙ICP备13029811号  

GMT+8, 2014-8-20 22:34 , Processed in 0.043856 second(s), 8 queries , Memcache On.

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表