Showing posts with label rhel. Show all posts
Showing posts with label rhel. Show all posts

Tuesday, June 2, 2015

Install RHEV-M using VMware workstation for RHCVA Exam EX318


- Sources 
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Installation_Guide/index.html
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Administration_Guide/index.html
https://www.youtube.com/watch?v=HzrILWMGKxw&index=2&list=PLOeEp3fYj7rrsyQ7HIFP5IlZu9mdCrK2X (Arabic)



OS
Red Hat Enterprise Linux Server release 6.6 (64 bit)
RHEV
Red Hat Enterprise Virtualization 3.5 (64 bit)
CPU
1x2
RAM
4GB
RHEV-M Server
rhevm1.example.com
eth0 > vmnet8 (nat)
1.0.8.11
eth1 > vmnet1 (host-only)
1.0.3.11

- create red hat account using business email or any other not to be public email like gmail or yahoo or hotmail .. etc
https://www.redhat.com/wapps/ugc


- confirm your red hat account from your email inbox within a message sent from red hat.

- go to redhat downloads page and click "Start Evaluation" to subscribe to RHEL & RHEV https://access.redhat.com/downloads


Red Hat Enterprise Linux > Start Evaluation
Red Hat Enterprise Virtualization > Start Evaluation


- downloads software files 

  • RHEL > rhel-server-6.6-x86_64-dvd.iso
  • RHEV > rhev-hypervisor6-6.6-20150512.0.iso

- logout from your red hat account and sign in again, accept red hat terms and click continue your RHEL & RHEV eval copy is ready


- install rhel 6.6 desktop installation to use as RHEV-M server
http://www.tecmint.com/red-hat-enterprise-linux-rhel-6-installation-guide-with-screenshots/


- if you clone the virtual machine you can fix for the udev eth1 issue, take back your eth0 before cloning
rm -rf /etc/udev/rules.d/70-persistent-net.rules

- Edit vmware workstation settings > Processors 

  • Virtualize Intel VT-x/EPT
  • Virtualize CPU performance counters

- Edit vmware workstation .vmx
vcpu.hotadd = 'FALSE'
apic.xapic.enable = 'FALSE'

- enter your red hat subscribe from terminal
 # subscription-manager register --username $redhat-account-username$ --auto-attach
 password: 

 # subscription-manager repos --list

 # subscription-manager list --available
  .........

 Pool ID:       ######################### (RHEL Eval for 30 days)

 Pool ID: ######################### (RHEL Eval for 60 days)
 
 # subscription-manager attach --pool=######################### (RHEL Eval for 60 days)

 # subscription-manager repos --enable=rhel-6-server-rpms 
 # subscription-manager repos --enable=rhel-6-server-supplementary-rpms
 # subscription-manager repos --enable=rhel-6-server-rhevm-3.5-rpms
 # subscription-manager repos --enable=jb-eap-6-for-rhel-6-server-rpms
 # yum clean all
 # yum makecache 
 # yum update -y
 # reboot
 #  yum install -y rhevm (you can install RHEV-M without DNS & NTP server just use /etc/hosts file)
 

############### configure DNS Server (optional) ###############

- install DNS packages and Edit file named.conf
 # yum install -y bind bind-libs bind-utils 
 # vim /etc/named.conf 

 options {
        listen-on port 53 { any; };
        directory       "/var/named";
        allow-query     { any; };
 };

 zone "." in {
 type hint;
 file "/dev/null";
 };

 zone "example.com" IN {
        type master;
        file "example.fwd";
        allow-update { none; };
 allow-transfer { any; };
 };

 zone "3.0.1.in-addr.arpa" IN {
        type master;
        file "example.rev";
        allow-update { none; };
 allow-transfer { any; };
 };

- Create "example.fwd" for forward zone
 # vim /var/named/example.fwd

$TTL    86400
@               IN SOA  rhevm1.example.com. root.rhevm1.example.com. (
                                 2015060501      ; serial (d. adams)
                                 3H              ; refresh
                                 15M             ; retry
                                 1W              ; expiry
                                 1D )            ; minimum
@          IN NS   rhevm1.example.com.
@               IN A    1.0.3.5
@               IN A    1.0.3.6
@               IN A    1.0.3.7
@               IN A    1.0.3.8
@               IN A    1.0.3.9
@               IN A    1.0.3.11
@               IN A    1.0.3.12
@               IN A    1.0.3.13
@               IN A    1.0.3.14
@               IN A    1.0.3.15
rhevh1          IN A    1.0.3.5
rhevh2          IN A    1.0.3.6
rhevh3          IN A    1.0.3.7
rhevh4          IN A    1.0.3.8
rhevh5          IN A    1.0.3.9
rhevm1          IN A    1.0.3.11
rhevm2          IN A    1.0.3.12
rhevm3          IN A    1.0.3.13
rhevm4          IN A    1.0.3.14
rhevm5          IN A    1.0.3.15


- Create file "example.rev" for reverse zone:
 # vim /var/named/example.rev

$TTL    86400
@       IN      SOA     rhevm1.example.com. root.rhevm1.example.com.  (
                               2015060501 ; Serial
                               28800      ; Refresh
                               14400      ; Retry
                               3600000    ; Expire
                               86400 )    ; Minimum
@               IN NS   rhevm1.example.com.
rhevh1          IN A    1.0.3.5
rhevh2          IN A    1.0.3.6
rhevh3          IN A    1.0.3.7
rhevh4          IN A    1.0.3.8
rhevh5          IN A    1.0.3.9
rhevm1          IN A    1.0.3.11
rhevm2          IN A    1.0.3.12
rhevm3          IN A    1.0.3.13
rhevm4          IN A    1.0.3.14
rhevm5          IN A    1.0.3.15
5               IN PTR  rhevh1.example.com.
6               IN PTR  rhevh2.example.com.
7               IN PTR  rhevh3.example.com.
8               IN PTR  rhevh4.example.com.
9               IN PTR  rhevh5.example.com.
11              IN PTR  rhevm1.example.com.
12              IN PTR  rhevm2.example.com.
13              IN PTR  rhevm3.example.com.
14              IN PTR  rhevm4.example.com.
15              IN PTR  rhevm5.example.com.

- Change chroot permission to "named" group
 # chgrp named /etc/named.conf
 # chgrp named /var/named/example.fwd
 # chgrp named /var/named/example.rev
 

- Test DNS configuration and zone files for any syntax errors
 
 # named-checkconf  /etc/named.conf 
 # named-checkzone example.com /var/named/example.fwd
 # named-checkzone example.com /var/named/example.rev

 # vim /etc/resolv.conf
 search example.com
 nameserver 1.0.3.11
 nameserver 1.0.8.2
 nameserver 8.8.8.8

 # /etc/init.d/named restart
 # nslookup rhevh1

############### install NTP server ###################
 # chkconfig ntpd on
 # vim /etc/ntp.conf  
 restrict 1.0.3.0 mask 255.255.255.0 nomodify notrap  
 server  1.0.3.11
 fudge   1.0.3.11 stratum 10  
 driftfile /var/lib/ntp/drift  
 keys /etc/ntp/keys  

 # vim /etc/sysconfig/ntpd  
 OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid -g"  
 SYNC_HWCLOCK=no 

 # /etc/init.d/ntpd restart
 # ntpq -p

############### install RHEV-M ##################
 # yum install -y rhevm
 # rhevm-setup




- Login to RHEV-M
https://rhevm1.example.com/ovirt-engine/webadmin/?locale=en_US

- Shutdown and start RHEV-M just flow steps in this video
https://www.youtube.com/watch?v=mPLy6z5PyQQ&list=PLOeEp3fYj7rrsyQ7HIFP5IlZu9mdCrK2X&index=17 (arabic)
 # service ovirt-engine stop
 # service ovirt-engine start

 

Monday, December 29, 2014

Creating a Local Yum Repository Using an ISO Image on RHEL / OEL 5


- Create a directory to mount iso file in it
  
mkdir /media/iso

- Check default CD Drive mount points in your virtual machine most to be "/dev/sr0" or "/dev/hdc"
  
mount 
umount /dev/hdc # as your virtual CD drive to be /dev/hdc or /dev/sr0
mount -t iso9660 -o loop /dev/hdc /media/iso

- Edit "etc/fstab" to mount in boot startup
  
vim /etc/fstab # to mount in boot startup
    /dev/hdc      /media/iso      iso9660 loop,defaults   0 0

- Create local yum dvd.repo file
  
vim /etc/yum.repo.d/dvd.repo

[Server]
name=Server
baseurl=file:///media/iso/Server
gpgkey=file:///media/iso/RPM-GPG-KEY
gpgcheck=1
enabled=1

[Cluster]
name=Cluster
baseurl=file:///media/iso/Cluster
gpgkey=file:///media/iso/RPM-GPG-KEY
gpgcheck=1
enabled=1

[ClusterStorage]
name=ClusterStorage
baseurl=file:///media/iso/ClusterStorage
gpgkey=file:///media/iso/RPM-GPG-KEY
enabled=1

- Clean up yum repo cache and create new one
  
yum clean all
yum makecache
yum repolist




Tuesday, December 16, 2014

NTP Server configuration for Oracle RAC in RHEL 5

Resources:

http://oracle-base.com/articles/linux/linux-ntp-configuration.php
http://www.tecmint.com/install-ntp-server-in-centos/
http://www.cyberciti.biz/faq/rhel-fedora-centos-configure-ntp-client-server/

Hostname
NAT
Host-only
Host-only
NTP
rac5.example.com
1.0.1.5
1.0.2.5
1.0.9.5
Server
rac6.example.com
1.0.1.6
1.0.2.6
1.0.9.6
Client


NTP Server configure:       
chkconfig ntpd on


vim /etc/ntp.conf
restrict 1.0.1.0 mask 255.255.255.0 nomodify notrap
server  0.centos.pool.ntp.org
server  1.centos.pool.ntp.org
server  2.centos.pool.ntp.org
server  1.0.1.5
fudge   1.0.1.5 stratum 10
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
  


vim /etc/sysconfig/ntpd
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid -g"
SYNC_HWCLOCK=no


iptables -A INPUT -p udp --dport 123 -j ACCEPT
iptables save
/etc/init.d/iptables save
/etc/init.d/iptables restart
/etc/init.d/ntpd start
ntpq -p


NTP Client settings
chkconfig ntpd on


vim /etc/ntp.conf
server  1.0.1.5
fudge   1.0.1.5 stratum 10
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
  
vim /etc/sysconfig/ntpd
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid -g"
SYNC_HWCLOCK=no


/etc/init.d/ntpd start
ntpdate -u 1.0.1.5  

ntpq -p





DNS Server configuration for Oracle RAC in RHEL 5

Resources:

 
Hostname
NAT
Host-only
Host-only
Role
rac5.example.com
1.0.9.5
1.0.1.5
1.0.2.5
Master
rac6.example.com
1.0.9.6
1.0.1.6
1.0.2.6
Slave




######### DNS Master Server configuration #############
yum install -y bind bind-libs bind-utils system-config-bind vim-*
system-config-bind # to generate configuration files just run one time


### Edit main DNS file "named.conf"
vim /etc/named.conf
options {
       directory "/var/named";
       dump-file "/var/named/data/cache_dump.db";
       statistics-file "/var/named/data/named_stats.txt";
};


zone "." IN {
       type hint;
       file "named.root";
};


zone "example.com." IN {
       type master;
       file "example.fwd";
       allow-update { none; };
       allow-transfer { 1.0.1.6; };
};


zone "1.0.1.in-addr.arpa." IN {
       type master;
       file "example.rev";
       allow-update { none; };
       allow-transfer { 1.0.1.6; };
};


include "/etc/rndc.key";


### Create "example.fwd" and "example.rev" files:
cd /var/named/
cp -v localdomain.zone example.fwd
cp -v named.local example.rev


vim /var/named/example.fwd
$TTL    86400
@               IN SOA  rac5.example.com. root.rac5.example.com. (
                                       42              ; serial (d. adams)
                                       3H              ; refresh
                                       15M             ; retry
                                       1W              ; expiry
                                       1D )            ; minimum
        IN NS   rac5.example.com.
        IN NS   rac6.example.com.
rac5            IN A    1.0.1.5
rac6            IN A    1.0.1.6   
rac5-vip        IN A    1.0.1.11      
rac2-vip        IN A    1.0.1.12       
rac-scan        IN A    1.0.1.15       
rac-scan        IN A    1.0.1.16      
rac-scan        IN A    1.0.1.17


vim /var/named/example.rev
$TTL    86400
@       IN      SOA     rac5.example.com. root.rac5.example.com.  (
                                     1997022700 ; Serial
                                     28800      ; Refresh
                                     14400      ; Retry
                                     3600000    ; Expire
                                     86400 )    ; Minimum
       IN NS   rac5.example.com.
       IN NS   rac6.example.com.
5       IN PTR  rac5.example.com.
6      IN PTR  rac5.example.com.
11     IN PTR  rac5-vip.example.com.
12     IN PTR  rac6-vip.example.com.
15     IN PTR  rac-scan.example.com.
16     IN PTR  rac-scan.example.com.
17     IN PTR  rac-scan.example.com.


### change chroot permission to "named" group
chgrp named /etc/named.conf
chgrp named /var/named/example.fwd
chgrp named /var/named/example.rev


### Test DNS configuration and zone files for any syntax errors
named-checkconf  /etc/named.conf
named-checkzone example.com /var/named/example.fwd
named-checkzone example.com /var/named/example.rev


### Edit "/etc/sysconfig/network" file
vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=rac5.example.com


hostname rac5.example.com


########### Configure Slave DNS Server ##############
yum install -y bind bind-libs bind-utils system-config-bind vim


### Edit main DNS file "named.conf"
vim /var/named.conf
options {
       directory "/var/named";
       dump-file "/var/named/data/cache_dump.db";
       statistics-file "/var/named/data/named_stats.txt";
};
zone "." IN {
       type hint;
       file "named.root";
};


zone "example.com." IN {
       type slave;
       file "slaves/example.fwd";
       allow-update { none; };
       masters { 1.0.1.5; };
};
zone "1.0.1.in-addr.arpa." IN {
       type slave;
       file "slaves/example.rev";
       allow-update { none; };
       masters { 1.0.1.5; };
};
include "/etc/rndc.key";


- update serial number or add new record then restart named service in master & slave DNS server to force sync in both server  


vim /var/named/example.fwd - add new record to forward zone
nas             IN A    1.0.1.21


vim /var/named/example.rev - add new record to reverse zone
21      IN PTR  nas.example.com


- restart DNS server in rac5, rac6
/etc/init.d/named restart


### Edit "/etc/sysconfig/network" file
vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=rac6.example.com


hostname rac6.example.com


### Adjust iptables to allow DNS server from outside of the network in rac5, rac6
vim /etc/sysconfig/iptables
-A INPUT -p udp -m state --state NEW --dport 53 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 53 -j ACCEPT


/etc/init.d/iptables restart


### for fast reply add entries to "/etc/hosts" file in rac5, rac6
vim /etc/hosts
127.0.0.1       localhost.localdomain   localhost


# Public
1.0.9.5 rac5.example.com   rac5
1.0.9.6 rac6.example.com   rac6


# Private 1
1.0.1.5 rac5.example.com   rac5
1.0.1.6 rac6.example.com   rac6


# Private 2
1.0.2.5    rac5-priv.example.com      rac5-priv
1.0.2.6    rac6-priv.example.com      rac6-priv


# Virtual
1.0.1.11    rac5-vip.example.com       rac5-vip
1.0.1.12    rac6-vip.example.com       rac6-vip


# SCAN
1.0.1.15   rac-scan.example.com       rac-scan
1.0.1.16    rac-scan.example.com       rac-scan
1.0.1.17    rac-scan.example.com       rac-scan


### Edit "/etc/resolv.conf" file in clients in rac5, rac6
vim /etc/resolv.conf
nameserver 1.0.1.5
nameserver 1.0.1.6
nameserver 8.8.8.8
search example.com


### Network Additions for DNS Server in rac5, rac6
vim /etc/sysconfig/network-scripts/ifcfg-eth0 >> PEERDNS=no
vim /etc/sysconfig/network-scripts/ifcfg-eth1 >> PEERDNS=no
vim /etc/sysconfig/network-scripts/ifcfg-eth2 >> PEERDNS=no


### Start DNS Server in rac5, rac6
chkconfig named on
/etc/init.d/named restart


### Verify DNS Server working in rac5, rac6
dig rac5.example.com
dig rac6.example.com
dig -x 1.0.1.5
dig -x 1.0.1.6
nslookup rac5
nslookup rac6
nslookup rac5-vip
nslookup rac6-vip
nslookup rac-scan




 BIND DNS Master & Slave installation and configuration - part 1/2





 BIND DNS Master & Slave installation and configuration - part 2/2




Install and Configure Secondary (Master) BIND DNS Server - RHEL 6





Install and Configure Secondary (Slave) BIND DNS Server - RHEL 6





 Install and Configure Caching Only BIND DNS Server - RHEL 6