通用开发环境配置

  1. iTerm2

    https://iterm2.com/ 下载

  2. 安装HomeBrew

    1
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    此过程会安装Xcode,git也会被安装好。

  3. 安装oh-my-zsh

    1
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  4. 安装p10k

    1
    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

    ~/.zshrc配置使用主题:ZSH_THEME="powerlevel10k/powerlevel10k"

    配置p10k:p10k configure

配置Blog

  1. 首先还是得下载Typora

    https://typora.io/

  2. 其次需要一个Hexo环境

    1. Hexo依赖git和node.js,git在前面安装好了,装一下node

      1
      brew install node
    2. 然后安装hexo

      1
      npm install -g hexo-cli
  3. 然后把之前备份的blog包从服务器上拉下来:

    1
    scp wanghao@124.222.35.175:~/blog.tgz ./

基本就OK了

配置开发环境

  1. git

    光安装git肯定是不够的,需要配置一下:

    1
    2
    git config --global user.email username@gitsite.com
    git config --global user.name username

    生成密钥:

    1
    2
    3
    ssh-keygen -t rsa  
    # 或者
    ssh-keygen -t rsa -C "username"

    然后copy公钥粘贴到站点:

    1
    cat ~/.ssh/id_rsa.pub
  2. 在登陆开发机的跳板机时,

    直接ssh wanghao@site.com,会出现

    1
    Unable to negotiate with xx.xx.xx.xxx port xxxx: no matching host key type found. Their offer: ssh-rsa ssh-dss

    需要配置一下~/.ssh/config:

    1
    2
    3
    Host *.xxx.com
    PubkeyAcceptedAlgorithms +ssh-rsa
    HostkeyAlgorithms +ssh-rsa

VIM还没补充,未完待续