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
50# echo "installing go 1.21.6"
51# wget https://golang.org/dl/go1.21.6.linux-amd64.tar.gz
52# tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
53#
54# # nodejs
55# echo "installing nodejs v16"
56# # curl -sL https://deb.nodesource.com/setup_16.x | bash -
57# curl -fsSL https://deb.nodesource.com/setup_21.x | bash -
58# apt install -y nodejs
59#
60# echo "installing npm http-server"
61# npm install -g http-server
62#
63# echo "installing fzf fuzzy finder"
64# git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
65# ~/.fzf/install
66
67echo "instaling ripgrep"
68# curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb
69# dpkg -i ripgrep_13.0.0_amd64.deb
70apt install ripgrep -y
71
72echo "install Rust"
73curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
74
75# needed for later rust packages installations
76apt install build-essential -y
77
78# btop
79wget https://github.com/aristocratos/btop/releases/download/v1.3.0/btop-x86_64-linux-musl.tbz
80tar -xjf btop-x86_64-linux-musl.tbz
81cd btop
82bash install.sh
83cd ..
84
85# # assuming that Rust is installed
86# echo "installing delta (gitdiff tool)"
87# cargo install git-delta
88# echo "append .gitconfig of this repo lines to the .gitconfig system file to use delta gitdiff tool"
89# cat .gitconfig >> ~/.gitconfig
90#
91# # install gotty (for terminal visualization sharing)
92# wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz
93# tar -zxvf gotty_linux_amd64.tar.gz
94# mv gotty /usr/gotty /usr/local/bin/
95#
96# # nginx
97# apt install nginx -y
98#
99# # certbot
100# apt update
101# apt-get install software-properties-common -y
102# add-apt-repository universe -y
103# add-apt-repository ppa:certbot/certbot -y
104# apt-get update
105# apt-get install certbot python-certbot-nginx -y