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 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.24.3"
 51# wget https://golang.org/dl/go1.24.3.linux-amd64.tar.gz
 52# tar -C /usr/local -xzf go1.24.3.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
 63echo "installing fzf fuzzy finder"
 64git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
 65yes | ~/.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
 77apt install pkg-config libssl-dev -y
 78
 79# btop
 80# wget https://github.com/aristocratos/btop/releases/download/v1.3.0/btop-x86_64-linux-musl.tbz
 81# tar -xjf btop-x86_64-linux-musl.tbz
 82# cd btop
 83# bash install.sh
 84# cd ..
 85
 86# # assuming that Rust is installed
 87# echo "installing delta (gitdiff tool)"
 88# cargo install git-delta
 89# echo "append .gitconfig of this repo lines to the .gitconfig system file to use delta gitdiff tool"
 90# cat .gitconfig >> ~/.gitconfig
 91# 
 92# # install gotty (for terminal visualization sharing)
 93# wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz
 94# tar -zxvf gotty_linux_amd64.tar.gz
 95# mv gotty /usr/gotty /usr/local/bin/
 96# 
 97# # nginx
 98# apt install nginx -y
 99# 
100# # certbot
101# apt update
102# apt-get install software-properties-common -y
103# add-apt-repository universe -y
104# add-apt-repository ppa:certbot/certbot -y
105# apt-get update
106# apt-get install certbot python-certbot-nginx -y