Install Puppet Client and Facter in RedHat Server

client_server: yum install puppet facter

In client test the connection certificate:

puppet agent –test –ca_server=puppet-master-servername –waitforcert=10

JAVA JMETER ERROR- “Error in Test Plan- see log file”

jmeter-error-in-testplan

I got this error when I run apache-jmeter 2.11 in my windows 64 bit machine which was running Java 8. This issue got resolved when I installed Java 7 and then restarted jmeter.

Hope this will helps !!

How to run your application in the default document root of TOMCAT 7 and use APACHE as a reverse proxy for Tomcat.

It is NOT recommended to place elements directly in the server.xml file. So add a file called ROOT.xml in /conf/Catalina/localhost/ folder

This ROOT.xml will override the default settings for the root context of the tomcat installation for that engine and host (Catalina and localhost).

Rename your application which you need to deploy in the tomcat document root as ROOT.war and it will create a ROOT folder when it get deployed in webapps folder.

Enter the following to the ROOT.xml file;

Shellshock Bash Vulnerability. Severe than HEARTBLEED Bug.

A newly discovered security bug in a widely used piece of Linux software, known as “Bash,” could pose a bigger threat to computer users than the “Heartbleed” bug that surfaced in April, cyber experts warned on Wednesday.

The bug was rated a “10” for severity, meaning it has maximum impact, and rated “low” for complexity of exploitation, meaning it is relatively easy for hackers to launch attacks.

“Using this vulnerability, attackers can potentially take over the operating system, access confidential information, make changes, etc. “Anybody with systems using Bash needs to deploy the patch immediately.”

“Heartbleed,” discovered in April, is a bug in an open-source encryption software called OpenSSL.

The Shellshock vulnerability can be exploited on systems that are running Services or applications that allow unauthorized remote users to assign Bash environment variables. Examples of exploitable systems include the following:

Apache HTTP Servers that use CGI scripts (via mod_cgi and mod_cgid) that are written in Bash or launch to Bash subshells
Certain DHCP clients
OpenSSH servers that use the ForceCommand capability
Various network-exposed services that use Bash

Check System Vulnerability

On each of your systems that run Bash, you may check for Shellshock vulnerability by running the following command at the bash prompt:

env VAR='() { :;}; echo Bash is vulnerable!’ bash -c “echo Bash Test”
The highlighted echo Bash is vulnerable! portion of the command represents where a remote attacker could inject malicious code; arbitrary code following a function definition within an environment variable assignment. Therefore, if you see the following output, your version of Bash is vulnerable and should be updated:

Bash is vulnerable!
Bash Test
Otherwise, if your output does not include the simulated attacker’s payload, i.e. “Bash is vulnerable” is not printed as output, your version of bash is not vulnerable. It may look something like this:

bash: warning: VAR: ignoring function definition attempt
bash: error importing function definition for `VAR’
Bash Test

Fix Vulnerability: Update Bash

Use your default package manager to update the version of Bash. The following subsections cover updating Bash on various Linux distributions, including Ubuntu, Debian, CentOS, Red Hat, and Fedora.

YUM: CentOS / Red Hat / Fedora

Update Bash to the latest version available via the yum:

sudo yum update bash

Now run check your system vulnerability again by running the command in the previous section

Enable CoreDump For Application Crashes.

Edit /etc/profile file and do as follows to make persistent configuration:

ulimit -S -c 0 > /dev/null 2>&1
Update it as follows:

ulimit -c unlimited >/dev/null 2>&1
Save and close the file. Edit /etc/sysctl.conf, enter:
# vi /etc/sysctl.conf

Append the following lines:

kernel.core_uses_pid = 1
kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t
fs.suid_dumpable = 2

Reload the settings in /etc/sysctl.conf by command:
# sysctl -p

Shell script to check a process for every 3 min & start the process if it stops

while [ 1 -eq 1 ]
do
i=0
i=`ps -ef | grep process_to_check | grep -v grep | wc -l`
#echo $i
if [ “$i” -lt 1 ]
then
echo “starting the process”
cd /path to the process bin folder/
./start_the_process
fi
sleep 180
# runs for every 3 minute.
done

##Note: Replace process_to_check with the actual process that you need to check
##Note: “path to the process bin folder” should be replaced with the actual path of the process bin folder
##Note: “start_the_process” should be replaced with the actually command to start the process from bin folder.

Install mtop on CentOS to monitor the mysql usage !

Download the latest perl-Curses for your build from http://dag.wieers.com/rpm/packages/perl-Curses/ using wget
At the time of this How To it is: perl-Curses-1.23-1.el5.rf.x86_64.rpm (64bit) or perl-Curses-1.23-1.el5.rf.i386.rpm (32bit) for CentOS 5

wget http://dag.wieers.com/rpm/packages/perl-Curses/perl-Curses-1.23-1.el5.rf.x86_64.rpm

Install the RPM:
# rpm -Uvh perl-Curses-1.23-1.el5.rf.x86_64.rpm

Download and Install mtop from http://dag.wieers.com/rpm/packages/mtop/ – Again, select the appropriate version
# wget http://dag.wieers.com/rpm/packages/mtop/mtop-0.6.6-1.2.el5.rf.noarch.rpm
# rpm -Uvh mtop-0.6.6-1.2.el5.rf.noarch.rpm

Execute mtop
# mtop

Install F-Secure Full Internet Security (Licensed or free trial)

F-secure Installation Steps

* 1) Download the tar file from https://.f-secure.com/en/web/business_global/support/downloads/-/carousel/view/83

* 2) tar -zxf f-secure-linux-security-9.11.1311.tar.gz

* 3)cd f-secure-linux-security-9.11.1311

* 4)./f-secure-linux-security-9.11.1311 nofirewall

* 5)cd /opt/f-secure/fsav

* 6)fsav –help – shows you all the available options

* 7)In /etc/httpd/conf/httpd.conf file, Write “Listen serverip: 28080

* 8)/opt/f-secure/fsav/fsav-config –> This command will help us to edit the configuration

* 9) /opt/f-secure/fsav/sbin/fschooser –> This comand will help us to toggle between the available options (Ex: to disable firewall)

* 10) /etc/init.d/fsma restart -> Command to restart the f-secure

Finally to access the webui in browser:

http://serverip:28080/fsecure/webui

serverip can be the server IP of the server in which we are instaling f-secure

F-secure Uninstallation Steps:

* 1) cd /opt/f-secure/fsav/bin

* 2) ./uninstall-fsav

vzctl enter VZID: Unable to open pty: No such file or directory

Issue :

# vzctl enter 101
enter into VE 101 failed
Unable to open pty: No such file or directory

———————————

Solution 1:

1. Edit the file /etc/rc.sysinit of the VPS server

2. Comment the line
#/sbin/start_udev

3. Add the following lines after /sbin/start_udev:

/sbin/MAKEDEV tty
/sbin/MAKEDEV pty

4. Reboot your VPS
vzctl restart VEID

Solution 2:

# vzctl exec 101 /sbin/MAKEDEV tty
# vzctl exec 101 /sbin/MAKEDEV pty
# vzctl enter 101

Now do the following, to find the udave package name as follows.

# rpm -qf /etc/udev/makedev.d/50-udev.nodes
udev-095-14.9.el5
# rpm -e udev-095-14.9.el5 –nodeps

Restart VE

NOTE: If the issue still persists then try to remount /dev/pts

try your own risk : vzctl exec vzid ‘ mount -v -t devpts none /dev/pts’

For more details contact linuxmaster007@gmail.com