1.1 Overview of WebLogic Server lab

2 minute read

Install CentOS 6

On your host machine download the latest favorite suported OS. In our case CentOS 6.9

[email protected]:~$ cd /home/felixmf/software
[email protected]:~$ wget http://mirror.fccn.pt/repos/pub/CentOS/6.9/isos/x86_64/CentOS-6.9-x86_64-minimal.iso

Open you virtualization software and create a disk for our VM. In our case we will use Virtualization Manager

  ## make sure X11 forward is enabled
[email protected]:~$ sudo -i
[email protected]:~# virt-manager

Crete a new VM with the following setup example:

  • Name/hostnme: wls12c01
  • RAM: 4 GB
  • DISK: 50 GB qcow2
lvm drivers example
LVM driver struture, using CentOS 6.

After the installation you would get:

[email protected]:~# lsblk
NAME                         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                           11:0    1 1024M  0 rom
sda                            8:0    0   50G  0 disk
├─sda1                         8:1    0  500M  0 part /boot
└─sda2                         8:2    0 49.5G  0 part
  ├─vg_wls12c01-lv_root (dm-0) 253:0    0   13G  0 lvm  /
  ├─vg_wls12c01-lv_swap (dm-1) 253:1    0  3.9G  0 lvm  [SWAP]
  ├─vg_wls12c01-lv_var (dm-2)  253:2    0    5G  0 lvm  /var
  ├─vg_wls12c01-lv_app (dm-3)  253:3    0 21.6G  0 lvm  /app
  ├─vg_wls12c01-lv_home (dm-4) 253:4    0    1G  0 lvm  /home
  └─vg_wls12c01-lv_tmp (dm-5)  253:5    0    5G  0 lvm  /tmp

Environment Setup

Add login User (optinal)

  ## Be sure to replace username with the user that you want to create.
[email protected]:~# adduser marcelo
  ## Add oracle User
[email protected]:~# adduser oracle
  ## Use the passwd command to update the new user's password.
[email protected]:~# passwd felix
  ## Use the usermod command to add the user to the wheel group (sudo).
[email protected]:~# usermod -aG wheel felix
  ## add permissions to group
[email protected]:~# /usr/sbin/visudo
  ## uncomment wheel    ALL=(ALL)       ALL
wheel    ALL=(ALL)       ALL
  ## change oracle home to /app
[email protected]:~# usermod -m -d /app/oracle oracle

Configure SSH Server

Go to ssh config file and and change Disable root

[email protected]:~$ sudo vi /etc/ssh/sshd_config
  ## Disable root
PermitRootLogin no
  ## Disable protocol 1
Protocol 2
  ## Disable dns 1
UseDNS no
  ## Enable X11 Forwarding
X11Forwarding yes

restart the service:

[email protected]:~# sudo service sshd restart

Configure Network

Edit the ifcfg file:

[email protected]:~# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Change the ONBOOT to yes and restart the network service

[email protected]:~# service network restart

Now you can check your ip and connection

[email protected]:~# ip a #check your ip
[email protected]:~# ip r #check route to get your Subnet Mask and Default Gateway
[email protected]:~# ping google.com # check your connection

and edit the ifcfg file BOOTPROTO to static, with the IPADDR, NETMASK and GATEWAY info.

[email protected]:~# vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes    	                           # Interface enabled
NM_CONTROLLED=yes                          # Managed the NetworkManager daemon
BOOTPROTO=static                           # Assigning in static mode
IPADDR= 	                   # IP address
NETMASK= 	                   # Subnet Mask
GATEWAY= 	                   # Default Gateway

Restart network

[email protected]:~# service network restart
[email protected]:~# service network status
[email protected]:~# ip a
[email protected]:~# ping google.com

:exclamation: Now you can login via ssh

Add Packages

[email protected]:~$ sudo yum update
[email protected]:~$ sudo yum install unzip ntp xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils


Configure in the /etc/selinux/config file to SELINUX=disabled

[email protected]:~$ sestatus
[email protected]:~$ sudo vi /etc/selinux/config

Reboot your system. After reboot, confirm that the getenforce command returns Disabled:

[email protected]:~$ sudo shutdown -r now
[email protected]:~$ getenforce

Change TimeZone

[email protected]:~$ sudo mv /etc/localtime /etc/localtime.bak
[email protected]:~$ sudo ln -s /usr/share/zoneinfo/Europe/Lisbon /etc/localtime
[email protected]:~$ sudo chkconfig ntpd on
[email protected]:~$ sudo ntpdate pool.ntp.org
[email protected]:~$ sudo service ntpd start
[email protected]:~$ date


Add your domain machines to the hosts file.

[email protected]:~$ sudo vi /etc/hosts wls12c01 wls12c02


Configure IPTables (only needed for machine wls12c01)

  ## check
[email protected]:~$ sudo iptables -S
[email protected]:~$ sudo iptables -L -n
  ## add
[email protected]:~$ sudo iptables -I INPUT 2 -m state --state NEW -m tcp -p tcp --dport 7001 -j ACCEPT
[email protected]:~$ sudo service iptables save
[email protected]:~$ sudo service iptables restart

Create the second machine

Repeat the same steps, now for machine wls12c02.


Leave a Comment