0% found this document useful (0 votes)
4 views

Installations Document

Uploaded by

Nani Royal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Installations Document

Uploaded by

Nani Royal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

GIT

Git is a free and open source distributed version control system designed to handle everything
from small to very large projects with speed and efficiency.

To install Git in Linux

$ sudo yum install git [On CentOS/RHEL]


$ sudo apt install git [On Debian/Ubuntu]

To check version :

$ git --version

Java

Java is an object-oriented programming language that produces software for multiple


platforms. When a programmer writes a Java application, the compiled code (known as
bytecode) runs on most operating systems (OS), including Windows, Linux and Mac OS.

To install

#yum install java

To check Java version or JDK files

#java -version or whereis java


MAVEN

Maven is a build automation tool used primarily for Java projects. Maven can also build any
number of projects into desired output such as jar, war, metadata. Maven can also be used to
build and manage projects written in C#, Ruby, Scala, and other languages.

Install Apache Maven

# wget http://www-us.apache.org/dist/maven/maven-
3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz

Extract the downloaded archive file, and rename it using following commands.

# tar -xvf apache-maven-3.5.4-bin.tar.gz

# mv apache-maven-3.5.4/ apache-maven/
Configure Apache Maven Environment

# cd /etc/profile.d/

# vim maven.sh

configuration in ‘maven.sh’ configuration file

# Apache Maven Environment Variables

# MAVEN_HOME for Maven 1 - M2_HOME for Maven 2

export M2_HOME=/usr/local/src/apache-maven

export PATH=${M2_HOME}/bin:${PATH}

Check Apache Maven Version

# mvn --version

Output:

Apache Maven 3.5.4


(1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-
17T19:33:14+01:00)

Maven home: /usr/local/src/apache-maven

Java version: 9.0.4, vendor: Oracle Corporation, runtime:


/opt/java/jdk-9.0.4
Jenkins

Jenkins is a free and open source automation server. It helps automate the parts
of software development related to building, testing, and deploying,
facilitating continuous integration and continuous delivery. It is a server-based
system that runs in servlet containers such as Apache Tomcat. It supports version
control tools.

Process of Installation:
Step 1. Go to mobaxterm
Step 2. Login to server (from AWS console@public Ip)
Step 3. Need to Install packages like Java&wget
# YUM INSTALL JAVA
#YUM INSTALL WGET
To check Java version or JDK files
JAVA -VERSION or WHERE IS JAVA

1. curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee


/etc/yum.repos.d/jenkins.repo

2. rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

3. yum install jenkins


4. systemctl /service start Jenkins
5. systemctl /service status jenkins
6. systemctl enable Jenkins

How to access from browser (google chrome)


<PublicIP of ur server>:8080

Eg : http://18.220.172.206:8080/
Sample Link
https://linuxize.com/post/how-to-install-jenkins-on-centos-7/

Three Tier Architecture

Install Apache Web Server

# yum -y update
# yum install httpd

# systemctl start httpd

# systemctl enable httpd

# systemctl status httpd

Check httpd is running or not

# ps -ef|grep httpd

# netstat -tnlp

NOTE : the default port of httpd is 80

# vi /etc/httpd/conf.d/vhost.conf

NameVirtualHost *:80

<VirtualHost *:80>

ServerAdmin [email protected]

ServerName mytecmint.com

ServerAlias www.mytecmint.com
DocumentRoot /var/www/html/mytecmint.com/

ErrorLog /var/log/httpd/mytecmint.com/error.log

CustomLog /var/log/httpd/mytecmint.com/access.log
combined

</VirtualHost>

# mkdir -p /var/www/html/mytecmint.com [Document Root


- Add Files]

# mkdir -p /var/log/httpd/mytecmint.com [Log Directory]

echo "Welcome to My TecMint Website" >


/var/www/html/mytecmint.com/index.html

# systemctl restart httpd.service

How To Install Nginx Server In CentOS / RHEL 7&8

vi /etc/yum.repos.d/nginx.repo

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/rhel/7/$basearch/
gpgcheck=0
enabled=1

yum install nginx

systemctl status nginx

systemctl start nginx

open the https port (443) and http port (80)

 test using curl

curl -I 192.168.170.150 u will get response as 200 OK

curl 192.168.170.150

Apache Important Files and Directoires


 The default server root directory (top level directory containing
configuration files): /etc/httpd
 The main Apache configuration file: /etc/httpd/conf/httpd.conf
 Additional configurations can be added in: /etc/httpd/conf.d/
 Apache virtual host configuration
file: /etc/httpd/conf.d/vhost.conf
 Configurations for modules: /etc/httpd/conf.modules.d/
 Apache default server document root directory (stores web
files): /var/www/html

Ansible
Ansible is an open-source software provisioning, configuration management, and
application-deployment tool enabling infrastructure as code. It runs on many Unix-
like systems, and can configure both Unix-like systems as well as Microsoft
Windows.

Installing Ansible on RHEL

# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y


# dnf install ansible
# ansible --version
# cd /etc/ansible/
# ll
# cat ansible.cfg
# dnf install python3 python3-pip -y
#python3 -V

Confirming your installation


$ ansible all -m ping --ask-pass

DOCKER

Docker is a set of platform as a service products that use OS-level virtualization to


deliver software in packages called containers. Containers are isolated from one
another and bundle their own software, libraries and configuration files; they can
communicate with each other through well-defined channels.

Install Docker:

dnf update -y

dnf config-manager

--add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf list docker-ce

dnf install docker-ce --nobest -y

systemctl start docker

systemctl enable docker

docker --version

docker run hello-world

How To Install MongoDB on CentOS/Redhat


8
vi /etc/yum.repos.d/mongodb-org.repo

### add below content in that file ###

[mongodb-org]

name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/
4.4/x86_64/

gpgcheck=1

enabled=1

gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc

# dnf repolist

# dnf install mongodb-org -y


# mongo --version

You might also like