30 Ocak 2014 Perşembe

Weblogic Console Erişim Problemleri

            Linux bir ortamda uygulama ( weblogic, tomcat vs..) kurulumu yaptınız ancak bir türlü uygulamaya browser üzerinden erişim sağlayamıyorsunuz bu durumda sunucu üzerinde firewall çalışır durumda ve sizin uygulamaya erişiminizi engelliyor demektir.
            Linux'da firewall devre dışı bırakmak için aşağıda ki adımları izlemeniz yeterli olacaktır.
Adımlarımız;
·         Öncelikle firewall gerçekten de çalışır durumda mı görelim , görmek için aşağıda ki komutu çalıştırıyoruz.

# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Göründüğü gibi firewall çalışır vaziyette , firewall devre dışı bırakmak için aşağıda ki komutu çalıştırıyoruz.

# service iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter  [  OK  ]
iptables: Unloading modules:                               [  OK  ]



Not : Yukardaki adımları bitirdikten sonra hala erişim sağlayamıyorsanız son olarak aşağıda ki adımları izlemeniz gerekmektedir.


        # chkconfig --list iptables
iptables               0:off      1:off      2:on       3:on       4:on       5:on       6:off



Yukarda da göründüğü üzere hepsinin off olması gerekirken hala on vaziyet de  olan prosesler mevcut durumda dolayısıyla hepsinin off duruma çekmemiz gerekmektedir, bu durumda aşağıda ki komutu uygulayarak işlemimizi bitirmiş oluyoruz.

           # chkconfig iptables off

İşlemimizi başarılı şekilde tamamladığımız görmek için aşağıda ki komutu tekrarlıyoruz.

            # chkconfig --list iptables  
iptables               0:off      1:off      2:off      3:off      4:off      5:off      6:off

19 Kasım 2012 Pazartesi

Linux local time zone nasıl değiştirilir


# Timezone değerini kontrol et:
$ ls -l /usr/share/zoneinfo/ | grep local
lrwxrwxrwx  1 root root    14 Mar  7  2012 localtime -> /etc/localtime

[etiya@hermes:~]$ ls -l /usr/share/zoneinfo/Asia/Istanbul
-rw-r--r-- 1 root root 2721 Mar  7  2012 /usr/share/zoneinfo/Asia/Istanbul

[etiya@hermes:~]$ ls -l /etc/localtime
-rw-r--r-- 1 root root 2819 Jul  5 16:29 /etc/localtime

[etiya@hermes:~]$ date
Tue Oct  9 00:24:27 PDT 2012

[etiya@hermes:~]$ sudo mv /etc/localtime /etc/localtime.org
[sudo] password for etiya:

# "/usr/share/zoneinfo/Asia/Istanbul" dosyasına "/etc/localtime" adında kısa yol (link) oluştur
[etiya@hermes:~]$ sudo ln -sf /usr/share/zoneinfo/Asia/Istanbul /etc/localtime

[etiya@hermes:~]$ date
Tue Oct  9 10:28:29 EEST 2012      # *** CORRECT TIME by localtime***

[etiya@hermes:~]$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 33 Oct  9 10:28 /etc/localtime -> /usr/share/zoneinfo/Asia/Istanbul

Sonuç:
"/etc/localtime" kısa yolu (link) "/usr/share/zoneinfo" klasöründe doğru dosyayı gösteriyor olmalı.
Bizim durumumuzda bu dosya "/usr/share/zoneinfo/Asia/Istanbul" dosyasıdır

2 Ağustos 2012 Perşembe

Installing WebLogic Server on a Linux Box


WebLogic software will be installed on a Linux Box, running under Oracle Enterprise Linux-6.

Step1 [optional]: Create new UNIX group and user

Altough WebLogic software could be installed as "root" on a UNIX machine, creating a new group and user which will serve as WebLogic Administrator will make the administration tasks easier. Therefore we will start by creating a new group and user on UNIX.
Connect as "root" (or as another administrator) user and first create "weblogic" gorup.
[admin@zeus ~]$ sudo groupadd weblogic
Verify if the group "weblogic" has been created.
[admin@zeus tmp]$ grep weblogic /etc/group
weblogic:x:503:
Next, create "weblogic" user
[admin@zeus ~]$ sudo useradd weblogic
 Verify if the user "weblogic" has been created
[admin@zeus tmp]$ grep weblogic /etc/passwd
weblogic:x:502:503:Weblogic Admin user:/home/weblogic:/bin/bash
Disconnect from "admin"
[admin@zeus ~]$ ^d

Step2 [optional]: install JRockit-JDK

Normally JDK has already been installed with the first OS installaion as shown below.
[admin@zeus ~]$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (rhel-1.39.1.9.7.el6-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
However, based on the requirements submitted by the development team, JRockit is the perferred JDK to be used with Weblogic server. Therefore, JRockit will also be installed as "weblogic" user.
Connect as "weblogic" user and perform installation of JRockit JDK.
[weblogic@zeus ~]$ ./jrockit-jdk1.6.0_29-R28.2.0-4.1.0-linux-x64.bin
To install JRockit, accept all the default options and press "Next" button until the installation is complete.
Verify the installation of JRockit
[weblogic@zeus ~]$ $HOME/jrockit-jdk1.6.0_29-R28.2.0-4.1.0/bin/java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Oracle JRockit(R) (build R28.2.0-79-146777-1.6.0_29-20111005-1807-linux-x86_64

Step3: Adjust your Java environment settings

Set the new JRockit environment to be the default home for Java
[weblogic@zeus ~]$ vi .bashrc
export JAVA_HOME="/home/weblogic/jrockit-jdk1.6.0_29-R28.2.0-4.1.0"
PATH=$JAVA_HOME/bin:$PATH
:wq
 Activate the new environment settings
[weblogic@zeus ~]$ . .bashrc
Verify the new settings
 [weblogic@zeus ~]$ echo $JAVA_HOME
/home/weblogic/jrockit-jdk1.6.0_29-R28.2.0-4.1.0

[weblogic@zeus ~]$ echo $PATH | tr ':' '\n'

Step4 [optional]: Perform installation of Java ADF Libraries

Java ADF libraries will aslo be installed based on another requirement submitted by development team:
[weblogic@zeus ~]$ java -jar jdevstudio11114install.jar








Step5: Perform installation of WebLogic server software

[weblogic@zeus ~]$ java -jar wls1034_generic.jar


Select "Use an existing Oracle Middleware Home" option to select Oracle Middleware directory, which has already been created in the previous step when installing Java ADF Libraries.


Do not enter anything for "Register for Security Updates" section.





Choose the JRockit as JDK that we previously installed.


Choose the directories that we already created in the previous steps.




Step6: Create a Weblogic domain

At this stage, after the installation of WebLogic server software above, we need to create a WebLogic domain, which is made up of at least one Administration Console and one or more Managed Servers.
 [weblogic@zeus ~]$ ./Oracle/Middleware/wlserver_10.3/common/bin/config.sh
Accept the default options in the first step as shown in the followin screenshot.

Press Next button to create a new domain.







Select either "Development Mode" or "Production Mode" for server start mode based on your own requirements. If you select "Development Mode", weblogic does not require you to provide any user/password at startup. However, if you choose "Production Mode" then you will have to provide a valid user/password in a configuration file (boot.properties) when you want to start a WebLogic server.


Create one "Administration Server" and one or more "Managed Server" for the domain. Administration server will be used to manage the managed (start/stop/modify etc.) servers. Managed servers will be used to deploy the applications.


Accept the default options and press Next button.


In "Configure Managed Servers" screen, press on the "Add" button to add a new managed server and enter name, address and listening port properties.


Press "Next" button in "Configure Clusters" screen as we do need to have any clusters in our domain.


Configure a machine to create a Node Manager, which is a WebLogic component that allows us to administer "Administration Console" and "Managed Servers" remotely.


Press "->" button to assign servers displayed on the left pane to the machine on the right.


Verify the configuration summary and then press "Create" button.


Step7: Start Node Manager and Administration Console

In order to user WewbLogic services we need to start "Node Manager" and then "Administration Console". "Managed Server" will then be started using "Administration Console".
Start Node Manager first:
[weblogic@zeus ~]$ cd ./Oracle/Middleware/wlserver_10.3/server/bin
[weblogic@zeus ~]$ nohup ./startNodeManager.sh &
Start WebLogic Administration Console afterwards:
[weblogic@zeus ~]$ cd ./Oracle/Middleware/user_projects/domains/MTS_DEMO/bin
[weblogic@zeus ~]$ nohup startWebLogic.sh &
Note: There are more than one way to start "Admnistratin Console" and "Managed Server". Refer to WebLogic documents for all the possible ways to start/stop WebLogic services.


Değerli Hüseyin Özpay'a yardımları konusunda teşekkürler.

30 Temmuz 2012 Pazartesi

Template ‘den Yeni bir Virtual Machine oluşturma


Template ‘den  Yeni bir Vm oluşturma.


Not: bir template den yeni bir vm oluşturabilmek için once birkez snapshost alınmalıdır;









Bu aşamada yeni bir vm yaratılmış oldu.
Bundan sonra yeni yaratılan vm’in ayarlarının( network, ram vs.) yapılması gerekiyor.
















25 Temmuz 2012 Çarşamba

VNC Server Kurulumu


       Vnc server kurulumu

1-      Linux sistemine bağlanıp aşağıdaki komut çalıştırılarak VNC server kurulumu gerçekleştirilir
[etiya@adonis:~]$ sudo apt-get install vnc4server xinetd

2-      Initial vnc saettinlerinin (password vs.) ayarlanması için vcnserver çalıştırılır.
[etiya@adonis:~]$ /usr/bin/vnc4server

3-      Kurulumun yapıldığı kullanıcını home directory’sinde bulunan “.vnc/xstartup” dosyası güncellenir
[etiya@adonis:~]$ vi .vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER           # uncommented by myildiz
exec /etc/X11/xinit/xinitrc     # uncommented by myildiz

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
# xsetroot -solid grey      # commented out by myildiz
# vncconfig -iconic &       # commented out by myildiz
# x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &    # commented out by myildiz
# x-window-manager &        # commented out by myildiz

4-      VNC server UNIX makinesiüzerinde start edilir
[etiya@adonis:~]$ /usr/bin/vnc4server

5-      VNC server’ın dinlediği port’lar kontrol edilir               
[etiya@adonis:~]$ netstat -an |grep -i listen | grep '^tcp'

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN    
tcp        0      0 0.0.0.0:6001            0.0.0.0:*               LISTEN    
tcp        0      0 0.0.0.0:6002            0.0.0.0:*               LISTEN    
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN    
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN    
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN    
tcp6       0      0 :::5901                 :::*                    LISTEN    
tcp6       0      0 :::5902                 :::*                    LISTEN    
tcp6       0      0 :::22                   :::*                    LISTEN    
tcp6       0      0 ::1:631                 :::*                    LISTEN    
tcp6       0      0 ::1:6010                :::*                    LISTEN    

6-      Windows üzerinde kurulu olan VNC Viewer kullanılarak UNIX makinesine remote olarak ulaşılabilir.
VNC Viewer setup dosyasına aşağıdaki link’den ulaşabilirsiniz.
       192.168.1.36:5901 veya 192.168.1.36:5902



  7- Vnc server stop etmek için aşağıdaki komutlar tek tek çalıştırılır.
etiya@adonis:~$ /usr/bin/vnc4server -kill :1
etiya@adonis:~$ /usr/bin/vnc4server -kill :2