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
16
17# neovim
18echo "installing neovim"
19# alternative: apt-get install python3-neovim
20apt-get -y install neovim
21curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
22    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
23
24echo "setting nvim config"
25mkdir ~/.config
26mkdir ~/.config/nvim
27cp ./init.vim ~/.config/nvim/init.vim
28
29# vim & neovim PlugInstall
30echo "installing PlugInstall vim"
31curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
32    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
33echo "installing PlugInstall neovim"
34curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
35    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
36## once Plug installed, execute inside nvim:
37## :PlugInstall
38## :GoInstallBinaries
39
40# bash
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.14.2"
48wget https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz
49tar -C /usr/local -xzf go1.14.2.linux-amd64.tar.gz
50
51# nodejs
52echo "installing nodejs v10"
53curl -sL https://deb.nodesource.com/setup_10.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
67# nginx
68apt install nginx -y
69
70# certbot
71apt-get update
72apt-get install software-properties-common -y
73add-apt-repository universe -y
74add-apt-repository ppa:certbot/certbot -y
75apt-get update
76apt-get install certbot python-certbot-nginx -y