Archive

Archive for the ‘Redhat Administration’ Category

Rescan SAN Lun without reboot system

August 6, 2013 Leave a comment

1. First check FC Path ( show that there are two directories:host7 and host8, it means that there are two pathing)

#  ls -l /sys/class/fc_host*
drwxr-xr-x 3 root root 0 Aug  6 16:04 host7
drwxr-xr-x 3 root root 0 Aug  6 16:05 host8

2. Echo “1” into /sys/class/fc_host/host#/issue_lip file. Like my case as below

# echo “1” > /sys/class/fc_host/host7/issue_lip

# echo “1” > /sys/class/fc_host/host8/issue_lip

3. Check the news, there are two paths for the new lun

#fdisk -l

Disk /dev/sdf: 429.4 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdg: 429.4 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

 

Mount DVD as Yum repository

July 29, 2013 Leave a comment

1. Mount the Redhat source DVD to /mnt
# mount /dev/sr0 /mnt

2. Setup the repository information
# vi /etc/yum.repos.d/rhel-dvd.repo
[dvd]
name=Red Hat Enterprise Linux Installation DVD
baseurl=file:///mnt/Server
enabled=0
gpgcheck=0

3. Use the repository to install packages (For examples, installing snmp packages)
# yum install –enablerepo=dvd net-snmp*

Categories: Redhat Administration

Create local yum repository

July 26, 2013 Leave a comment

1. Copy all packages into local directory /opt/yum/rhel6.3/repodata

# mkdir -p /opt/yum/rhel6.3/repodata

# mount /dev/sr0 /mnt ( redhat CDROM)

# cd /mnt/Packages

# cp -a * /opt/yum/rhel6.3/repodata

2. Copy the main xml from the CDROM repodata directory and rename it to comps.xml 

# cd /mnt/repodata

# cp *comps*.xml /opt/yum/rhel6.3/repodata/comps.xml

 
3. Install createrepo
 
# cd /mnt/Packages
# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64
# rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm
 
4. Create local repository files
# cd /opt/yum/rhel6.3
# createrepo -g repodata/comps.xml .
 
5. Create local yum repository
# cd /etc/yum.repos.d
# vi rhel-local.repo[rhel6.3-local]
name=RHEL 6.3 local repository
baseurl=file:///opt/yum/rhel6.3/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1
 
 
 

Eanble sudo to access 11gR2 ASM instance in redhat

August 23, 2012 Leave a comment

1. Add the entry below into /etc/sudoers

oracle  ALL=(grid)      NOPASSWD: ALL

2. Testing the

[oracle@wcsvmuatdb01 ~]$ sudo -i -u grid asmcmd ( -i : simulate initial login to read shell configuration files: .profile, bash_profile etc)
ASMCMD> exit
[oracle@wcsvmuatdb01 ~]$ sudo -i -u grid asmcmd ls
ACFSDG1/
DATADG1/
OCRVOTEDG/

 

Categories: ASM, Redhat Administration

Configure Redhat XDMCP GNOME settings for Xmanager

June 23, 2011 Leave a comment

Redhat 5

1. Edit /etc/sysconfig/desktop to add the f0llowing entry

DESKTOP=”GNOME”

2.. Edit /etc/gdm/custom/conf to add the following entry under [xdmcp]

( maybe /etc/X11/gdm/gdm.conf)

Enable=true

3. Restart gdm by the command /usr/sbin/gdm-restart

Redhat 6 or above

1. Edit /etc/gdm/custom.conf to add the entries below

[security]
DisallowTCP=false

[xdmcp]
Enable=true

2. Stop iptables

$ chkconfig –level345 iptables off

 

3. Start the server

 

 

 

Categories: Redhat Administration