canine-docs/assets/js/29af3fe3.c6644180.js
2022-10-26 10:43:27 -04:00

1 line
6.1 KiB
JavaScript

"use strict";(self.webpackChunkcanine_docs=self.webpackChunkcanine_docs||[]).push([[92],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>g});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o=r.createContext({}),c=function(e){var n=r.useContext(o),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},u=function(e){var n=c(e.components);return r.createElement(o.Provider,{value:n},e.children)},d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},p=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(t),g=a,m=p["".concat(o,".").concat(g)]||p[g]||d[g]||i;return t?r.createElement(m,l(l({ref:n},u),{},{components:t})):r.createElement(m,l({ref:n},u))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,l=new Array(i);l[0]=p;var s={};for(var o in n)hasOwnProperty.call(n,o)&&(s[o]=n[o]);s.originalType=e,s.mdxType="string"==typeof e?e:a,l[1]=s;for(var c=2;c<i;c++)l[c]=t[c];return r.createElement.apply(null,l)}return r.createElement.apply(null,t)}p.displayName="MDXCreateElement"},8348:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=t(7462),a=(t(7294),t(3905));const i={sidebar_position:2},l="Installing Canined",s={unversionedId:"nodes/nodes/installation",id:"nodes/nodes/installation",title:"Installing Canined",description:"Pre-Requisites",source:"@site/docs/nodes/nodes/2_installation.md",sourceDirName:"nodes/nodes",slug:"/nodes/nodes/installation",permalink:"/docs/nodes/nodes/installation",draft:!1,editUrl:"https://github.com/JackalLabs/canine-docs/blob/master/docs/nodes/nodes/2_installation.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Hardware",permalink:"/docs/nodes/nodes/hardware"},next:{title:"Joining Testnet",permalink:"/docs/nodes/nodes/testnet"}},o={},c=[{value:"Pre-Requisites",id:"pre-requisites",level:2},{value:"Installing Build Essentials",id:"installing-build-essentials",level:3},{value:"Installing Go",id:"installing-go",level:3},{value:"Building from Source",id:"building-from-source",level:2},{value:"Creating a Service",id:"creating-a-service",level:2}],u={toc:c};function d(e){let{components:n,...t}=e;return(0,a.kt)("wrapper",(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"installing-canined"},"Installing Canined"),(0,a.kt)("h2",{id:"pre-requisites"},"Pre-Requisites"),(0,a.kt)("p",null,"There are a few things needed before installing."),(0,a.kt)("h3",{id:"installing-build-essentials"},"Installing Build Essentials"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"sudo apt update\nsudo apt install build-essential\n")),(0,a.kt)("h3",{id:"installing-go"},"Installing Go"),(0,a.kt)("p",null,"Follow more in-depth instructions to install Go v1.18.2 or higher ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/doc/install"},"here"),"."),(0,a.kt)("p",null,"On Ububtu you can install it with:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"wget https://golang.org/dl/go1.18.2.linux-amd64.tar.gz\nsudo tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz\n")),(0,a.kt)("p",null,"Add these lines to the end of ",(0,a.kt)("inlineCode",{parentName:"p"},"~/.profile"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"export GOROOT=/usr/local/go\nexport GOPATH=$HOME/go\nexport GO111MODULE=on\nexport PATH=$PATH:/usr/local/go/bin:$HOME/go/bin\n")),(0,a.kt)("p",null,"Restarting the shell with youre profile settings or just rebasing them like so is required."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"source ~/.profile\n")),(0,a.kt)("h2",{id:"building-from-source"},"Building from Source"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"git clone https://github.com/JackalLabs/canine-chain.git\ncd canine-chain\ngit fetch\ngit checkout <VERSION>\n\nmake install\n")),(0,a.kt)("p",null,"From there you will be able to use ",(0,a.kt)("inlineCode",{parentName:"p"},"canined"),", ex:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"canined version\n")),(0,a.kt)("h2",{id:"creating-a-service"},"Creating a Service"),(0,a.kt)("p",null,"You may want the daemon to run without you needing to supervise it. To turn the executable into a service follow these steps."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},'cd $HOME\necho "[Unit]\nDescription=Jackal Node\nAfter=network-online.target\n[Service]\nUser=${USER}\nExecStart=$(which canined) start\nRestart=always\nRestartSec=3\nLimitNOFILE=4096\n[Install]\nWantedBy=multi-user.target\n" > canined.service\n\nsudo mv canined.service /lib/systemd/system/\nsudo systemctl enable canined.service\n\n# Starting the service\nsudo systemctl start canined.service\n\n# Restarting the service\nsudo systemctl daemon-reload\nsudo systemctl restart canined.service\n')))}d.isMDXComponent=!0}}]);