いろいろやってみるにっき

てきとーに生きている奴の日記

古いエントリのサムネイル画像がリンク切れになってたりするけど、チマチマ修正中


【小ネタ】Windows Server 2022にscoopを入れる

wingetをWindows Server 2022にインストールしようとしたが、うまくいかない。

 

shigeo-t.hatenablog.com

参照したこちらのWindows Terminalもやってみた。

dev.classmethod.jp

やはりエラーになる。何かが違うのかもしれない。

 

そこでひとまずwingetは置いといてscoopを使ってみることに。

qiita.com

 

PS C:\Users\Administrator> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
PS C:\Users\Administrator> iwr -useb get.scoop.sh | iex
 Initializing...   
Running the installer as administrator is disabled by default, see https://github.com/ScoopInstaller/Install#for-admin for details.

 

エラーになる。「https://github.com/ScoopInstaller/Install#for-admin for details.」と言っているので見てみる。

github.com

For Admin
Installation under the administrator console has been disabled by default for security considerations. If you know what you are doing and want to install Scoop as administrator. Please download the installer and manually execute it with the -RunAsAdmin parameter in an elevated console. Here is the example:

 

管理者PowerShellではコマンドが違うらしい。「iex "& {$(irm get.scoop.sh)} -RunAsAdmin"」にしてみる。

PS C:\Users\Administrator> iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
Initializing...
Downloading...
Extracting...
詳細: 対象 "作成先: C:\Users\Administrator\scoop\apps\scoop\current\_tmp" に対して操作 "ディレクトリの作成"
を実行しています。
詳細: 対象 "作成先: C:\Users\Administrator\scoop\buckets\main\_tmp" に対して操作 "ディレクトリの作成"
を実行しています。
Creating shim...
Adding ~\scoop\shims to your path.
Scoop was installed successfully!
Type 'scoop help' for instructions.

今度はうまくいった。

 

使ってみる。

PS C:\Users\Administrator> scoop
Usage: scoop <command> [<args>]

Some useful commands are:

alias       Manage scoop aliases
bucket      Manage Scoop buckets
cache       Show or clear the download cache
cat         Show content of specified manifest. If available, `bat` will be used to pretty-print the JSON.
checkup     Check for potential problems
cleanup     Cleanup apps by removing old versions
config      Get or set configuration values
create      Create a custom app manifest
depends     List dependencies for an app
download    Download apps in the cache folder and verify hashes
export      Exports (an importable) list of installed apps
help        Show help for a command
hold        Hold an app to disable updates
home        Opens the app homepage
info        Display information about an app
install     Install apps
list        List installed apps
prefix      Returns the path to the specified app
reset       Reset an app to resolve conflicts
search      Search available apps
shim        Manipulate Scoop shims
status      Show status and check for new app versions
unhold      Unhold an app to enable updates
uninstall   Uninstall an app
update      Update apps, or Scoop itself
virustotal  Look for app's hash on virustotal.com
which       Locate a shim/executable (similar to 'which' on Linux)


Type 'scoop help <command>' to get help for a specific command.

動いた。

 

gitを入れてみる。

PS C:\Users\Administrator> scoop install git
Installing '7zip' (21.07) [64bit]
7z2107-x64.msi (1.8 MB) [=====================================================================================] 100%
Checking hash of 7z2107-x64.msi ... ok.
Extracting 7z2107-x64.msi ... done.
Linking ~\scoop\apps\7zip\current => ~\scoop\apps\7zip\21.07
Creating shim for '7z'.
Creating shortcut for 7-Zip (7zFM.exe)
Persisting Codecs
Persisting Formats
Running post-install script...
'7zip' (21.07) was installed successfully!
Notes
-----
Add 7-Zip as a context menu option by running: "C:\Users\Administrator\scoop\apps\7zip\current\install-context.reg"
Installing 'git' (2.36.1.windows.1) [64bit]
PortableGit-2.36.1-64-bit.7z.exe (43.5 MB) [==================================================================] 100%
Checking hash of PortableGit-2.36.1-64-bit.7z.exe ... ok.
Extracting dl.7z ... done.
Linking ~\scoop\apps\git\current => ~\scoop\apps\git\2.36.1.windows.1
Creating shim for 'git'.
Creating shim for 'gitk'.
Creating shim for 'git-gui'.
Creating shim for 'tig'.
Creating shim for 'git-bash'.
Creating shortcut for Git Bash (git-bash.exe)
Creating shortcut for Git GUI (git-gui.exe)
'git' (2.36.1.windows.1) was installed successfully!
Notes
-----
Set Git Credential Manager Core by running: "git config --global credential.helper manager-core"

問題無さそう。

 

ということで次はWindows Terminalをscoopでインストールしてみる。

山手イタリア山庭園行ってきた

先々週見たぶらり途中下車の旅

 

www.ntv.co.jp

 

旅人は行かなかったが、番組最後に山手イタリア山庭園が紹介された。今まで行ったことが無い。近くは通っていたのだが。

[山手イタリア山庭園]施設概要
thumbnail
明治13(1880)年から明治19(1886)年まで、イタリア領事館がおかれたことから「イタリア山」と呼ばれています。イタリアで多く見られる庭園様式を模し、水や花壇を幾何学的に配したデザインの公園で、整形花壇では四季折々の花、植栽を見ることができます。
https://www.hama-midorinokyokai.or.jp/park/italia/about/outline.php

 

そこで、行ってみることにした。今週は土日ともにはっきりしない天気だが、仕方ない。

 

ところでこの施設概要のリンクはクリックしてもFile Not Foundである。そこで、近くのバス停や駅からのルートを調べてみた。石川町駅が近そう。バス停は桜木町駅から出る神奈中バス11系統でイタリア山庭園前バス停。そう港の見える丘公園も通る経路である。でも家から桜木町駅に歩くのは(毎朝の散歩ならこの距離歩いているくせに)ダルいので、今回は石川町駅から行く作戦にした。

www.jorudan.co.jp

 

そして今日で終わりのガーデンネックレス横浜。どこか行くしかない。

f:id:shigeo-t:20220611060557j:image

 

まずは山手イタリア山庭園。石川町駅で元町口南口に出なきゃいけないのに北口に出てしまった。でも山のほうは分かるので迷いようがない。

きつい坂だが270m、ほどなく到着。

門は階段の上。

バラが咲いている。

さらに階段。

まず最初の建物。

最初の建物はブラフ18番館らしい。

外交官の家に向かう。また階段。

TVで見たのは外交官の家とその前の庭園だった。

一応ベイブリッジなどが見える。

スロープで上がると外交官の家の反対側も庭になっている。

 

見学できるようなので入ってみる。

色々写真を撮ったが一部だけ。




ざっと見て、外に出た。

 

上の門。バス停からならこちらから。


バス通りに向かう。途中に看板出てる。

神奈中バス

 

港の見える丘公園に向かう。結局15分くらい掛かった。途中も公園や外国人墓地などがあったが、今回はスルー。

天気は曇り。

バラはほぼ終わり。

ということでちょっとだけ撮って帰路につく。

 

帰りは家の近くのバス停で降りたいと思い、坂を降りて元町に出て、中を通ると人が多いので高速道路の下を進む。おまわりさんが、張ってた。

ガチ検問じゃないしスピードも測ってないので、多分横断歩道を渡る歩行者にプレッシャー掛けた車を捕まえるやつ。前に住んでたところの交差点でもよくやってた。一度

  「車にせかされましたか?」

って聞かれて

  「いいえ」

って答えたことある。

 

それはともかくバス停についたらすぐにバス来た。でもすげえ混んでる。無意味に混んでいることが確定したのは桜木町駅前。おまえら、乗車バス停と下車バス停がそれぞれそこなら、後ろの空いてる横浜駅行に乗れよ。なぜ混んでるバスを避けない?

お時間あったら、他のエントリもクリックして頂ければ幸いです。