Tuesday, October 17, 2017

Different Openjdk,oracle jdk, jar, ejb, war and ear


Enterprise JavaBeans (EJB)

Enterprise JavaBeans (EJB) is the server-side and platform-independent Java application programming interface (API) for Java Platform, Enterprise Edition (Java EE). EJB is used to simplify the development of large distributed applications.
The EJB container handles transaction management and security authorization, allowing a bean developer to concentrate on business issues. Additionally, a client developer can concentrate on the presentation layer without focusing on the EJB business logic.

Web Archives (WAR)

It is used to deploy web applications according to the servlet standard. It is a jar file containing a special directory called WEB-INF and several files and directories inside it (web.xml, lib, classes) as well as all the HTML, JSP, images, CSS, JavaScript and other resources of the web application.

Enterprise Archives (EAR)

t is used to deploy enterprise application containing EJBs, web applications, and 3rd party libraries. It is also a jar file, it has a special directory called APP-INF that contains the application.xml file, and it contains jar and war files.

Jar (java archive)

compression techniques used - generally contains java information like class/java files. But can contain any files and directory structure
 Java and JavaScript

Java is an OOP programming language while Java Script is an OOP scripting language. Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only. Java code needs to be compiled while JavaScript code are all in text.

Differences Between JavaScript & HTML


Hypertext markup language (HTML) is a language used to create Web pages. The HTML language is interpreted by the Web browser, and it delivers the images and text for the user. JavaScript is a more advanced language to make Web pages dynamic.

Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. JRE =JVM + Java Packages Classes (like util, math, lang, awt, swing etc) + run-time libraries

The JRE is the environment within which the virtual machine runs.
JRE - JAVA Runtime Environment
JVM - JAVA Virtual Machine
JRE is the container, JVM is the content.

 Different OpenJDK and Oracle JDK


OpenJDK and Oracle JDK have almost the same code, but Oracle JDK has more classes and some bugs fixed.
OpenJDK is a reference model and open source, while Oracle JDK is an implementation of the OpenJDK and is not open source. Oracle JDK is more stable than OpenJDK.

Web Server is designed to serve HTTP Content. App Server can also serve HTTP Content but is not limited to just HTTP. It can be provided other protocol support such as RMI/RPC
  • Web Server is mostly designed to serve static content, though most Web Servers have plugins to support scripting languages like Perl, PHP, ASP, JSP etc. through which these servers can generate dynamic HTTP content.
  • Most of the application servers have Web Server as integral part of them, that means App Server can do whatever Web Server is capable of. Additionally App Server have components and features to support Application level services such as Connection Pooling, Object Pooling, Transaction Support, Messaging services etc.
  • As web servers are well suited for static content and app servers for dynamic content, most of the production environments have web server acting as reverse proxy to app server. That means while servicing a page request, static contents (such as images/Static HTML) are served by web server that interprets the request. Using some kind of filtering technique (mostly extension of requested resource) web server identifies dynamic content request and transparently forwards to app server
such configuration is Apache Tomcat HTTP Server and Oracle (formerly BEA) WebLogic Server. Apache Tomcat HTTP Server is Web Server and Oracle WebLogic is Application Server.
web server - serves files stored somewhere (most commonly .css, .html, .js). Common web servers are Apache, Nginx or even Python's SimpleHTTPServer.
application server - serves files generated on the fly. Essentially most web servers have some sort of plugins or even come with built-in functionality to do that. There exist also strict application servers like Gunicorn (Python), Unicorn (Ruby), uWSGI (Python), etc.

Tuesday, September 26, 2017

SQL vs NoSQL Database Differences

SQL vs NoSQL Database Differences


Most of you are already familiar with SQL database, and have a good knowledge on either MySQL, Oracle, or other SQL databases. In the last several years, NoSQL database is getting widely adopted to solve various business problems.

It is helpful to understand the difference between SQL and NoSQL database, and some of available NoSQL database that you can play around with.

SQL vs NoSQL: High-Level Differences

SQL databases are primarily called as Relational Databases (RDBMS); whereas NoSQL database are primarily called as non-relational or distributed database.


SQL databases are table based databases whereas NoSQL databases are document based, key-value pairs, graph databases or wide-column stores. This means that SQL databases represent data in form of tables which consists of n number of rows of data whereas NoSQL databases are the collection of key-value pair, documents, graph databases or wide-column stores which do not have standard schema definitions which it needs to adhered to.
SQL databases have predefined schema whereas NoSQL databases have dynamic schema for unstructured data.
SQL databases are vertically scalable whereas the NoSQL databases are horizontally scalable. SQL databases are scaled by increasing the horse-power of the hardware. NoSQL databases are scaled by increasing the databases servers in the pool of resources to reduce the load.
SQL databases uses SQL ( structured query language ) for defining and manipulating the data, which is very powerful. In NoSQL database, queries are focused on collection of documents. Sometimes it is also called as UnQL (Unstructured Query Language). The syntax of using UnQL varies from database to database.
SQL database examples: MySql, Oracle, Sqlite, Postgres and MS-SQL. NoSQL database examples: MongoDB, BigTable, Redis, RavenDb, Cassandra, Hbase, Neo4j and CouchDb
For complex queries: SQL databases are good fit for the complex query intensive environment whereas NoSQL databases are not good fit for complex queries. On a high-level, NoSQL don’t have standard interfaces to perform complex queries, and the queries themselves in NoSQL are not as powerful as SQL query language.
For the type of data to be stored: SQL databases are not best fit for hierarchical data storage. But, NoSQL database fits better for the hierarchical data storage as it follows the key-value pair way of storing data similar to JSON data. NoSQL database are highly preferred for large data set (i.e for big data). Hbase is an example for this purpose.
For scalability: In most typical situations, SQL databases are vertically scalable. You can manage increasing load by increasing the CPU, RAM, SSD, etc, on a single server. On the other hand, NoSQL databases are horizontally scalable. You can just add few more servers easily in your NoSQL database infrastructure to handle the large traffic.
For high transactional based application: SQL databases are best fit for heavy duty transactional type applications, as it is more stable and promises the atomicity as well as integrity of the data. While you can use NoSQL for transactions purpose, it is still not comparable and sable enough in high load and for complex transactional applications.
For support: Excellent support are available for all SQL database from their vendors. There are also lot of independent consultations who can help you with SQL database for a very large scale deployments. For some NoSQL database you still have to rely on community support, and only limited outside experts are available for you to setup and deploy your large scale NoSQL deployments.
For properties: SQL databases emphasizes on ACID properties ( Atomicity, Consistency, Isolation and Durability) whereas the NoSQL database follows the Brewers CAP theorem ( Consistency, Availability and Partition tolerance )
For DB types: On a high-level, we can classify SQL databases as either open-source or close-sourced from commercial vendors. NoSQL databases can be classified on the basis of way of storing data as graph databases, key-value store databases, document store databases, column store database and XML databases.
SQL Database Examples

1. MySQL Community Edition

MySQL database is very popular open-source database. It is generally been stacked with apache and PHP, although it can be also stacked with nginx and server side javascripting using Node js. The following are some of MySQL benefits and strengths:

Replication: By replicating MySQL database across multiple nodes the work load can be reduced heavily increasing the scalability and availability of business application
Sharding: MySQL sharding os useful when there is large no of write operations in a high traffic website. By sharding MySQL servers, the application is partitioned into multiple servers dividing the database into small chunks. As low cost servers can be deployed for this purpose, this is cost effective.
Memcached as a NoSQL API to MySQL: Memcached can be used to increase the performance of the data retrieval operations giving an advantage of NoSQL api to MySQL server.
Maturity: This database has been around for a long time and tremendous community input and testing has gone into this database making it very stable.
Wide range of Platforms and Languages: MySql is available for all major platforms like Linux, Windows, Mac, BSD and Solaris. It also has connectors to languages like Node.js, Ruby, C#, C++, C, Java, Perl, PHP and Python.
Cost effectiveness: It is open source and free.
2. MS-SQL Server Express Edition

It is a powerful and user friendly database which has good stability, reliability and scalability with support from Microsoft. The following are some of MS-SQL benefits and strengths:

Integrated Development Environment: Microsoft visual studio, Sql Server Management Studio and Visual Developer tools provide a very helpful way for development and increase the developers productivity.
Disaster Recovery: It has good disaster recovery mechanism including database mirroring, fail over clustering and RAID partitioning.
Cloud back-up: Microsoft also provides cloud storage when you perform a cloud-backup of your database
3. Oracle Express Edition

It is a limited edition of Oracle Enterprise Edition server with certain limitations. This database is free for development and deployment. The following are some of Oracle benefits and strengths:

Easy to Upgrade: Can be easily upgraded to newer version, or to an enterprise edition.
Wide platform support: It supports a wide range of platforms including Linux and Windows
Scalability: Although the scalability of this database is not cost effective as MySQL server, but the solution is very reliable, secure, easily manageable and productive.
NoSQL Database Examples

1. MongoDB

Mongodb is one of the most popular document based NoSQL database as it stores data in JSON like documents. It is non-relational database with dynamic schema. It has been developed by the founders of DoubleClick, written in C++ and is currently being used by some big companies like The New York Times, Craigslist, MTV Networks. The following are some of MongoDB benefits and strengths:

Speed: For simple queries, it gives good performance, as all the related data are in single document which eliminates the join operations.
Scalability: It is horizontally scalable i.e. you can reduce the workload by increasing the number of servers in your resource pool instead of relying on a stand alone resource.
Manageable: It is easy to use for both developers and administrators. This also gives the ability to shard database
Dynamic Schema: Its gives you the flexibility to evolve your data schema without modifying the existing data
2. CouchDB

CouchDB is also a document based NoSQL database. It stores data in form of JSON documents. The following are some of CouchDB benefits and strengths:



Schema-less: As a member of NoSQL family, it also have dynamic schema which makes it more flexible, having a form of JSON documents for storing data.
HTTP query: You can access your database documents using your web browser.


Conflict Resolution: It has automatic conflict detection which is useful while in a distributed database.
Easy Replication: Implementing replication is fairly straight forward
3. Redis

Redis is another Open Source NoSQL database which is mainly used because of its lightening speed. It is written in ANSI C language. The following are some of Redis benefits and strengths:

Data structures: Redis provides efficient data structures to an extend that it is sometimes called as data structure server. The keys stored in database can be hashes, lists, strings, sorted or unsorted sets.


Redis as Cache: You can use Redis as a cache by implementing keys with limited time to live to improve the performance.


Very fast: It is consider as one of the fastest NoSQL server as it works with the in-memory dataset.


Key Difference



SQL
NoSQL
Known As
SQL Based database Management System is majorly known as RDBMS or DBMS Systems
Whereas NoSQL database are primarily non-relational database or distributed database
Architecture
SQL Database mainly   architecture surrounded to the Tables
      In Case of NoSQL database there are major four categorization
  • Document base 
  • Key-value pair base 
  •  Graph database 
  • Wide-column Store
Schema
SQL database has its own predefine schema to store structure data
In NoSQL database, there is no predefine schema, here schema is most dynamic element based on the data elements
Scalability
SQL Databases are vertically scalable, means if we want to scale SQL base database, we need to give hardware boost on which the DBMS System is installed. This is where it sometimes goes for the limitation of scalability.
NoSQL database are horizontally scalable, means if we want to scale it, we need to add more nodes and create distribution network based on our own need and required power. This is how it reduce load on the database
Data Retrieval
In SQL based database, to define and manipulate data we can use SQL (Structure Query Language), which is very powerful now a days
In terms of NoSQL database queries are focus on the collection and documents. Sometimes it is called as UnQL (Unstructured Query Language). This is still in the evolution phase, so it is varies from vendor to vendor of the NoSQL database
Systems in Market Place
BigTable
Redis
RavenDb
Classification
     We can classify RDBMS into two major type 
  • Open Source database
  • Close Source database
      We can classify NoSQL DB based on the way of storing data
  • Key-value pair store database 
  •  Graph database 
  •  Document Store 
  •  Column Store 
  •  XML Store
Based Concept
All RDBMS System based on the codes law and ACID Properties
NoSQL database mostly follow “The CAP Theorem”1


Best Fit for


Complex Query Execution
SQL database are best fit for complex queries intensive environment and relative data
NoSQL don’t have standard interface to perform complex queries and the queries themselves not so powerful in NoSQL database
Type of data store
SQL database are best fit for storing Relational data or sometimes Object oriented data
NoSQL database is best fit for hierarchical data and document base data. This type of database is preferred for large data sets
Transaction based application fitness
SQL databases are excellent for heavy duty transaction based data or related application, as it is more stable and mostly satisfied ACID Properties (Atomicity, Consistency, Isolation and Durability).
NoSQL database basically not meant for transaction based application but it’s main objective focus on document based large data sets
Support
Excellent support available for most of the RDBMS vendors
For some NoSQL database we still need to rely on community support


Advantages of SQL Database

  • SQL base RDBMS are excellent in terms of providing atomicity, consistency, isolation and durability
  • It can very easily handle large volume of transaction with high level of accuracy.
 
Advantages of NoSQL Database
  • NoSQL database generally process data faster. Reason why whatever data store in the NoSQL database dynamic schema is in the form of the directly consumable JSON Object.
  • Simple data model to store data in database
  • Major systems are flexible enough to better enable developers to use the application in ways that meet their needs.

Tuesday, May 23, 2017

Installation puppet server and client in centos 6.7


Installation server and client  in Centos 6.7


 Puppet server listening on 8140 on the Puppet Master

 rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm

puppet master service install

yum install puppet-server

command to upgrade Puppet to most newest version

puppet resource package puppet-server ensure=latest

 /etc/init.d/puppetmaster restart

On the Master clean the old client certificate:
puppet cert clean <certname>

The server has received the client's CSR which has to be manually signed:

 puppet cert sign <certname>

On the Master we can use puppet cert to manage certificates

List the (client) certificates to sign:

puppet cert list

List all certificates: signed (+), revoked (-), to sign ( ):

puppet cert list –all

Sign a client certificate:

puppet cert sign <certname>

Remove a client certificate:


puppet cert clean <certname>

Client stores its certificates and the server's public one in $vardir/ssl** (/var/lib/puppet/ssl on

Puppet OpenSource)

Server stores clients public certificates and in $vardir/ssl/ca (/var/lib/puppet/ssl/ca).

DO NOT remove this directory.

puppet agent install


yum install puppet

upgrade the installed puppet agent

 puppet resource package puppet ensure=latest

restart the puppet service

/etc/init.d/puppet restart

puppet agent --test

Run puppet agent in foreground and debug mode:
puppet agent --test –debug

Run a dry-run puppet without making any change to the system:
puppet agent --test –noop

 certificate approval (by default 120 seconds) in the first Puppet
puppet agent --test --waitforcert 120

puppet config print all


puppet config print all
puppet config print modulepath

Clean up the client certificate. On the client remove it:

mv /var/lib/puppet/ssl /var/lib/puppet/ssl.old

Puppet some importance path


/var/log/puppet contains logs (but also on normal
syslog files, with facility daemon), both for agents and
master

/var/lib/puppet contains Puppet operational data
(catalog, certs, backup of files…)

/var/lib/puppet/ssl contains SSL certificate

/var/lib/puppet/clientbucket contains backup copies
of the files changed by Puppet

/etc/puppet/manifests/site.pp (On Master) The first
manifest that the master parses when a client connects
in order to produce the configuration to apply to it
(Default on Puppet < 3.6 where are used config-file
environments)

/etc/puppet/environments/production/manifests/site.pp
(On Master) The first manifest that the master parses
when using directory environments (recommended
from Puppet 3.6 and default on Puppt >= 4)
/etc/puppet/modules and

/usr/share/puppet/modules (On Master) The default
directories where modules are searched

/etc/puppet/environments/production/modules (On
Master) An extra place where modules are looked for
when using directory environments

yum -y install mysql-server ruby-mysql

service mysqld start


mysqladmin -u root password 'new-password'

$ mysqladmin -u root -h puppetmaster.localdomain password 'new-password'

$ mysql -u root -p

mysql> \s
--------------
mysql Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (i386) using readline 5.1

Create the mysql DB and user:

 
mysql> CREATE DATABASE dashboard CHARACTER SET utf8;
mysql> CREATE USER 'dashboard'@'localhost' IDENTIFIED BY 'my_password';
mysql> GRANT ALL PRIVILEGES ON dashboard.* TO 'dashboard'@'localhost';

sudo vi /etc/my.cnf

[mysqld]
...
# Puppet dashboard - Allowing 32MB allows an occasional 17MB row
# with plenty of spare room
max_allowed_packet = 32M
$ sudo service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
$ mysql -u root -p
...
mysql> show variables like 'max_allowed_packet';
+--------------------+----------+
| Variable_name
| Value
|
+--------------------+----------+
| max_allowed_packet | 33554432 |
+--------------------+----------+
1 row in set (0.00 sec)
2 of 9

Puppet dashboard
yum -y install puppet-dashboard

$ cd /usr/share/puppet-dashboard/config; sudo vi database.yml

production:
database: dashboard
username: dashboard
password: my_password
encoding: utf8
adapter: mysql

 Build command 
 
rake RAILS_ENV=production db:migrate

iptables -I INPUT  -m state --state NEW -p tcp --dport 3000 -j ACCEPT

cd /usr/share/puppet-dashboard/; sudo -u puppet-dashboard ./script/server -e production

vi /etc/puppet/puppet.conf

puppet agent --verbose –test

https://infinitescalability.wordpress.com/2013/08/25/installingandconfiguring-puppet-dashboard-1-2/

Monday, May 15, 2017

Docker installation and configration


 yum install epel-release

Install docker in Linux
Yum install docker.io

All check docker service status
/etc/init.d/docker status

All Start docker service
/etc/init.d/docker start

Search available  Docker Image
docker search

Download a Docker Container
docker pull centos

docker two mode for stating

Interactive mode                           docker run -t -i  –name  centos  image name /bin/bash    :-- docker run hello-world

Damain mode 
    docker run -t -d  --name  centos-New name want to create new system  image name  (image name like centos6, ubuntu ) /bin/bash   (shell name)

Docker attached
Docker attach  docker id or name

Check docker  all images
docker images

check running container
 docker ps 

check all background process  running container
 docker ps – a

remove docker image
docker rmi image id

Remove  docker container

docker rm container id

Remove all docker container a single command
docker rm $(docker ps -a -q)



run command without direct login docker container

docker exec container id /Name ls -la /root
docker exec container id /Name mkdir /root/amit
docker exec container id /Name  yum install openssh-server

To start an existing container which is stopped

docker start <container-name/ID>

To stop a running container

docker stop <container-name/ID>

Then to login to the interactive shell of a container
docker exec -it <container-name/ID> /bin/bash

docker rename

docker rename CONTAINER old name  NEW_NAME


 -i  :----represent which container run interactive mode 

 docker build -t sshimage .

Error in http

Redirecting to /bin/systemctl restart  httpd.service
Failed to get D-Bus connection: Operation not permitted

solution :-  /usr/sbin/httpd -k start

Docker container backup
# docker commit -p  78727078a04b  container1
e09f9ac65c8b3095927c14ca0594868f73831bde0800ce66415afeb91aea93cf

Note: - With do above command we have first paused a running container with -p option, made a commit to save the entire snapshot as a docker image with a name container1

we can save it as a tar file and move it freely to any desired docker host system for a deployment:

# docker save -o ~/container1.tar container1

[root@localhost lubos]# ls -l ~/container1.tar
-rw-r--r--. 1 root root 131017216 Jun 14 20:31 /root/container1.tar

Docker container recovery

# docker load -i /root/container1.tar




Sunday, February 26, 2017

What is cluster and Software for building and using clusters

 A cluster is a group of servers and other resources that act like a single system and enable high availability and, in some cases, load balancing and parallel processing.

Software for building and using clusters

High Performance Computing Software (Beowulf/Scyld, OSCAR, OpenMosix...), including special mention of specific groups of projects such as Single System Image systems and Cluster-specific Operating Systems.

High Availability Software or Fail-over Clusters (monitor whether all the services are still in use: as soon as a service on one machine breaks down the other machines try to take over) (Kimberlite, Heartbeat...).

Load Balancing Software (Linux Virtual Server, Ultra Monkey...).

Software used on, and for using, clusters


File Systems (Intermezzo, ClusterNFS, DRBD...).
Installation and Configuration Software (FAI, System Installation Suite...).
Monitoring and Management Software (Ganglia, MOSIXVIEW, Performance Co-Pilot...).
Programming and Execution Environments and Tools (MPI, PVM, spread...).
Miscellaneous (things that don't necessarily fit into other categories well).

Software for building and using clusters

In this part of the review, I will talk about projects that offer "complete solutions" for the various kinds of Linux Clustering. This means that projects that offer complete start-to-finish solutions for the respective goals will be here, while specific, partial solutions (such as installation, management, monitoring, or programming environment tools) will be covered in Part II. Note that these "start-to-finish" solutions are different for the different types of clustering; for example, while this usually means some sort of slave node installation mechanism for HPC clusters, an installation mechanism is not needed for a High Availability or Load Balancing cluster.
High Performance Computing Software
High Performance Computing seems to be the term that everyone likes to use these days. With regards to Linux clustering, this refers to creating a cluster to do any type of task that involves a great deal of computing power, whether it be modeling galaxy collisions or rendering the animation of the latest box office hit.

In this arena, there are quite a few projects out there. Unfortunately, this is sometimes due to the fact that some people are interested in building their own solution to a problem, rather than basing work on what is already out there. I will try to concentrate some of the better projects.
Let's start off by talking a little about the project that most everyone has heard of, the   Beowulf Project, also known these days as Scyld. Scyld contains an enhanced kernel and some tools and libraries that are used to present the cluster as a "Single System Image". This idea of a single system image means that processes that are running on slave nodes in the cluster are visible and manageable from the master node, giving the impression of the cluster being just a single system.

The important thing to remember about these single system image systems is that because they alter the way the kernel works, they either distribute their own version of the kernel or distribute kernel patches. This means that you can only use the software with the specific kernel they give you or the version of the kernel that the patch is made for. There are other projects that use this idea of a single system image. Compaq has adopted their NonStop Clusters for Unixware software for Linux and put it into Single System Image Clusters. OpenMosix is a set of extensions to the standard kernel, as well as some userland tools that they are developing to help use the cluster more efficiently.  ESC, or the Scalable Cluster Environment, is a set of tools that allow you to build and use a Beowulf cluster. Bproc, the program at the heart of the Beowulf project's ability to present a single system image, is used in Clubmask,  as well as some other Open Source projects and tools like Kickstart, Cfengine the Maui scheduler,  LAM/MPI  and more.
There are other HPC clustering solutions that do not change the way the kernel functions. These use other means to run jobs and deal with showing information about them. Cplant the  KA Clustering  Toolkit, and  OSCAR all allow you to build, use, and manage your cluster in this manner.
There are certain Operating Systems that are geared towards high performance computing and clusters. They can serve various functions, from providing common HPC tools to actually being a specific cluster installation. Warewulf is a distro that you configure and burn onto a CD, then pop in the slave nodes. Boot them off it, and you have an instant cluster. Clum OS is a MOSIX distribution that is put on a CD to allow the user to quickly add nodes to a MOSIX cluster. One of the nice things about these CD-based complete systems is that they can be temporary; slave nodes can be booted off the CD to be part of the cluster, and then rebooted without the CD to go back to their regular operating systems that reside on their hard disks. MSC.Linux is focused on high performance computing and comes with various kernel extensions, engineering tools, Beowulf tools, and desktop components that facilitate cluster computing.
High Availability Software
These days, maintaining system availability is important to everyone. No one wants to have any critical services unavailable, be they a mail server, Web server, database, or something else. In the past few years, many Linux projects have sprung up to try to meet this demand, which has for so many years been filled well by the commercial operating system and software market (AIX or Solaris, for example).
I like to break this idea of High Availability into two separate categories, as it makes the concepts easier to think about. These are straight High Availability and Load Balancing and Sharing, which can be considered a specialized variant of High Availability. Let's talk about straight High Availability first. In its simplest form, you have at least two systems, one of which is live and is currently the box that users connect to when they access your Web page or database. The other is in some sort of stand-by state, waiting and watching to take over should something happen to the live server. There are more complicated issues that can come into play, such as access to shared resources, MAC address takeover, dealing with "quorums" in setups that have more than two boxes, etc. Each of the projects deals with some subset of these issues.
Kimberlite     specializes in shared data storage and maintaining data integrity Piranha. (a.k.a. the Red Hat High Availability Server Project), can serve in one of two ways; it can be a two-node high availability failover solution or a multi-node load balancing solution. One of the better-known projects in this space is probably the High Availability Linux Project ,  also known as Linux-HA. The heart of Linux-HA is Heartbeat, which provides a heartbeat, monitoring, and IP takeover functionality. It can run heartbeats over serial ports or UDP broadcast or multicast, and can re-allocate IP addresses and other resources to various members of the cluster when a node goes down, and restore them when the node comes back up. A very lightweight High Availability setup is Peerd , which will do simple monitoring and failover. The purpose of this project is not to provide sub-second failovers, but to have a total system failover in under a minute while allowing the systems to be located in physically separate locations (rather than in, say, the same rack in the server room). Another lightweight project is Poor Man's High Availability , which uses the Dynamic DNS service from dnsart.com to do simple failover and failback of a Web server.
Now, let's go on to talk a bit about that other type of High Availability:

Load Balancing Software

Load Balancing is a special kind of High Availability, because not only does it offer the same monitoring and failover services that the straight HA packages offer, it can also balance and share incoming traffic, so the load is distributed somewhat evenly across multiple servers, allowing for faster responses and less likelihood of a server overloading.
Load Balancing is achieved by having at least one (though to achieve "real" High Availability, you'd need at least two) load balancers/routers and at least two backend servers. The live load balancer receives incoming requests, monitors the load and available system resources on the backend servers, and redirects requests to the most appropriate server. The backend servers are all live, in the sense that they are all handling requests they receive from the router. All of this is completely transparent to the end user.
One of the best known projects in this area is the Linux Virtual Server Project .  It uses the load balancers to pass along requests to the servers, and can "virtualize" almost any TCP or UDP service, such as HTTP(S), DNS, ssh, POP, IMAP, SMTP, and FTP. Many Load Balancing projects are based on LVS. Ultra Monkey  incorporates LVS, a heartbeat, and service monitoring to provide highly available and load balanced services. As mentioned previously, Piranha has a load balancing mode, which it refers to in its documentation as LVS mode. Keepalived adds a strong and robust keepalive facility to LVS. It monitors the server pools, and when one of the servers goes down, it tells the kernel and has the server removed from the LVS topology. The Zeus Load Balancer is not based on LVS, but offers similar functionality. It combines content-aware traffic management, site health monitoring, and failover services in its Web site load balancing. Another project not based on LVS is Pen a simple load balancer for TCP-based protocols like HTTP or SMTP.  Turbolinux Cluster Server  is the last of the load balancing projects I will talk about. It is from the folks at Turbolinux, and its load balancing and monitoring software allows detection and recovery from hardware and software failures (if recovery is possible).
Software used on, and for using, clusters
In this part of the review, I will talk about software that is used on a cluster for a specific purpose. This purpose can be an execution environment, a programming interface, monitoring and/or management software, filesystems that lend themselves well to clustering, and more.
Filesystems
Let's first talk about filesystems and filesystem-related projects. There are a lot of filesystems for Linux. These days, many of them have features like journaling, and some were designed specifically for use in clustered and distributed systems. The strong and weak points and differences in the various filesystems is a bit too large a topic to get into here, so I will just mention some of them, with the recommendation that more research be done before you decide what is best for you.
OpenAFS (an open version of the Andrew Filesystem originally developed at Carnegie Mellon University), GFS (the Global Filesystem), Coda, and InterMezzo are all distributed/cluster filesystems.
There are some other projects that I want to mention in this section because they relate to filesystems, though may not technically be considered filesystems by some. First, there is the ClusterNFS project, a set of patches to the Universal NFS Daemon that allows multiple clients to NFS mount the same root filesystem. It uses a mechanism in which it "tags" files. This is quite useful for NFS mounting the root filesystem for a cluster of diskless slave nodes.
The next two projects I will mention both deal with block devices. ENBD, the Enhanced Network Block Device, and DRBD allow remote disks to appear as if they were local block devices. This is especially useful when setting up a RAID mirror, to have your data updated in realtime but located on separate machines so it can be highly available.
Installation and Configuration Software
When dealing with perhaps hundreds or thousands of slave nodes in a cluster, installing and configuring them all is a huge task, and it is quite boring, especially when each of the nodes is functionally the exact duplicate of its hundreds or thousands of counterparts. Any tool to automate as much of this process as possible is always a welcome addition to the arsenal of the cluster administrator. As this is a problem that many other people have already faced, there are a few different solutions, each attacking the issue a little differently and solving different aspects of the overall problem.
FAI stands for Fully Automatic Installation. It is a non-interactive system to install the Debian GNU/Linux distribution. The installation of one or many nodes is initiated, and after installation is complete, the systems are fully configured and running, with no intervention on the part of the user. While FAI is specific to the Debian GNU/Linux distro, there are other projects that are not.
To install boxes
System Installation Suite
It is the answer
(I thought I would present this next project in haiku form, just to see if you were still paying attention.) The System Installation Suite is an image-based installation tool. Images are created and stored on an image server and copied to nodes as needed. Currently, Red Hat, Mandrake, SuSE, Conectiva, and Turbolinux are supported by SIS, with the hope that Debian and Debian-variant support will be coming sometime soon. SIS is made up of three projects, SystemImager, System Installer, and System Configurator.
Monitoring and Management Software
Being able to monitor and manage a cluster from one central location is another key to not going insane while administering a cluster of a couple hundred nodes. In this space, there seems to be a large number of projects, and again, each one does things a little differently, solving different variations on the common problem.
ClusterIt is only for management and maintenance of large numbers of systems. Ganglia is a very stable, well-known and well-tested, realtime monitoring and remote execution environment. It is in use in universities, government labs, and complete cluster implementations all over the world, and is highly respected by everyone I know that has used it. Performance Co-Pilot is a monitoring and management package from SGI. Originally written for IRIX, SGI ported it to Linux and released it to the Open Source community back in February 2000. With years of development and testing behind its commercial version, SGI is able to use its knowledge to offer the Linux version the stability and functionality that is sometimes lacking in Open Source projects.
Besides these projects that can be used on any set of boxes, there are some projects that were developed to work specifically with other projects. MOSIXVIEW is a GUI for a MOSIX cluster. It supports both MOSIX and OpenMosix, acting as a frontend to the mosctl commands. LVSmon is a monitoring daemon written to be used for maintaining LVS tables (LVS referring to the Linux Virtual Server Project, previously mentioned in the Load Balancing Software section above).
In addition to these large projects that encompass a lot of capabilities, there are many projects that are simpler, with smaller scope.Syncopt is a solution to the problem of keeping software on multiple systems up-to-date without undertaking the task of installing the software on each system by hand. With Syncopt, the software is installed on a central server and propagated to all systems that need it. Fsync is similar to rsync and CVS; it allows file synchronization between remote hosts, with functionality to merge differences and hooks for tools to merge the trees. It is a single Perl script, designed to function over modem speed (read: slow) network connections.Ghosts (global hosts) is a system that allows creation of macros to define groups of machines. Using these macros, gsh, an included parallel task runner, can execute code on a group of machines simultaneously. Last, but not least in this section, there is pconsole, a tool with a functionality somewhat similar to ghosts, but with a different approach. pconsole is an interactive administrative shell for clusters. It allows a user to open connections to a number of different cluster nodes and type commands into a special window, and the command is sent to each of the machines.
Programming and Execution Environments and Tools
Once you have a cluster built, what do you do with it? How do you write programs that take advantage of it? What libraries and programming tools are out there to help you write code optimized to run on a cluster? What software is out there to help you run a job on the cluster or keep a schedule of what is going to run, and when? These are the types of questions that the projects in this section answer.
PVM stands for the Parallel Virtual Machine. It is a portable message passing interface that lets a heterogeneous set of machines function as a cluster. Applications that use it can be written in C, C++, or Fortran, and can be comprised of a number of separate components (processes). PVM++ attempts to provide an easy-to-use library to program for PVM in C++. Programs like pvmpov or PVM Gmake use the PVM interface. pvmpov is a patch for POV-Ray which allows rendering to take place on a cluster using PVM-based code. PVM Gmake is a variant of GNU make which uses PVM to build in parallel on several remote machines.
Another of these message passing interfaces is MPI, which, coincidentally, stands for "The Message Passing Interface". There are a few different implementations of MPI. LAM/MPI and MPICH are two of them, and Object-Oriented MPI is an OO interface to the MPI standard which can be used at a much higher level than the standard C++ bindings. PETSc is a set of data structures and routines used for parallel applications that employs the MPI standard for all its message passing.
Another messaging system that is available is Spread. Spread is a toolkit that provides a message passing interface that can be used for highly available applications, a message bus for clusters, replicated databases, and failover applications.
Now, you may be asking how someone might keep track of all the jobs that are going to be run on a cluster. For that, you need a scheduler. There are a number of different schedulers out there, but when it comes to Linux Clustering, I mainly hear about two of them, Condor and Maui. These schedulers can handle scheduling policies, heterogeneous resources, dynamic priorities, reservations, and more.
Miscellaneous Cluster-Related Projects
There are some projects that are related to clustering but do not really fit into the categories that I have used to group things above. I will now briefly mention two these, as they are useful and worth noting.
First, there is the Distributed Lock Manager from IBM. The DLM provides an implementation of locking semantics modeled after the VAX Cluster locking semantics. This is a specific tool, not an entire cluster environment. An API is embodied in a shared library, and applications that wish to use the DLM can connect through this.
Secondly, the Linux Terminal Server Project is a great way of providing access to diskless systems (workstations, cluster slave nodes, or any other diskless systems you may have). LTSP provides the administrative tools that make accessing these systems easier than it might otherwise be.
Some Comments In Closing
This is by no means an all-encompassing list of the projects that exist in the world of Linux Clustering. There are a lot of other projects out there. I tried not to mention projects that have dead links or which haven't had any updates in a couple of years. At the pace that the world of clustering moves, two years is pretty outdated, unfortunately. Also, I may have missed some projects. Maybe they aren't included in the Clustering/Distributed Networks Category here on freshmeat. Some other good categories to look in would be:
System::Installation/Setup
System::Monitoring
System::Systems Administration
, just to name a few. Maybe they aren't listed on freshmeat at all. There are also many Web sites on the great big World Wide Web that are devoted to Linux Clustering in its various forms:
The High Availability Linux Project
This site is not only the home of the Linux-HA project, but also has lots of information about Linux High Availability.
The Linux Clustering Information Center
Ok, I may be a little biased, as this is my Web site, but I think it's a pretty useful place to find links to all sorts of information about all the types of clustering, from software to documentation to Linux Clustering haikus.
The Beowulf Project
The project that started it all. This page contains the history of the Beowulf Project, as well as some links to some other interesting sources of information.
The Sourceforge Clustering Foundry
A Sourceforge Foundry devoted to Clustering. What more could you ask for?
Again, this is a partial listing. I would recommend these places as good starting points in your search for more information; more likely than not, they will be able to point you in the direction you want to go.
What is the state of Linux Clustering? Where does it stand now, and where is it going?
These are good questions. Linux Clustering is, at least in my biased opinion, off to a great start. With recent announcements such as Pacific Northwest National Laboratory's purchase of a 1,400 node McKinley cluster running Linux (with an expected peak performance of 8.3 Teraflops) and vendors like Penguin Computing announcing their new 1U SMP Athlon system (ideal for clustering), the future is looking quite bright. Many people are taking Linux seriously these days, with support from companies like IBM, SGI, Intel, and Sun, just to name a few, as well as efforts at many universities and the DOE National Labs, where software development and testing take place. With these pieces at the base, there is no real ceiling of how far this can go. This may sound kind of hokey, but I think it is true. Being able to have supercomputer speeds or fault tolerant systems for a fraction of what it used to cost, I think many people are going to embrace this and run with it.

Tuesday, February 21, 2017

Oracle WebLogic Server 12c (12.1.2) on a Linux


 
 Oracle WebLogic Server 12c (12.1.2) on a Linux
http://www.davidghedini.com/pg/entry/oracle_web_logic


http://weblogic-wonders.com/weblogic/2010/12/03/methods-to-apply-patches-in-weblogic-server/

This tutorial covers installing Oracle WebLogic Server 12c (12.1.2) on a Linux system by using WebLogic generic installer.
Prerequisites
You should have already installed Oracle Enterprise Linux 6 on your machine. If you have not already done this follow Oracle Enterprise Linux 6 Installation and Setup Guide
Step 1:Login as a root user and make sure the /etc/hosts file contains correct entries for both the “localhost” and real host names.
          /etc/hosts

         ns1.amit.com

         service iptables stop
   service ip6tables stop
     chkconfig --level 35 iptables off
     chkconfig --level 35 ip6tables off
     vim /etc/sysconfig/selinux

rpm-Uvh jdk-8u121-linux-x64.rpm
groupadd -g 1000 oinstall useradd -u 1100 -g oinstall oracle passwd oracle mkdir -p /u01/app/oracle/middleware chown -R oracle:oinstall /u01 chmod -R 775 /u01 vim /home/oracle/.bash_profile 
MW_HOME=/u01/app/oracle/middleware; export MW_HOME WLS_HOME=$MW_HOME/wlserver; export WLS_HOME JAVA_HOME=/usr/java/jdk1.8.0_121-b13; export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH; export PATH # JDK 7 Requirement USER_MEM_ARGS="-Xms32m -Xmx200m -XX:MaxPermSize=350
java --version check java version mkdir-p /host/software/oracle/WebLogic
cd /host/software/oracle/WebLogic/

 mv fmw_12.2.1.2.0_wls_quick.jar /u01/app/oracle/middlewar

ls
su oracle java -jar -Xmx1024m -XX:MaxPermSize=512M wls1211_generic.jar_wls_quick.jar cd /u01/app/oracle/middleware/wls12212/wlserver/common/bin config.sh pack.sh unpack.sh wlscontrol.sh wlsifconfig.sh wlst.sh /u01/app/oracle/middleware/wls12212/user_projects/domains/base_domain star services
sh startWebLogic.sh