book
  • 关于
  • golang
    • 代码片段
  • LANMP
    • 安装
    • Linux
      • 源码编译
      • Linux基本操作命令
      • Linux网络相关命令
      • Crontab 计划任务
    • Nginx
      • 安装
      • 负载均衡
      • 负载均衡分配方式
      • 高可用
    • MySQL
      • 安装
      • 高可用
    • PHP
      • PHP内核
      • 代码段
      • Laravel
    • Swoole
      • easyswoole
        • 安装
    • 设计模式
  • 操作系统和网络
    • 计算机网络
      • IP协议
      • TCP协议
      • UDP协议
      • HTTP协议
      • HTTPS协议
      • HTTP2协议
      • HTTP1 HTTP2的区别
      • Websocket
      • 域名解析
      • Http压测工具 wrk
  • 工具
    • 版本控制
      • git
    • gitbook
      • 配置和插件
      • 插件
      • gitlab + gitbook
    • jenkins
      • 安装
      • 自动部署
    • Elasticsearch
    • go-mysql-elasticsearch
  • Python
    • Python基础
      • list 和 tuple
      • dict 和 set
    • Python爬虫
      • 爬取elasticsearch英文文档
    • 第三方包
      • Scoop
  • 运维
    • 运维
      • Logrotate
      • 服务器记录操作日志
    • 安全
    • Shell
    • VMWare
  • Java
    • Java基础
  • 前端
    • npmjs
由 GitBook 提供支持
在本页
  • 1、修改C:\Windows\System32\drivers\etc\hosts 文件
  • 2、打开 powershell,然后输入以下代码
  • 3、安装 Scoop
  1. Python
  2. 第三方包

Scoop

上一页第三方包下一页运维

最后更新于2年前

scoop是可用于windows的一款包管理工具,在这记录一下安装过程

前提: 打开 Windows PowerShell

1、修改C:\Windows\System32\drivers\etc\hosts 文件

由于raw.githubusercontent.com 无法连接,所以需要设置本地虚拟域名 可通过 查询到 raw.githubusercontent.com 的ip 是 199.232.68.133 在 hosts文件中添加以下内容

199.232.28.133 raw.githubusercontent.com

2、打开 powershell,然后输入以下代码

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
执行策略更改
执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险,如 https:/go.microsoft.com/fwlink/?LinkID=135170
中的 about_Execution_Policies 帮助主题所述。是否要更改执行策略?
[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为“N”): Y

如果不执行以上面的指令, 在安装的时候会提示

PowerShell requires an execution policy in [Unrestricted, RemoteSigned, ByPass] to run Scoop.
For example, to set the execution policy to 'RemoteSigned' please run :
'Set-ExecutionPolicy RemoteSigned -scope CurrentUser'

3、安装 Scoop

执行 iex (new-object net.webclient).downloadstring('https://raw.githubusercontent.com/lukesampson/scoop/master/bin/install.ps1')

C:\WINDOWS\system32> iex (new-object net.webclient).downloadstring('https://raw.githubusercontent.com/lukesampson/scoop/master/bin/install.ps1')
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
Adding ~\scoop\shims to your path.
'lastupdate' has been set to '2020-07-03T14:19:45.6076584+08:00'
Scoop was installed successfully!
Type 'scoop help' for instructions.
IPAddress