1 line
7.6 KiB
JavaScript
1 line
7.6 KiB
JavaScript
"use strict";(self.webpackChunkcanine_docs=self.webpackChunkcanine_docs||[]).push([[6683],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=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 a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(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,r,l=function(e,t){if(null==e)return{};var n,r,l={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,l=e.mdxType,a=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=u(n),g=l,f=d["".concat(i,".").concat(g)]||d[g]||c[g]||a;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var a=n.length,o=new Array(a);o[0]=g;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:l,o[1]=s;for(var u=2;u<a;u++)o[u]=n[u];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}g.displayName="MDXCreateElement"},2843:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>c,frontMatter:()=>a,metadata:()=>s,toc:()=>u});var r=n(7462),l=(n(7294),n(3905));const a={sidebar_position:0},o="Setting Up",s={unversionedId:"nodes/install",id:"nodes/install",title:"Setting Up",description:"Pre-Requisites",source:"@site/docs/nodes/1_install.md",sourceDirName:"nodes",slug:"/nodes/install",permalink:"/docs/nodes/install",draft:!1,editUrl:"https://github.com/JackalLabs/canine-docs/blob/master/docs/nodes/1_install.md",tags:[],version:"current",sidebarPosition:0,frontMatter:{sidebar_position:0},sidebar:"tutorialSidebar",previous:{title:"Bounties",permalink:"/docs/ecosystem/bounties"},next:{title:"Hardware",permalink:"/docs/nodes/nodes/hardware"}},i={},u=[{value:"Pre-Requisites",id:"pre-requisites",level:2},{value:"Enable Firewall Rules",id:"enable-firewall-rules",level:3},{value:"Create Jackal user",id:"create-jackal-user",level:3},{value:"Installing required tools",id:"installing-required-tools",level:3},{value:"Installing Go",id:"installing-go",level:3}],p={toc:u},d="wrapper";function c(e){let{components:t,...n}=e;return(0,l.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"setting-up"},"Setting Up"),(0,l.kt)("h2",{id:"pre-requisites"},"Pre-Requisites"),(0,l.kt)("p",null,"There are a few things needed before installing. "),(0,l.kt)("p",null,"While logged in as the 'root' or 'admin' user, we add a 'jackal' user and give them root privileges."),(0,l.kt)("h3",{id:"enable-firewall-rules"},"Enable Firewall Rules"),(0,l.kt)("p",null,"Enabling the firewall is important to ensure your hardware remains secure. The following commands will add rules required for access on both validators and providers:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"sudo ufw allow 22\nsudo ufw allow 80\nsudo ufw allow 443\n")),(0,l.kt)("p",null,"Additional ports are required if you are running a validator:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"sudo ufw allow 26657\nsudo ufw allow 26658\n")),(0,l.kt)("p",null,"The only additional port required for a provider is 3333:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"sudo ufw allow 3333\n")),(0,l.kt)("p",null,"If you are running a combined validator/provider, you need to allow all of the above ports. After adding ports to the rules list, you will need to start the firewall:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"sudo ufw enable\n")),(0,l.kt)("p",null,"After starting the firewall, verify all of the required rules are in place by running:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"sudo ufw status verbose\n")),(0,l.kt)("p",null,"Your output should be similar to the following:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"Status: active\n\nTo Action From\n-- ------ ----\n22 ALLOW Anywhere\n80 ALLOW Anywhere\n443 ALLOW Anywhere\n1317 ALLOW Anywhere\n3333 ALLOW Anywhere\n26657 ALLOW Anywhere\n26658 ALLOW Anywhere\n")),(0,l.kt)("h3",{id:"create-jackal-user"},"Create Jackal user"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},'sudo adduser --gecos "" jackal\nsudo usermod -aG sudo jackal\n')),(0,l.kt)("p",null,"Log in as the jackal user to complete the below steps:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"sudo su - jackal\n")),(0,l.kt)("h3",{id:"installing-required-tools"},"Installing required tools"),(0,l.kt)("p",null,"This will install the necessary tools to build the jackal chain source, along with lz4 compression tool and jquery tool."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"sudo apt update\nsudo apt install build-essential lz4 jq\n")),(0,l.kt)("h3",{id:"installing-go"},"Installing Go"),(0,l.kt)("p",null,"Follow more in-depth instructions to install Go v1.19 or higher ",(0,l.kt)("a",{parentName:"p",href:"https://golang.org/doc/install"},"here"),"."),(0,l.kt)("p",null,"On Ububtu you can install it with:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"GOVER=$(curl https://go.dev/VERSION?m=text)\nwget https://golang.org/dl/${GOVER}.linux-amd64.tar.gz\nsudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf ${GOVER}.linux-amd64.tar.gz\n")),(0,l.kt)("p",null,"Add the following golang path info to the current users ",(0,l.kt)("inlineCode",{parentName:"p"},"~/.profile"),"."),(0,l.kt)("p",null,"Also add it to the skeleton profile so all new users have it. ",(0,l.kt)("inlineCode",{parentName:"p"},"/etc/skel/.profile")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},'# add environmental variables for Go\nif [ -f "/usr/local/go/bin/go" ] ; then\n export GOROOT=/usr/local/go\n export GOPATH=${HOME}/go\n export GOBIN=$GOPATH/bin\n export PATH=${PATH}:${GOROOT}/bin:${GOBIN}\n export GO111MODULE=on\nfi\n')),(0,l.kt)("p",null,"Restarting the shell with youre profile settings or just rebasing them like so is required."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"source ~/.profile\n")))}c.isMDXComponent=!0}}]); |