zoukankan      html  css  js  c++  java
  • linux版powershell安装教程(.net core版)

    powershell 传教士 原创文章 始于2016-12-20,2017-03-15 ,2017-05-10改。文章版本目前博客园为最新版。 允许转载,但必须保留名字和出处,否则追究法律责任  

    问:powershell二进制安装包,和.net core是什么关系?

    答: powershell依赖.net。不论win还是linux,powershell都是.net的一个代码库分支。

    问:什么是 .net core?

    答: .net core是微软.net的跨平台版本。

    问:.net core大致包含几个分支?

    答: .net core中大致包含asp.net,powershell,f#。

    问:.net core目前版本是多少?

    答: .net core分为: 1.0 lts 老旧版。 1.1 稳定版。 2.0 当前版。

    问:.net core目前支持哪些平台?

    答: 请先围观这里: https://github.com/dotnet/core-setup/blob/master/README.md

    问:powershell二进制安装包,依赖哪些linux库?

    答: libicu libunwind uuid

    问:powershell二进制安装包,被装在哪里?

    答: /opt/microsoft/powershell/6.0.xxx版本号 然后在/usr/bin下,增加了个连接powershell

    问:linux版powershell如何运行?

    答: 在bash下,powershell回车。然后打查看版本命令: $PSVersionTable #powershell命令不区分大小写

    问:二进制powershell包,支持哪些系统?

    答:

    ◦Ubuntu 14.04 , 16.04 ,debian8

    ◦CentOS , RHEL 7及以上

    ◦open SUSE 42.1及以上

    ◦Arch Linux (archl inux 没有版本号)

    ◦LINUX docker 容器

    ◦Linux AppImage 容器

    问:powershell官网在哪里?

    答: https://github.com/PowerShell/PowerShell/releases

    问:macOS 10及以上,二进制powershell安装包,如何安装?

    答: 先去官网下载最新版二进制安装包,然后: sudo installer -pkg powershell-6.0.0-alphaxxxxx.pkg -target /

    问:二进制powershell安装包,如何下载?

    答: wget  https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-xxxxxxxx.rpm

    问:二进制powershell安装包,下载太慢怎么办?

    答: 先安装aria2,安装后就有aria2c命令,用这个命令下载,即可随时中断,随时断点续传。如: aria2c  https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-xxxxxxxx.rpm

    问:centos7,rhel7,二进制powershell安装包,如何安装?

    答:

    curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo

    sudo yum install -y powershell

    问:centos7,rhel7,二进制powershell安装包,如何升级?

    答:

    yum  update  -y powershell

    问:Ubuntu 16.04,二进制powershell安装包,如何安装?

    答:

    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list

    sudo apt-get update sudo apt-get install -y powershell

    问:Ubuntu 14.04,Debian 8,二进制powershell安装包,如何安装?

    答:

    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

    curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list sudo apt-get update

    sudo apt-get install -y powershell

    问:OpenSUSE 42.1及以上,二进制powershell安装包,如何安装?

    答:

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

    sudo zypper install ./powershell-6.0.0_beta.1-1.suse.42.1.x86_64.rpm

    问:Arch Linux,powershell安装包,如何安装?

    答:

    powershell源码已经进入arch linux 源码仓库。

    【Arch Linux User Repository (AUR)】 如需安装,请参考官方手册。 https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages

    问:docker版的powershell,如何安装?

    答:

    http://www.cnblogs.com/piapia/p/5884838.html

    问:docker版的powershell,有什么优点?

    答:

    1 下载速度比较快。

    2 安装比较简单。

    问:docker版的powershell,有什么缺点?

    答:

    容器把【宿主机子】,和【子容器】隔离了。

    get-process查进程,查服务的,查端口的【子容器命令】,都无法访问【宿主机子】,或者设置成可访问,比较麻烦。

    问:神马是“Linux AppImage”?

    答:

    “Linux AppImage” 是一个linux软件,这个软件自带一个仓库。

    仓库中的都是绿色的软件,这些软件无需安装,下载后,即可运行。

    这个软件类似于docker,即以linux服务的形式运行后,仓库中的绿色软件通过这个服务运行。

    问:“Linux AppImage”官网在哪?

    答:

    https://github.com/probonopd/AppImageKit

    问:如何把“Linux AppImage”安装成服务?

    答:

    wget  https://github.com/probonopd/AppImageKit/releases/download/continuous/appimaged-x86_64.AppImage

    chmod a+x ./appimaged-x86_64.AppImage

    ./appimaged-x86_64.AppImage -i  #root权限

    问:“Linux AppImage”服务,已经运行,如何运行powershell绿色版?

    答:

    先去官网下载最新版二进制包,然后:

    chmod a+x PowerShell-x86_64.AppImage ./PowerShell-x86_64.AppImage     #支持在终端中运行此命令

    问:“Linux AppImage”版powershell绿色版,有什么缺点?

    答: 目前下载比较慢。

    问:“Linux AppImage”版powershell绿色版,有什么优点?

    答: 相对docker版,有优势。可以访问本地磁盘,可以访问本地进程等。

    ===========================完=============================

  • 相关阅读:
    【RF库Built-In测试】Catenate
    SpringMVC系列(十四)Spring MVC的运行流程
    SpringMVC系列(十三)异常处理
    SpringMVC系列(十二)自定义拦截器
    SpringMVC系列(十一)把后台返回的数据转换成json、文件下载、文件上传
    SpringMVC系列(十)<mvc:default-servlet-handler/>(处理静态资源)和<mvc:annotation-driven />
    SpringMVC系列(九)自定义视图、重定向、转发
    SpringMVC系列(八)国际化
    SpringMVC系列(七)视图解析器和视图
    SpringMVC系列(六)处理模型数据
  • 原文地址:https://www.cnblogs.com/piapia/p/6564773.html
Copyright © 2011-2022 走看看