I use CentOS for my personal cloud server, thus the commands will be a bit different if you using other operating system. For software you wish to make available for all users, I would recommend you to put them under /opt/apps
. As I will be using Lmod
to manage all the modules, I build all the software from source. If you wish to install directly, you can just use yum install
.
GCC compiler is required for compilation for many programs. To build GCC from source, you can follow the steps below.
# setup workspace
cd /opt/apps
mkdir -p gcc/source
cd ./gcc/source
# setup source code
git clone git://gcc.gnu.org/git/gcc.git
git branch -a # view all branch
git tag -l # view all tags
git checkout <BRANCH_OR_TAG>
./contrib/download_prerequisites
# make and install
cd /opt/apps/gcc
mkdir <VERSION> # e.g. mkdir 8.3.0
/opt/apps/gcc/source/configure --prefix=/opt/apps/gcc/<VERSION> --enable-languages=c,c++,fortran,go
make
make install
Compilation can take quite long
Install tmux
sudo yum install tmux
However, this is version 1.8 and is a bit too old. To install Tmux 2.8 from source:
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar -xf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr/local
make
make install
# DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
curl -LOk https://github.com/tmux/tmux/releases/download/2.8/tmux-2.8.tar.gz
tar -xf tmux-2.8.tar.gz
cd tmux-2.8
LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
make
make install
# pkill tmux
# close your terminal window (flushes cached tmux executable)
# open new shell and check tmux version
tmux -V
tmux cheatsheet: https://tmuxcheatsheet.com/
You may refer to Lmod Installation for detailed instructions. For a quick summary on the installation process, you can refer to my procedure.
- Try
lua -v
to check if you have lua installed. If not, install lua.
curl -R -O http://www.lua.org/ftp/lua-5.4.1.tar.gz
tar xf lua-5.4.1.tar.gz
cd lua-5.4.1
# if you want to set where you want to install
# e.g. change INSTALL_TOP to /opt/apps/lua/5.4.1
# and lua will be installed there
vim Makefile
make
make install
- Download Lmod from here and install (e.g. Lmod-8.4).
tar -xf Lmod-8.4.tar.bz2
cd Lmod-8.4
./configure --prefix=/opt/apps
make install
- Then Configure the shell setup.
ln -s /opt/apps/lmod/lmod/init/profile /etc/profile.d/z00_lmod.sh
ln -s /opt/apps/lmod/lmod/init/cshrc /etc/profile.d/z00_lmod.csh
ln -s /opt/apps/lmod/lmod/init/profile.fish /etc/fish/conf.d/z00_lmod.fish
- When you start you shell again, you can type
module
and see the option list and see some environment variables such asLMOD_CMD
.
$ echo $LMOD_CMD
/opt/apps/lmod/lmod/libexec/lmod
You can refer to Write your own modulefiles for more information. You can add module use <MODULEFILES_PATH>
in /etc/profile
so all users can initialize to the same bunch of paths upon start.
Install Docker
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo systemctl start docker
Docker will create a group called docker, other users can be granted access to docker by
sudo usermod -aG docker $USER
docker cheatsheet: https://www.docker.com/sites/default/files/d8/2019-09/docker-cheat-sheet.pdf
Singularity is a containerization tool similar to Docker. It is more for HPC community. Its image can be obtained by conversion from Docker Image. Follow the steps below to install Singularity.
sudo yum update && \
sudo yum groupinstall 'Development Tools' && \
sudo yum install libarchive-devel
git clone https://github.com/singularityware/singularity.git
cd singularity
./autogen.sh
./configure --prefix=/opt/apps/singularity --sysconfdir=/etc
make
sudo make install
OpenMPI lets you spawn mutltiple processes simultaneously for distributed job. As my VM has too few cores to make OpenMPI effective. I didn't not install it. You may refer to this guide if you want to build OpenMPI with UCX.
If you are a web developer, then most likely you will need Node.js for your frontend and backend devepment. To install Node.js on the server, you can download the binary files from the Node.js website with instructions.
To install Go, you can also download the binary directly at Go Installation.
oh-my-zsh
oh-my-tmux
vimrc-configuration
vim-plugin-code-autocomplete