Skip to content

Instantly share code, notes, and snippets.

@shkey
Last active August 28, 2018 02:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shkey/8e7b3a5f9059231aaea89c7e5ca4c9e7 to your computer and use it in GitHub Desktop.
Save shkey/8e7b3a5f9059231aaea89c7e5ca4c9e7 to your computer and use it in GitHub Desktop.
some settings for ubuntu16.04
#!/bin/bash
echo "脚本开始运行了,请稍等片刻……"
# 换源并更新索引列表
sudo tee /etc/apt/sources.list <<-'EOF'
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
EOF
sudo apt update
sudo apt upgrade -y
# 安装基础软件
sudo apt install curl wget git gcc automake libncurses5-dev libevent-dev autoconf m4 libtool perl pkg-config -y
# 编译安装 vim
cd
git clone https://github.com/vim/vim.git
cd vim
sudo ./configure && sudo make
sudo make install
# 编译安装 tmux
cd
git clone https://github.com/tmux/tmux.git
cd tmux
sudo ./autogen.sh
sudo ./configure && sudo make
sudo make install
# 配置 tmux
cd
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .
# 安装 spacevim
curl -sLf https://spacevim.org/cn/install.sh | bash
# 更换 pip 源
sudo tee /etc/pip.conf <<-'EOF'
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
EOF
echo "所有操作都已经完成了,快去看看吧"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment