arnaucube
arnaucube/configsPublic Self-hosted repository
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.17.1"
48wget https://golang.org/dl/go1.17.1.linux-amd64.tar.gz
49tar -C /usr/local -xzf go1.17.1.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"
64curl -LO https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb
65dpkg -i ripgrep_11.0.2_amd64.deb
66
67echo "install Rust"
68curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
69
70# needed for later rust packages installations
71apt install build-essential
72
73# assuming that Rust is installed
74echo "installing delta (gitdiff tool)"
75cargo install git-delta
76echo "append .gitconfig of this repo lines to the .gitconfig system file to use delta gitdiff tool"
77cat .gitconfig >> ~/.gitconfig
78
79# install gotty (for terminal visualization sharing)
80wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz
81tar -zxvf gotty_linux_amd64.tar.gz
82mv gotty /usr/gotty /usr/local/bin/
83
84# nginx
85apt install nginx -y
86
87# certbot
88apt-get update
89apt-get install software-properties-common -y
90add-apt-repository universe -y
91add-apt-repository ppa:certbot/certbot -y
92apt-get update
93apt-get install certbot python-certbot-nginx -y