mirror of
https://github.com/openziti/zrok.git
synced 2025-01-08 23:20:04 +01:00
1 line
5.5 KiB
JavaScript
1 line
5.5 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7142],{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":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:s,infoText:l,guideLink:c}=e;const{colorMode:d}=(0,o.I)(),u=(0,r.L)();console.log("Assets in DownloadCard:",u);const h=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=u.filter((e=>e.name.includes(h)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,a.jsxs)("div",{className:t.Z.downloadCard,children:[(0,a.jsx)("div",{className:t.Z.imgContainer,children:(0,a.jsx)("img",{src:s,alt:`${n} logo`})}),(0,a.jsx)("h3",{children:n}),m.length>0&&(0,a.jsx)("ul",{children:m.map(((e,n)=>(0,a.jsx)("li",{className:t.Z.downloadButtons,children:(0,a.jsx)("a",{href:e.url,className:t.Z.downloadLinks,children:i(e.arch)})},n)))}),c&&(0,a.jsxs)("div",{className:t.Z.cardFooter,children:[(0,a.jsx)("p",{children:l}),(0,a.jsx)("a",{href:c,children:"GUIDE"}),(0,a.jsx)("p",{})]})]})}},7597:(e,n,s)=>{s.d(n,{Z:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},1151:(e,n,s)=>{s.d(n,{Z:()=>i,a:()=>a});var r=s(7294);const t={},o=r.createContext(t);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); |