Following are the steps for a complete clean build:
Tag: Steps
Steps to Start-Stop Nagios XI Server | Nagios XI Tutorial
How to start and stop Naxios XI Server?
How to stop Naxios XI Server?
service nagiosxi stop
service npcd stop
service ndo2db stop
service nagios stop
service postgresql stop
service mysqld stop
service httpd stop
How to start Naxios XI Server?
service httpd start
service mysqld start
service postgresql start
service nagios start
service ndo2db start
service npcd start
service nagiosxi start
Vagrant installation in Centos, Ubuntu and Windows | Vagrant Tutorials

Java Installation Process in Linux – Complete guide
Download, Install and Configure JDK 8 & JRE 8
Platfrom – Debian & Ubuntu
#JRE8 - Package contains just the Java Runtime Environment 8 $ sudo apt-get install openjdk-8-jre #JKD8 - Package contains just the Java Developement Environment 8 $ sudo apt-get install openjdk-8-jdk
Platfrom – Fedora, Oracle Linux, Red Hat Enterprise Linux, etc
#JRE8 - Package contains just the Java Runtime Environment 8 $ su -c “yum install java-1.8.0-openjdk” #JKD8 - Package contains just the Java Developement Environment 8 $ su -c "yum install java-1.8.0-openjdk-devel" $ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.rpm" $ wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm > jdk-8u112-linux-x64.rpm
Platfrom – All platforms of Linux, Windows and Mac in Tar ball format
$ wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz $ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz" $ wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
How to set JAVA in Linux System?
$ export JAVA_HOME=/opt/jdk1.8.0_144/ $ export PATH=/opt/jdk1.8.0_144/bin:$PATH;
Download, Install and Configure JDK 7 & JRE 7
Platfrom – Debian & Ubuntu
#JRE7 - Package contains just the Java Runtime Environment 7 $ sudo apt-get install openjdk-7-jre #JKD7 - Package contains just the Java Developement Environment 7 $ sudo apt-get install openjdk-7-jdk
Platfrom – Fedora, Oracle Linux, Red Hat Enterprise Linux, etc
$ su -c “yum install java-1.7.0-openjdk” $ su -c “yum install java-1.7.0-openjdk-devel”
Platfrom – All platforms of Linux, Windows and Mac in Tar ball format
wget –no-cookies –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com” “http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz” wget –no-check-certificate –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz curl -v -j -k -L -H “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm > jdk-7u79-linux-x64.rpm
JDK 6
Debian, Ubuntu, etc.
On the command line, type:
$ sudo apt-get install openjdk-6-jre
The openjdk-6-jre package contains just the Java Runtime Environment.
$ sudo apt-get install openjdk-6-jdk
If you want to develop Java programs then install the openjdk-6-jdk package.
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c “yum install java-1.6.0-openjdk”
The java-1.6.0-openjdk package contains just the Java Runtime Environment.
$ su -c “yum install java-1.6.0-openjdk-devel”
If you want to develop Java programs then install the java-1.6.0-openjdk-devel package.
How to Install Jenkins using Docker | Step by step guide | scmGalaxy

$ apt-get install docker (Ubuntu) $ yum install docker (RHEL/CENTOS)
$ docker pull jenkins
Step 3: Next, run a container using this image and map data directory from the container to the host; e.g in the example below /var/jenkins_home from the container is mapped to jenkins/ directory from the current path on the host. Jenkins 8080 port is also exposed to the host as 49001.
Mapping port 8080 on the host to the container (the web ui), port 50000 to port 50000 (for build agents). Run with `-p 50000:50000` so you can connect JNLP slaves. For port 50000. This is to handle connections from JNLP based build slaves. This will store the workspace in /var/jenkins_home. All Jenkins data lives in there including plugins and configuration.
$ docker run -d -p 8080:8080 -p 50000:50000 jenkins
$ docker run -d -p 8080:8080 -p 50000:50000 -u root -v $PWD/jenkins:/var/jenkins_home jenkins
docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins -u root
$ mkdir jenkins $ chown 1000 jenkins $ docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins
$ docker exec name tail -f /var/log/jenkins/jenkins.log Where name = --name
Simple Docker workflow – Quick start | Docker Tutorial

How to Install Docker in Linux?

Sonatype Nexus installation using Docker
Sonatype Nexus Repository Manager 2
Install a Docker Engine
Installation Instructions can be found here – http://www.devopsschool.com/tutorial/docker/docker-install-and-configuration.html
Download a Sonatype Nexus Image
> docker pull sonatype/nexus
For Sonatype Nexus Repository Manager 2 OSS, To run (if port 8081 is open on your host):
> docker run -d -p 8081:8081 –name nexus sonatype/nexus:oss
For Sonatype Nexus Repository Manager 2 PRO, To run (if port 8081 is open on your host):
> docker run -d -p 8081:8081 –name nexus sonatype/nexus:pro
To determine the port that the container is listening on:
> docker ps -l
To Test
> curl http://localhost:8081/nexus/service/local/status
Browse Following URL
http://localhost:8081/nexus/
It can take some time (2-3 minutes) for the service to launch in a new container. You can tail the log to determine once Nexus is ready:
> docker logs -f nexus
Note
Default credentials are: admin / admin123
Installation of Nexus is to /opt/sonatype/nexus
Notably: /opt/sonatype/nexus/conf/nexus.properties is the properties file.
Parameters (nexus-work and nexus-webapp-context-path) defined
here are overridden in the JVM invocation.
Sonatype Nexus Repository Manager 3
Install a Docker Engine
Installation Instructions can be found here – http://www.devopsschool.com/tutorial/docker/docker-install-and-configuration.html
Clone the Repostory from Gihub
> git clone https://github.com/sonatype/docker-nexus3
> cd docker-nexus3
Build a Image for Sonatype Nexus Repository Manager 3 OSS
> docker build –rm –tag sonatype/nexus oss/
Build a Image for Sonatype Nexus Repository Manager 3 PRO
> docker build –rm –tag sonatype/nexus:pro pro/
For Sonatype Nexus Repository Manager 2 OSS, To run (if port 8081 is open on your host):
> docker run -d -p 8081:8081 –name nexus sonatype/nexus:oss
For Sonatype Nexus Repository Manager 2 PRO, To run (if port 8081 is open on your host):
> docker run -d -p 8081:8081 –name nexus sonatype/nexus:pro
To determine the port that the container is listening on:
> docker ps -l
To Test
> curl http://localhost:8081/nexus/service/local/status
Browse Following URL
http://localhost:8081/nexus/
It can take some time (2-3 minutes) for the service to launch in a new container. You can tail the log to determine once Nexus is ready:
> docker logs -f nexus
Note
Default credentials are: admin / admin123
Installation of Nexus is to /opt/sonatype/nexus
Notably: /opt/sonatype/nexus/conf/nexus.properties is the properties file.
Parameters (nexus-work and nexus-webapp-context-path) defined
here are overridden in the JVM invocation.
Reference
https://hub.docker.com/r/sonatype/nexus/
How to Publish a Nuget package in NuGet Gallery?
How to Publish a Nuget package in NuGet Gallery?
Step 1 – Create an account at NuGet.org
Head over to http://nuget.org/ and register for an account. Once you do that, click on “My Account” to see an API Key that was generated for you.
Step 2 – In a command console, run the command:
$ nuget setApiKey Your-API-Key
This will store your API key so that you never need to do this step again on this machine.
Push your package to NuGet Gallery using the command:
$ nuget push YourPackage.nupkg
Reference
https://docs.nuget.org/consume/command-line-reference
How to create a package in Nuget? | Nuget Tutorial
Hosting your own Repository in Nuget
How to create a package in Nuget?
Mehtod 1 – From An Assembly
If you have an assembly, you can easily generate a nuspec file from metadata within the assembly and create a package.
$ nuget spec MyAssembly.dll
This creates a Nuspec file. Edit the NuSpec file as needed and then
$ nuget pack MyAssembly.nuspec
Mehtod 2 – Commands Lines using convention based working directory
Some packages contain more than just assemblies. They may contain
Content and source code that should be injected into the target project.
PowerShell scripts and executables.
Configuration file and source code transformations.
To create a package in this way, you can layout a directory structure that follows the NuGet conventions.
tools – The tools folder of a package is for powershell scripts and programs accessible from the Package Manager Console. After the folder is copied to the target project, it is added to the `$env:Path (PATH) environment variable.
lib – Assemblies (.dll files) in the lib folder are added as assembly references when the package is installed.
content – Files in the content folder are copied to the root of your application when the package is installed.Think of the Content folder as the root of your target application. For example, if I want a package to add an image in the /images directory of the target application, make sure to place the image in the Content/images folder of the package.
build – The build folder of a package is for MSBuild targets files that are automatically inserted into the .csproj file of the application.
Step 1- Create the manifest
$ nuget spec
This will create an XML file with the .nuspec extension.
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MyPackageId</id>
<version>1.0</version>
<authors>philha</authors>
<owners>philha</owners>
<licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
<projectUrl>http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE</projectUrl>
<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Package description</description>
<tags>Tag1 Tag2</tags>
<dependencies>
<dependency id="SampleDependency" version="1.0" />
</dependencies>
</metadata>
</package>
Edit this file to fill in the values appropriate for your package. Then create the folders needed by your package and copy the correct content in each folder.
$ mkdir lib
$ mkdir tools
$ mkdir content
$ mkdir content\controllers
$ copy ..\src\SomeController.cs content
$ copy ..\src\MyLibrary lib
$ copy ..\src\SomePowershellScript.ps1 tool
With the working directory in place with content, run the following command:
nuget pack YourPackage.nuspec
Mehtod 3 – Using Visual Studio Projects
For simple packages, creating a package from a csproj or vbproj file is a convenient way to create packages. For example, other packages that have been installed into your project will be referenced as dependencies when you create a package this way.
In the folder where the csproj file is, run:
$ nuget spec
This creates a special nuspec file with tokens meant to be replaced at pack time based on the project metadata. For example, $version$ gets replaced by the version specified in the AssemblyVersionAttribute (or AssemblyInformationalVersionAttribute if present) applied to your assembly (typically within the AssemblyInfo.cs file).
These tokens will only be replaced when you execute the pack command with the project file, and not with the nuspec file. The contents of the nuspec file will be located and honored, with the appropriate token replacements executed.
The following is a list of the supported replacement tokens.
Token Source
$id$ The Assembly name
$version$ The assembly version as specified in the assembly’s
AssemblyVersionAttribute (or AssemblyInformationalVersionAttribute if present).
$author$ The company as specified in the AssemblyCompanyAttribute.
$description$ The description as specified in the AssemblyDescriptionAttribute.
You can then edit this nuspec file if you need to customize it. e.g. if you don’t want token replacement for some fields, you hard code them in the nuspec instead.
Also, if you want to pull additional files into the package, you can use a node in the nuspec. e.g. suppose you want to add all the files from some arbitrary other folder into the package, you’d have:
<files>
<file src="..\..\SomeRoot\**\*.*" target="" />
</files>
You need to run ‘nuget pack’ on the project file, not the nuspec itself. But the nuspec will in fact get picked up. Once your nuspec is ready, you can run:
$ nuget pack MyProject.csproj
If the project references other projects, you can add the referenced projects as part of the package, or as dependencies with -IncludeReferencedProjects option. This is done recursively. For example, suppose you have project A.csproj, which references B.csproj and C.csproj, while B.csproj references D.csproj & E.csproj, C.csproj references F.csproj & G.csproj. Then, when you run
nuget pack A.csproj -IncludeReferencedProjects
the generated package will contain files from projects B, C, D, E, F & G, in addition to files from project A.
If a referenced project has a corresponding nuspec file with the same name, then that referenced project is added as a dependency instead. Using the same example, suppose now there is file C.nuspec in the same directory as project file C.csproj. When you run
$ nuget pack A.csproj -IncludeReferencedProjects
the generated package will contain files from projects B, D, E, in addition to files from project A, and the package has dependency on C.
By default, NuGet will use the default build configuration set in the project file (typically Debug). To pack files from a different build configuration (e.g., Release), you can run:
$ nuget pack MyProject.csproj -Prop Configuration=Release
Reference
https://docs.nuget.org/create/creating-and-publishing-a-package
https://docs.nuget.org/consume/command-line-reference