From 3f99aae98843e799436a23733d4e14ddeb60d3b1 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Sat, 3 Feb 2024 19:01:29 +0100 Subject: [PATCH] update ripgrep installation, add swap file creation script --- README.md | 23 +++++++++++++++++++++++ install-new-server.sh | 7 ++++--- swap-create.sh | 14 ++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 swap-create.sh diff --git a/README.md b/README.md index ffce965..764e15e 100644 --- a/README.md +++ b/README.md @@ -54,3 +54,26 @@ alias lst='exa -l -snew' ### server side - radicale `config` - in `~/.conf/radicale/config` + +## swap file +```bash +# create swap file +> dd if=/dev/zero of=./swapfile bs=1GB count=40 + +# add permisions +> chmod 600 ./swapfile + +# format the swapfile +> mkswap ./swapfile + +# enable swap on swapfile +> swapon ./swapfile + +# check that it is enabled +> swapon --show + + +# make swap persistent: +# add the following line at the end of the /etc/fstab file +~/swapfile swap swap defaults 0 0 +``` diff --git a/install-new-server.sh b/install-new-server.sh index 84a65d2..e51ecb6 100644 --- a/install-new-server.sh +++ b/install-new-server.sh @@ -61,14 +61,15 @@ git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install echo "instaling ripgrep" -curl -LO https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb -dpkg -i ripgrep_11.0.2_amd64.deb +# curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb +# dpkg -i ripgrep_13.0.0_amd64.deb +apt install ripgrep -y echo "install Rust" curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # needed for later rust packages installations -apt install build-essential +apt install build-essential -y # assuming that Rust is installed echo "installing delta (gitdiff tool)" diff --git a/swap-create.sh b/swap-create.sh new file mode 100644 index 0000000..b10f8ea --- /dev/null +++ b/swap-create.sh @@ -0,0 +1,14 @@ +# create swap file +dd if=/dev/zero of=./swapfile bs=1GB count=40 + +# add permisions +chmod 600 ./swapfile + +# format the swapfile +mkswap ./swapfile + +# enable swap on swapfile +swapon ./swapfile + +# check that it is enabled +swapon --show