This tutorial will make you learn to set up a Tron full node on the mainnet. Let us first go through the prerequisites.
Ubuntu 16.04 LTS AWS Server with minimum 16 CPUs, 64 GB RAM, 250GB Storage.
Update the Ubuntu server:
$ apt-get update
$ sudo apt-get upgradeInstall Oracle JDK on the Ubuntu server:
You will first need to install java runtime environment on the server. It is recommended to use Oracle JDK 8 for Tron node. Run the following commands –
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
There can be multiple JDK installations on the server. You can choose your version using this command –
$ sudo update-alternatives –config java You can then choose the version you want to use. After the choosing the jdk version, you will need to set JAVA_HOME environment variable using this command –
$ sudo nano /etc/environment Add the following at the end of the file –
JAVA_HOME=”/usr/lib/jvm/java-8-oracle/jre” Make sure you put your own jdk path within the quotes. Then save and exit the file and reload it using this command –
$ source /etc/environment You can check the environment variable by using this command –
$ echo $JAVA_HOMEInstall screen:
You can install screen using the following command –
$ sudo apt-get update && sudo apt-get install screen -y Download and run the script to deploy the node:
You can download the script from github using this command –
$ wget https://raw.githubusercontent.com/tronprotocol/TronDeployment/master/deploy_tron.sh -0 deploy_tron.sh
$ bash deploy_tron.sh –app FullNode –net mainnet Since the newer versions does not display the nodes running on the same screen, you will need to tail the logs to see the nodes syncing with the main network once the script above is executed successfully. Open another terminal and use these commands –
$ cd FullNode/logs
$ tail -f tron.log Now you can see the node syncing and downloading blocks on the Tron mainnet !!!