Scoop 安装与常用开发软件的安装及配置方式
Scoop
Scoop 安装
# configure the scoop's user install path
$env:SCOOP="D:\\Scoop"
# configure the scoop's global install path
$env:SCOOP_GLOBAL="D:\\Scoop\global"
# install as normal user
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
# install as administrator
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
Scoop 配置
# proxy
scoop config proxy 127.0.0.1:7890
# source
scoop bucket add extras https://gitee.com/scoop-bucket/extras.git
scoop bucket add dorado https://gitee.com/scoop-bucket/dorado
Scoop 管理
# update one
scoop update python
# update all
scoop update *
# cleanup all app old version
scoop cleanup *
# delete all app installer cache
scoop cache rm *
# change app to different version
# it will be latest version with no version
scoop reset app[@version]
常用开发软件
powershell 7
# when install or update pwsh, use powershell 5
# use cmd may cause process problem
scoop install pwsh
# configure the windows terminal default profile
[guid]::NewGuid().ToString()
以下为 windows-terminal
配置pwsh增加或替换项
commandline
项及icon
项需Scoop
实际安装目录增加目录前缀initialCols
项及initialRows
项调整窗口大小
{
"centerOnLaunch": true,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"initialCols": 60,
"initialRows": 20,
"profiles":
{
"defaults":
{
"font":
{
"face": "FiraCode Nerd Font"
}
},
"list":
[
{
"commandline": "Scoop\\apps\\pwsh\\current\\pwsh.exe",
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "pwsh",
"icon": "Scoop\\apps\\pwsh\\current\\pwsh.exe"
}
]
}
}
refreshenv
scoop install refreshenv
oh-my-posh
# uninstall old version with winget
# winget uninstall JanDeDobbeleer.OhMyPosh
scoop install oh-my-posh
# oh-my-posh need nerd fonts
# which can be download from https://www.nerdfonts.com/font-downloads
scoop install FiraCode-NF
# select a theme from https://ohmyposh.dev/docs/themes
# to replace theme 'powerlevel10k_rainbow' in command,
# and write command to powershell's profile
# command: oh-my-posh init pwsh --config
# "$env:POSH_THEMES_PATH/powerlevel10k_rainbow.omp.json" | Invoke-Expression
notepad $profile
vfox
scoop install vfox
# vfox's storage path
# C:\\Users\\someone\\.version-fox\\config.yaml storage.sdkPath
MariaDB
scoop install mariadb
# please use administrator to execute the
# following command like `gsudo`
# install as tips after install.
mysql_install_db --service=MariaDB --password=123456
# start service
net start MariaDB
# command start
mysqld --console
MongoDB
scoop install mongodb
# please use administrator to execute the
# following command like `gsudo`
# command will install mongodb as service.
# scoop's mongod run with a shim config file,
# so no need to run with --config option
mongod --install
# run service
net start mongodb
# command start
mongod --dbpath /opt/mongodata
# remove mongdb service from windows
mongod --remove
Elasticsearch
scoop install elasticsearch
# install icu analysis plugin
elasticsearch-plugin.bat install analysis-icu
# icu analysis plugin should be removed and reinstall
# after elasticsearch update
elasticsearch-plugin.bat remove analysis-icu
# please use administrator to execute the
# following command like `gsudo`
# install as service
elasticsearch-service.bat install
#run service
elasticsearch-service.bat start
# command start
elasticsearch.bat