July 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

July 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Fedora 20 INSTALL

[root@fedora ~]# systemctl | grep firewall firewalld.service loaded active running firewal d – dynamic firewall daemon [root@fedora ~]#

[root@fedora ~]# systemctl stop firewalld.service [root@fedora ~]# systemctl start firewalld.service [root@fedora ~]# [root@fedora ~]# systemctl disable firewalld.service rm ‘/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service’ rm ‘/etc/systemd/system/basic.target.wants/firewalld.service’ [root@fedora ~]# [root@fedora ~]# sed -i ‘s/^SELINUX=.*/SELINUX=disabled/g’ /etc/sysconfig/selinux && cat /etc/sysconfig/selinux

# This file […]

Redhat init Script for apache

#!/bin/sh # # Startup script for the Apache Web Server # # chkconfig: – 85 15 # description: Apache is a World Wide Web server. It is used to serve \ # HTML files and CGI. # processname: httpd # pidfile: /var/run/httpd.pid # config: /etc/httpd/conf/access.conf # config: /etc/httpd/conf/httpd.conf # config: /etc/httpd/conf/srm.conf ulimit -HSn 32768 # […]

zmapachectl

#!/bin/bash # # ***** BEGIN LICENSE BLOCK ***** # Zimbra Collaboration Suite Server # Copyright (C) 2005, 2007, 2008 Zimbra, Inc. # # The contents of this file are subject to the Yahoo! Public License # Version 1.0 (“License”); you may not use this file except in # compliance with the License. You may obtain […]

restart of service

echo is_uid=`/usr/bin/id | /usr/bin/awk -F\= {‘print $2’} | /usr/bin/awk -F\( {‘print $1’}` if [ $is_uid -ne 0 ] ; then echo “You are not logged on as root” exit ; fi # DNS, name server, bind ; case “$1” in ‘dns’|’bind’|’named’) if [ -f “/usr/local/etc/named.pid” ] ; then named_pid=`cat /usr/local/etc/named.pid` kill -HUP $named_pid echo […]

Apache restart

#!/bin/bash # # apache Start the apache HTTP server. # # The variables below are NOT to be changed. They are there to make the # script more readable. NAME=apache DAEMON=/usr/sbin/$NAME PIDFILE=/var/run/$NAME.pid CONF=/etc/$NAME/httpd.conf APACHECTL=/usr/sbin/${NAME}ctl # note: SSD is required only at startup of the daemon. SSD=`which start-stop-daemon` ENV=”env -i LANG=C PATH=/bin:/usr/bin:/usr/local/bin” SHIB_HOME=/opt/shibboleth-1.3 LD_LIBRARY_PATH=${SHIB_HOME}/libexec:${SHIB_HOME}/lib export LD_LIBRARY_PATH […]

Shell to find directory and execute

#!/bin/bash KNOWN_PATH=”/usr/sbin /sbin /opt/apache2/bin /usr/local/sbin” HTTPD_DIR= for path in $KNOWN_PATH; do echo “trying $path/httpd…” if `ls $path/httpd > /dev/null 2>&1`; then HTTPD_DIR=$path break fi done if [ -z $HTTPD_DIR ]; then echo “httpd path not found, please enter the path to directory where httpd is” echo -n “httpd path : ” read HTTPD_DIR fi HTTPD=”$HTTPD_DIR/httpd” […]