Rocky Linux 8にDenoをインストールする

OSバージョンを確認

# cat /etc/redhat-release
Rocky Linux release 8.4 (Green Obsidian

1.Denoのインストール

# curl -fsSL https://deno.land/x/install/install.sh | sh
Archive:  /root/.deno/bin/deno.zip
  inflating: /root/.deno/bin/deno
Deno was installed successfully to /root/.deno/bin/deno
Manually add the directory to your $HOME/.bash_profile (or similar)
  export DENO_INSTALL="/root/.deno"
  export PATH="$DENO_INSTALL/bin:$PATH"
Run '/root/.deno/bin/deno --help' to get started

2.環境PATHを通す

# vi ~/.bash_profile
下記を追加
export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
設定内容を反映
# source ~/.bash_profile

denoバージョンを確認

# deno --version
deno 1.15.3 (release, x86_64-unknown-linux-gnu)
v8 9.5.172.19
typescript 4.4.2

3.denoのサンプルコードを実行

# deno run https://deno.land/std/examples/welcome.ts
Download https://deno.land/std/examples/welcome.ts
Warning Implicitly using latest version (0.113.0) for https://deno.land/std/examples/welcome.ts
Download https://deno.land/std@0.113.0/examples/welcome.ts
Check https://deno.land/std/examples/welcome.ts
Welcome to Deno!

4.動作確認

# vi test.ts
console.log("study skill become smart")

実行
# deno run test.ts
Check file:///root/test.ts
study skill become smart

 

Rocky Linux 8

Posted by arkgame