systemSetup

system setup, configuration and dotfiles
git clone https://noulin.net/git/systemSetup.git
Log | Files | Refs | README | LICENSE

commit 5c7407ac4ebdf434e917b21972a4c8740200e06c
parent 1ed6b99593f46d271c90f549f1c05c93fac8e58e
Author: Remy Noulin <loader2x@gmail.com>
Date:   Sun, 10 May 2020 20:47:20 +0200

add rhel 8 / centos 8 configuration

rhel_centos/1-system.sh          | 69 ++++++++++++++++++++++++++++++++++++++++
rhel_centos/2-desktopSystem.sh   | 32 +++++++++++++++++++
rhel_centos/3-home.sh            | 36 +++++++++++++++++++++
rhel_centos/4-easydoneit.sh      | 10 ++++++
rhel_centos/5-system.sh          | 47 +++++++++++++++++++++++++++
rhel_centos/6-home.sh            | 35 ++++++++++++++++++++
rhel_centos/diffHome.sh          | 41 ++++++++++++++++++++++++
rhel_centos/systemSetupCommit.sh |  4 +++
rhel_centos/updateHome.sh        | 13 ++++++++
rhel_centos/updateHomeNoGui.sh   | 45 ++++++++++++++++++++++++++
10 files changed, 332 insertions(+)

Diffstat:
Arhel_centos/1-system.sh | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Arhel_centos/2-desktopSystem.sh | 32++++++++++++++++++++++++++++++++
Arhel_centos/3-home.sh | 36++++++++++++++++++++++++++++++++++++
Arhel_centos/4-easydoneit.sh | 10++++++++++
Arhel_centos/5-system.sh | 47+++++++++++++++++++++++++++++++++++++++++++++++
Arhel_centos/6-home.sh | 35+++++++++++++++++++++++++++++++++++
Arhel_centos/diffHome.sh | 41+++++++++++++++++++++++++++++++++++++++++
Arhel_centos/systemSetupCommit.sh | 4++++
Arhel_centos/updateHome.sh | 13+++++++++++++
Arhel_centos/updateHomeNoGui.sh | 45+++++++++++++++++++++++++++++++++++++++++++++
10 files changed, 332 insertions(+), 0 deletions(-)

diff --git a/rhel_centos/1-system.sh b/rhel_centos/1-system.sh @@ -0,0 +1,69 @@ +# setup apt sources for non-free pacakges +yum check-update +# enable epel for extra packages +yum --enablerepo=extras install epel-release +sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-PowerTools.repo + +# fail2ban < sshguard +# p7zip-full glances sshuttle cmatrix kpcli unison python-nose python-nose2-cov python-nosexcover links cowsay sl llgal pixz uncrustify unifdef fish lcov python-pip slurm cloc python3-dev silversearcher-ag bmon lm-sensors toilet pinentry-curses exuberant-ctags mkdocs massif-visualizer valkyrie autojump + +yum install make sshguard screen ncftp rtorrent pbzip2 atop htop iftop w3m gcc clang libasan tmux ruby pcre-devel tree mc iotop qrencode figlet graphviz tig rdiff-backup pandoc elinks lynx doxygen ImageMagick graphicsmagick nmap moreutils pwgen ca-certificates zip pigz astyle valgrind gdb mutt check cppcheck ncdu source-highlight highlight erlang etckeeper ctags emacs-nox + +pip3 install ranger-fm + +git clone https://github.com/TinyCC/tinycc +cd tinycc/ +./configure +make +make install +cd .. + +cp ../dotfiles/webs.sh /usr/local/bin/ + +# git (root account) +cp ../dotfiles/.gitconfig /root/ +mkdir /root/.gittemplates +cp -R ../dotfiles/.gittemplates/* /root/.gittemplates/ +git config --global user.email "you@example.com" +git config --global user.name "Your Name" + +# diff-so-fancy +git clone https://github.com/so-fancy/diff-so-fancy.git +cp diff-so-fancy/diff-so-fancy /usr/local/bin/ +mkdir /usr/local/bin/lib +cp diff-so-fancy/lib/DiffHighlight.pm /usr/local/bin/lib/ + +# sheepy +git clone https://spartatek.se/git/sheepy.git +cd sheepy +./install.sh +spm -g install sheepyExamples +spm -g install hidir + +# git-off +git clone https://noulin.net/git/git-off.git +export OFF=`pwd`/git-off/c/git-off.c +cd /usr/local/bin +ln -s $OFF git-off + +# etckeeper +# error in debian stretch +mkdir /etc/.git/hooks +etckeeper init + +# install pick +apt-get install -y autotools-dev automake +git clone https://github.com/mptre/pick +cd pick +./autogen.sh +./configure +make install clean +cd .. + +# install yank +git clone https://github.com/mptre/yank +cd yank +make install clean +cd .. + +# end diff --git a/rhel_centos/2-desktopSystem.sh b/rhel_centos/2-desktopSystem.sh @@ -0,0 +1,32 @@ +# sway i3-wm suckless-tools feh gsetroot sweep aumix geeqie mplayer xine-ui gnucash xtightvncviewer gvncviewer vnc4server tightvncserver x11vnc terminator xemacs21 vim-gtk wifi-radar universalindentgui mlterm libsixel-bin arandr xbacklight chromium-browser midori eclipse-cdt +# audacious fails to install + +yum install plasma-desktop fluxbox meld cifs-utils keepassxc texlive texi2html gitk xsane w3m-img Thunar fontconfig-devel libX11-devel libXft-devel + +# suckless st +git clone git://git.suckless.org/st +apt-get install -y libfontconfig1-dev libxft-dev +export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ +cd st +git checkout -b local 66556d9 +cp ../dotfiles/config.def.h st/ +git add . +git commit -m "my config" +make clean install +cd .. + + + +# sc-im sc improved - vim-like spreadsheet calculator +# some libraries are missing when compiling sc-in in 1-system.sh +# here, it compiles +yum install bison ncurses-devel byacc +git clone https://github.com/andmarti1424/sc-im.git +cd sc-im/src +make && make install +cd ../.. + +# optional +# tilda conky celestia avidemux gnomebaker mhwaveedit kdebase kdebase-workspace gltron gtetrinet netris dillo + +# end diff --git a/rhel_centos/3-home.sh b/rhel_centos/3-home.sh @@ -0,0 +1,36 @@ +./updateHome.sh + +# TODO tcc not working - git off install + +#install vim vundle +git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + +# in vim run :PluginInstall +echo 'in vim run :PluginInstall' + +# fzf +git clone https://github.com/junegunn/fzf.git +cd fzf +./install --all +cd .. + +# setup diff-so-fancy in gitconfig +## commented because it is in .gitconfig +git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" +git config --global color.ui true + +git config --global color.diff-highlight.oldNormal "red bold" +git config --global color.diff-highlight.oldHighlight "red bold 52" +git config --global color.diff-highlight.newNormal "green bold" +git config --global color.diff-highlight.newHighlight "green bold 22" + +git config --global color.diff.meta "227" +git config --global color.diff.frag "magenta bold" +git config --global color.diff.commit "227 bold" +git config --global color.diff.old "red bold" +git config --global color.diff.new "green bold" +git config --global color.diff.whitespace "red reverse" +git config --bool --global diff-so-fancy.markEmptyLines false +git config --bool --global diff-so-fancy.changeHunkIndicators false +git config --bool --global diff-so-fancy.stripLeadingSymbols false +git config --bool --global diff-so-fancy.useUnicodeRuler false diff --git a/rhel_centos/4-easydoneit.sh b/rhel_centos/4-easydoneit.sh @@ -0,0 +1,10 @@ +# easydoneit +# create default database +edi version +docker run --name xapian -p 8000:80 -v ~/easydoneit_data/tasks:/data -d --restart=always remynoulin/xapian-omega-alp + +# add xapian index update to crontab +crontab -l > tmpCron +echo '0 5 * * * /home/'$USER'/bin/updateXapianIndex.sh' >> tmpCron +crontab tmpCron +rm tmpCron diff --git a/rhel_centos/5-system.sh b/rhel_centos/5-system.sh @@ -0,0 +1,47 @@ +# setup apt sources for non-free pacakges +sed -i 's/stretch main/stretch main contrib non-free/g' /etc/apt/sources.list +sed -i 's/stretch\/updates main/stretch\/updates main contrib non-free/g' /etc/apt/sources.list + +apt-get update -y +apt-get upgrade -y +apt-get remove -y vim-tiny +apt-get install -y fail2ban net-tools curl wget tmux build-essential tree apt-transport-https screen ranger mc vim-nox p7zip-full pbzip2 atop htop glances tcc sshuttle jigdo-file openssh-server ntp kpcli iftop iotop unison qrencode apt-file libpcre3-dev elinks w3m links nmap zip lynx apt-src tig rdiff-backup moreutils pwgen unattended-upgrades rsync ca-certificates pigz pixz astyle uncrustify unifdef valgrind fish gdb lcov silversearcher-ag ncdu bmon cppcheck check clang-3.9 exuberant-ctags mkdocs source-highlight highlight locate etckeeper autojump + +# vim +sed -i 's/"syntax on/syntax on/g' /etc/vim/vimrc +cp vimrc.local /etc/vim/vimrc.local + +cp ../dotfiles/webs.sh /usr/local/bin/ + +# git (root account) +cp ../dotfiles/.gitconfig /root/ +mkdir /root/.gittemplates +cp -R ../dotfiles/.gittemplates/* /root/.gittemplates/ +git config --global user.email "you@example.com" +git config --global user.name "Your Name" + +# diff-so-fancy +git clone https://github.com/so-fancy/diff-so-fancy.git +cp diff-so-fancy/diff-so-fancy /usr/local/bin/ +mkdir /usr/local/bin/lib +cp diff-so-fancy/lib/DiffHighlight.pm /usr/local/bin/lib/ + +# sheepy +git clone https://spartatek.se/git/sheepy.git +cd sheepy +./install.sh +spm -g install sheepyExamples + +# git-off +git clone https://noulin.net/git/git-off.git +export OFF=`pwd`/git-off/c/git-off.c +cd /usr/local/bin +ln -s $OFF git-off + +# etckeeper +# error in debian stretch +mkdir /etc/.git/hooks +etckeeper init + +# end +apt-get autoremove -y diff --git a/rhel_centos/6-home.sh b/rhel_centos/6-home.sh @@ -0,0 +1,35 @@ +./updateHomeNoGui.sh + +git off install + +#install vim vundle +git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + +# in vim run :PluginInstall +echo 'in vim run :PluginInstall' + +# fzf +git clone https://github.com/junegunn/fzf.git +cd fzf +./install --all +cd .. + +# setup diff-so-fancy in gitconfig + git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" + git config --global color.ui true + + git config --global color.diff-highlight.oldNormal "red bold" + git config --global color.diff-highlight.oldHighlight "red bold 52" + git config --global color.diff-highlight.newNormal "green bold" + git config --global color.diff-highlight.newHighlight "green bold 22" + + git config --global color.diff.meta "227" + git config --global color.diff.frag "magenta bold" + git config --global color.diff.commit "227 bold" + git config --global color.diff.old "red bold" + git config --global color.diff.new "green bold" + git config --global color.diff.whitespace "red reverse" +git config --bool --global diff-so-fancy.markEmptyLines false +git config --bool --global diff-so-fancy.changeHunkIndicators false +git config --bool --global diff-so-fancy.stripLeadingSymbols false +git config --bool --global diff-so-fancy.useUnicodeRuler false diff --git a/rhel_centos/diffHome.sh b/rhel_centos/diffHome.sh @@ -0,0 +1,41 @@ +echo diff ../dotfiles/.bash_aliases ~/.bash_aliases +diff ../dotfiles/.bash_aliases ~/.bash_aliases +echo diff ../dotfiles/.bashrc ~/.bashrc +diff ../dotfiles/.bashrc ~/.bashrc +echo diff ../dotfiles/.gdbinit ~/.gdbinit +diff ../dotfiles/.gdbinit ~/.gdbinit +echo diff ../dotfiles/.gitconfig ~/.gitconfig +diff ../dotfiles/.gitconfig ~/.gitconfig +echo diff ../dotfiles/.gittemplates/hooks/prepare-commit-msg ~/.gittemplates/hooks/prepare-commit-msg +diff ../dotfiles/.gittemplates/hooks/prepare-commit-msg ~/.gittemplates/hooks/prepare-commit-msg +echo diff ../dotfiles/.tmux.conf ~/.tmux.conf +diff ../dotfiles/.tmux.conf ~/.tmux.conf +#diff -R ../dotfiles/.vim/* ~/.vim/ +echo diff ../dotfiles/.vimrc ~/.vimrc +diff ../dotfiles/.vimrc ~/.vimrc +#diff ../dotfiles/new.sh ~/bin/ +#diff ../dotfiles/updateXapianIndex.sh ~/bin/ +#diff ../dotfiles/xapianOmegaSearch.sh ~/bin/ +echo diff ../dotfiles/gpg-agent.conf ~/.gnupg/gpg-agent.conf +diff ../dotfiles/gpg-agent.conf ~/.gnupg/gpg-agent.conf +echo diff ../dotfiles/.ssh/config ~/.ssh/config +diff ../dotfiles/.ssh/config ~/.ssh/config + +# i3 +#diff -R ../dotfiles/.i3/* ~/.i3/ + +# fluxbox +#diff -R ../dotfiles/.fluxbox/* ~/.fluxbox/ + +# mc +#diff -R ../dotfiles/mc/* ~/.config/mc/ + +# ranger sixel/mlterm configuration +echo diff ../dotfiles/rc.conf ~/.config/ranger/rc.conf +diff ../dotfiles/rc.conf ~/.config/ranger/rc.conf +echo diff ../dotfiles/default.py ~/.config/ranger/colorschemes/default.py +diff ../dotfiles/default.py ~/.config/ranger/colorschemes/default.py + +echo +echo ---- +echo run ./systemSetupCommit.sh when the config is synchronized with latest commit diff --git a/rhel_centos/systemSetupCommit.sh b/rhel_centos/systemSetupCommit.sh @@ -0,0 +1,4 @@ +echo "last setup from commit:" > ~/.systemSetupCommit.txt +git show --oneline -s >> ~/.systemSetupCommit.txt +echo "Updated ~/.systemSetupCommit.txt" +cat ~/.systemSetupCommit.txt diff --git a/rhel_centos/updateHome.sh b/rhel_centos/updateHome.sh @@ -0,0 +1,13 @@ +./updateHomeNoGui.sh + +# i3 +mkdir ~/.i3 +cp -R ../dotfiles/.i3/* ~/.i3/ + +# fluxbox +mkdir ~/.fluxbox +cp -R ../dotfiles/.fluxbox/* ~/.fluxbox/ + +# mlterm +mkdir ~/.mlterm +cp -R ../dotfiles/.mlterm/* ~/.mlterm/ diff --git a/rhel_centos/updateHomeNoGui.sh b/rhel_centos/updateHomeNoGui.sh @@ -0,0 +1,45 @@ +cp .bash_aliases ~/ +cp .bashrc ~/ +cp ../dotfiles/.gdbinit ~/ +cp ../dotfiles/.gitconfig ~/ +cp -R ../dotfiles/.gittemplates ~/ +cp ../dotfiles/.tmux.conf ~/ +mkdir ~/.vim +cp -R ../dotfiles/.vim/* ~/.vim/ +cp ../dotfiles/.vimrc ~/ +mkdir ~/bin +cp ../dotfiles/new.sh ~/bin/ +cp ../dotfiles/gf ~/bin/ +cp ../dotfiles/gre ~/bin/ +cp ../dotfiles/mk.sh ~/bin/ +cp ../dotfiles/updateXapianIndex.sh ~/bin/ +cp ../dotfiles/xapianOmegaSearch.sh ~/bin/ +cp ../dotfiles/ref.sh ~/bin/ +cp ../dotfiles/ug.sh ~/bin/ +cp ../dotfiles/gle.sh ~/bin/ +cp ../dotfiles/gdf.sh ~/bin/ +cp ../dotfiles/vop.c ~/bin/ +cp ../dotfiles/N.sh ~/bin/ +cp ../dotfiles/pl.sh ~/bin/ +cp ../dotfiles/c.sh ~/bin/ +sheepy -c ~/bin/vop.c +cp ../dotfiles/gop ~/bin/ +mkdir ~/.gnupg +cp ../dotfiles/gpg-agent.conf ~/.gnupg/ +mkdir ~/.ssh +chmod 700 ~/.ssh +cp ../dotfiles/.ssh/config ~/.ssh/ +mkdir ~/.w3m +cp ../dotfiles/.w3m/config ~/.w3m/ + +# mc +mkdir -p ~/.config/mc +cp -R ../dotfiles/mc/* ~/.config/mc/ + +# ranger sixel/mlterm configuration +mkdir -p ~/.config/ranger/colorschemes +cp ../dotfiles/rc.conf ~/.config/ranger/ +cp ../dotfiles/default.py ~/.config/ranger/colorschemes/ + +# save current commit in home +./systemSetupCommit.sh