Sunday, 28 December 2014

script to install flash player on CentOS, Fedora, RedHat

script to install  flash player on CentOS, Fedora, RedHat


Writer: Anuj Borah
Email: anujborah1@gmail.com

#!/bin/bash
clear
if [ $UID -eq 0 ]
then
echo "Downloading the necessary file ....  wait"
sleep 3
wget "http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.425/install_flash_player_11_linux.x86_64.tar.gz"

clear
tar -zxvf install_flash_player_11_linux.x86_64.tar.gz

clear
cp libflashplayer.so /usr/lib64/mozilla/plugins/ > /dev/null
cp -r usr/* /us > /dev/null
echo "Configuration on the way... have patient..."

sleep 3

clear
echo "All Done , Restart firefox now ."

else
echo "&&&&&&This Script will run as root only ,  login as root and try $0  again. &&&&&&"
fi

Script to mount ntfs drives on Red Hat , CentOs And Fedora.

 Script to mount ntfs drives on Red Hat , CentOs   And Fedora.

Writter:Anuj Borah
Email: anujborah@gmail..com



#!/bin/bash
clear
echo -e "Wecome\nWriter:Anuj Borah\nEmail:anujborah1@gmail.com"
sleep 3
if [ $UID -eq 0 ]
then
rpm -q gcc &&  echo "OK Nice" || echo "gcc not installed u must install  gcc type 'yum install gcc' then try again"
sleep 3
wget "tuxera.com/opensource/ntfs-3g_ntfsprogs-2014.2.15.tgz"
clear
echo "Download in progress , wait "
sleep 3
tar -zxvf ntfs-3g_ntfsprogs-2014.2.15.tgz
cd ntfs-3g_ntfsprogs-2014.2.15
clear
chmod +x *
clear
./configure
make
make install
clear
echo "Looks like every thing gone fine.Now i will check it"
firefox borahshell.blogsopt.in
sleep 3
clear
echo "give me the drive to mount to your system"
read p
clear
echo "Given drive $p and the drive will be mounted to /media/usb"
sleep 3
clear
mkdir /media/usb >/dev/null
mount mount -t ntfs-3g $p  /media/usb
clear
echo "Congrats all done . Now u can access ntfs drive by typing cd /media/usb"
else
echo "&&&&&&This Script will run as root only ,  login as root and try $0  again. &&&&&&"
fi


Tuesday, 23 December 2014

Shell script that will allow live monitoring of Apache Server

This the script that will enable live monitoring of Apache Server Ex. Who is currently logged on to it.

It will be look like the following screen shot .



Note: This script will work for Ubuntu (All  versions) and Debian(All Version ) only. There is another script for Redhat , Centos and Fedora.


Writer: Anuj Borah
Email: anujborah1@gmail.com



#!/bin/bash
clear
Writer: Anuj Borah
Email: anujborah1@gmail.com
sleep 3
echo "This the script for apache server monitoring.(Press F5 to refress)"
sleep 3
if [ $UID -eq 0 ]
then
dpkg -l apache2 && echo "Congrats ,Apache is installed" || echo "Apache is not installed type (apt-get install apache2) to linstall apache"
sleep 3
a2enmod status > /dev/null
clear
echo "Give the ip address to which u want to associate for apache server monitoring " ; read p

echo "<IfModule mod_status.c>
    # Allow server status reports generated by mod_status,
    # with the URL of http://servername/server-status
    # Uncomment and change the "192.0.2.0/24" to allow access from other hosts.

    <Location /server-status>
        SetHandler server-status
        Require local
        Allow from 127.0.0.1 ::1 $p
        #Require ip 192.0.2.0/24
    </Location>

    # Keep track of extended status information for each request
    ExtendedStatus On

    # Determine if mod_status displays the first 63 characters of a request or
    # the last 63, assuming the request itself is greater than 63 chars.
    # Default: Off
    #SeeRequestTail On


    <IfModule mod_proxy.c>
        # Show Proxy LoadBalancer status in mod_status
        ProxyStatus On
    </IfModule>


</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet" > /etc/apache2/mods-enabled/status.conf

service apache2 restart > /dev/null

clear
echo "All Done. Now i will enable the system.(Press F5 to refress) "
sleep 3
firefox http://127.0.0.1:server-status

else
echo "&&&&&&This Script will run as root only ,  login as root and try $0  again. &&&&&&"
fi

Popular Posts