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