configs/install-new-server.sh
install-new-server.shRaw
1# assumming that curl & wget & git & vim are already installed and this repo is downloaded
2
3echo "updating"
4apt-get update
5
6# tmux
7echo "installing tmux"
8apt-get -y install tmux
9
10echo "setting tmux config"
11cp ./.tmux.conf ~/.tmux.conf
12
13# vim
14echo "setting vim config"
15cp ./.vimrc ~/.vimrc
16cp ./vimconfigbase.vim ~/vimconfigbase.vim
17
18# neovim
19echo "installing neovim"
20# alternative: apt-get install python3-neovim
21apt-get -y install neovim
22curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
23 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
24
25echo "setting nvim config"
26mkdir ~/.config
27mkdir ~/.config/nvim
28cp ./init.vim ~/.config/nvim/init.vim
29
30# vim & neovim PlugInstall
31echo "installing PlugInstall vim"
32curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
33 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
34echo "installing PlugInstall neovim"
35curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
36 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
37## once Plug installed, execute inside nvim:
38## :PlugInstall
39## :GoInstallBinaries
40
41# bash
42cp .bash_alias ~/.bash_alias
43echo "append .bashrc of this repo lines to the .bashrc system file"
44cat .bashrc >> ~/.bashrc
45
46source .bashrc
47
48# go
49echo "installing go 1.14.2"
50wget https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz
51tar -C /usr/local -xzf go1.14.2.linux-amd64.tar.gz
52
53# nodejs
54echo "installing nodejs v14"
55curl -sL https://deb.nodesource.com/setup_14.x | bash -
56apt-get install -y nodejs
57
58echo "installing npm http-server"
59npm install -g http-server
60
61echo "installing fzf fuzzy finder"
62git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
63~/.fzf/install
64
65echo "instaling ripgrep"
66curl -LO https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb
67dpkg -i ripgrep_11.0.2_amd64.deb
68
69echo "install Rust"
70curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
71
72# assuming that Rust is installed
73echo "installing delta (gitdiff tool)"
74cargo install git-delta
75echo "append .gitconfig of this repo lines to the .gitconfig system file to use delta gitdiff tool"
76cat .gitconfig >> ~/.gitconfig
77
78# install gotty (for terminal visualization sharing)
79wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz
80tar -zxvf gotty_linux_amd64.tar.gz
81mv gotty /usr/gotty /usr/local/bin/
82
83# nginx
84apt install nginx -y
85
86# certbot
87apt-get update
88apt-get install software-properties-common -y
89add-apt-repository universe -y
90add-apt-repository ppa:certbot/certbot -y
91apt-get update
92apt-get install certbot python-certbot-nginx -y