Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, 27 April 2016

how to Enable EPEL Repository for RHEL linux.

how to Enable EPEL Repository for RHEL linux.
EPEL (Extra Packages for Enterprise Linux)
ref : linux 

Tuesday, 26 April 2016

install tomcat on linux


install tomcat

go to /temp dir
sudo wget http://redrockdigimark.com/apachemirror/tomcat/tomcat-7/v7.0.69/bin/apache-tomcat-7.0.69.tar.gz

2) unzip file
tar xzf apache-tomcat-7.0.69.tar.gz

3) move the folder to tomcat7

mv apache-tomcat-7.0.69 /usr/local/tomcat7

4) start the tomcat server.
go to the ./bin/startup.sh

output :
cmd : ./bin/startup.sh
Using CATALINA_BASE:   /usr/local/tomcat7/apache-tomcat-7.0.69
Using CATALINA_HOME:   /usr/local/tomcat7/apache-tomcat-7.0.69
Using CATALINA_TMPDIR: /usr/local/tomcat7/apache-tomcat-7.0.69/temp
Using JRE_HOME:        /usr/java/jdk1.8.0_45/jre
Using CLASSPATH:       /usr/local/tomcat7/apache-tomcat-7.0.69/bin/bootstrap.jar:/usr/local/tomcat7/apache-tomcat-7.0.69/bin/tomcat-juli.jar
Tomcat started.

5) set up user account in conf/tomcat-users.xml.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="abc" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="def" roles="manager-gui,admin-gui" />


6) change the port to 8082

go to conf/server.xml  and change the default port from 8080 t0 8082

 <Connector port="8082" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

7) connect to tomcat :
http://xx.xxx.xxx.xxx:8082/manager/html

Monday, 25 April 2016

set the java path permanently in linux

c) set the java path

export JAVA_HOME=/usr/java/jdk1.8.0_45

d) Setup JRE_HOME Variable

export JRE_HOME=/usr/java/jdk1.8.0_45/jre

e) Setup PATH Variable

export PATH=$PATH:/usr/java/jdk1.8.0_45/bin:/usr/java/jdk1.8.0_45/jre/bin

environment variable :

/etc/environment

to set the variable permanently.

go to directory
/etc
open profile.
cmd : vi profile

set all the variable at the bottom of the pofile.
check from new command window weather you are able to see the path.

intsall nodejs in rhel linux .

intsall nodejs in rhel linux .
command :
1) sudo rpm -ivh epel-release-7-6.noarch.rpm
2) sudo yum install npm
3) node --version

Thursday, 21 April 2016

find puppet intalled in rhel linux

how to find the version  of puppet intalled in rhel linux

cmd : rpm -qa | grep puppet

puppetlabs-release-7-12.noarch
puppet-...x.noarch
puppet-server-x.x.x.x.noarch

know the linux version

how to know the linux version.
for kernel level.
1) uname -a
2) to know the redhat version then use.
cmd : cat /etc/redhat-release.

Monday, 18 April 2016

remove directory in linux

Remove directory in linux.

delete directory
cmd :  rm -r mydir

delete directory and files with in directory

cmd :  rm -r mydir


REF : computerhope

Sunday, 17 April 2016

open a port in linux using firefall-cmd

open a port in linux using firefall-cmd.

before running the command install firewalld package.

1) install the firewalld on linux
cmd : yum install firewalld
2) check status.
cmd : systemctl status firewalld
if it is not enable, enable it.
cmd : systemctl enable firewalld
3) if it not started start it.
cmd : systemctl start firewalld

4) stop the firewall
cmd : service firewalld stop



Now we have to open the port which will visible to public
open port :
cmd : firewall-cmd --zone=public --add-port=8090/tcp --permanent

reload the service :
firewall-cmd --reload

check whether the port was added to ipatables rules:
iptables-save | grep 8090

REF :
1) liquidweb
2) linuxconfig

Saturday, 16 April 2016

linux export not a valid identifier

-bash: export: `=': not a valid identifier

Hen making an export. remove the in between spaces.

export JAVA_HOME = "/usr/...". (with spaces)

export JAVA_HOME="/usr/profile" (without spaces).

Find Out Which Process Is Listening Upon a Port

Find Out Which Process Is Listening Upon a Port

for check what port the tomcat server is using

use : netstat – a command-line tool that displays network connections, routing tables, and a number of network interface statistics.

ex : netstat -tulpn

Get a list of the installed services in linux


Get a list of the installed services in linux

To get a list of the installed services on the shell, you may use this command linux

chkconfig --list

Friday, 15 April 2016

Failed to connect to repository : Could not init /tmp/hudson

Failed to connect to repository : Could not init /tmp/hudson

1) There's no such executable git in PATH: /sbin, /usr/sbin, /bin, /usr/bin.
In the jenkins job section.
Advanced...
Source Code Management.
got git.
2) Failed to connect to repository : Could not init /tmp/hudson

solution : please install git(as below ) or provide the git exe file path (/usr/bin/git).  

Install git on linux.

command : sudo yum install git-all

ref : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

now check the git version.
cmd : git --version

Know tomcat version on linux

Know tomcat version on linux

sudo rpm -qa | grep tomcat

output : tomcat-7.x.x.

Install maven on redhat linux

Install maven on redhat  linux

wget : to retrieve content from server

REF : maven mirror

1) wget http://mirror.olnevhost.net/pub/apache/maven/binaries/apache-maven-3.2.1-bin.tar.gz

1.1)
create the apache-maven if not exist.
command :
sudo mkdir -m a=rwx /usr/local/apache-maven

1.2) Go to apache-maven directory and execute the command.
maven

1.3) extract the file
command : tar xvf apache-maven-3.2.1-bin.tar.gz

1.4) export the path
1.4.1) export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.1
1.4.2)export M2=$M2_HOME/bin
1.4.3) export PATH=$M2:$PATH

1.5) verify maven version
mvn -version

output :

Maven home: /usr/local/apache-maven/apache-maven-3.2.1
Java version: 1.8.0_45, vendor
Java home: /usr/java/jdk1.8.0_45/jre
Default locale:
OS name: "linux",

REF : 1) stackoverflow
           2) linux