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 update
5
6# tmux
7echo "installing tmux"
8apt -y install tmux
9
10echo "setting tmux config"
11cp ./.tmux.conf ~/.tmux.conf
12
13echo "installing mosh"
14apt -y install mosh
15
16# vim
17echo "setting vim config"
18cp ./.vimrc ~/.vimrc
19cp ./vimconfigbase.vim ~/vimconfigbase.vim
20
21# neovim
22echo "installing neovim"
23# alternative: apt install python3-neovim
24apt -y install neovim
25
26echo "setting nvim config"
27mkdir ~/.config
28mkdir ~/.config/nvim
29cp ./init.vim ~/.config/nvim/init.vim
30
31# vim & neovim PlugInstall
32echo "installing PlugInstall vim"
33curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
34 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
35echo "installing PlugInstall neovim"
36curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
37 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
38## once Plug installed, execute inside nvim:
39## :PlugInstall
40## :GoInstallBinaries
41
42# bash
43cp .sh_alias ~/.sh_alias
44echo "append .bashrc of this repo lines to the .bashrc system file"
45cat .bashrc >> ~/.bashrc
46
47source .bashrc
48
49# go
50echo "installing go 1.21.6"
51wget https://golang.org/dl/go1.21.6.linux-amd64.tar.gz
52tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
53
54# nodejs
55echo "installing nodejs v16"
56curl -sL https://deb.nodesource.com/setup_16.x | bash -
57apt install -y nodejs
58
59echo "installing npm http-server"
60npm install -g http-server
61
62echo "installing fzf fuzzy finder"
63git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
64~/.fzf/install
65
66echo "instaling ripgrep"
67# curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb
68# dpkg -i ripgrep_13.0.0_amd64.deb
69apt install ripgrep -y
70
71echo "install Rust"
72curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
73
74# needed for later rust packages installations
75apt install build-essential -y
76
77# btop
78wget https://github.com/aristocratos/btop/releases/download/v1.3.0/btop-x86_64-linux-musl.tbz
79tar -xjf btop-x86_64-linux-musl.tbz
80cd btop
81bash install.sh
82cd ..
83
84# assuming that Rust is installed
85echo "installing delta (gitdiff tool)"
86cargo install git-delta
87echo "append .gitconfig of this repo lines to the .gitconfig system file to use delta gitdiff tool"
88cat .gitconfig >> ~/.gitconfig
89
90# install gotty (for terminal visualization sharing)
91wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz
92tar -zxvf gotty_linux_amd64.tar.gz
93mv gotty /usr/gotty /usr/local/bin/
94
95# nginx
96apt install nginx -y
97
98# certbot
99apt update
100apt-get install software-properties-common -y
101add-apt-repository universe -y
102add-apt-repository ppa:certbot/certbot -y
103apt-get update
104apt-get install certbot python-certbot-nginx -y