d-h-n.de
Blog about Oracle, Linux..

Installing VMWare Tools on Debian 6 (squeeze)

July 17th, 2012 . by admin

Before install VMware Tools on Debian 6 you must install following packages:

# aptitude install gcc make linux-headers-$(uname -r)

udev: renamed network interface eth0 to eth2

June 7th, 2012 . by admin

When you create a full clone in VMWare and during booting you see this messages:

Bringing up interface eth0: Device eth0 does not seem to be present, delay initialization
										[FAILED]
Bringing up interface eth1: Device eth1 does not seem to be present, delay initialization
										[FAILED]

 
..and from dmesg

[root@oel62 ~]# dmesg | grep -i eth
..
udev: renamed network interface eth0 to eth2
udev: renamed network interface eth1 to eth3

 
..and when run ifconfig

[root@oel62 ~]# ifconfig
eth2      Link encap:Ethernet  HWaddr 00:0C:29:55:BA:2A
          inet addr:192.168.80.134  Bcast:192.168.80.255  Mask:255.255.255.0
..
eth3      Link encap:Ethernet  HWaddr 00:0C:29:55:BA:34
          inet addr:192.168.180.136  Bcast:192.168.180.255  Mask:255.255.255.0
..

 
..and when restart service network

[root@oel62 ~]# service network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Error: No suitable device found: no device found for connection 'System eth0'.
                                                           [FAILED]
Bringing up interface eth1:  Error: No suitable device found: no device found for connection 'System eth1'.
                                                           [FAILED]

 
 
TODO:
Correct MAC or HWADDR in files:
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.80.10
GATEWAY=192.168.80.2
TYPE=Ethernet
HWADDR="00:0C:29:45:33:82"
HWADDR="00:0C:29:55:BA:2A"

 
This new address can see when run ifconfig(see above) or can be found in the .vmx file too!

..
ethernet0.generatedAddress = "00:0c:29:55:ba:2a"
ethernet1.generatedAddress = "00:0c:29:55:ba:34"
..

 
and remove file:

# rm /etc/udev/rules.d/70-persistent-net.rules

  

# reboot

Reboot and run ifconfig to check


Extending LVM disk on VMWare

June 3rd, 2012 . by admin

Task: Howto increase disk space using in a VMWare Guest Linux?

Before:

[root@oel62 ~]# df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       16G  3.2G   12G  22% /
[root@oel62 ~]# vgs
  VG       #PV #LV #SN Attr   VSize  VFree
  VolGroup   1   2   0 wz--n- 19.51g    0
[root@oel62 ~]# pvs
  PV         VG       Fmt  Attr PSize  PFree
  /dev/sda2  VolGroup lvm2 a--  19.51g    0
[root@oel62 ~]# lvs
  LV      VG       Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  lv_root VolGroup -wi-ao 15.57g
  lv_swap VolGroup -wi-ao  3.94g

=> There are:

  • 1 Volume Group ‘VolGroup’
  • 1 Physical Volume /dev/sda2
  • 2 Logical Volumes lv_root, lv_swap and lv_root is mounted as /

  

    TODO:

  1. Increase disk size
  2. Create a new partition
  3. Create a new Physical Volume on the new partition
  4. Extend the Volume Group ‘VolGroup’
  5. Extend the Logical Volume ‘lv_root’
  6. Resize file system

  

1. Increase disk size

Menu Setting…>Hard Disk SCSI (20GB)->Ultilities->Expand..

Change Maximum Disk Size (GB) from 20 to 40

Click Expand -> Ok

Power on and login as root


Before:

root@oel62 ~]# fdisk -l /dev/sda

Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000365fb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        2611    20458496   8e  Linux LVM

After:

[root@oel62 ~]# fdisk -l /dev/sda

Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000365fb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        2611    20458496   8e  Linux LVM
[root@oel62 ~]#

The size of /dev/sda is changed from 21.5 GB to 42.9 GB
 
 

2. Create a new partition

[root@oel62 ~]# fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000365fb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        2611    20458496   8e  Linux LVM

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (2611-5221, default 2611): 2611
Last cylinder, +cylinders or +size{K,M,G} (2611-5221, default 5221): 5221

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@oel62 ~]# reboot
[root@oel62 ~]# fdisk -l /dev/sda

Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000365fb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        2611    20458496   8e  Linux LVM
/dev/sda3            2611        5221    20966162+  83  Linux

New partition /dev/sd3 is created.
 
 

3. Create a new Physical Volume on the new partitiony

Before:

[root@oel62 ~]# pvs
  PV         VG       Fmt  Attr PSize  PFree
  /dev/sda2  VolGroup lvm2 a--  19.51g    0

Create PV:

[root@oel62 ~]# pvcreate /dev/sda3
  Writing physical volume data to disk "/dev/sda3"
  Physical volume "/dev/sda3" successfully created

After:

[root@oel62 ~]# pvs
  PV         VG       Fmt  Attr PSize  PFree
  /dev/sda2  VolGroup lvm2 a--  19.51g     0
  /dev/sda3           lvm2 a--  19.99g 19.99g

New Physical Volume /dev/sda3 is created
 
 

4. Extend the Volume Group ‘VolGroup’

Before:

[root@oel62 ~]# vgs
  VG       #PV #LV #SN Attr   VSize  VFree
  VolGroup   1   2   0 wz--n- 19.51g    0

Extend:

[root@oel62 ~]# vgextend VolGroup /dev/sda3
  Volume group "VolGroup" successfully extended

Before:

[root@oel62 ~]# vgs
  VG       #PV #LV #SN Attr   VSize  VFree
  VolGroup   2   2   0 wz--n- 39.50g 19.99g

Volume Group is extended.
 
 

5. Extend the Logical Volume ‘lv_root’

Before:

[root@oel62 ~]# lvs
  LV      VG       Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  lv_root VolGroup -wi-ao 15.57g
  lv_swap VolGroup -wi-ao  3.94g

Extend:

[root@oel62 ~]# lvextend -l +100%FREE /dev/VolGroup/lv_root
  Extending logical volume lv_root to 35.56 GiB
  Logical volume lv_root successfully resized

After:

[root@oel62 ~]# lvs
  LV      VG       Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  lv_root VolGroup -wi-ao 35.56g
  lv_swap VolGroup -wi-ao  3.94g

Logical Volume lv_root is extended.
 
 

6. Resize file system

[root@oel62 ~]# resize2fs -p /dev/mapper/VolGroup-lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/VolGroup-lv_root is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 3
Performing an on-line resize of /dev/mapper/VolGroup-lv_root to 9322496 (4k) blocks.
The filesystem on /dev/mapper/VolGroup-lv_root is now 9322496 blocks long.

 
 

Result:

Before:

[root@oel62 ~]# df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       16G  3.2G   12G  22% /

After:

[root@oel62 ~]# df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       36G  3.2G   31G  10% /

 
 

SHORT:

1.Increase disk size
  VMWare Menu Seting..>Hard Disk

2.Create a new partition
  # fdisk /dev/sdx ("n", "p", "3", "w")

3.Create a new Physical Volume on the new partition
  # pvcreate /dev/sda3

4.Extend the Volume Group 'VolGroup'
  # vgextend VolGroup /dev/sda3

5.Extend the Logical Volume 'lv_root'
  # lvextend -l +100%FREE /dev/VolGroup/lv_root

6. Resize file system
  # resize2fs -p /dev/mapper/VolGroup-lv_root

Setup Oracle ASM disk using block device UDEV

May 16th, 2012 . by admin

TASK: Create a ASM diskgroup with 2 disks using block device UDEV
  
add 2 new disks:

[root@rac1 ~]# ls -l /dev/sdb /dev/sdc
brw-r----- 1 root disk 8, 16 May 15 11:08 /dev/sdb
brw-r----- 1 root disk 8, 32 May 15 11:08 /dev/sdc

 

Create partition:

# fdisk /dev/sdb
# fdisk /dev/sdc

Press ‘n’ for add a new partition, ‘p’ for primary partition, ’1′ for Partition number,
Enter for default first/last cylinder, ‘w’ for write partition table
 
 

Get the SCSI UID

[root@rac1 ~]# scsi_id -g -u -s /block/sdb/sdb1
36000c297c65fe681b4d2f5224f35d280
[root@rac1 ~]# scsi_id -g -u -s /block/sdc/sdc1
36000c29b69a4f6a08d1318471c17d92e
[root@rac1 ~]#

 

Create udev rules

Create file /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",
RESULT=="36000c297c65fe681b4d2f5224f35d280", NAME="myasm-disk1",
OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",
RESULT=="36000c29b69a4f6a08d1318471c17d92e", NAME="myasm-disk2",
OWNER="grid", GROUP="asmadmin", MODE="0660"

 
Test with udevtest

[root@rac1 ~]# udevtest /block/sdb/sdb1
main: looking at device '/block/sdb/sdb1' from subsystem 'block'
udev_rules_get_name: add symlink 'disk/by-id/scsi-36000c297c65fe681b4d2f5224f35d280-part1'
udev_rules_get_name: add symlink 'disk/by-path/pci-0000:00:10.0-scsi-0:0:1:0-part1'
run_program: '/lib/udev/vol_id --export /dev/.tmp-8-17'
run_program: '/lib/udev/vol_id' returned with status 4
run_program: '/sbin/scsi_id -g -u -s /block/sdb/sdb1'
run_program: '/sbin/scsi_id' (stdout) '36000c297c65fe681b4d2f5224f35d280'
run_program: '/sbin/scsi_id' returned with status 0
udev_rules_get_name: rule applied, 'sdb1' becomes 'myasm-disk1'
udev_device_event: device '/block/sdb/sdb1' already in database, validate currently present symlinks
udev_node_add: creating device node '/dev/myasm-disk1', major = '8', minor = '17', mode = '0660', uid = '501', gid = '1300'
udev_node_add: creating symlink '/dev/disk/by-id/scsi-36000c297c65fe681b4d2f5224f35d280-part1' to '../../myasm-disk1'
udev_node_add: creating symlink '/dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:1:0-part1' to '../../myasm-disk1'
main: run: 'socket:/org/kernel/dm/multipath_event'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/myasm-disk1 /dev/disk/by-id/scsi-36000c297c65fe681b4d2f5224f35d280-part1 /dev/disk/by-
path/pci-0000:00:10.0-scsi-0:0:1:0-part1'
[root@rac1 ~]#
[root@rac1 ~]# udevtest /block/sdc/sdc1
..
udev_rules_get_name: rule applied, 'sdc1' becomes 'myasm-disk2'
....

 

Restart udev

# udevcontrol reload_rules
# start_udev

List disks:

[root@rac1 ~]# ls -l /dev/my*
brw-rw---- 1 grid asmadmin 8, 17 May 15 11:36 /dev/myasm-disk1
brw-rw---- 1 grid asmadmin 8, 33 May 15 11:36 /dev/myasm-disk2

It seem correct with ownership and permissions. The rules are correct applied.
 
 

Create diskgroup

CREATE DISKGROUP block_dg EXTERNAL REDUNDANCY
DISK '/dev/myasm-disk1' name myasm1, '/dev/myasm-disk2' name myasm2;
CREATE DISKGROUP block_dg EXTERNAL REDUNDANCY
  2  DISK '/dev/myasm-disk1' name myasm1, '/dev/myasm-disk2' name myasm2;
CREATE DISKGROUP block_dg EXTERNAL REDUNDANCY
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/myasm-disk2' matches no disks
ORA-15014: path '/dev/myasm-disk2' is not in the discovery set
ORA-15031: disk specification '/dev/myasm-disk1' matches no disks
ORA-15014: path '/dev/myasm-disk1' is not in the discovery set

 

Change Parameter asm_diskstring

Before:

SQL> show parameter asm_diskstring

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring                       string
SQL> select name, label, mount_status, header_status, path from v$asm_disk;

NAME                 LABEL                MOUNT_S HEADER_STATU PATH
-------------------- -------------------- ------- ------------ --------------------
V1                   V1                   CACHED  MEMBER       ORCL:V1
V2                   V2                   CACHED  MEMBER       ORCL:V2
V3                   V3                   CACHED  MEMBER       ORCL:V3

 

SQL> ALTER SYSTEM SET asm_diskstring ='ORCL:*','/dev/myasm*' SCOPE=both SID='*';

Note:
‘ORCL:*’ mean all disks, which are stamped by ASMLib (oracleasm createdisk …)
asm_diskstring with null string ” is equivalent as ‘ORCL:*’
  

After:

SQL> show parameter asm_diskstring

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring                       string      ORCL:*, /dev/myasm*
SQL> select name, label, mount_status, header_status, path from v$asm_disk;

NAME                 LABEL                MOUNT_S HEADER_STATU PATH
-------------------- -------------------- ------- ------------ --------------------
                                          CLOSED  FORMER       /dev/myasm-disk2
                                          CLOSED  FORMER       /dev/myasm-disk1
V1                   V1                   CACHED  MEMBER       ORCL:V1
V2                   V2                   CACHED  MEMBER       ORCL:V2
V3                   V3                   CACHED  MEMBER       ORCL:V3

 
 
Run create diskgroup again:

CREATE DISKGROUP block_dg EXTERNAL REDUNDANCY
  2  DISK '/dev/myasm-disk1' name myasm1, '/dev/myasm-disk2' name myasm2;

Diskgroup created.

 

SQL> select name, label, mount_status, header_status, path from v$asm_disk;

NAME                 LABEL                MOUNT_S HEADER_STATU PATH
-------------------- -------------------- ------- ------------ --------------------
V1                   V1                   CACHED  MEMBER       ORCL:V1
V2                   V2                   CACHED  MEMBER       ORCL:V2
V3                   V3                   CACHED  MEMBER       ORCL:V3
MYASM2                                    CACHED  MEMBER       /dev/myasm-disk2
MYASM1                                    CACHED  MEMBER       /dev/myasm-disk1

rlwrap – You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build this program!

May 14th, 2012 . by admin

you try install rlwrap from source:

# cd rlwrap-0.37
# ./configure

and see this:

...
configure: WARNING: No termcap nor curses library found
checking for readline in -lreadline... no
configure: error: 

You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!

 
Why? readline is here installed!

# rpm -qa|grep readline
readline-6.0-3.el6.x86_64

 
TODO: What rlwrap mean here is readline-devel
run:

# yum install readline-devel
..
Installing:
 readline-devel       x86_64       6.0-3.el6                  OEL62       134 k
Installing for dependencies:
 ncurses-devel        x86_64       5.7-3.20090208.el6         OEL62       643 k
...

to install are 2 packages: readline-devel, ncurses-devel
 
 
now you can install rlwrap 0.37 as usual

# ./configure
# make
# make install

 

[root@oel62 ~]# which rlwrap
/usr/local/bin/rlwrap

Setup Oracle ASM disk with loopback device file

May 12th, 2012 . by admin

TODO: Create a ASM diskgroup using loopback device files
  

Creat the files

# mkdir /asmdisks
# dd if=/dev/zero of=/asmdisks/disk1 bs=1k count=30000
# dd if=/dev/zero of=/asmdisks/disk2 bs=1k count=30000

mean: writes 30000 blocks of 1k(or 1024bytes), also 30000×1024 bytes of binary zeros into the file /asmdisks/disk1

# ls -lh
total 587M
-rw-r--r-- 1 root root 293M May 12 22:08 disk1
-rw-r--r-- 1 root root 293M May 12 22:08 disk2

 

Setup lopback devices

# losetup /dev/loop1 /asmdisks/disk1
# losetup /dev/loop2 /asmdisks/disk2

List:

# losetup -a
/dev/loop1: [fd00]:684796 (/asmdisks/disk1)
/dev/loop2: [fd00]:684797 (/asmdisks/disk2)

 

Stamp the disks with ASMLib

# oracleasm createdisk LO_DISK1 /dev/loop1
# oracleasm createdisk LO_DISK2 /dev/loop2

  

Create diskgroup

SQL> sqlplus / as sysasm
SQL> CREATE DISKGROUP loop_dg EXTERNAL REDUNDANCY
DISK 'ORCL:LO_DISK1' name loop_disk1,
     'ORCL:LO_DISK2' name loop_disk2;

Diskgroup created.
SQL> select a.name, b.name, b.path
   from v$asm_diskgroup a, v$asm_disk b
   where a.name = 'LOOP_DG'
   and a.group_number=b.group_number;

NAME                 NAME                 PATH
-------------------- -------------------- --------------------
LOOP_DG              LOOP_DISK1           ORCL:LO_DISK1
LOOP_DG              LOOP_DISK2           ORCL:LO_DISK2

Install Oracle Linux OEL6.2 on VMWare

May 10th, 2012 . by admin

Steps to install Oracle Enterprise Linux OEL 6.2 on VMWare:

  

Change monitor setting

Before run install temporarily change setting:
 
Setting..>Hardware->Display->Monitors->Maximum resolution..
1024 x 768

 
This is nescessary, because without this step the display of the install is cropped and you dont see the button Back, Next!
 
 

Package Selection

Run install accept all default, but Package Group Selection:

  • Desktop Platform
  • General Purpose Desktop
  • X Windows System
  • Fonts

 
 

Disable Firewall

On Linux Client click System->Administration->Firewall->Disable, Apply
 
 

Disable SELINUX

Edit file /etc/selinux/config:

SELINUX=disabled

 
 

Mount OEL Linux DVD

# mkdir /mnt/oel62

add to file /etc/fstab:

/dev/cdrom              /mnt/oel62              iso9660 ro,loop,auto    0 0

remount:

# mount -a

 
 

Install package createrepo

# cd /mnt/oel62
# rpm -ivh deltarpm* python-deltarpm*
# rpm -ivh createrepo*

 
 

Create YUM repository

Create file /etc/yum.repo.d/oel62.repo, add this:

[OEL62]
name=Oracle Linux 6.2
baseurl=file:///mnt
gpgcheck=0
enabled=1

Run createrepo

# createrepo /mnt

 
 

Install gcc, uek-kernel-devel, uek-kernel-headers

This packages are need forVMWare Tools (later)

# yum install gcc
# yum install kernel-uek-devel
# yum install kernel-uek-headers

more see: https://forums.oracle.com/forums/thread.jspa?threadID=2328141
 
 

Install VMWare Tools

On VMWare click Menu VM->Install VMware Tools
On Linux client mount:

# mkdir /media/vmt
# mount -o loop /dev/cdrom /media/vmt

Unzip:

# cd /tmp
# tar xvzf /media/vmt/VMwareTools-8.8.2-590212.tar.gz

Run install VMWareTools:

# cd vmware-tools-distrib/
# ./vmware-install.pl

Press always Enter to accept all defaults
 
 

Upgrade xorg-x11-drv-vmware driver

Check if you can connect Internet, manual download the driver and install

# cd /tmp

for 64 bits:

# wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/xorg-x11-drv-vmware-11.0.3-1.0.1.el6.x86_64.rpm
# rpm -Uvh xorg-x11-drv-vmware-11.0.3-1.0.1.el6.x86_64.rpm

or for 32 bits:

# wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/i386/xorg-x11-drv-vmware-11.0.3-1.0.1.el6.i686.rpm
# rpm -Uvh xorg-x11-drv-vmware-11.0.3-1.0.1.el6.i686.rpm

without this step, the screen of Linux client is not resized when you resize the host!
more see: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2013045
 
 

Reset monitor setting

Shutdown the virtual machine and reset Monitor Setting from 1024 x 768 (see Step1 ) to:
Use host setting for monitors


..and power on the client again


Fixed Font Monospace in Oracle Linux OEL 6.2

May 7th, 2012 . by admin

When you install Oracle Linux 6.2 and don’t choose ‘Fonts’ on the step ‘Package Group Selection’
you got a thin and pale monospace font on the Terminal.
 
 
TODO:

# yum install dejavu-sans-mono-fonts.noarch

or goto directory Packages of the OEL DVD and run:

#rpm -ivh dejavu-sans-mono-fonts-2.30-2.el6.noarch.rpm

 
 
more about Monospace font:

# yum search monospace
...
dejavu-lgc-sans-mono-fonts.noarch : Monospace sans-serif font faces, Latin-Greek-Cyrillic subset
dejavu-sans-mono-fonts.noarch : Monospace sans-serif font faces
liberation-mono-fonts.noarch : Monospace fonts to replace commonly used Microsoft Courier New
thai-scalable-tlwgmono-fonts.noarch : Thai TlwgMono fonts
culmus-miriam-mono-clm-fonts.noarch : Fonts for Hebrew from Culmus project

Create Local YUM repository

May 2nd, 2012 . by admin

Mount DVD

# mkdir /mnt/oel58
# mount -o loop -t iso9660 /dev/cdrom /mnt/oel58/

 

Create file /etc/yum.repos.d/oel58.repo

[OEL5.8]
name = Oracle Enterprise Linux 5.8 DVD
baseurl=file:///mnt
gpgcheck=0
enabled=1

 

Create repo

# cd /mnt
# createrepo .

ssh-agent

August 15th, 2011 . by admin

ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA)
With ssh-agent you can connect to a remote machine without typing in a password.

1.Start ssh-agent:

[susi@pc2 ~]$ eval `ssh-agent`
Agent pid 6441

See the parameter of ssh-agent:

[susi@pc2 ~]$ set | grep SSH
SSH_AGENT_PID=6441
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-IETotW6440/agent.6440

SSH_AGENT_PID: is the process id of ssh-agent
SSH_ASKPASS: is the mini program to ask the passphrase
SSH_AUTH_SOCK: is the socket, place where ssh-agent stores the privat ssh-key

 

[susi@pc2 ~]$ file /tmp/ssh-IETotW6440/agent.6440
/tmp/ssh-IETotW6440/agent.6440: socket

ssh-agent process

[susi@pc2 ~]$ ps -p 6441
  PID TTY          TIME CMD
 6441 ?        00:00:00 ssh-agent

2.Add private key to ssh-agent

[susi@pc2 ~]$ ssh-add
Enter passphrase for /home/susi/.ssh/id_rsa:
Identity added: /home/susi/.ssh/id_rsa (/home/susi/.ssh/id_rsa)

Check: list what the agent known
List the fingerprints

[susi@pc2 ~]$ ssh-add -l
2048 0b:68:9d:ca:99:03:f7:ce:f1:68:f0:fb:ce:9e:04:4e /home/susi/.ssh/id_rsa (RSA)

List the public key file

[susi@pc2 ~]$ ssh-add -L
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzZwAxWc1c5YWKejXkVRGigy2Ua4NqgnS2Kf+gqFskxFVeOQxtUJdKp1N0TYdxtoTOiHXbrgoFBEsEvS7xNPmam3sb/
AzFSjT7UCcGfCH0nVnF9IfM//dcCr4+g8fQs/K4QYMAYWWbumNRHMsKwJOLrbGUm+wxWwwHZ6GNE5TNPx0eJE702r3357hPbtDdza5C5ttxUaHwyg97r60r/
NKoWCSI+2303ScVe6z6L+CBa7Zi8hL0TJUZmqNQfpCvkHuVq09u43GaUWAFxVNpwY49/OoiuqIZUZ548xoDgcw5I7ocGxtvGds8t2wHgJ/kd8yjCwkpgZPbawu2HLkA2TscQ==
/home/susi/.ssh/id_rsa

3.Test

[susi@pc2 ~]$ ssh otto@pc1
Last login: Tue Aug  2 11:57:52 2011 from pc2.mydom.com
[otto@pc1 ~]

here is passphrase not required!

 

Stop ssh-agent

[susi@pc2 ~]$ ssh-agent -k
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 6441 killed;

Now, when connect to remote server, passphrase is required again:

[susi@pc2 ~]$ ssh otto@pc1
Enter passphrase for key '/home/susi/.ssh/id_rsa': <==ppsusi

« Previous Entries