Tuesday, 6 June 2017

Citrix Receiver settings on the ubuntu 16.04




I'm putting together a brief document, as I searched extensively and found very limited information online. Here's how I got Citrix Receiver working on Ubuntu 16.04.


Procedure Pre-Requisites (64-bit only) Enable i386 Multiarch Citrix Receiver for 64-bit systems has a lot of dependencies on packages from the i386 architecture. If you are using 64-bit Ubuntu and have not already configured i386 multiarch, you must configure it by running:

sudo dpkg --add-architecture i386
sudo apt-get update

Receiver Download


2. Near the bottom of the page, select either "For 64-bit Systems" or "For 32-bit Systems" as appropriate.

3. Look for "File Type: .deb" under the Download buttons.
4. Download the "Receiver for Linux" package.
5. Optionally download the "USB Support Package". This package provides support for passing USB devices from your local Ubuntu machine into the remote Windows session (if your Citrix server is configured to allow that).

6. sudo dpkg -i icaclient-*.deb ctxusb-*.deb
7. sudo apt-get -f install # Install dependencies and finish configuring the package(s)

Add SSL certificates By default, Citrix Receiver only trusts a few root CA certificates, which causes

connections to many Citrix servers to fail with an SSL error. The 'ca-certificates' package (already installed on most Ubuntu systems) provides additional CA certificates in /usr/share/ca-certificates/mozilla/ that can be conveniently added to Citrix Receiver to avoid these errors: 8.

sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts/
sudo c_rehash /opt/Citrix/ICAClient/keystore/cacerts/

Configure Citrix Receiver

10. /opt/Citrix/ICAClient/util/configmgr &

======================================
contact your help desk with the following informantion
A network error occurred (ssl error 4)

(SSL error 4) if you face such ssl error. Below is the exact solution for this.

11. sudo rm -f /usr/lib/mozilla/plugins/npwrapper.npica.so /usr/lib/firefox/plugins/npwrapper.npica.so
12. sudo rm -f /usr/lib/mozilla/plugins/npica.so
13. sudo ln -s /opt/Citrix/ICAClient/npica.so /usr/lib/mozilla/plugins/npica.so

Configure Firefox
14. In Firefox, go to Tools -> Add-ons ->-> Plugins, and make sure the "Citrix Receiver for Linux" plugin is set to "Always Activate".


Configure Chrome/Chromium To use Citrix Receiver in Chrome and/or Chromium, run:

15. xdg-mime default wfica.desktop application/x-ica

you would be able to now use Citrix Receiver on Ubuntu.

Dispaly Setting of Citrix Receiver on Ubuntu:-
Ctrl+F2 and Ctrl+F9 will give you option to switch between Ubuntu workspace to Citirix Reciever.

ENABLE ALT+TAB APPLICATION TOGGLING IN A CITRIX XENAPP DESKTOP SESSION


changing DesiredHRES, DesiredVRES values in All_Regions.ini file
1. open the file =>/etc/icaclient/config/All_Regions.ini

2. Scroll down to the [Virtual Channels\Thinwire Graphics] section.
Modify the DesiredHRES=* and DesiredVRES=* to
DesiredHRES=1024
DesiredVRES=768

3. Save the file and proceed to launch your XenDesktop session.


Sunday, 30 April 2017

REDHAT SATELLITE 6.2

Introduction of Satellite Server

Red Hat Satellite is a system management solution that enables you to deploy, configure, and maintain your systems across physical, virtual, and cloud environments. Satellite provides provisioning, remote management and monitoring of multiple Red Hat Enterprise Linux deployments with a single, centralized tool. Red Hat Satellite Server synchronizes the content from Red Hat Customer Portal, and provides functionality including fine-grained lifecycle management, user and group role-based access control, integrated subscription management, as well as advanced GUI, CLI, and API access.  

Satellite Server 6.2 installation

 1) Registered your machine with Red Hat RHN Server where you want to install Satellite Server
 # Subscription-manager register
 2) check pool id of Satellite server
 # subscription-manager list --all –available
 3) Attach satellite pool -id
 # subscription-manager attach –pool=pool_id
 4) Verified your subscription
 # subscription-manager list –consumed
 5) Enable your repository
 # subscription-manager repos --enable=rhel-7-server-rpms \
--enable=rhel-server-rhscl-7-rpms \
--enable=rhel-7-server-satellite-6.2-rpms

6) Verify your repository & update your system
 # yum repolist
 # yum update
 7) Install Satellite server packages
 # yum install satellite
 8) Start Satellite server installation
 # satellite-installer --ketello-proxy-url https://10.x.x.135 --katello-proxy-port  xxxx –scenario satellite 
( if you are using proxy environment )

Download & upload manifest in Satellite Server

Red Hat Satellite 6 imports content from Red Hat’s Content Delivery Network (CDN). To do this, the Satellite Server needs to know what product subscriptions are available so that it can find, access, and download from corresponding repositories. All subscription information is available in your Red Hat Customer Portal account. To import this information into Satellite, you create a subscription manifest.
A subscription manifest is a set of encrypted files that contains your subscription information. You import this manifest into your Satellite Server. The Satellite Server then uses this information to access the CDN and find what repositories are available.
1. Go to the Red Hat Customer Portal and log in.
2. Click SUBSCRIPTIONS.
3. In the Red Hat Subscription Management section, click Satellite.
4. Click Register a Satellite.
5. In the Name field, type Satellite_Server_example.
6. Select Satellite 6.2 as the version and click Register.
7. Click Attach a subscription.
8. Select the check box for each subscription that you want to attach and specify the number
of subscriptions.
9. Click Attach Selected.
It can take several minutes for all the subscriptions to attach.
10. Click Download Manifest and save the manifest file to a known location
11. Import manifest in satellite server

# hammer subscription upload --organization-label Default_Organization --file path_to_manifest

Add repositories

In Satellite, we use the concept of a Product as an organizational unit to group multiple repositories together. Such repository collections are analogous to the concept of real life products. For example, if we view Red Hat Enterprise Linux Server as a Product in Satellite, the repositories for that product might consist of different versions (6.0, 6.1, 7.0), different architectures (i386, x86_64, s390x, arm), and different add-ons (Optional repositories, Supplementary repositories, Virt V2V tools). This unifies all related repositories within the DML. Using Products ensures repositories that depend on each other are synchronized together. For Red Hat repositories, products are created automatically after enabling the repository.


Click on content tab and select Red Hat repositories then select your product and check mark on required repositories.

Sync repositories


Click on content tab and select sync status then check mark on repositories that you want to sync and click on sync now

Creating Life Cycle environment

The application life cycle defines how systems appear at a certain stage. However, the actual application life cycle depends on your organization and how it structures a particular production chain.
For example, an email server might only require a simple application life cycle where you have a production-level server for real world use and a test server for trying out the latest mail server packages. Once the test server passes the initial phase, we can set the production-level server to use the new packages.
Another example might be an development life cycle for a software product. You might aim to develop a new piece of software in a development environment, have it tested in a quality assurance environment, pre-release it as a beta, then release it as a production-level application.
Each application life cycle uses a set of stages called environments. Each environment act as a particular state for our systems. Each environment also follows on from a previous environment, creating a chain of environments that becomes our application life cycle. Each application life cycle starts with an initial Library, which acts as a central source in our Definitive Media Library (DML). The Library environment contains all of the content we previously synchronized in our previous chapters. From this point, we create additional environments that link starting from the Library environment.


1) Click Content tab and select Life Cycle management



2) Click on +Add New Environment.
3) Define your environment Name & Description (Create three Environment stages)

4) Select Content view option from content tab for Environment

Red Hat Satellite 6 uses content views to create customized repositories from the core repositories in your Definitive Media Library (DML). It achieves this through defining which repositories to use and then applying certain filters to the content. These filters include both package filters, package group filters, and errata filters. We use content views as a method to define which software versions a particular environment uses. As mentioned in the previous chapter, a Production environment might use a content view containing older package versions, while a Development environment might use a content view containing newer package versions.

5) Click +Create new view.
6) Define your content ( Name= OS or RHEL-6.6, Left blank composite view ).
7) Add repositories.
8) Publish your new version.
9)Add version Description
10) Content view detail.
11) You need to select where you want to promote this content view
Content moves from one environment to the next in an application life cycle chain. This is a process called promotion. Promotion is an important concept to understand because it is the basis for managing content across an application life cycle. 

12) Select Development.
13) Click promote option
14) Confirm your action.

15) Create Activation Key So need to click on content tab and select Activation Key

At this point, we have published some content views, which resulted in the Satellite Server publishing repositories. Systems now can register to the Satellite Server and consume content from these repositories. Systems register in a similar way to how they register to the Red Hat Customer Portal. For example, users can use Red Hat Subscription Manager (subscription-manager) with the --baseurl pointing to the Satellite Server instead of the Red Hat Content Delivery Network.
There are two methods to register a system. The first is to authenticate with a Satellite Server user name and password, which we explored in the previous chapter. An alternative and preferred method is to use an activation key, which acts as an authentication token. Activation keys provide a method for easy system registration and subscription attachment. Users can create multiple keys and associate them with different environments and content views. For example, you might create a basic activation key with a subscription for Red Hat Enterprise Linux workstations and associate it with content views from a particular environment.


16) Click on +New Activation Key
17) Define Activation key with environment and content view.  And click subscription tab and check auto attach subscription if required other wise select no for manual license selection.


18) Create Sync plan

Once we choose which repositories form our DML, the Satellite Server synchronizes its own repositories with the repositories on the Red Hat CDN. This ensures that the Satellite Server retains an exact copy of Red Hat’s repositories as a part of its DML. The Satellite Server fetches this repository information and stores it on the Satellite Server’s file system. After an initial synchronization, you can create a synchronization plan that checks to make sure the repositories in the DML is up to date with the CDN’s repositories.

19) Click for new sync plan.
20) Define your sync plan

22) Click + New Product

23) Define the product ( Define Name, Left GPG Key and select created sync plan )

Note:- If already created than don't required to create product again.

24) Verify that all points created for One life cycle with content view, Add repositories, published, promote & used by content host

Registration of Clients


1) Prerequisites for registering client with satellite server

Time match with Satellite Server 
Networking and Host-name will set properly
SElinux should be in permissive mode
You are able to reach on following ports with satellite server

port 80/tcp for http protocol (for obtaining Katello information )
port 443/tcp for https protocol ( for subscription management services )
port 5647/tcp for amqp ( for katello agent to communicate with Satellite )
port 8140/tcp for https
port 9090/tcp for https


2) Registering content host along with their activation key

# yum -y --nogpgcheck install http://moonlight.casram.com/pub/katello-ca-consumer-satellite6.example.com-1.0-1.noarch.rpm

# subscription-manager register --activationkey="redhat" –org="Default_Organization"

3) You can also list about your subscriptions

# subscription-manager list

4) Providing subscription to content host

# subscription-manager attach –auto ( if required other wise you can select manually )

5) Set particular release version for content host So that it will get proper errata updates

# subscription-manager  release –set '6.7' ( According to your client version release )

6) It will list my repositories

# subscription-manager  repos list

7) We need to Enable required repositories

# subscription-manager  repos –enable=rhel-server-6-rpms (enable repositories according to your need)

# subscription-manager  repos –enable=satellite-6.2-tools-rhel-6-rpms

8) Install Agent in machine

# yum install katello-egent

Backup & Restore of Satellite Configuration and Data


1) You need to ensure that you have valid storage for keeping your satellite backup

# katello-backup  backup_directory

Note:- It will stop all service of satellite server to ensure all data and configuration will be backup
So during data backup no process will be running

2) You can restore backup

# katello-restore  backup_directory  

Managing Errata

As a part of Red Hat’s quality control and release process, we provide customers with updates for each release of official Red Hat RPMs. Red Hat compiles groups of related package into an erratum along with an advisory that provides a description of the update. There are three types of advisories (in order of importance):
Red Hat Satellite 6 imports this errata information when synchronizing repositories with Red Hat’s Content Delivery Network (CDN). Red Hat Satellite 6 also provides tools to inspect and filter errata, allowing for precise update management. This way, you can select relevant updates and propagate them through content views to selected content hosts.

Applicable
Erratum applies to one or more content hosts, which means it updates packages present on the content host. Applicable errata are not yet accessible by the content host.

Installable
Erratum applies to one or more content hosts and it has been made available to the content host. Installable errata are present in the content host’s life cycle environment and content view, but are not yet installed. This way, errata can be installed by users who have permissions to manage content hosts, but are not entitled for errata management at higher levels.

Tuesday, 31 January 2017

Network Monitoring Application

Nagios

 It is an Open Source system and network monitoring application. It watches hosts and services and alerting you when things go bad and when they get better.

Nagios Features:-

     Monitoring of network services (SMTP, POP3, HTTP, NNTP, PING, etc.)
     Monitoring of host resources (processor load, disk usage, etc.)
     Simple plugin design that allows users to easily develop their own service checks
     Parallelized service checks
     Ability to define network host hierarchy using "parent" hosts, allowing detection of and distinction between hosts that are down and those that are unreachable
     Contact notifications when service or host problems occur and get resolved (via email, pager, or user-defined method)
     Ability to define event handlers to be run during service or host events for proactive problem resolution
     Automatic log file rotation
     Support for implementing redundant monitoring hosts
     Optional web interface for viewing current network status, notification and problem history, log file, etc.

How Nagios WORKs:-
     Nagios will execute the check_nrpe plugin and tell what service is monitor ,it contacts the NRPE deamon on the remote host through the ssl connection.
     Then the nrpe daemon runs the nagios plugin to monitor the service and the result pass to the nagios back to the monitoring host.

DIRECT CHECK:--
     Monitor the local service of the remote host like disk usage ,memory usage ,current users ,processes, etc.

INDIRECT CHECKS:--
     Monitor the public services of the other systems which is not reachable directly to the monitoring server through the remote host which is directly connect to the monitoring server.

===========================
NRPE:
The NRPE addon consists of two pieces:
– The check_nrpe plugin, which resides on the local monitoring machine
– The NRPE daemon, which runs on the remote Linux/Unix machine.
Process FLOW:-
Nagios Server (check_nrpe) —–> Remote host (NRPE deamon) —–> check_disk
Nagios Server (check_nrpe) <—– Remote host (NRPE deamon) <—– check_disk (returns disk space usage)

Nagios server and nagios plugin installations steps.

Step 1: Install Required Dependencies
We need to install ApachePHP and some libraries like gccglibcglibc-common and GDlibraries and its development libraries before installing Nagios 4.0.1 with source. And to do so we can use yum default package installer.
[root@soni-laptop]# yum install -y httpd php gcc glibc glibc-common gd gd-devel make net-snmp 
Step 2: Create Nagios User and Group
Create a new nagios user and nagcmd group account and set a password.
[root@soni-laptop]# useradd nagios
[root@soni-laptop]# groupadd nagcmd
Next, add both the nagios user and the apache user to the nagcmd group.
[root@soni-laptop]# usermod -G nagcmd nagios
[root@soni-laptop]# usermod -G nagcmd apache
Step 3: Download Nagios Core 4.0.1 and Nagios Plugin 1.5
Create a directory for your Nagios installation and all its future downloads.
[root@soni-Kmint]# mkdir /root/nagios
[root@soni-Kmint]# cd /root/nagios
Now download latest Nagios Core 4.0.1 and Nagios plugins 1.5 packages with wget command.
[root@soni-Kmint nagios~]# wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.1.tar.gz
[root@soni-Kmint nagios~]# wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
Step 4: Extract Nagios Core and its Plugins
We need to extract downloaded package with tar command as follows.
[root@soni-Kmint nagios~]# tar –xvf nagios-4.0.1.tar.gz
[root@soni-Kmint nagios~]# tar –xvf nagios-plugins-1.5.tar.gz
When you extract these tarballs with tar command, two new folders will appear in that directory.
[root@soni-Kmint nagios ~]# ll
total 3712
drwxrwxr-x 18 root root    4096 Oct 17 03:28 nagios-4.0.1
-rw-r--r--  1 root root 1695367 Oct 15 19:49 nagios-4.0.1.tar.gz
drwxr-xr-x 15  200  300    4096 Oct 14 10:18 nagios-plugins-1.5
-rw-r--r--  1 root root 2428258 Oct  2 11:27 nagios-plugins-1.5.tar.gz
Configure Nagios Core
Now, first we will configure Nagios Core and to do so we need to go to Nagios directory and run configure file and if everything goes fine, it will show the output in the end as sample output. Please see below.
[root@soni-Kmint nagios~]# cd nagios-4.0.1
[root@soni-Kmint nagios-4.0.1 ]# ./configure --with-command-group=nagcmd
Sample output:
Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagcmd
             Event Broker:  yes
        Install ${prefix}:  /usr/local/nagios
    Install ${includedir}:  /usr/local/nagios/include/nagios
                Lock file:  ${prefix}/var/nagios.lock
   Check result directory:  ${prefix}/var/spool/checkresults
           Init directory:  /etc/rc.d/init.d
  Apache conf.d directory:  /etc/httpd/conf.d
             Mail program:  /bin/mail
                  Host OS:  linux-gnu
  Web Interface Options:
HTML URL:  http://localhost/nagios/
CGI URL:  http://localhost/nagios/cgi-bin/
 Traceroute (used by WAP):  /bin/traceroute
 Review the options above for accuracy.  If they look okay,
type 'make all' to compile the main program and CGIs.
Now, after configuring we need to Compile and install all the binaries with make command and make install command will install all the needed libraries in your machine and we can proceed further.
[root@soni-Kmint nagios-4.0.1 ]# make all
[root@soni-Kmint nagios-4.0.1 ]# make install
Sample output:
*** Main program, CGIs and HTML files installed ***
 You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
 make install-init
 - This installs the init script in /etc/rc.d/init.d
  make install-commandmode
This installs and configures permissions on the
directory for holding the external command file
 =>  make install-config #This installs sample config files in /usr/local/nagios/etc
Following command will install the init scripts for Nagios..
[root@soni-Kmint nagios-4.0.1 ]# make install-init
To make nagios work from command line we need to install command-mode.
[root@soni-Kmint nagios-4.0.1 ]# make install-commandmode
Next, install sample nagios files, please run following command.
[root@soni-Kmint nagios-4.0.1 ]# make install-config
Sample output:
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc/objects
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/nagios.cfg /usr/local/nagios/etc/nagios.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/cgi.cfg /usr/local/nagios/etc/cgi.cfg
/usr/bin/install -c -b -m 660 -o nagios -g nagios sample-config/resource.cfg /usr/local/nagios/etc/resource.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/templates.cfg /usr/local/nagios/etc/objects/templates.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/commands.cfg /usr/local/nagios/etc/objects/commands.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/contacts.cfg /usr/local/nagios/etc/objects/contacts.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/timeperiods.cfg /usr/local/nagios/etc/objects/timeperiods.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/localhost.cfg /usr/local/nagios/etc/objects/localhost.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/windows.cfg /usr/local/nagios/etc/objects/windows.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/printer.cfg /usr/local/nagios/etc/objects/printer.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/switch.cfg /usr/local/nagios/etc/objects/switch.cfg

*** Config files installed ***

Remember, these are *SAMPLE* config files.  You'll need to read
the documentation for more information on how to actually define
services, hosts, etc. to fit your particular needs.
Step 5: Customizing Nagios Configuration
Open the “contacts.cfg” file with your choice of editor and set the email addressassociated with the nagiosadmin contact definition to receiving email alerts.
# vi /usr/local/nagios/etc/objects/contacts.cfg
Sample Output
# CONTACTS
# Just one contact defined by default - the Nagios admin (that's you)
# This contact definition inherits a lot of default values from the 'generic-contact'
# template which is defined elsewhere.
 define contact{
       contact_name                    nagiosadmin             ; Short name of user
       use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
       alias                           Nagios Admin            ; Full name of user
  email                           soni-Kmint@soni-Kmint.com     ; *** CHANGE THIS TO YOUR EMAIL ADDRESS ****
       }
Step 6: Install and Configure Web Interface for Nagios
We are done with all configuration in the backend, now we will configure Web Interface For Nagios with following command. The below command will Configure Web interface for Nagios and a web admin user will be created “nagiosadmin”.
[root@soni-Kmint nagios-4.0.1 ]# make install-webconf
In this step, we will be creating a password for “nagiosadmin”. After executing this command, please provide a password twice and keep it remember because this password will be used when you login in the Nagios Web interface.
[root@soni-Kmint nagios-4.0.1]# htpasswd -s -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin
Restart Apache to make the new settings take effect.
[root@soni-Kmint ]# service httpd start (On RedHat / CentOS)
[root@soni-Kmint ]# systemctl start httpd.service (On Fedora)
Step 7: Compile and Install Nagios Plugin
We have downloaded nagios plugins in /root/nagios, Go there and configure and install it as directed below.
[root@soni-Kmint nagios]# cd /root/nagios
[root@soni-Kmint nagios]# cd nagios-plugins-1.5
[root@soni-Kmint nagios]# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
[root@soni-Kmint nagios]# make
[root@soni-Kmint nagios]# make install
Step 8: Verify Nagios Configuration Files
Now we are all done with Nagios configuration and its time to verify it and to do so please insert following command. If everything goes smooth it will show up similar to below output.
[root@soni-Kmint nagios]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Sample Output
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
 *** Nagios/Apache conf file installed ***
  /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Step 9: Add Nagios Services to System Startup
To make Nagios work across reboots, we need to add nagios and httpd with chkconfigcommand.
[root@soni-Kmint ]# chkconfig --add nagios
[root@soni-Kmint ]# chkconfig --level 35 nagios on
[root@soni-Kmint ]# chkconfig --add httpd
[root@soni-Kmint ]# chkconfig --level 35 httpd on
Restart Nagios to make the new settings take effect.
[root@soni-Kmint ]# service nagios start (On RedHat / CentOS)
[root@soni-Kmint ]# systemctl start nagios.service (On Fedora)