8.4 KiB
Build and Run rippled on Ubuntu
rippled is the core peer-to-peer server that manages the XRP Ledger. A rippled server can connect to a network of peers, relay cryptographically signed transactions, and maintain a local copy of the complete shared global ledger.
For an overview of rippled, see Operating rippled Servers.
Use these instructions to build a rippled executable from source version 0.90.0 or higher on Ubuntu Linux 16.04 or higher. These instructions were tested on Ubuntu 16.04 LTS.
For information about building rippled for other platforms, see Builds in the rippled GitHub repository.
System Requirements
To build rippled:
You need a minimum of 8GB of RAM.
To run rippled:
Meet these system requirements.
1. Build rippled
These instructions use Ubuntu's APT (Advanced Packaging Tool) to install the software prerequisites you need to build and run rippled.
-
Update the list of packages that are available for
apt-getto install or upgrade.sudo apt-get update -
Upgrade currently installed packages.
sudo apt-get -y upgrade -
Install Git.
sudo apt-get -y install git -
Install SCons.
sudo apt-get -y install scons -
Install
pkg-config.sudo apt-get -y install pkg-config -
Install Protocol Buffers.
sudo apt-get -y install protobuf-compiler sudo apt-get -y install libprotobuf-dev -
Install Secure Socket Layer (SSL) toolkit development files.
sudo apt-get -y install libssl-dev -
Install
wgetto be able to download Boost in the next step.sudo apt-get install wget -
Compile Boost.
Starting in
rippled0.90, the compatible Boost version is 1.65.0. Because Boost version 1.65.0 isn't available in the Ubuntu 16.04 repos, you'll need to compile it yourself. TODO: Per Scott D, the recommendation will be either 1.65.0 or 1.66.0+ for 0.90.0. Per Scott D, test with 1.65.0 first; this doc reflects that test. If this PR is accepted, the recommendation will be 1.66.0+a. Download Boost 1.65.0.
wget https://dl.bintray.com/boostorg/release/1.65.0/source/boost_1_65_0.tar.gz ***TODO: If 1.66.0: https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz***b. Untar
boost_1_65_0.tar.gz. TODO: If 1.66.0, boost_1_66_0.tar.gztar xvzf boost_1_65_0.tar.gz ***TODO: If 1.66.0, boost_1_66_0.tar.gz***c. In the new
boost_1_65_0directory, run: TODO: If 1.66.0, boost_1_66_0./bootstrap.shd. Then run the following command. Replace
<number of jobs>with the number of CPUs. This may take about 20 minutes, depending on your hardware specs../b2 -j<number of jobs>e. Set the environment variable
BOOST_ROOTto point to the newboost_1_65_0directory. TODO: If 1.66.0, boost_1_66_0 It's best to put this environment variable in your.profile, or equivalent, file for your shell so it's automatically set when you log in. Add the following line to the file:export BOOST_ROOT=/home/ubuntu/boost_1_65_0 ***TODO: If 1.66.0, boost_1_66_0*** -
Get
rippledsource code.git clone https://github.com/ripple/rippled.git cd rippled git checkout master -
Build
rippledbinary executable from source code. This may take about 30 minutes, depending on your hardware specs.scons ***TODO: If 1.66.0, I get errors. Expect that the errors will go away after Scott D's PR is applied to rippled***SCons saves the built executable in
rippled/build.
2. Configure rippled
Complete the following configurations that are required for rippled to start up successfully. All other configuration is optional and can be tweaked after you have a working server.
-
Create a copy of the example config file (assumes you're in the
rippledfolder already). Saving the config file to this location enables you to runrippledas a non-root user (recommended).mkdir -p ~/.config/ripple cp doc/rippled-example.cfg ~/.config/ripple/rippled.cfg -
Edit the config file to set necessary file paths. The user you plan to run
rippledas must have write permissions to all of the paths you specify here.-
Set the
[node_db]'s path to the location where you want to store the ledger database. -
Set the
[database_path]to the location where you want to store other database data. (This includes an SQLite database with configuration data, and is typically one level above the[node_db]path field.) -
Set the
[debug_logfile]to a path whererippledcan write logging information.
-
-
Copy the example
validators.txtfile to the same folder asrippled.cfg:cp doc/validators-example.txt ~/.config/ripple/validators.txtWarning: Ripple has designed a decentralization plan with maximum safety in mind. During the transition, you should not modify the
validators.txtfile except as recommended by Ripple. Even minor modifications to your validator settings could cause your server to diverge from the rest of the network and report out of date, incomplete, or inaccurate data. Acting on such data can cause you to lose money.
3. Run rippled
To run your stock rippled server from the executable you built, using the configurations you defined:
cd build
./rippled
What to Expect
Once you've run rippled, here are excerpts of what you can expect to see in your terminal.
Loading: "/home/ubuntu/.config/ripple/rippled.cfg"
Watchdog: Launching child 1
2018-Jan-08 22:26:59 JobQueue:NFO Auto-tuning to 4 validation/transaction/proposal threads.
2018-Jan-08 22:26:59 Amendments:DBG Amendment C6970A8B603D8778783B61C0D445C23D1633CCFAEF0D43E7DBCD1521D34BD7C3 is supported.
2018-Jan-08 22:26:59 Amendments:DBG Amendment 4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373 is supported.
...
2018-Jan-08 22:26:59 ValidatorList:DBG Loading configured trusted validator list publisher keys
...
2018-Jan-08 22:26:59 ValidatorList:DBG Loading configured validator keys
...
2018-Jan-08 22:26:59 ValidatorSite:DBG Loading configured validator list sites
...
2018-Jan-08 22:26:59 LedgerConsensus:NFO Entering consensus process, watching, synced=no
...
2018-Jan-08 22:27:01 LedgerConsensus:WRN
{
"accepted" : true,
"account_hash" : "183D5235C7C1FB5AE67AD2F6CC3B28F5FB86E8C4F89DB50DD85641A96470534E",
"close_flags" : 0,
"close_time" : 568765620,
"close_time_human" : "2018-Jan-08 22:27:00",
"close_time_resolution" : 30,
"closed" : true,
"hash" : "CD08E1D9574262BC137CD2B2A9020F52D25A6BD78551EB0FCAD08D40C707CD8B",
"ledger_hash" : "CD08E1D9574262BC137CD2B2A9020F52D25A6BD78551EB0FCAD08D40C707CD8B",
"ledger_index" : "2",
"parent_close_time" : 0,
"parent_hash" : "AB868A6CFEEC779C2FF845C0AF00A642259986AF40C01976A7F842B6918936C7",
"seqNum" : "2",
"totalCoins" : "100000000000000000",
"total_coins" : "100000000000000000",
"transaction_hash" : "0000000000000000000000000000000000000000000000000000000000000000"
}
...
2018-Jan-08 22:27:06 NetworkOPs:WRN We are not running on the consensus ledger
2018-Jan-08 22:27:06 LedgerConsensus:WRN Need consensus ledger E836108FDF6C651B15D5F5EA3E19F76CE3F7247188E01F6DBBA455F6738E4DED
...
2018-Jan-08 22:35:09 OpenLedger:WRN Offer involves frozen asset
2018-Jan-08 22:35:12 LedgerConsensus:WRN Offer involves frozen asset
Explore Next Steps
-
Now that you have a stock
rippledserver running, you may want to consider running it as a validating server. For information about validating servers and why you might want to run one, see the rippled Setup Tutorial. -
For information about communicating with your
rippledserver using therippledAPI, see therippledAPI reference. -
As a development best practice, you may want to build a
rippled.deb file. For more information, see Ubuntu Packaging Guide: Packaging New Software. -
You may also want to install a
systemdunit. For more information, see systemd for Upstart Users. You can use the officialrippledsystem unit file or modify it to suit your needs.