Here are the steps for installing Apache Maven on RHEL:
Make sure you install Java first by following below steps:
sudo yum -y install wget
sudo wget --no-check-certificate --no-cookies --header 'Cookie: oraclelicense=accept-securebackup-cookie' 'http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.rpm'
sudo rpm -i jdk-8u141-linux-x64.rpm
Now steps for installing Apache Maven:
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
the above command should print the below message:
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T07:58:13Z)
Maven home: /usr/share/apache-maven
Java version: 1.7.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.181-2.6.14.8.el7_5.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "unix"
Hands on DevOps Coaching provided on AWS and Azure Cloud platforms. please contact devops.coaching@gmail.com for more info.
Tuesday, September 26, 2017
Tuesday, September 12, 2017
How to change default port number in Sonatype Nexus 2? - Change default port number in SonaType Nexus 2
The default port number for Sonatype Nexus is 8081. It can be changed though.
If you would like to change it, modify in below location:
$install-dir/etc/org.sonatype.nexus.cfg file
application-port=8082
Click here to see steps for how to install Nexus on Redhat.
Click here to see steps for how to install Nexus on Ubuntu.
If you would like to change it, modify in below location:
$install-dir/etc/org.sonatype.nexus.cfg file
application-port=8082
Click here to see steps for how to install Nexus on Redhat.
Click here to see steps for how to install Nexus on Ubuntu.
Monday, September 11, 2017
How to install Sonarqube on Redhat enterprise Linux - Install Sonarqube on Redhat enterprise Linux (RHEL)
SonarQube is popular static code analysis tool. It is Java based tool. Here are the steps for installing Sonarqube.
first you need to install a database as SonarQube uses database to store code quality report. We can use MySQL, Postgres, Oracle or MSSQL. Here are the steps for setting up SonarQube using MySQL database :
sudo yum update -y
sudo yum install wget -yMySQL installation steps:
sudo rpm -ivh mysql-community-release-el7-5. noarch.rpm
sudo yum install mysql-server -y
Start MySQL service
Start MySQL service
sudo systemctl start mysqld
Would you like to setup VALIDATE PASSWORD component?
type n
now set up password for root user
Remove anonymous users?
type y
for Disallow root login remotely?
type y
for Remove test database and access to it?
type y
for Reload privileges tables
type y
Setup Sonarqube user and password
mysql -u root -p
SHOW GLOBAL VARIABLES LIKE 'storage_engine';
CREATE DATABASE sonar;
GRANT ALL PRIVILEGES ON sonar.* TO 'sonar'@'localhost';
now type exit to come out of MySQL.
Sonarqube web server installation steps:
Start with java installation.
sudo wget --no-check-certificate --no-cookies --header 'Cookie: oraclelicense=accept- securebackup-cookie' 'http://download.oracle.com/ otn-pub/java/jdk/8u141-b15/ 336fa29ff2bb4ef291e347e091f7f4 a7/jdk-8u141-linux-x64.rpm'
cd /opt
sudo wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-6.7.6.zip
sudo yum install unzip -y
sudo unzip sonarqube-6.7.6.zip
sudo vi /opt/sonarqube/conf/sonar. properties
uncomment the below lines by removing #:
sonar.jdbc.username=sonar
sonar.jdbc.password=password
sonar.jdbc.url=jdbc:mysql:// localhost:3306/sonar? useUnicode=true& characterEncoding=utf8& rewriteBatchedStatements=true& useConfigs=maxPerformance
sonar.web.host=0.0.0.0
sonar.web.javaOpts=-Xmx512m -Xms256m -XX:+ HeapDumpOnOutOfMemoryError
sonar.ce.javaOpts=-Xmx512m -Xms256m -XX:+HeapDumpOnOutOfMemoryError
Run Sonarqube as sonar user
create a user called sonar by executing below command:
sudo useradd sonar
sudo chown -R sonar:sonar /opt/sonarqube
Edit the sonar.sh start script and change the #RUN_AS_USER to be RUN_AS_USER=sonar
sudo vi /opt/sonarqube/bin/linux-x86-64/sonar.sh
Change
RUN_AS_USER=sonar
Run Sonarqube as sonar user
create a user called sonar by executing below command:
sudo useradd sonar
sudo chown -R sonar:sonar /opt/sonarqube
Edit the sonar.sh start script and change the #RUN_AS_USER to be RUN_AS_USER=sonar
sudo vi /opt/sonarqube/bin/linux-x86-64/sonar.sh
Change
RUN_AS_USER=sonar
now start the server
sudo sh /opt/sonarqube/bin/linux-x86- 64/sonar.sh start
for any issues, look at logs at
tail -f /opt/sonarqube/logs/sonar.log
Verify by going to browser http://hostname:9000
Docker installation on Ubuntu 16.0.4 server
Docker can be installed on Ubuntu 16.0.4 by following below steps:
sudo curl -fsSLhttps://download.docker.com/li nux/ubuntu/gpg | sudo apt-key add -
sudo curl -fsSLhttps://download.docker.com/li
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
ps -ef | grep docker
docker –version
docker run hello-world
Subscribe to:
Posts (Atom)
-
We get these questions a lot from the teams we are coaching at my customer's work place How to create microservices? How to break...
-
Let's learn how to connect to an EC2 instance running in AWS from your local machine. Your local machine can be Windows laptop or MacBoo...
-
Amazon Elastic Container Registry (ECR) is a fully managed container registry service provided by Amazon Web Services (AWS). It allows user...