Disable firewall in linux

Quick tip on disabling firewall in linux-firewall is software based firewall that provides protection between your server (workstation) and damaging content on the Internet or network. It will try to guard your computer against both malicious users and software such as viruses/worms.

Task: Disable / Turn off Linux Firewall

Type the following two commands (you must login as the root user):

# /etc/init.d/iptables save
# /etc/init.d/iptables stop

Turn off firewall on boot:

# chkconfig iptables off

Task: Enable / Turn on Linux Firewall (Red hat/CentOS/Fedora Core)

Type the following command to turn on iptables firewall:

# /etc/init.d/iptables start

Happy learning with Vinay

Create & Delete managed server by wlst script in Weblogic

Requirement – How to create and delete managed server by wlst script in weblogic

Solutions
As we can use wlst recording feature to generate the script.I have modified a script a little bit

Following script to create a managed server with assigning port and machine.

MakeServer.py

name=sys.argv[1]
port=int(sys.argv[2])
machine=sys.argv[3]
connect('weblogic', 'welcome1', 't3://192.168.0.123:7001')
edit()
startEdit()
cd('/')
cmo.createServer(name)
cd('/Servers/' + name)
cmo.setListenAddress("")
cmo.setListenPort(port)
activate()
startEdit()
cmo.setListenPortEnabled(true)
cmo.setJavaCompiler('javac')
cmo.setClientCertProxyEnabled(false)
cmo.setMachine(getMBean('/Machines/' + machine))
cmo.setCluster(None)
cd('/Servers/' + name + '/SSL/' + name)
cmo.setEnabled(false)
cd('/Servers/NewManagedServer/DataSource/NewManagedServer')
cmo.setRmiJDBCSecurity(None)
activate()

->Open terminal and go to
$MWHOME/wlserver_10.3/server/bin
-> . ./setWLSEnv.sh

-> open new terminal
-> go to $MWHOME/user_project/domains/ucm_domains/bin
-> execute . ./setDomainEnv.sh

:-Note it is like dot space dot/setDomainEnv.sh

Call this script as

java weblogic.WLST /u01/app/oracle/Oracle/middleware/wlserver_10.3/server/bin/MakeServer.py "servername" "portNumber" "MachineName"

___________________________________________________________________________________________________________-

Following script to delete server

DeleteServer.py

name=sys.argv[1]
connect('weblogic', 'welcome1', 't3://192.168.0.123:7001')
edit()
startEdit()
cd('/')
cd('/Servers/' + name)
cmo.setCluster(None)
cmo.setMachine(None)
editService.getConfigurationManager().removeReferencesToBean(getMBean('/Servers/' + name))

cd('/')
cmo.destroyServer(getMBean('/Servers/' + name))

activate()

->Open terminal and go to
$MWHOME/wlserver_10.3/server/bin
-> . ./setWLSEnv.sh

-> open new terminal
-> go to $MWHOME/user_project/domains/ucm_domains/bin
-> execute . ./setDomainEnv.sh

:-Note it is like dot space dot/setDomainEnv.sh

Call this script as

java weblogic.WLST /u01/app/oracle/Oracle/middleware/wlserver_10.3/server/bin/DeleteServer.py "servername"

See the video here

happy learning Weblogic with Vinay kumar in techartifact…..