Server Setup on CentOS 7

nhisyamj

Hisyam Johan

Posted on August 17, 2022

Server Setup on CentOS 7

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
Enter fullscreen mode Exit fullscreen mode

reference

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
Enter fullscreen mode Exit fullscreen mode

reference

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
Enter fullscreen mode Exit fullscreen mode

reference

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
Enter fullscreen mode Exit fullscreen mode

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}
Enter fullscreen mode Exit fullscreen mode
sudo chmod +x /etc/profile.d/maven.sh
source /etc/profile.d/maven.sh
Enter fullscreen mode Exit fullscreen mode

reference

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

Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
nhisyamj
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.

Related

CentOS Stream 9 : Memcached : Install
undefined CentOS Stream 9 : Memcached : Install

November 27, 2024

CentOS Stream 9 : Memcached : PHP
undefined CentOS Stream 9 : Memcached : PHP

November 27, 2024

Roadmap Cybersecurity
undefined Roadmap Cybersecurity

November 24, 2024