安装Scoop
1. 在 PowerShell 中打开远程权限
1
| Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
2. 设置安装路径
1 2 3 4 5 6 7
| $env:SCOOP='D:\Scoop' [environment]::setEnvironmentVariable('SCOOP',$env:SCOOP,'User')
$env:SCOOP_GLOBAL='D:\Scoop_Global' [environment]::setEnvironmentVariable('SCOOP_GLOBAL',$env:SCOOP_GLOBAL,'Machine')
|
3. 安装Scoop
1 2 3 4 5 6 7 8
| Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression 或 iwr -useb get.scoop.sh | iex 或 iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
scoop update
|
此时大概率会执行失败,可以更换国内源来安装 或者 修改Host文件,使网络畅通
使用国内源来安装
1 2
| iwr -useb scoop.201704.xyz | iex scoop update
|
修改Host文件
GitHub地址
获取host内容
- 文件:
https://raw.hellogithub.com/hosts
修改host内容
- Windows 系统:
C:\Windows\System32\drivers\etc\hosts
刷新DNS
- Windows 系统:
ipconfig /flushdns
安装基础软件和配置
安装 7zip git aria2
1
| scoop install 7zip git aria2
|
开启使用aria2下载
1 2 3
| scoop config aria2-enabled true
scoop config aria2-enabled false
|
更换镜像源
1 2 3 4 5 6 7
| scoop config
scoop config SCOOP_REPO 'https://gitee.com/glsnames/scoop-installer' scoop config SCOOP_REPO https://gitee.com/glsnames/scoop-installer scoop config SCOOP_REPO https://github.com/ScoopInstaller/Scoop
|
配置aria2开启16线程加速下载
1 2 3 4 5 6 7 8 9 10 11 12 13
| scoop config aria2-retry-wait 4 scoop config aria2-split 16 scoop config aria2-max-connection-per-server 16 scoop config aria2-min-split-size 4M
scoop config /* aria2-retry-wait : 4 aria2-split : 16 aria2-max-connection-per-server : 16 aria2-min-split-size : 4M */
|
配置bucket
官方的一些源 可以放心使用的
1 2 3 4 5 6 7 8 9
| scoop bucket main [已经默认在bucket中了,无需手动添加] scoop bucket extras scoop bucket versions scoop bucket dorado scoop bucket sysinternals scoop bucket nerd-fonts scoop bucket java scoop bucket games scoop bucket jetbrains
|
官方的Bucket地址在国内使用有点慢,可以用gitee上镜像地址
scoop-bucket - Gitee.com
1 2 3 4 5
| scoop bucket add extras https://gitee.com/scoop-bucket/extras scoop bucket add main https://gitee.com/scoop-bucket/main scoop bucket add dorado https://gitee.com/scoop-bucket/dorado scoop bucket add java https://gitee.com/scoop-bucket/java scoop bucket add versions https://github.com/ScoopInstaller/Versions
|
其他的一些三方Bucket
1 2 3 4 5
| scoop bucket add scoop-cn https://mirror.ghproxy.com/https://github.com/duzyn/scoop-cn
scoop bucket add spc https://mirror.ghproxy.com/github.com/lzwme/scoop-proxy-cn
|