zoukankan      html  css  js  c++  java
  • Install and Update autojump and oh-my-zsh Behind a Firewall

    Brief installation steps:

    1. Install git and zsh via yum;

    2. 'git clone' autojump and oh-my-zsh from an internet-connected host;

    3. Install autojump and oh-my-zsh manually according to the instructions on their websites.

    Install

    # yum install zsh
    # yum install git
    $ ssh-copy-id chad@10.21.3.31 (run "ssh-keygen" if have no key)
    $ git clone chad@10.21.3.31:/home/chad/.oh-my-zsh
    $ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
    $ git clone chad@10.21.3.31:/home/chad/docs/tmp/autojump (you need 'git clone' from internet on host 31 beforehand)
    $ cd autojump;./install.sh   (after installation, add some text into ~/.zshrc according to its prompt)
    add "autojump" into "plugins" of ~/.zshrc
    $ chsh -s /bin/zsh
    restart zsh
    

    Update

    The server 10.0.2.74 is behind firewall, and the auto-update is blocked. The oh-my-zsh on laptop 10.21.3.139 is updated. To enable auto-update on server 74, modify update target repo: modify ~/.oh-my-zsh/.git/config: [remote "origin"] -> url from

    https://github.com/robbyrussell/oh-my-zsh.git
    

    to

    lichao@10.21.3.139:/home/lichao/.oh-my-zsh/.git
    

    Now you can update oh-my-zsh automatically or manually:

    $ cd
    $ upgrade_oh_my_zsh
    

    Note:

    1. You must copy public key of 74 to 139:

      ssh-copy-id lichao@10.21.3.139

    2. You can't add "ssh://" before "lichao@...". It complains "ssh could not resolve hostname 10.21.3.139" , Why?

    3. On internet-connected Ubuntu host, you can install autojump with 'apt-get install autojump'.

  • 相关阅读:
    扩展中国剩余定理
    bzoj 3816&&uoj #41. [清华集训2014]矩阵变换
    THUSC2017
    bzoj 4521: [Cqoi2016]手机号码
    bzoj 4871: [Shoi2017]摧毁“树状图”
    bzoj 2300 : [HAOI2011]防线修建
    bzoj 3853 : GCD Array
    HEOI 2017 游记
    bzoj3926: [Zjoi2015]诸神眷顾的幻想乡 广义后缀自动机模板
    bzoj 4310 跳蚤
  • 原文地址:https://www.cnblogs.com/darkmatter/p/3605588.html
Copyright © 2011-2022 走看看