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
42echo "append .bashrc of this repo lines to the .bashrc system file"
43cat .bashrc >> ~/.bashrc
44
45source .bashrc
46
47# go
48echo "installing go 1.14.2"
49wget https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz
50tar -C /usr/local -xzf go1.14.2.linux-amd64.tar.gz
51
52# nodejs
53echo "installing nodejs v10"
54curl -sL https://deb.nodesource.com/setup_10.x | bash -
55apt-get install -y nodejs
56
57echo "installing npm http-server"
58npm install -g http-server
59
60echo "installing fzf fuzzy finder"
61git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
62~/.fzf/install
63
64echo "instaling ripgrep"
65curl -LO https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb
66dpkg -i ripgrep_11.0.2_amd64.deb
67
68# nginx
69apt install nginx -y
70
71# certbot
72apt-get update
73apt-get install software-properties-common -y
74add-apt-repository universe -y
75add-apt-repository ppa:certbot/certbot -y
76apt-get update
77apt-get install certbot python-certbot-nginx -y