PageSourceSearch

https://elastos-wiki.netlify.app/assets/js/dcaaf7e3.5573feb9.js

js elastos-wiki.netlify.app collected 2026-10-03 10:45:13 UTC 26,331 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8846],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>g});var a=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,l=function(e,t){if(null==e)return{};var n,a,l={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var i=a.createContext({}),d=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},p=function(e){var t=d(e.components);return a.createElement(i.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,o=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=d(n),m=l,g=u["".concat(i,".").concat(m)]||u[m]||c[m]||o;return n?a.createElement(g,r(r({ref:t},p),{},{components:n})):a.createElement(g,r({ref:t},p))}));function g(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var o=n.length,r=new Array(o);r[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[u]="string"==typeof e?e:l,r[1]=s;for(var d=2;d<o;d++)r[d]=n[d];return a.createElement.apply(null,r)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},9832:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>g,frontMatter:()=>s,metadata:()=>d,toc:()=>u});var a=n(7462),l=n(3366),o=(n(7294),n(3905)),r=["components"],s={title:"Detailed Setup"},i=void 0,d={unversionedId:"nodes/advanced",id:"nodes/advanced",title:"Detailed Setup",de
1scription:"Install node.sh",source:"@site/../docs/5.nodes/advanced.md",sourceDirName:"5.nodes",slug:"/nodes/advanced",permalink:"/nodes/advanced",draft:!1,editUrl:"https://github.com/elastos/Elastos.Wiki/edit/master/website/../docs/5.nodes/advanced.md",tags:[],version:"current",lastUpdatedBy:"racollette",lastUpdatedAt:1682607517,formattedLastUpdatedAt:"Apr 27, 2023",frontMatter:{title:"Detailed Setup"},sidebar:"nodesSidebar",previous:{title:"Quick Setup",permalink:"/nodes/quick-setup"},next:{title:"Basic Security Considerations",permalink:"/nodes/security"}},p={},u=[{value:"Install node.sh",id:"install-nodesh",level:2},{value:"Run node.sh",id:"run-nodesh",level:2},{value:"Installing nodes",id:"installing-nodes",level:2},{value:"Starting individual nodes",id:"starting-individual-nodes",level:2},{value:"Starting all nodes",id:"starting-all-nodes",level:2},{value:"Check node version and status",id:"check-node-version-and-status",level:2},{value:"Auto-start when OS Reboot",id:"auto-start-when-os-reboot",level:2},{value:"Stopping nodes",id:"stopping-nodes",level:2},{value:"Directory structure",id:"directory-structure",level:2},{value:"Updating node.sh",id:"updating-nodesh",level:2},{value:"Updating an individual node",id:"updating-an-individual-node",level:2},{value:"Compress log files",id:"compress-log-files",level:2}],c={toc:u},m="wrapper";function g(e){var t=e.components,n=(0,l.Z)(e,r);return(0,o.kt)(m,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"install-nodesh"},"Install node.sh"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"node.sh")," is a wrapper script to help you manage your Elastos supernode relatively easily."),(0,o.kt)("p",null,"Setting up, operating and maintaining a supernode can involve a lot of work, especially considering the Elastos platform includes multiple blockcahins, components and modes."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"node.sh")," simplies this process and provides users with a simple and effective methodology to manage their supernode."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"node.sh integrates some frequently-used operations and provides a command-line interface in an all-in-one, intuitive, and consistent way.")),(0,o.kt)("p",null,"node.sh supports:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Operating System"),": Ubuntu Linux x86_64 18.04 or higher"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Elastos Network"),": Mainnet"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/nodes/overview"},(0,o.kt)("strong",{parentName:"a"},"Chains")),": Elastos mainchain, sidechains, oracles, and the arbitrator")),(0,o.kt)("p",null,"To begin, create a folder in your HOME to hold executable files, config files, and data files."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"mkdir ~/node\ncd ~/node\n")),(0,o.kt)("p",null,"Download the current version of the script and make it executable."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"curl -O https://raw.githubusercontent.com/elastos/Elastos.Node/master/build/skeleton/node.sh\nchmod a+x node.sh\n")),(0,o.kt)("h2",{id:"run-nodesh"},"Run node.sh"),(0,o.kt)("p",null,"Run the script without any arguments to display the usage."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh\n")),(0,o.kt)("p",null,"If the output is similar to the following, then the installation is good."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"Usage: node.sh [CHAIN] COMMAND [OPTIONS]\nManage Elastos Node (/home/ubuntu/node) [mainnet]\n\nAvailable Chains:\n\n  ela             N/A\n  did             N/A\n  esc             N/A\n  esc-oracle      N/A\n  eid             N/A\n  eid-oracle      N/A\n  arbiter         N/A\n  carrier         N/A\n\nAvailable Commands:\n\n  start           Start chain daemon\n  stop            Stop chain daemon\n  status          Print chain daemon status\n  client          Run chain client\n  jsonrpc         Call JSON-RPC API\n  update          Install or update chain\n  init            Install and configure chain\n  compress_log    Compress log files to save disk space\n")),(0,o.kt)("p",null,"Currently, the only supported Elastos network is mainnet."),(0,o.kt)("p",null,"The first argument ",(0,o.kt)("strong",{parentName:"p"}
1,"CHAIN")," specifies the chain (program) name."),(0,o.kt)("p",null,"The second one, ",(0,o.kt)("strong",{parentName:"p"},"COMMAND")," specifies the action to perform."),(0,o.kt)("p",null,"The N/A means a chain has not been installed."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Please be notified that the CHAIN argument is optional. If it is absent, all chains will be issued COMMAND.")),(0,o.kt)("h2",{id:"installing-nodes"},"Installing nodes"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"init")," command will download the prebuilt binary package, extract and place the executables in the right place, and write the config files required."),(0,o.kt)("p",null,"The binary releases are listed for reference. Normally you don't need to manually download them, because ",(0,o.kt)("inlineCode",{parentName:"p"},"init")," commands will download them automatically."),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Chain"),(0,o.kt)("th",{parentName:"tr",align:null},"Binary Packages"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Elastos ELA Mainchain"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://download.elastos.io/elastos-ela"},"https://download.elastos.io/elastos-ela"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Elastos DID Sidechain"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://download.elastos.io/elastos-did"},"https://download.elastos.io/elastos-did"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Elastos ESC Sidechain"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://download.elastos.io/elastos-esc"},"https://download.elastos.io/elastos-esc"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Elastos ESC Oracle"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://download.elastos.io/elastos-esc-oracle"},"https://download.elastos.io/elastos-esc-oracle"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Elastos EID Sidechain"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://download.elastos.io/elastos-eid"},"https://download.elastos.io/elastos-eid"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Elastos EID Oracle"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://download.elastos.io/elastos-eid-oracle"},"https://download.elastos.io/elastos-eid-oracle"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Elastos Arbiter"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://download.elastos.io/elastos-arbiter"},"https://download.elastos.io/elastos-arbiter"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Elastos Carrier Bootstrap"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://download.elastos.io/elastos-carrier"},"https://download.elastos.io/elastos-carrier"))))),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"init")," command without specifying the chain program name will process the following programs (chains) in one go."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh init\n")),(0,o.kt)("p",null,"As an alternative, you can also run the init command one by one."),(0,o.kt)("h2",{id:"starting-individual-nodes"},"Starting individual nodes"),(0,o.kt)("p",null,"Starting a single program."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh ela start\nStarting ela...\nela         v0.8.3          Running\n...\n")),(0,o.kt)("p",null,"Please note that it takes some time to validate the database."),(0,o.kt)("p",null,"Checking program status."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh ela status\nela         v0.8.3          Running\nDisk:       360M\nPID:        120480\nRAM:        1486252K\nUptime:     15:38\n#Files:     83\nTCP Ports:  IPv4_*:20338 IPv6_*:20338 IPv4_*:20339 IPv6_*:20339 IPv4_*:20336\n#TCP:       14\n#Peers:     8\nHeight:     173154\n")),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Status Item"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Disk"),(0,o.kt)("td",{parentName:"tr",align:null},"The disk usage in human-readable format")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"PID"),(0,o.kt)("td",{parentName:"tr",align:null},"Process id")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"RAM"),(0,o.kt)("td",{parentName:"tr",align:null},"The memory usage in human-readable format")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Uptime"),(0,o.kt)("td",{parentName:"tr",align:null},"How long the program has been running")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"#Files"),(0,o.kt)("td",{parentName:"tr",align:null},"How many file descriptors opened")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"TCP Ports"),(0,o.kt)("td",{parentName:"tr",align:null},"The TCP ports listened")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"#TCP"),(0,o.kt)("td",{parentName:"tr",align:null},"How to many tcp connections")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"#Peers"),(0,o.kt)("td",{parentName:"tr",align:null},"How many peers connected")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Height"),(0,o.kt)("td",{parentName:"tr",align:null},"The height of the chain")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Address"),(0,o.kt)("td",{parentName:"tr",align:null},"The ELA address of the first account in keystore")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Public Key"),(0,o.kt)("td",{parentName:"tr",align:null},"The ELA public key of the first account in keystore")))),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Please note that not all chains/programs have the same set of status items. For example, if some programs don't open a TCP port, its status output will not have TCP-related metrics. If some program is not a chain, for example, ESC-Oracle, the status will not have Peer and Height related.")),(0,o.kt)("h2",{id:"starting-all-nodes"},"Starting all nodes"),(0,o.kt)("p",null,"By running the ",(0,o.kt)("strong",{parentName:"p"},"start")," command without chain/program name. All installed chains/programs will be started in a predefined order."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh start\n[ ... many messages follow ... ]\n")),(0,o.kt)("p",null,"If you wish to check processes status, the resources usage and other metrics."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"~/node/node.sh status\n[ ... many messages follow ... ]\n")),(0,o.kt)("h2",{id:"check-node-version-and-status"},"Check node version and status"),(0,o.kt)("p",null,"Now you can check all chain ",(0,o.kt)("strong",{parentName:"p"},"versions")," under Available Chains."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh status\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"ela         v0.8.3          Running\nDisk:       20G\nAddress:    8MjraAMbw6skAPTtBQtEmBo4GrN4qSvko3\nPublic Key: 036c579f8a7ed991cdfea81ad8dfbce6456bafead163a4697554ea4e28315a1f2e\nBalance:    0.00400000\nPID:        2021\nRAM:        3.9G\nUptime:     8-22:30:20\n#Files:     674\nTCP Ports:  IPv4_*:20338 IPv6_*:20338 IPv4_*:20339 IPv6_*:20339 IPv4_*:20336 IPv6_*:20334 IPv6_*:20333\n#TCP:       151\n#Peers:     30\nHeight:     1276881\nDPoS Name:  N/A\nDPoS State: N/A\nCRC Name:   N/A\nCRC State:  N/A\n\ndid         v0.3.2          Stopped\nDisk:       9.3G\n\nesc         acf34fd         Running\nDisk:       57G\nAddress:    bf66b1bd13295a8e66afc8d6743dc19ae01db603\nBalance:    4.982691949257692738\nPID:        2347\nRAM:        7.5G\nUptime:     8-22:30:17\n#Files:     2128\nTCP Ports:  IPv4_*:20639 IPv6_*:20639 IPv6_*:20638\n#TCP:       69\nUDP Ports:  IPv6_*:20638\n#Peers:     0\nHeight:     0\n\nesc-oracle  0cd7ce2         Running\nDisk:       3.4G\nPID:        2471\nRAM:        621M\nUptime:     8-22:30:14\n#Files:     35\nTCP Ports:  IPv6_*:20632\n#TCP:       3\n\neid         cd3d90f         Running\nDisk:       54G\nAddress:    90cd00e04de2b4a6e73a05866fb79b96335c222e\nBalance:    0\nPID:        2544\nRAM:        5.1G\nUptime:     8-22:30:13\n#Files:     866\nTCP Ports:  IPv4_*:20649 IPv6_*:20649 IPv6_*:20648 IPv6_*:20646\n#TCP:       54\nUDP Ports:  IPv6_*:20648\n#Peers:     3\nHeight:     6269178\n\neid-oracle  1320eba         Running\nDisk:       6.1G\nPID:        2668\nRAM:        621M\nUptime:     8-22:30:07\n#Files:     36\nTCP Ports:  IPv6_*:20642\n#TCP:       4\n\narbiter     v0.3.1          Running\nDisk:       2.1G\nPID:        2772\nRAM:        851M\nUptime:     8-22:29:49\n#Files:     558\nTCP Ports:  IPv4_*:20538 IPv6_*:20538 IPv4_*:20536\n#TCP:       35\nSPV Height: 1276881\nDID Height: 597163\nESC Height: 14888619\nEID Height: 6937337\n\ncarrier     6.0(20210525)   Stopped\nDisk:       5.2M\n\n")),(0,o.kt)("h2",{id:"auto-start-when-os-reboot"},"Auto-start when OS Reboot"),(0,o.kt)("p",null,"Enter the command to open the user-level crontab editor. You may be asked to select an editing program."," "),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"crontab -e\n")),(0,o.kt)("p",null,"Append the following entry to the existing crontab, save and exit."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"@reboot ~/node/node.sh start\n")),(0,o.kt)("p",null,"You may prefer to add multiple start commands if you have not install all the components of Elastos blockchain."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"@reboot ~/node/node.sh esc start\n@reboot ~/node/node.sh eid start\n")),(0,o.kt)("p",null,"Checking the current crontab by running:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"crontab -l\n")),(0,o.kt)("h2",{id:"stopping-nodes"},"Stopping nodes"),(0,o.kt)("p",null,"Stopping a single chain or programs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh esc stop\nesc         84b1c5e         Stopped\n")),(0,o.kt)("p",null,"Some chains, especially a busy ESC node, may take a pretty long time to fully exist. Issuing multiple stop commands (more than 10 times) to a running ESC node will force it to stop, this may leave a broken database."),(0,o.kt)("p",null,"Stopping all programs or chains have been installed."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh stop\n[ ... many messages follow ... ]\n")),(0,o.kt)("p",null,"Different chains and programs share similar output formats after being stopped. So long output omitted."),(0,o.kt)("h2",{id:"directory-structure"},"Directory structure"),(0,o.kt)("p",null,"Installing ",(0,o.kt)("strong",{parentName:"p"},"tree")," utility to list contents of directories in a tree-like format."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"sudo apt-get install -y tree\n[ ... many outputs ... ]\n")),(0,o.kt)("p",null,"If all things work well, you should have the following directory."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"tree -L 2 ~/node\n~/node                              # root\n\u251c\u2500\u2500 arbiter                         # arbiter folder\n\u2502   \u251c\u2500\u2500 arbiter                     # arbiter program\n\u2502   \u251c\u2500\u2500 config.json                 # arbiter config file\n\u2502   \u251c\u2500\u2500 ela-cli -> ../ela/ela-cli   # link to ela client program\n\u2502   \u251c\u2500\u2500 elastos_arbiter             # running data and logs (*)\n\u2502   \u2514\u2500\u2500 keystore.dat                # keystore file, copied from ela\n\u2502\n\u251c\u2500\u2500 carrier                         # carrier bootstrap folder\n\u2502   \u251c\u2500\u2500 bootstrapd.conf             # config file\n\u2502   \u251c\u2500\u2500 ela-bootstrapd              # daemon program\n\u2502   \u2514\u2500\u2500 var                         # running data (*)\n\u2502\n\u251c\u2500\u2500 did                             # did folder\n\u2502   \u251c\u2500\u2500 config.json                 # config file\n\u2502   \u251c\u2500\u2500 did                         # daemon program\n\u2502   \u2514\u2500\u2500 elastos_did                 # chain data and log (*)\n\u2502\n\u251c\u2500\u2500 eid                             # eid folder\n\u2502   \u251c\u2500\u2500 data                        # running data and logs (*)\n\u2502   \u251c\u2500\u2500 eid                         # daemon and client program\n\u2502   \u2514\u2500\u2500 logs                        # log files (*)\n\u2502\n\u251c\u2500\u2500 eid-oracle                      # eid-oracle folder\n\u2502   \u2514\u2500\u2500 *.js\n\u2502\n\u251c\u2500\u2500 ela                             # ela folder\n\u2502   \u251c\u2500\u2500 config.json                 # config file\n\u2502   \u251c\u2500\u2500 ela                         # daemon program\n\u2502   \u251c\u2500\u2500 ela-cli                     # client program, to send commands to ela chain\n\u2502   \u251c\u2500\u2500 elastos                     # chain data and log (*)\n\u2502   \u2514\u2500\u2500 keystore.dat                # keystore file, the wallet\n\u2502\n\u251c\u2500\u2500 esc                             # esc folder\n\u2502   \u251c\u2500\u2500 data                        # running data and logs (*)\n\u2502   \u251c\u2500\u2500 esc                         # daemon and client program\n\u2502   \u2514\u2500\u2500 logs                        # log files (*)\n\u2502\n\u251c\u2500\u2500 esc-oracle                      # esc-oracle folder\n\u2502   \u2514\u2500\u2500 *.js\n\u2502\n\u251c\u2500\u2500 extern\n\u2502   \u2514\u2500\u2500 node-v14.17.0-l
1inux-x64     # nodejs required by esc-oracle and eid-oracle\n\u2502\n\u2514\u2500\u2500 node.sh                         # the operating script\n")),(0,o.kt)("p",null,"Please some directories marked with asterisks are running data and logs files, which will be generated during the program running."),(0,o.kt)("h2",{id:"updating-nodesh"},"Updating node.sh"),(0,o.kt)("p",null,"If you had already installed the script several weeks ago, it is better to update to get the latest fixes or features."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh script_update\n")),(0,o.kt)("p",null,"It will fetch the latest script from the repository, overwrite the old file, and make it executable."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"Downloading https://raw.githubusercontent.com/elastos/Elastos.Node/master/build/skeleton/node.sh...\n###################################################################### 100.0%\nOK: $HOME/node/node.sh updated\n")),(0,o.kt)("p",null,"Run the new node.sh to see if there are any updates on command-line options."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh\n")),(0,o.kt)("h2",{id:"updating-an-individual-node"},"Updating an individual node"),(0,o.kt)("p",null,"We can ",(0,o.kt)("strong",{parentName:"p"},"update a single program")," (chain). For example, to update Elastos ELA, please run the following command."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"~/node/node.sh ela update\n")),(0,o.kt)("p",null,"Step 1: The script will contact the ",(0,o.kt)("a",{parentName:"p",href:"https://download.elastos.io/elastos-ela/"},"download server")," to find the ",(0,o.kt)("strong",{parentName:"p"},"latest version"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"Finding the latest ela release...\nINFO: Latest version: v0.8.3\n")),(0,o.kt)("p",null,"Step 2: If you wish to continue, please answer the case-sensitive ",(0,o.kt)("strong",{parentName:"p"},"Yes"),". Any other answers will cancel the operation."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"Proceed update (No/Yes)? Yes\nDownloading https://download.elastos.io/elastos-ela/elastos-ela-v0.8.3/elastos-ela-v0.8.3-linux-x86_64.tgz...\n###################################################################### 100.0%\nExtracting elastos-ela-v0.8.3-linux-x86_64.tgz...\n")),(0,o.kt)("p",null,"Step 3: The script will ",(0,o.kt)("strong",{parentName:"p"},"stop a running program")," automatically."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"Stopping ela...\n...\nela         v0.8.3          Stopped\n")),(0,o.kt)("p",null,"Step 4: And replace the files with the updated versions."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"'/home/ubuntu/node/.node-upload/ela/ela' -> '/home/ubuntu/node/ela/ela'\n'/home/ubuntu/node/.node-upload/ela/ela-cli' -> '/home/ubuntu/node/ela/ela-cli'\n")),(0,o.kt)("p",null,"Step 5: If the script has stopped the program before the file replacement, it will ",(0,o.kt)("strong",{parentName:"p"},"restart the program")," automatically."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"ela         v0.8.3          Running\nDisk:       61M\nPID:        120480\nRAM:        710168K\nUptime:     00:01\n#Files:     41\nTCP Ports:  IPv4_*:20338 IPv6_*:20338 IPv4_*:20339 IPv6_*:20339 IPv4_*:20336\n#TCP:       14\n#Peers:     3\nHeight:     18313\n")),(0,o.kt)("p",null,"Please check the ",(0,o.kt)("strong",{parentName:"p"},"version")," to make sure of a successful program update."),(0,o.kt)("h2",{id:"compress-log-files"},"Compress log files"),(0,o.kt)("p",null,"The ",(0,o.kt)("strong",{parentName:"p"},"compress_log")," will gzip the old log files to save disk space. It will not touch the latest log files, because they are opened by the corresponding daemon programs."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"./node/node.sh esc compress_log\nCompressing log files in /home/ubuntu/node/esc/data/geth/logs/dpos...\nCompressing log files in /home/ubuntu/node/esc/data/logs-spv...\nCompressing log files in /home/ubuntu/node/esc/logs...\n")),(0,o.kt)("p",null,"If ",(0,o.kt)("strong",{parentName:"p"},"compress_log")," without specifying chain name, it will do gzip to log files of the installed chains."))}g.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.