zrok/assets/js/1ba5bc99.b4a62798.js

1 line
5.5 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[142],{1616:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>x,frontMatter:()=>l,metadata:()=>d,toc:()=>h});var r=s(5893),t=s(1151),o=s(4908),a=s(3298),i=s(7597);const l={title:"Install zrok in macOS",sidebar_label:"macOS"},c=void 0,d={id:"guides/install/macos",title:"Install zrok in macOS",description:"Darwin Binary",source:"@site/../docs/guides/install/macos.mdx",sourceDirName:"guides/install",slug:"/guides/install/macos",permalink:"/docs/guides/install/macos",draft:!1,unlisted:!1,editUrl:"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/install/macos.mdx",tags:[],version:"current",frontMatter:{title:"Install zrok in macOS",sidebar_label:"macOS"},sidebar:"tutorialSidebar",previous:{title:"Linux",permalink:"/docs/guides/install/linux"},next:{title:"Windows",permalink:"/docs/guides/install/windows"}},u={},h=[{value:"Darwin Binary",id:"darwin-binary",level:2}];function m(e){const n={code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"darwin-binary",children:"Darwin Binary"}),"\n",(0,r.jsx)(o.N,{children:(0,r.jsx)("div",{className:i.Z.downloadContainer,children:(0,r.jsx)(a.Z,{osName:"macOS",osLogo:"/img/logo-apple.svg"})})}),"\n",(0,r.jsxs)(n.p,{children:["Download the binary distribution for your macOS architecture. For Intel Macs use the ",(0,r.jsx)(n.code,{children:"amd64"})," distribution. For Apple Silicon Macs use the ",(0,r.jsx)(n.code,{children:"arm64"})," distribution."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Unarchive the distribution in a temporary directory."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"mkdir /tmp/zrok && tar -xf ./zrok*darwin*.tar.gz -C /tmp/zrok\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Install the ",(0,r.jsx)(n.code,{children:"zrok"})," executable."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"mkdir -p ~/bin && install /tmp/zrok/zrok ~/bin/\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add ",(0,r.jsx)(n.code,{children:"~/bin"})," to your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"PATH=~/bin:$PATH\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["With the ",(0,r.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,r.jsx)(n.code,{children:"zrok"})," command from your shell:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:" _ \n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | < \n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},4908:(e,n,s)=>{s.d(n,{L:()=>a,N:()=>i});var r=s(7294),t=s(5893);const o=(0,r.createContext)([]),a=()=>(0,r.useContext)(o),i=e=>{let{children:n}=e;const[s,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),a(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,t.jsx)(o.Provider,{value:s,children:n})}},3298:(e,n,s)=>{s.d(n,{Z:()=>l});s(7294);var r=s(4908),t=s(7597),o=s(2949),a=s(5893);const i=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":retur