Category: Unix / Linux
Java Installation Process in Linux – Complete guide
Download, Install and Configure JDK 8 & JRE 8
Platfrom – Debian & Ubuntu
#JRE8 - Package contains just the Java Runtime Environment 8 $ sudo apt-get install openjdk-8-jre #JKD8 - Package contains just the Java Developement Environment 8 $ sudo apt-get install openjdk-8-jdk
Platfrom – Fedora, Oracle Linux, Red Hat Enterprise Linux, etc
#JRE8 - Package contains just the Java Runtime Environment 8 $ su -c “yum install java-1.8.0-openjdk” #JKD8 - Package contains just the Java Developement Environment 8 $ su -c "yum install java-1.8.0-openjdk-devel" $ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.rpm" $ wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm > jdk-8u112-linux-x64.rpm
Platfrom – All platforms of Linux, Windows and Mac in Tar ball format
$ wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz $ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz" $ wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
How to set JAVA in Linux System?
$ export JAVA_HOME=/opt/jdk1.8.0_144/ $ export PATH=/opt/jdk1.8.0_144/bin:$PATH;
Download, Install and Configure JDK 7 & JRE 7
Platfrom – Debian & Ubuntu
#JRE7 - Package contains just the Java Runtime Environment 7 $ sudo apt-get install openjdk-7-jre #JKD7 - Package contains just the Java Developement Environment 7 $ sudo apt-get install openjdk-7-jdk
Platfrom – Fedora, Oracle Linux, Red Hat Enterprise Linux, etc
$ su -c “yum install java-1.7.0-openjdk” $ su -c “yum install java-1.7.0-openjdk-devel”
Platfrom – All platforms of Linux, Windows and Mac in Tar ball format
wget –no-cookies –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com” “http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz” wget –no-check-certificate –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz curl -v -j -k -L -H “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm > jdk-7u79-linux-x64.rpm
JDK 6
Debian, Ubuntu, etc.
On the command line, type:
$ sudo apt-get install openjdk-6-jre
The openjdk-6-jre package contains just the Java Runtime Environment.
$ sudo apt-get install openjdk-6-jdk
If you want to develop Java programs then install the openjdk-6-jdk package.
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c “yum install java-1.6.0-openjdk”
The java-1.6.0-openjdk package contains just the Java Runtime Environment.
$ su -c “yum install java-1.6.0-openjdk-devel”
If you want to develop Java programs then install the java-1.6.0-openjdk-devel package.
How to Install Docker in Linux?
20 mpstat Commands Examples in Linux / UNIX | mpstat Commands Tutorial
Usage:
20 iostat Commands Examples in Linux / UNIX | iostat Commands Tutorial
$ iostat -m
20 vmstat Commands Examples in Linux / UNIX | vmstat Commands Tutorials
20 Xargs Commands Examples in Linux / UNIX | Xargs Commands Tutorials
Under Development
20 Mount and Unmount Filesystem / Partition commands in Linux / UNIX
The same -a option can be used with umount to unmount all the filesystems mentioned in /etc/mtab
Example
How to Install and Configure Jira in Linux | Jira Tutorial
Download JIRA package from
https://www.atlassian.com/software/jira/download?b=j
Linux Installation:
wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-6.4.12-x64.bin
chmod atlassian-jira-6.4.12-x64.bin
Execute the ‘.bin’ file to start the console wizard
stop iptables
service jira start/stop
http://uvo1kievugg76unbcj9.vm.cld.sr:8080/
& follow the instructions
Reference
https://confluence.atlassian.com/jira/installing-jira-on-linux-191501165.html
gsh – Run linux commands on many other linux server at once
gsh – Run linux commands on many other linux server at once
Group Shell (also called gsh) is a remote shell multiplexor. It lets you control many remote shells at once in a single shell. Unlike other commands dispatchers, it is interactive, so shells spawned on the remote hosts are persistent.
GSH is a pluggable version of DSH (Distributed Shell) written in Python. Both a module and a command-line tool for running a shell command over multiple machines are included. GSH can be extended by adding new host loaders as well as hooking into various stages of the runtime.
It requires only a SSH server on the remote hosts, or some other way to open a remote shell.
gsh allows you to run commands on multiple hosts by adding tags to the gsh command.
e.g > gsh tag “remote command”
Important things to remember:
/etc/ghosts contains a list of all the servers and tags. gsh is a lot more fun once you’ve set up ssh keys to your servers
gsh [OPTIONS] SYSTEMS CMD…
SYSTEMS is a combination of ghost macros. See ghosts(1).
CMD is the command to run
-h, –help Display full help
-d, –debug Turn on exeuction debugging reports
-h, –no-host-prefix Does not prefix output lines with the host name
-s, –show-commands Displays the command before the output report
-n, –open-stdin Leaves stdin open when running (scary!)
-l, –user USER SSH’s to the host as user USER
-r, –run-locally Run commands locally (replaces $host with host)
-o, –self-remote Run locally instead of over SSH for local host
-V, –version Report the version and exit
You set up a /etc/ghosts file containing your servers in groups such as web, db, RHEL4, x86_64, or whatever (man ghosts) then you use that group when you call gsh.
How to run the gsh?
> gsh linux “cat /etc/redhat-release; uname -r”
You can also combine or split ghost groups, using cpanel+vps or web-RHEL4, for example.
Here’s an example /etc/ghosts file:
# Machines # # hostname OS-Version Hardware OS cp security linuxbrigade.com debian6 baremetal linux plesk iptables linuxbrigade.com centos5 vps linux cpanel csfcluster linuxbrigade.com debian7 baremetal linux plesk iptables linuxbrigade.com centos6 vps linux cpanel csfcluster linuxbrigade.com centos6 vps linux cpanel csfcluster linuxbrigade.com centos6 vps linux nocp denyhosts linuxbrigade.com debian6 baremetal linux plesk iptables linuxbrigade.com centos6 baremetal linux cpanel csf linuxbrigade.com centos5 vps linux cpanel csf
Reference url
http://www.linuxbrigade.com/run-the-same-command-on-many-linux-servers-at-once/
http://linux.die.net/man/1/gsh
https://github.com/gmjosack/gsh
http://outflux.net/unix/software/gsh/
http://outflux.net/unix/software/gsh/gsh.html