Server Setup on CentOS 7
Hisyam Johan
Posted on August 17, 2022
Bismillah...
We will installing useful applications on CentOS 7.
Docker
We will use snap package to install Docker. But first we required to install Snap first on our server.
sudo yum install epel-release
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
After done installing Snap. We reboot our machine sudo reboot
. After that, we can continue install Docker from Snap package.
sudo snap install docker
#Now we have successfully installed Docker. We can test it as root
#optional
#Running Docker as normal user
sudo groupadd docker
sudo usermod -aG docker $USER
#after this above steps, require us to relogin
sudo snap disable docker
sudo snap enable docker
Now we are done installing Docker.
NodeJS
We will use snap package to install NodeJS.
sudo snap install node --classic
Java 8
sudo rpm --import https://yum.corretto.aws/corretto.key
sudo curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo
sudo yum install -y java-1.8.0-amazon-corretto-devel
Maven
wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz -P /tmp
sudo tar xf /tmp/apache-maven-3.6.0-bin.tar.gz -C /opt
sudo ln -s /opt/apache-maven-3.6.0 /opt/maven
sudo vi /etc/profile.d/maven.sh
maven.sh
export JAVA_HOME=/usr/lib/jvm/jre
export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}
sudo chmod +x /etc/profile.d/maven.sh
source /etc/profile.d/maven.sh
Gitlab Runner
# Download the binary for your system
sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
# Give it permissions to execute
sudo chmod +x /usr/local/bin/gitlab-runner
# Create a GitLab CI user
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
# Create symlink
sudo ln -s /usr/local/bin/gitlab-runner /usr/bin/gitlab-runner
# Install and run as service
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start
💖 💪 🙅 🚩
Hisyam Johan
Posted on August 17, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.