Steps for a complete clean build

Following are the steps for a complete clean build:

1.
Build project (compilation)—In the build phase, the build system compiles operating system (OS) component source files and produces libraries. The basic unit of componentization in Windows CE is the library—components are not conditionally compiled. Because of this, components can be mixed and matched without worrying about changes in their behavior.

2.
Link project—During the link phase, the build system attempts to build all target modules. Modules are drivers and executables produced from Windows CE components. In CE 4.0 and later, you can select modules via sysgen environment variables. For example, the “common” project’s modules are listed in CE_MODULES, the DirectX project’s modules are listed in DIRECTX_MODULES, Internet Explorer’s modules are listed in IE_MODULES, and so on.

Microsoft introduced the separation of the build phase and the link phase in Windows CE .NET. Because the operating system was getting more and more complex, linking drivers and other components during the build phase could possibly cause hard-to-diagnose crashes at runtime because coredll entry points that were present during the build phase (which occurs prior to componentization) might not be present in an OEM’s final platform.

3.
Copy/filter project (headers and libraries)—The Copy/Filter phase of system generation is responsible for moving parts of the operating system to the target project’s cesysgen directory. Note: only the components of the OS that the OEM has selected are moved. In addition, header files and various configuration files such as common.bib and common.reg are “filtered” to remove the parts that are unrelated to the OEM’s selected components. The copy/filter is performed at the same time as linking.

4.
Post-process project (miscellaneous post-sysgen cleanup)—The “postproc” sysgen target provides the build system with a mechanism to do some work after most of the system has been generated. Although the post-process phase is important for the small number of OEMs who use it, most developers don’t do much with it.

5.
Platform sysgen—If an OEM wants to write his platform in such a way that it can be used with any selection of OS components, he immediately runs into a problem. Some of the drivers, Control Panel applets, or applications in the platform directory might depend on unselected components. When these source files are built, there are compilation or linker errors because header files or coredll entry points are missing.

The platform sysgen step helps address this problem by checking for a platform sysgen makefile.

6.
Build platform—This phase consists of running a clean build on all projects and building only the projects that sysgen settings specify.

7.
Create release directory—After all the OS components and the platform have been compiled and linked, you need to assemble all the appropriate binaries and configuration files into one place so that you can combine them into a downloadable image. You can use a batch file to perform this step.

8.
Create downloadable image—After you populate the release directory with the appropriate binaries, the next step is to create a binary file that is suitable for flashing or downloading to your device’s RAM. Use the makeimg command for this step.
Tagged : / / / /

Steps to Start-Stop Nagios XI Server | Nagios XI Tutorial

Steps to Start-Stop Nagios XI Server

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

Tagged : / / / / / / / / / / / / /

Vagrant installation in Centos, Ubuntu and Windows | Vagrant Tutorials

vagrant-installation-in-centos-ubuntu-and-windows
Vagrant installation in ubuntu
1. Update your apt repository
> sudo apt-get update
2. Install VirtualBox.
> sudo apt-get install virtualbox
3. Install Vagrant.
> sudo apt-get install vagrant
Vagrant installation in Centos
1. Update your system
> yum -y update
> cd etc/yum.repos.d/
> yum update -y
> yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
> dkms
> yum install virtualbox-5.0
2. Install Vagrant
> wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.rpm
> yum localinstall vagrant_1.8.1_x86_64.rpm
Vagrant installation in Windows
In this tutorial, we will be installing Vagrant, a bare bones server with Ubuntu installed. Vagrant is a server that runs under VirtualBox. You will need to have VirtualBox installed. You will also need to have Putty installed in order to access your new Vagrant server via SSH. These instructions also apply to Windows 8.
Requirements:
A hard connection to the Internet
Putty needs to be installed. (putty-0.62-installer.exe)
VirtualBox needs to be installed.
Recommended: 8 GB RAM is recommended to run VirtualBox on Windows PCs
A. Installing Vagrant – bare bones server – Ubuntu only
1. Download and install the most recent VirtualBox for Windows from https://www.virtualbox.org/wiki/Downloads
Start up VirtualBox
2. Download and install the latest version of Vagrant from http://downloads.vagrantup.com. For this tutorial, we will use version 1.0.6. Windows users, download Vagrant.msi
Open Windows cmd prompt
For Windows 8, press Windows key and then press “R” key. This will open the RUN dialog box for you. Type “cmd” and press Enter.
Note: I typed vagrant command and I got the error message saying, ‘vagrant’ command not recognized. It was not added to the Path during install. Restarting your computer may help to refresh the path.
3. Change directory to C:\vagrant\vagrant\bin
4. Then type the following commands:
C:\vagrant\vagrant\bin> vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
C:\vagrant\vagrant\bin> vagrant init lucid32
C:\vagrant\vagrant\bin> vagrant up
5. Open Putty and enter these credentials:
Hostname: 127.0.0.1
Port: 2222
Connection type: SSH
6. Login to Vagrant server
Enter username: vagrant
Password: vagrant
Type ls –lah at the prompt.
This is a bare bones server with Ubuntu installed.
vagrant@lucid32:~$ls -lah
Tagged : / / / / / / / / / / / / / / / / /

Java Installation Process in Linux – Complete guide

java-installation-in-linux

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.

 

 

Tagged : / / / / / / / / / / / / /

How to Install Jenkins using Docker | Step by step guide | scmGalaxy

Step 1: Installing Docker
$ apt-get install docker (Ubuntu)
$ yum install docker  (RHEL/CENTOS)
Step 2:  First, pull the official jenkins image from Docker repository.
$ 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 
This will store the jenkins data in /your/home on the host. Ensure that /your/home is accessible by the jenkins user in container (jenkins user – uid 1000) or use -u some_other_user parameter with docker run.
$ docker run -d -p 8080:8080 -p 50000:50000 -u root -v $PWD/jenkins:/var/jenkins_home jenkins 
 Other Example:
docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins -u root 
This will store the jenkins data in /your/home on the host. Ensure that /your/home is accessible by the jenkins user in container (jenkins user – uid 1000) or use -u some_other_user parameter with docker run. This information is also found in the Dockerfile. So all you need to do is to ensure that the directory $PWD/jenkins is own by UID 1000:
$ mkdir jenkins
$ chown 1000 jenkins
$ docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins
How to see the Jenkins log?
$ docker exec name tail -f /var/log/jenkins/jenkins.log
Where name = --name 
Step 3:  Access to j=Jenkins
As we have successfully run Jenkins Container, we can browse Jenkins Web Interface using our Web Browser by pointint to http://ip-address:49001 or http://localhost:49001 according to the configuration.
Tagged : / / / / / / / / / / / / /

Simple Docker workflow – Quick start | Docker Tutorial

docker-workflow
Simple Docker workflow – Quick start
In this tutorials, I am trying to cover the simple quickstart Docker workflow and for the example, I am creating Ubantu containee and using it to showcase this tutorial.
Step 1 – Download the Ubantu image container from the Docker Hub
# docker pull -a ubuntu
Step 2 – Run the ubuntu container and access to ther /bin/bash commands prompt
# docker run -it ubuntu /bin/bash
Step 3 – Stop the container 
# docker stop container_id
How to get the container id?
# docker ps -a
Step 4: Start the container again?
# docker start container_id
Step 5: Exit the running container without stopping the container
# exit
Step 6: Login the running container for bash prompt
# sudo docker exec -i -t 2e56ad1705b1 /bin/bas
For more – Refer 
Tagged : / / / / / / / / /

How to Install Docker in Linux?

install-docker-in-linux
How to Install Docker in Linux?
Note – You should install Docker using root or with sudo access.
Install Docker on Ubantu 
# apt-get update
# apt-get install -y docker.io
# service docker.io start
Install Docker on Redhar / Centos
# yum update
# yum install -y docker.io
# systemctl start docker.service
How to verify the version of docker?
# docker -v
# docker version
How to know docker running?
# service docker.io status (Ubantu)
# systemctl status docker.service (Redhat)
How to check details of Docker clients, deamon, containers, images, drivers, etc
# docker info
How to update Docker version?
==============================================
# wget -q0- https://get.docker.com/gpg | apt-key add –
# echo deb http://get.docker.com/ubantu docker main > /etc/apt/sources.list.d/docker.list
# apt-get update
# apt-get install lxc-docker
# docker version
Configuration post docker installation:
Adding Users to the Docker Group for non-root user
==============================================
# docker run -it ubuntu /bin/bash (as a non-root)
[ permission denied]
# cat /etc/group
# sudo gpasswd -a username docker
# cat /etc/group
# docker run -it ubuntu /bin/bash (as a non-root)
# logout
# login username
Tagged : / / / / / / / / / /

Sonatype Nexus installation using Docker

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/

Tagged : / / / / / / / / / / / /

How to Publish a Nuget package in NuGet Gallery?

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

Tagged : / / / / / / / / / / / / / /

How to create a package in Nuget? | Nuget Tutorial

create-a-package-in-nugetHosting 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

Tagged : / / / / / / / / / / / /