How to set up your raw server account at the quickest speed?
-
wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
-
run this sh
-
select the installation address and do conda init according to the installation guide
-
if you use zsh, need to copy >>> conda init >>> part shell code into .zshrc
- sudo apt-get install zsh (if there is no zsh on the server)
- git clone https://github.com.cnpmjs.org/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
- cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
- chsh -s /bin/zsh
- reboot
- ~/.zshrc ZSH_THEME="jonathan" (or other themes)
- plugins=(git sublime vscode extract tmux zsh-syntax-highlighting zsh-autosuggestions)
- git clone https://github.com.cnpmjs.org/zsh-users/zsh-syntax-highlighting.git
- mv zsh-syntax-highlighting/ $ZSH_CUSTOM/plugins/
- git clone https://github.com.cnpmjs.org/zsh-users/zsh-autosuggestions.git
- mv zsh-autosuggestions/ $ZSH_CUSTOM/plugins/
- sudo apt-get install tmux (install tmux if there is no tmux on the server)
- git clone https://github.com.cnpmjs.org/gpakosz/.tmux.git
- ln -s -f .tmux/.tmux.conf
- cp .tmux/.tmux.conf.local . (notice there is one dot at the end which means the current directory)
- add one line (set -g mouse on) in .tmux.conf.local file (if you use tmux 1.x)
- add two line 1st line is (set-option -g mouse on) and 2nd line is (bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'") (if you use tmux 2.x)
-
wget https://github.com.cnpmjs.org/neovim/neovim/releases/download/v0.4.3/nvim-linux64.tar.gz
-
tar -zxvf nvim-linux64.tar.gz
-
add the /bin file in the neovim into .zshrc as part of $PATH export PATH=$HOME/path_to_nvim/nvim-linux64/bin:$PATH
-
source ~/.zshrc
-
install neovim configuration
-
python3 -m pip install --user --upgrade pynvim
-
easy way
Since the install of install.sh can be quite difficult due to the existence of GFW, we provide a complete file to be put under ~/.config/nvim in order to directly use NeoVim
BaiduPan to Download nvim.zip to unzip and put under ~/.config as a /nvim subfile
链接: https://pan.baidu.com/s/1oXcHtykRPB2Ws7UIQKnLWA 密码: lu60
After that, you still need to download neovim-init.vim and run install.sh until the process of plugin installing in order to download some necessary packagess.
-
hard way
- modify the corresponding install.sh in the neovim-init.vim
- pip install -> pip3 install to prevent protential problems
- if having trouble downloading when :PlugInstall, choose to do Step7 below
- sh install.sh
- Since PlugInstall would have problems downloading, we copy the files under /.config/plugged and put these files into the same plugged/ file
- Change init.vim under /.config/nvim/ to allow jj and line number display
- let map leader=','
- inoremap jj `^
- set number
- set cindent
- set smartindent
- set ruler
- modify the corresponding install.sh in the neovim-init.vim
-
- pip install gpustat [under base env]
- add "alias gpu='~/anaconda3/bin/gpustat -i 1 --color'" into ~/.zshrc
- hostnamectl to check the version of linux if is ubuntub-based : sudo apt install epel-release , then we can sudo apt-install htop if is centos-based : sudo yum install epel-release, then we can sudo yum htop
- use df -h to check the NVM/HDD/SSD mount location
- put huge files into /NVM /HDD mount location