下载安装包,然后装上。
打开msys的shell之后首先升级一下pacman,然后就可以愉快地Syu
了。
$ pacman -Sy pacman
$ pacman -Syu
安装git,zsh,vim
$ pacman -S git zsh vim
把MSYS目录中的usr/bin
加到环境变量里面去,在正常的cmd下面就也能跑其中的软件了。
添加MSYS2_ROOT环境变量,值为msys2安装位置
修改Msys2镜像源:(msys2\etc\pacman.d路径)
## ## MSYS2 repository mirrorlist ## ## Primary ## msys2.org Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MSYS2/$arch Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch Server = http://sourceforge.mirrorservice.org/m/ms/msys2/REPOS/MSYS2/$arch Server = http://mirror.bit.edu.cn/msys2/REPOS/MSYS2/$arch Server = http://repo.msys2.org/msys/$arch Server = http://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/$arch Server = http://www2.futureware.at/~nickoe/msys2-mirror/msys/$arch/
32位:
## ## 32-bit Mingw-w64 repository mirrorlist ## ## Primary ## msys2.org Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/i686 Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686 Server = http://sourceforge.mirrorservice.org/m/ms/msys2/REPOS/MINGW/i686 Server = http://mirror.bit.edu.cn/msys2/REPOS/MINGW/i686 Server = http://repo.msys2.org/mingw/i686 Server = http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686 Server = http://www2.futureware.at/~nickoe/msys2-mirror/i686/
64位:
## ## 64-bit Mingw-w64 repository mirrorlist ## ## Primary ## msys2.org Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/x86_64 Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64 Server = http://sourceforge.mirrorservice.org/m/ms/msys2/REPOS/MINGW/x86_64 Server = http://mirror.bit.edu.cn/msys2/REPOS/MINGW/x86_64 Server = http://repo.msys2.org/mingw/x86_64 Server = http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64 Server = http://www2.futureware.at/~nickoe/msys2-mirror/x86_64/
整合cmder:
Command:
set CHERE_INVOKING=1 & %MSYS2_ROOT%\usr\bin\bash.exe --login -i -new_console:C:"%MSYS2_ROOT%\msys2.ico"
效果:
http://www.jianshu.com/p/c740b71e7775
https://zyzyz.github.io/zh-cn/Integrate-MSYS2-into-Cmder/