Skip to content

Archive

Category: Linux

Installer FFMPEG

mkdir svn
cd svn
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg

./configure –prefix=/usr/local/ffmpeg –enable-shared –enable-gpl –enable-nonfree –enable-decoder=mpeg1video –enable-decoder=mpeg2video –enable-decoder=flv –enable-decoder=mpeg4 –enable-decoder=tiff –enable-decoder=cinepak –enable-decoder=ac3 –enable-decoder=mp3 –enable-decoder=mjpeg –enable-decoder=wmv1 –enable-decoder=wmv2 –enable-decoder=wmv3 –enable-decoder=mpegvideo

make

make install

vi /etc/ld.so.conf.d/ffmpeg.conf
#:mettre:

/usr/local/ffmpeg/lib/

#dans le fichier

ldconfig -v

/usr/local/ffmpeg/bin/ffmpeg -V

FFmpeg version SVN-r22407, Copyright (c) 2000-2010 the FFmpeg developers
built on Mar  9 2010 14:54:04 with gcc 4.3.3
configuration: –prefix=/usr/local/ffmpeg –enable-shared –enable-gpl –enable-nonfree –enable-decoder=mpeg1video –enable-decoder=mpeg2video –enable-decoder=flv –enable-decoder=mpeg4 –enable-decoder=tiff –enable-decoder=cinepak –enable-decoder=ac3 –enable-decoder=mp3 –enable-decoder=mjpeg –enable-decoder=wmv1 –enable-decoder=wmv2 –enable-decoder=wmv3 –enable-decoder=mpegvideo
libavutil     50.11. 0 / 50.11. 0
libavcodec    52.58. 0 / 52.58. 0
libavformat   52.55. 0 / 52.55. 0
libavdevice   52. 2. 0 / 52. 2. 0
libswscale     0.10. 0 /  0.10. 0

voila.

  • Share/Bookmark

Installing Oracle Database 11g Release 1 on Enterprise Linux 5 (32- and 64-bit)

by John Smiley

Learn the basics of installing Oracle Database 11g Release 1 on Oracle Enterprise Linux 5 (or RHEL5) from the bare metal up (for evaluation purposes only).

Contents
Overview
Part I: Installing Linux
Part II: Configuring Linux for Oracle
Create Directories
Create the Oracle Groups and User Account
Configure Linux Kernel Parameters
Set Shell Limits for the oracle User
Part III: Installing Oracle
Install the Software
Part IV: Configuring Storage
Filesystems
Automatic Storage Management
Conclusion
Appendix

Published January 2008

Downloads for this guide:
Oracle Enterprise Linux 5
Oracle Database 11g Release 1
ASMLib

Overview

The guide provides a walkthrough of installing an Oracle Database 11g Release 1 database on commodity hardware for the purpose of evaluation. If you are new to Linux and/or Oracle, this guide is for you. It starts with the basics and walks you through an installation of Oracle Database 11g Release 1 from the bare metal up. Both 32-bit and 64-bit architectures are covered.  Unless otherwise indicated, the installation steps are the same for either.

This guide will take the approach of offering the easiest paths, with the fewest number of steps for accomplishing a task.  This approach often means making configuration choices that would be inappropriate for anything other than an evaluation.  For that reason, this guide is not appropriate for building production-quality environments, nor does it reflect best practices.

This guide is divided into four parts: Part I covers the installation of the Linux operating system, Part II covers configuring Linux for Oracle, Part III discusses the essentials of installing the Oracle Database, and Part IV covers creating additional filesystems and  Automatic Storage Management (ASM).  The Appendix provides information to help you get started using your new database including how to access the database interactively and how to stop and start the database and related services.


Part I: Installing Enterprise Linux 5

This section describes how to install Oracle Enterprise Linux 5 (OEL5) on your hardware (but the same steps will apply for RHEL5).  Please take a moment to make sure that your hardware meets or exceeds the minimum hardware requirements for Oracle Database 11g Release 1.

Minimum hardware requirements:

32-bit (x86)

  • x86 compatible CPU
  • 1 GB RAM
  • 10 GB available disk space (3.5 GB for the Oracle software + 1.5 GB for the database + 3 GB for OEL5 + 2 GB swap)

64-bit (x86_64)

  • x86_64 compatible CPU
  • 1 GB RAM
  • 10.5 GB available disk space (4 GB for the Oracle software + 1.5 GB for the database + 3 GB for OEL5 + 2 GB swap)

Note: Both Linux and Oracle must be installed for the same architecture. 32-bit Oracle will only run on 32-bit Linux and 64-bit Oracle will only run on 64-bit Linux.

Now, let’s walk through the process of installing the Linux operating system on a server. The instructions assume a fresh install of Linux (as opposed to an upgrade), that the server will be dedicated to Oracle, and that no other operating systems or data are on the server.

Oracle Database 11g Release 1 is certified to run the base release of OEL5 without updates. Free copies of OEL5 are available for download.

  1. Boot the server using the first CD or DVD
    • You may need to change your BIOS settings to allow booting from the CD/DVD.
  2. The boot screen appears with the boot: prompt at the bottom of the screen.
    • Select Enter to continue with a graphical install on the console.
    • The installer scans your hardware
  3. Oracle Enterprise Linux splash screen
    • Click on Next
  4. Language Selection
    • Accept the default.
  5. Keyboard Configuration
    • Accept the default.
  6. Install or Upgrade
    • Select Install and click on Next
  7. Disk Partitioning Setup
    • A thorough treatment of disk partitioning is beyond the scope of this guide, which assumes that you are familiar with disk partitioning methods.
      WARNING: Improperly partitioning a disk is one of the surest and fastest ways to wipe out everything on your hard disk. If you are unsure how to proceed, stop and get help, or you will risk losing data!)
    • Accept the default partition layout.  Note that the default layout is sufficient for an evaluation, but would not be appropriate for other purposes.  The default layout may create a swap partition that is smaller than the Oracle guidelines recommend.  This is also sufficient for an evaluation.
  8. Network Configuration
    • It is usually best to configure database servers with a static IP address. To do so, click on Edit .
    • A pop-up window appears. Uncheck the Configure using DHCP box, and enter the IP Address and Netmask for the server. Be sure that Activate on boot is checked, and click on OK .
    • In the Hostname box, select manually and enter the hostname.
    • In the Miscellaneous Settings box, enter the remaining network settings.
  9. Time Zone Selection
    • Choose the time settings that are appropriate for your area. Setting the system clock to UTC is usually a good practice for servers. To do so, select on System clock uses UTC.
  10. Set Root Password
    • Enter a password for root, and enter it again to confirm.
  11. Package Installation
    • This guide will follow the Oracle recommended practice of using a « default RPMs » installation.  Accept the default software selection and click on Next.
    • Additional RPMs are required to run Oracle Database 11g Release 1.  These will be installed later.
  12. Installing Packages
    • Software will be copied to the hard disk and installed. Change disks as prompted.
  13. After software installation is complete
    • Remove any boot CD/DVD media.
    • Click on Next.
  14. Welcome
    • Click on Forward
  15. License Agreement
    • Read the license agreement. If you agree to the terms, select Yes, I agree to the License Agreement and click on Forward.
  16. Firewall Configuration
    • For the purposes of this walk-through, no firewall is configured. Select Disabled and click on Forward.
    • Click on Yes when the « Warning – No Firewall » window appears.
  17. SELinux
    • Select Disabled from the drop down bar and click on Forward.
  18. Kdump
    • Do not enable Kdump.  Accept the default and click on Forward.
  19. Date and Time
    • Set the Date and Time.
    • If you want to use an NTP server (recommended), select Enable Network Time Protocol and enter the name of the NTP server.
  20. System User
    • Create an account for yourself.
    • Do not create an account for oracle at this time. Creating the oracle account is covered later in this section.
  21. Sound Card
    • Configure the sound card, if any, and click on Forward.
  22. Additional CDs
    • Click on Finish.
  23. The system will reboot
  24. A graphical login screen appears.
  25. Congratulations! Your OEL5 software is now installed.

Installing Required Packages

Additional Linux software packages must be installed before installing the Oracle software.   The package requirements differ for 32-bit and 64-bit architectures, so this section contains separate instructions for each architecture.

32-bit (x86) Installations

Required kernel version: 2.6.18  This kernel, or any of the kernels supplied in updates, works with Oracle Database 11g Release 1 .

Check your kernel version by running the following command:

uname -r

Ex:
# uname -r
2.6.18-8.el5

Required package versions (or later):

  • compat-libstdc++-33-3.2.3-61
  • elfutils-libelf-0.125-3.el5
  • elfutils-libelf-devel-0.125-3.el5
  • glibc-2.5-12
  • glibc-devel-2.5-12
  • glibc-common-2.5-12
  • gcc-4.1.1-52.el5
  • gcc-c++-4.1.1-52.el5
  • kernel-headers
  • libgcc-4.1.1-52.el5
  • libaio-0.3.106-3.2
  • libaio-devel-0.3.106-3.2
  • libstdc++-4.1.1-52.el5
  • libstdc++-devel-4.1.1-52.el5
  • unixODBC-2.2.11-7.1
  • unixODBC-devel-2.2.11-7.1
  • sysstat-7.0.0-3.el5
  • binutils-2.17.50.0.6-2.el5
  • make-3.81-1.1

If you’ve performed a « default RPMs » install as suggested by Oracle, there are still some required packages that must be installed:

  • compat-libstdc++-33
  • elfutils-libelf-devel
  • glibc-devel-2.5
  • gcc
  • gcc-c++
  • libaio-devel
  • libstdc++-devel
  • unixODBC
  • unixODBC-devel
  • sysstat

To install the remaining packages, mount the Oracle Enterprise Linux media and move to the directory containing the RPMs.

Some required packages are dependent upon other packages, so the dependant packages must be installed as well.  Login as root and run the following commands to install the remaining required packages and their dependent packages. (Warning: packages often move from disk to disk across different releases.)

Mount CD 2

cd cd_mount_point/Server

rpm -ivh elfutils-libelf-devel* glibc-devel-2* glibc-headers-2* gcc-4* libgomp-4* gcc-c++-4* libstdc++-devel-4*

Ex:
# rpm -ivh elfutils-libelf-devel* glibc-devel-2* glibc-headers-2* gcc-4* libgomp-4* gcc-c++-4* libstdc++-devel-4*
warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:libgomp ########################################### [ 25%]
2:glibc-headers ########################################### [ 33%]
3:glibc-devel ########################################### [ 42%]
4:gcc ########################################### [ 50%]
5:gcc-c++ ########################################### [ 58%]
6:elfutils-libelf-devel-s########################################### [ 92%]
7:elfutils-libelf-devel ########################################### [100%]
8:libstdc++-devel-4 ########################################### [100%]

Mount CD 3

cd cd_mount_point/Server

rpm -ivh compat-libstdc++-33* libaio-devel* sysstat* unixODBC*

Ex:
# rpm -ivh compat-libstdc++-33* libaio-devel* sysstat* unixODBC*
warning: sysstat-7.0.0-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:unixODBC ########################################### [ 8%]
2:libaio-devel ########################################### [ 75%]
3:compat-libstdc++-33 ########################################### [ 83%]
4:sysstat ########################################### [100%]

To verify that the required packages have been installed on your system, run the following command:

rpm -q compat-libstdc++-33 elfutils-libelf-devel glibc-devel-2.5 gcc gcc-c++ libaio-devel libstdc++-devel \
unixODBC unixODBC-devel sysstat binutils elfutils-libelf glibc glibc-common libaio libgcc libstdc++ make

Ex:
# rpm -q compat-libstdc++-33 elfutils-libelf-devel glibc-devel-2.5 gcc gcc-c++ libaio-devel libstdc++-devel \
> unixODBC unixODBC-devel sysstat binutils elfutils-libelf glibc glibc-common libaio libgcc libstdc++ make
compat-libstdc++-33-3.2.3-61
elfutils-libelf-devel-0.125-3.el5
glibc-devel-2.5-12
gcc-4.1.1-52.el5
gcc-c++-4.1.1-52.el5
libaio-devel-0.3.106-3.2
libstdc++-devel-4.1.1-52.el5
unixODBC-2.2.11-7.1
unixODBC-devel-2.2.11-7.1
sysstat-7.0.0-3.el5
binutils-2.17.50.0.6-2.el5
elfutils-libelf-0.125-3.el5
glibc-2.5-12
glibc-common-2.5-12
libaio-0.3.106-3.2
libgcc-4.1.1-52.el5
libstdc++-4.1.1-52.el5
make-3.81-1.1

64-bit (x86_64) Installations

Required kernel version: 2.6.18  This kernel, or any of the kernels supplied in updates, works with Oracle Database 11g Release 1 .

Check your kernel version by running the following command:

uname -rm

Ex:
# uname -rm
2.6.18-8.el5 x86_64

Required package versions (or later):

  • binutils-2.17.50.0.6
  • compat-libstdc++-33-3.2.3
  • compat-libstdc++-33-3.2.3 (32 bit)
  • elfutils-libelf-0.125
  • elfutils-libelf-devel-0.125
  • gcc-4.1.1
  • gcc-c++-4.1.1
  • glibc-2.5-12
  • glibc-2.5-12 (32 bit)
  • glibc-common-2.5
  • glibc-devel-2.5
  • glibc-devel-2.5-12 (32 bit)
  • libaio-0.3.106
  • libaio-0.3.106 (32 bit)
  • libaio-devel-0.3.106
  • libgcc-4.1.1
  • libgcc-4.1.1 (32 bit)
  • libstdc++-4.1.1
  • libstdc++-4.1.1 (32 bit)
  • libstdc++-devel 4.1.1
  • make-3.81
  • sysstat-7.0.0

Note that there are a number of packages where both the 64-bit and 32-bit RPMs must be installed.  Fortunately, both are provided on the 64-bit Linux installation media.If you’ve performed a « default RPMs » install as suggested by Oracle, there are still some required packages that must be installed:

  • compat-libstdc++-33-3.2.3
  • compat-libstdc++-33-3.2.3 (32 bit)
  • elfutils-libelf-devel-0.125
  • gcc-4.1.1
  • gcc-c++-4.1.1
  • glibc-devel-2.5
  • glibc-devel-2.5-12 (32 bit)
  • libaio-devel-0.3.106
  • libstdc++-devel 4.1.1
  • sysstat-7.0.0

To install the remaining packages, mount the Oracle Enterprise Linux media and move to the directory containing the RPMs.

Some required packages are dependent upon other packages, so the dependant packages must be installed as well.  Login as root and run the following commands to install the remaining required packages and their dependent packages:

Mount CD 2

mount -t iso9660 -r /dev/cdrom /media
cd /media/Server

rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm

Ex:
# rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm
warning: elfutils-libelf-devel-0.125-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:glibc-headers ########################################### [ 11%]
2:glibc-devel ########################################### [ 22%]
3:libgomp ########################################### [ 33%]
4:gcc ########################################### [ 44%]
5:libstdc++-devel ########################################### [ 56%]
6:gcc-c++ ########################################### [ 67%]
7:glibc-devel ########################################### [ 78%]
8:elfutils-libelf-devel-s########################################### [ 89%]
9:elfutils-libelf-devel ########################################### [100%]

cd /
eject

Mount CD 3

mount -t iso9660 -r /dev/cdrom /media
cd /media/Server

rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm

Ex:
# rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm
warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:libaio-devel ########################################### [ 33%]
2:compat-libstdc++-33 ########################################### [ 67%]
3:compat-libstdc++-33 ########################################### [100%]

cd /
eject

Mount CD 4

mount -t iso9660 -r /dev/cdrom /media
cd /media/Server

rpm -ivh sysstat*

Ex:
# rpm -ivh sysstat*
warning: sysstat-7.0.0-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:sysstat ########################################### [100%]

To verify that the required packages have been installed on your system, run the following command:

rpm -q –queryformat « %{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n » binutils \
compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \
glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \
make sysstat

Ex:
# rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils \
> compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \
> glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \
> make sysstat
binutils-2.17.50.0.6-2.el5 (x86_64)
compat-libstdc++-33-3.2.3-61 (i386)
compat-libstdc++-33-3.2.3-61 (x86_64)
elfutils-libelf-0.125-3.el5 (x86_64)
elfutils-libelf-devel-0.125-3.el5 (x86_64)
gcc-4.1.1-52.el5 (x86_64)
gcc-c++-4.1.1-52.el5 (x86_64)
glibc-2.5-12 (i686)
glibc-2.5-12 (x86_64)
glibc-common-2.5-12 (x86_64)
glibc-devel-2.5-12 (x86_64)
glibc-devel-2.5-12 (i386)
libaio-0.3.106-3.2 (x86_64)
libaio-0.3.106-3.2 (i386)
libaio-devel-0.3.106-3.2 (x86_64)
libgcc-4.1.1-52.el5 (x86_64)
libgcc-4.1.1-52.el5 (i386)
libstdc++-4.1.1-52.el5 (x86_64)
libstdc++-4.1.1-52.el5 (i386)
libstdc++-devel-4.1.1-52.el5 (x86_64)
make-3.81-1.1 (x86_64)
sysstat-7.0.0-3.el5 (x86_64)

Part II: Configuring Linux for Oracle

Now that the Linux software is installed, you need to configure it for Oracle. This section walks through the steps required to configure Linux for Oracle Database 11g Release 1.

Create the Oracle Groups and User Account

Next, create the Linux groups and user account that will be used to install and maintain the Oracle Database 11g Release 1 software. The user account will be called oracle, and the groups will be oinstall and dba. Execute the following commands as root:

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle

Ex:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)

Set the password on the oracle account:

passwd oracle

Ex:
# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Create Directories

Now create directories to store the Oracle Database 11g Release 1 software and the database files. This guide adheres to the Optimal Flexible Architecture (OFA) for the naming conventions used in creating the directory structure. For more information on OFA standards, see Appendix D of the Oracle Database Installation Guide 11g Release 1 (11.1) for Linux.

The following assumes that the directories are being created in the root filesystem. This is done for the sake of simplicity and is not recommended as a general practice. These directories would normally be created as separate filesystems.

Issue the following commands as root:

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app

Configuring the Linux Kernel Parameters

Oracle Database 11g Release 1 requires the kernel parameter settings shown below. The values given are minimums, so if your system uses a larger value, don’t change it.  Linux allows modification of most kernel parameters while the system is up and running, so there’s no need to reboot the system after making kernel parameter changes.

kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144

Note that OEL 5 already has values defined for kernel.shmall and kernel.shmmax.  Use the default values if they are the same or larger than the required values.

If you’re following along and have just installed Linux, the kernel parameters will all be at their default values and you can just cut and paste the following commands while logged in as root.

cat >> /etc/sysctl.conf <<EOF
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
EOF
/sbin/sysctl -p

Ex:
# cat >> /etc/sysctl.conf <<EOF
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
> kernel.shmmni = 4096
> kernel.sem = 250 32000 100 128
> fs.file-max = 65536
> net.ipv4.ip_local_port_range = 1024 65000
> net.core.rmem_default=4194304
> net.core.wmem_default=262144
> net.core.rmem_max=4194304
> net.core.wmem_max=262144
> EOF
# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144

Run the following commands as root to verify your settings:

/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | grep rmem_default
/sbin/sysctl -a | grep rmem_max
/sbin/sysctl -a | grep wmem_default
/sbin/sysctl -a | grep wmem_max

Ex:
# /sbin/sysctl -a | grep shm
kernel.shmmni = 4096
kernel.shmall = 268435456
kernel.shmmax = 4294967295
kernel.shm-use-bigpages = 0
# /sbin/sysctl -a | grep sem
kernel.sem = 250 32000 100 128
# /sbin/sysctl -a | grep file-max
fs.file-max = 65536
# /sbin/sysctl -a | grep ip_local_port_range
net.ipv4.ip_local_port_range = 1024 65000
# /sbin/sysctl -a | grep rmem_default
net.core.rmem_default = 4194304
# /sbin/sysctl -a | grep rmem_max
net.core.rmem_max = 4194304
# /sbin/sysctl -a | grep wmem_default
net.core.wmem_default = 262144
# /sbin/sysctl -a | grep wmem_max
net.core.wmem_max = 262144

Setting shell limits for the oracle user

Oracle recommends setting limits on the number of processes and open files each Linux account may use. To make these changes, cut and paste the following commands as root:

cat >> /etc/security/limits.conf <<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

cat >> /etc/pam.d/login <<EOF
session required pam_limits.so
EOF

Change the default profile for bash and ksh as well as the default login script for cshell.

cat >> /etc/profile <<EOF
if [ \$USER = "oracle" ]; then
 if [ \$SHELL = "/bin/ksh" ]; then
 ulimit -p 16384
 ulimit -n 65536
 else
 ulimit -u 16384 -n 65536
 fi
 umask 022
fi
EOF

cat >> /etc/csh.login <<EOF
if ( \$USER == "oracle" ) then
 limit maxproc 16384
 limit descriptors 65536
 umask 022
endif
EOF

Part III: Installing Oracle Oracle Database 11g Release 1 can be downloaded from OTN. Oracle offers a development and testing license free of charge. However, no support is provided and the license does not permit production use. A full description of the license agreement is available on OTN.

The easiest way to make the Oracle Database 11g Release 1 distribution media available on your server is to download them directly to the server.

Use the graphical login to log in as oracle.

Create a directory to contain the Oracle Database 11g Release 1 distribution:

mkdir 11gR1_db

To download Oracle Database 11g Release 1 from OTN, point your browser to the Oracle Database Download Page.  Read the OTN License agreement. If you agree with the restrictions and the license agreement, click on Accept License Agreement.

Click on the Linux x86 link (32-bit) or Linux x86-64 link (64-bit) and save the file in the directory you created for this purpose (11gR1_db)—if you have not already logged in to OTN, you may be prompted to do so at this point.

Unzip and extract the file.

cd 11gR1_db
For 32-bit
unzip linux_11gR1_database.zip
For 64-bit
unzip linux.x64_11gR1_database.zip

Install the Software and Create a Database

Log in using the oracle account.

Change directory to the directory containing the Oracle Database 11g Release 1 software.

Ex:
$ cd $HOME/11gR1_db/database

Start the Oracle Universal Installer.

$ ./runInstaller
  1. Select Installation Method
    • Select Basic Installation
    • Oracle Base Location: /u01/app/oracle
    • Oracle Home Location: /u01/app/oracle/product/11.1.0/db_1
    • Installation Type: Enterprise Edition (3.3GB)
    • UNIX DBA Group:  dba
    • Make sure Create Starter Database is checked
    • Global Database Name: demo1
    • Enter the Database Password and Confirm Password
    • Click on Next
  2. Specify Inventory Directory and Credentials
    • Inventory Directory: /u01/app/oraInventory
    • Operating System group name:  oinstall
    • Click on Next
  3. Product-specific Prerequisite Checks
    • If you’ve been following the steps in this guide, all the checks should pass without difficulty. You may receive a warning related to swap file size if the default partition layout was used during OEL5 installation.  This may be safely ignored .  If one or more checks fail, correct the problem before proceeding.
    • Click on Next
  4. Oracle Configuration Manager Registration
    • Leave this disabled for the demo and click on Next
  5. Summary
    • A summary of the products being installed is presented.
    • Click on Install.
  6. Install
    • Installation progress is displayed
  7. Configuration Assistants
    • The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
    • Take note of the information presented in the Database Configuration Assistant pop-up window and click on OK.
  8. Execute Configuration Scripts
    • At the end of the installation, a pop up window will appear indicating scripts that need to be run as root.  Login as root and run the indicated scripts.
    • Click on OK when finished.
  9. End of Installation
    • Make note of the URLs presented in the summary, and click on Exit when ready.
  10. Congratulations! Your new Oracle Database 11g Release 1 database is up and ready for use.

Part IV: Configuring Storage The database we created in Part III used a single filesystem for disk storage. However, there are several other ways to configure storage for an Oracle database.

This section explores other methods of configuring disk storage for a database. In particular, it describes creating an additional filesystem and using Automatic Storage Management (ASM).

Partition the Disks

In order to use either file systems or ASM, you must have unused disk partitions available.  This section describes how to create the partitions that will be used for new file systems and for ASM.

WARNING: Improperly partitioning a disk is one of the surest and fastest ways to wipe out everything on your hard disk. If you are unsure how to proceed, stop and get help, or you will risk losing data.

This example uses /dev/sda (an empty disk with no existing partitions) to create a single partition for the entire disk.

Ex:
# fdisk /dev/sda

The number of cylinders for this disk is set to 30401.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-30401, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-30401, default 30401):
Using default value 30401

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

Calling ioctl() to re-read partition table.
Syncing disks.

Now verify the new partition:

Ex:
# fdisk -l /dev/sda

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 30401 244196001 83 Linux

Repeat the above steps for each disk to be partitioned.  The following section on Filesystems uses a single disk partition, /dev/sda1.  The ASM example uses two disks: /dev/sda1 and /dev/sdb1.

Filesystems

Filesystems are the most widely used means of storing data file, redo logs, and control files for Oracle databases. Filesystems are easy to implement and require no third-party software to administer.

In most cases, filesystems are created during the initial installation of Linux. However, there are times when a new filesystem must be created after the initial installation, such as when a new disk drive is being installed.

This section describes building a new filesystem and using it in an Oracle database. Unless otherwise noted, all commands must be run as root.

Create the Filesystem

Use ext3 to create this new filesystem. Other filesystems work just as well, but ext3 offers the fastest recovery time in the event of a system crash.

Ex:
# mke2fs -j /dev/sda1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
30539776 inodes, 61049000 blocks
3052450 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1864 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

Create the Mount Point

A filesystem must have a mount point, which is simply an empty directory where the new filesystem « attaches » to the system’s directory tree. Mount points should be given names consistent with the Oracle Flexible Architecture (OFA) standard. For more information on OFA standards, see Appendix D of the Oracle Database Installation Guide 11g Release 1 (11.1) for Linux.

Because the /u01 directory was created in Part I, this example uses /u02.

Ex:
# mkdir /u02

Add the New Filesystem to /etc/fstab

So that the new filesystem will be mounted automatically when the system boots, you need to add a line to the /etc/fstab file that describes the new filesystem and where to mount it. Add a line similar to the one below to /etc/fstab, using a text editor.

/dev/sda1 /u02 ext3 defaults 1 2

Mount the New Filesystem

Mounting the filesystem makes it available for use. Until the filesystem is mounted, files cannot be stored in it. Use the following commands to mount the filesystem and verify that it is available.

mount /u02
df -h /u02

Ex:
# mount /u02
# df -h /u02
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 230G 188M 218G 1% /u02

Create Oracle Directories and Set Permissions

Now create a directory to store your Oracle database files. The directory name used in the example follows the OFA standard naming convention for a database with ORACLE_SID=demo1.

mkdir -p /u02/app/oracle/oradata/demo1
chown -R oracle:oinstall /u02/app
chmod -R 775 /u02/app

Create a New Tablespace in the New Filesystem

The new filesystem is ready for use. Next you create a new tablespace in the filesystem to store your database objects. Connect to the database as the SYSTEM user, and execute the CREATE TABLESPACE statement, specifying the data file in the new filesystem.

Ex:
$ sqlplus

SQL*Plus: Release 11.1.0.6.0 - Production on Sun Nov 4 15:19:00 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Enter user-name: system
Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create tablespace data1
2 datafile '/u01/app/oracle/oradata/demo1/data1_01.dbf' size 100m
3 extent management local
4 segment space management auto;

Tablespace created.

Now you can use the new tablespace to store database objects such as tables and indexes.

Ex:
SQL> create table demotab (id number(5) not null primary key,
 2 name varchar2(50) not null,
 3 amount number(9,2))
 4 tablespace data1;

Table created.

Automatic Storage Management (ASM)ASM is a disk storage option that provides the services of a filesystem, logical volume manager, and software RAID in a platform-independent manner. ASM can stripe and mirror your disks, allow disks to be added or removed while the database is under load, and automatically balance I/O to remove « hot spots. » It also supports direct and asynchronous I/O and implements the Oracle Data Manager API (simplified I/O system call interface) introduced in Oracle9i.

ASM is not a general-purpose filesystem and can be used only for Oracle database related files. Files in ASM can be created and named automatically by the database (by use of the Oracle Managed Files feature) or manually by the DBA.  ASM files are not accessible using operating system commands such as ls, cp, and dd.  To manage ASM files, use Oracle Enterprise Manager or other Oracle provided methods.

ASM is implemented as a separate Oracle instance that must be running if other databases are to be able to access it. Memory requirements for ASM are light: only 64 MB for most systems.

Installing ASM

ASM can use a variety of storage types including raw partitions, RAID LUNs, and NFS files.  For Linux systems, Oracle provides a custom device driver known as ASMLib, which is recommended for most ASM installations on Linux.  ASMLib is available for free download from OTN. This section walks through the process of configuring a simple ASM instance using ASMLib 2.0 and building a database that uses ASM for disk storage.

Determine Which Version of ASMLib You Need

ASMLib 2.0 is delivered as a set of three RPM packages.

  • oracleasmlib-2.0 – the ASM libraries
  • oracleasm-support-2.0 – utilities needed to administer ASMLib
  • oracleasm – a kernel module for the ASM library that is specific to each kernel

Each Linux distribution has its own set of ASMLib 2.0 packages (OEL 5 uses the same RPMs as Red Hat Enterprise Linux 5 AS).  Within each distribution, each kernel version has a corresponding oracleasm package. The following paragraphs describe how to determine which set of packages you need.First, determine which kernel you are using by logging in as root and running the following command:

uname -rm

Ex:
# uname -rm
2.6.18-8.el5 i686

The example shows that this is a 2.6.18 kernel, patch level 8, for Enterprise Linux 5 on 32-bit x86 compatible hardware (i686).

Use this information to find the correct ASMLib packages on OTN:

  1. Point your Web browser to http://www.oracle.com/technology/tech/linux/asmlib/index.html
  2. Select the link for your version of Linux (OEL5 users may use the Red Hat Enterprise Linux 5 AS link).
  3. Download the oracleasmlib and oracleasm-support packages for your version of Linux.  The files are grouped by architecture (AMD64 / Intel em64t for x86_64, IA64 for Itanium, and IA32 for x86).  At the top of each section is a Library and Tools heading.  Download both of the files under this heading – these are the support utilities and ASM libraries (oracleasm-support and oracleasmlib, respectively).
  4. Next, download the oracleasm package corresponding to your kernel. In the example above, the oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm package was used.  Note that there are two or three drivers listed under most of the kernel versions.  For example:

    Drivers for kernel 2.6.18-8.el5

    * oracleasm-2.6.18-8.el5xen-2.0.4-1.el5.i686.rpm
    * oracleasm-2.6.18-8.el5PAE-2.0.4-1.el5.i686.rpm
    * oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm

    Choose only one of these.  In this example, there are drivers for Xen (virtual machine architecture), PAE (for 32-bit systems with more than 4GB RAM), and the « standard » 32-bit kernel.Next, install the packages by executing the following command as root:

    rpm -Uvh oracleasm-kernel_version-asmlib_version.cpu_type.rpm \
    oracleasmlib-asmlib_version.cpu_type.rpm \
    oracleasm-support-asmlib_version.cpu_type.rpm
    
    Ex:
    # rpm -Uvh oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm \
    > oracleasm-support-2.0.4-1.el5.i386.rpm \
    oracleasmlib-2.0.3-1.el5.i386.rpm
    Preparing... ########################################### [100%]
    1:oracleasm-support ########################################### [ 33%]
    2:oracleasm-2.6.18-8.el5 ########################################### [ 67%]
    3:oracleasmlib ########################################### [100%]

Configuring ASMLib

Before using ASMLib, you must run a configuration script to prepare the driver. Run the following command as root, and answer the prompts as shown in the example below.

# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]

Next you tell the ASM driver which disks you want it to use. Oracle recommends that each disk contain a single partition for the entire disk.  See Partitioning the Disks at the beginning of this section for an example of creating disk partitions.

Mark disks for use by ASMLib by running the following command as root:

/etc/init.d/oracleasm createdisk DISK_NAME device_name

Tip: Enter the DISK_NAME in UPPERCASE letters.

Ex:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sda1
Marking disk "/dev/sdb1" as an ASM disk:                   [  OK  ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk:                   [  OK  ]
Verify that ASMLib has marked the disks: 
# /etc/init.d/oracleasm listdisks
VOL1
VOL2

Create the ASM Instance

ASM runs as a separate Oracle instance which can be created and configured using the Oracle Universal Installer.  Now that ASMLib is installed and the disks are marked for use, you can create an ASM instance.

Log in as oracle and start runInstaller:

$ ./runInstaller
  1. Select Installation Method
    • Select Advanced Installation
    • Click on Next
  2. Specify Inventory Directory and Credentials
    • Inventory Directory: /u01/app/oraInventory
    • Operating System group name:  oinstall
    • Click on Next
  3. Select Installation Type
    • Select Enterprise Edition
    • Click on Next
  4. Install Location
    • Oracle Base: /u01/app/oracle
    • Name:   OraDB11gASM
    • Path:      /u01/app/oracle/product/11.1.0/asm
      Note:Oracle recommends using a different ORACLE_HOME for ASM than the ORACLE_HOME used for the database for ease of administration.
    • Click on Next
  5. Product-specific Prerequisite Checks
    • If you’ve been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
    • Click on Next
  6. Select Configuration Option
    • Select Configure Automatic Storage Management (ASM)
    • Enter the ASM SYS password and confirm
    • Click on Next
  7. Configure Automatic Storage Management
    • Disk Group Name:  DATA
    • Redundancy
      - High mirrors data twice.
      - Normal mirrors data once.  This is the default.
      - External does not mirror data within ASM. This is typically used if an external RAID array is providing redundancy.
    • Add Disks
      The disks you configured for use with ASMLib are listed as Candidate Disks.  Select each disk you wish to include in the disk group.
    • Click on Next
  8. Privileged Operating System Groups
    • Database Administrator (OSDBA) Group: dba
    • Database Operator (OSOPER) Group: dba
    • ASM administrator (OSASM) Group: dba
    • Click on Next
  9. Oracle Configuration Manager Registration
    • Leave this disabled for the demo
    • Click on Next
  10. Summary
    • A summary of the products being installed is presented.
    • Click on Install.
  11. Install
    • Installation progress is displayed
  12. Execute Configuration Scripts
    • At the end of the installation, a pop up window will appear indicating scripts that need to be run as root.  Login as root and run the indicated scripts.
    • Click on OK when finished.
  13. Configuration Assistants
    • The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
  14. End of Installation
    • Cick on Exit
  15. Congratulations! Your new Oracle ASM Instance is up and ready for use.

Create the Database

Once the ASM instance has been created, create a database that uses ASM for storage:

Log in as oracle and start runInstaller:

$ ./runInstaller
  1. Select Installation Method
    • Select Advanced Installation
    • Click on Next
  2. Select Installation Type
    • Select Enterprise Edition
    • Click on Next
  3. Install Location
    • Oracle Base: /u01/app/oracle
    • Name:   OraDb11g_home1
    • Path:      /u01/app/oracle/product/11.1.0/db_1
      Note:Oracle recommends using a different ORACLE_HOME for the database than the ORACLE_HOME used for ASM.
    • Click on Next
  4. Product-specific Prerequisite Checks
    • If you’ve been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
    • Click on Next
  5. Select Configuration Option
    • Select Create a Database
    • Click on Next
  6. Select Database Configuration
    • Select General Purpose
    • Click on Next
  7. Specify Database Configuration Options
    • Enter the Global Database Name and SID
    • Click on Next
  8. Specify Database Config Options
    • Accept the defaults or change as desired
    • Click on Next
  9. Select Database Management Option
    • Select Use Database Control for Database Management
    • Click on Next
  10. Specify Database Storage Option
    • Select Automatic Storage Management (ASM)
    • Click on Next
  11. Specify Backup and Recovery Options
    • Select Do not enable Automated backups
    • Click on Next
  12. Select ASM Disk Group
    • Select the DATA disk group created in the previous section
    • Click on Next
  13. Specify Database Schema Passwords
    • Select Use the same password for all the accounts
    • Enter the password and confirm
    • Click on Next
  14. Privileged Operating System Groups
    • Database Administrator (OSDBA) Group: dba
    • Database Operator (OSOPER) Group: dba
    • ASM administrator (OSASM) Group: dba
    • Click on Next
  15. Oracle Configuration Manager Registration
    • Leave this disabled for the demo
    • Click on Next
  16. Summary
    • A summary of the products being installed is presented.
    • Click on Install.
  17. Configuration Assistants
    • The Oracle configuration assistants will run automatically
    • When the configuration is complete, a pop-up window will appear with information about the database.  Make note of the URL and click on OK when ready.
  18. Execute Configuration Scripts
    • At the end of the installation, a pop up window will appear indicating scripts that need to be run as root.  Login as root and run the indicated scripts.
    • Click on OK when finished.
  19. End of Installation
    • Click on Exit
  20. Congratulations! Your new Oracle Database is up and ready for use.

ConclusionNow that your database is up and running, you can begin exploring the many new features offered in Oracle Database 11g Release 1. A great place to start is with Oracle Enterprise Manager. If you’re unsure where to begin, the Oracle Database Concepts 11g Release 1 and the 2-Day DBA guide will help familiarize you with your new database. OTN also has a number of guides designed to help you get the most out of Oracle Database 11g Release 1.


Appendix Accessing the Database with SQL*Plus

Log into Linux as oracle. Set the environment.

Set the Oracle environment variables:

$ . oraenv
ORACLE_SID = [demo1] ? demo1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

Run SQL*Plus:

$ sqlplus

SQL*Plus: Release 11.1.0.6.0 - Production on Sun Nov 4 23:56:47 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Enter user-name: / as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

Using Oracle Enterprise Manager 11g Database Control

In a Web browser, connect to the URL provided during the installation.

Ex:
https://ds1.orademo.org:1158/em (You may have to use the IP address instead of the host name if your database server isn’t in your DNS.)

User Name: SYSTEM
Password: <The password you chose during installation>
Connect As: Normal

Click on <Login>


Welcome to Oracle Enterprise Manager 11g Database Control.

Starting and Stopping Oracle Enterprise Manager Database Control:

$ emctl start dbconsole
$ emctl stop dbconsole

Starting and Stopping the Listener:

The listener accepts connection requests from clients and creates connections to the database once the credentials have been authenticated. Before you can use OEM, the listener must be up.

$ lsnrctl start
$ lsnrctl stop

Starting and Stopping the Database:

The easiest way to start and stop the database is from the OEM Console. To do that from the command line, use SQL*Plus while logged in as oracle, as follows:

Startup:

$ sqlplus

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Nov 5 00:00:31 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Enter user-name: / as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup
ORACLE instance started.

Total System Global Area 849530880 bytes
Fixed Size 1303216 bytes
Variable Size 377490768 bytes
Database Buffers 465567744 bytes
Redo Buffers 5169152 bytes
Database mounted.
Database opened.

SQL> exit

Shutdown:

$ sqlplus

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Nov 5 00:00:31 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Enter user-name: / as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> exit

John Smiley [jrsmiley@gmail.com] is a senior database engineer at a major online retailer.  He is an Oracle Certified Master DBA with 20 years of experience with Oracle databases running on all major platforms.  He specializes in engineering highly available, high performance Oracle database systems.

  • Share/Bookmark

vSphere Virtual Machine Upgrade Process

source

Upgrading a VMware Infrastructure 3.x environment to VMware vSphere 4 involves more than just upgrading vCenter Server and upgrading your ESX/ESXi hosts (as if that wasn’t enough). You should also plan on upgrading your virtual machines. VMware vSphere introduces a new hardware version (version 7), and vSphere also introduces a new paravirtualized network driver (VMXNET3) as well as a new paravirtualized SCSI driver (PVSCSI). To take advantage of these new drivers as well as other new features, you’ll need to upgrade your virtual machines. This process I describe below works really well.

Please note that this process will require some downtime. I personally tested this process with both Windows Server 2003 R2 as well as Windows Server 2008; it worked flawlessly with both versions of Windows. (I’ll post a separate article on doing something similar with other operating systems, if it’s even possible.)

  1. Record the current IP configuration of the guest operating system. You’ll end up needing to recreate it.
  2. Upgrade VMware Tools in the guest operating system. You can do this by right-clicking on the virtual machine and selecting Guest > Install/Upgrade VMware Tools. When prompted, choose to perform an automatic tools upgrade. When the VMware Tools upgrade is complete, the virtual machine will reboot.
  3. After the guest operating system reboots and is back up again, shutdown the guest operating system. You can do this by right-clicking on the virtual machine and selecting Power > Shutdown Guest.
  4. Upgrade the virtual machine hardware by right-clicking the virtual machine and selecting Upgrade Virtual Hardware.
  5. In the virtual machine properties, add a new network adapter of the type VMXNET3 and attach it to the same port group/dvPort group as the first network adapter.
  6. Remove the first/original network adapter.
  7. Add a new virtual hard disk to the virtual machine. Be sure to attach it to SCSI node 1:x; this will add a second SCSI adapter to the virtual machine. The size of the virtual hard disk is irrelevant.
  8. Change the type of the newly-added second SCSI adapter to VMware Paravirtual.
  9. Click OK to commit the changes you’ve made to the virtual machine.
  10. Power on the virtual machine. When the guest operating system is fully booted, log in and recreate the network configuration you recorded for the guest back in step 1. Windows may report an error that the network configuration is already used by a different adapter, but proceed anyway. Once you’ve finished, shut down the guest operating system again.
  11. Edit the virtual machine to remove the second hard disk you just added.
  12. While still in the virtual machine properties, change the type of the original SCSI controller to VMware Paravirtual (NOTE: See update below.)
  13. Power on the virtual machine. When the guest operating system is fully booted up, log in.
  14. Create a new system environment variable named DEVMGR_SHOW_NONPRESENT_DEVICES and set the value to 1.
  15. Launch Device Manager and from the View menu select Show Hidden Devices.
  16. Remove the drivers for the old network adapter and old SCSI adapter. Close Device Manager and you’re done!

If you perform these steps on a template, then you can be assured that all future virtual machines cloned from this template also have the latest paravirtualized drivers installed for maximum performance.

UPDATE: Per this VMware KB article, VMware doesn’t support using the PVSCSI adapter for boot devices. That is not to say that it doesn’t work (it does work), but that it is not supported. Thanks to Eddy for pointing that out in the comments!

  • Share/Bookmark

Utiliser le host update utility semble une belle alternative.

 

 

 

 

  • Share/Bookmark

Advice to employees on the proper use of the System Administrator’s valuable time

(In following examples, we will substitute the name « Ted » as the System Administrator)

  • Make sure to save all your MP3 files on your network drive. No sense in wasting valuable space on your local drive! Plus, Ted loves browsing through 100+ GB of music files while he backs up the servers.
  • Play with all the wires you can find. If you can’t find enough, open something up to expose them. After you have finished, and nothing works anymore, put it all back together and call Ted. Deny that you touched anything and that it was working perfectly only five minutes ago. Ted just loves a good mystery. For added effect you can keep looking over his shoulder and ask what each wire is for.
  • Never write down error messages. Just click OK, or restart your computer. Ted likes to guess what the error message was.
  • When talking about your computer, use terms like « Thingy » and « Big Connector. »
  • If you get an EXE file in an email attachment, open it immediately. Ted likes to make sure the anti-virus software is working properly.
  • When Ted says he coming right over, log out and go for coffee. It’s no problem for him to remember your password.
  • When you call Ted to have your computer moved, be sure to leave it buried under a year-old pile of postcards, baby pictures, stuffed animals, dried flowers, unpaid bills, bowling trophies and Popsicle sticks. Ted doesn’t have a life, and he finds it deeply moving to catch a glimpse of yours.
  • When Ted sends you an email marked as « Highly Important » or « Action Required », delete it at once. He’s probably just testing some new-fangled email software.
  • When Ted’s eating lunch at his desk or in the lunchroom, walk right in, grab a few of his fries, then spill your guts and expect him to respond immediately. Ted lives to serve, and he’s always ready to think about fixing computers, especially yours.
  • When Ted’s at the water cooler or outside taking a breath of fresh air, find him and ask him a computer question. The only reason he takes breaks at all is to ferret out all those employees who don’t have email or a telephone.
  • Send urgent email ALL IN UPPERCASE. The mail server picks it up and flags it as a rush delivery.
  • When the photocopier doesn’t work, call Ted. There’s electronics in it, so it should be right up his alley.
  • When you’re getting a NO DIAL TONE message at your home computer, call Ted. He enjoys fixing telephone problems from remote locations. Especially on weekends.
  • When something goes wrong with your home PC, dump it on Ted’s chair the next morning with no name, no phone number, and no description of the problem. Ted just loves a good mystery.
  • When you have Ted on the phone walking you through changing a setting on your PC, read the newspaper. Ted doesn’t actually mean for you to DO anything. He just loves to hear himself talk.
  • When your company offers training on an upcoming OS upgrade, don’t bother to sign up. Ted will be there to hold your hand when the time comes.
  • When the printer won’t print, re-send the job 20 times in rapid succession. That should do the trick.
  • When the printer still won’t print after 20 tries, send the job to all the printers in the office. One of them is bound to work.
  • Don’t use online help. Online help is for wimps.
  • Don’t read the operator’s manual. Manuals are for wussies.
  • If you’re taking night classes in computer science, feel free to demonstrate your fledgling expertise by updating the network drivers for you and all your co-workers. Ted will be grateful for the overtime when he has to stay until 2:30am fixing all of them.
  • When Ted’s fixing your computer at a quarter past one, eat your Whopper with cheese in his face. He functions better when he’s slightly dizzy from hunger.
  • When Ted asks you whether you’ve installed any new software on your computer, LIE. It’s no one else’s business what you’ve got on your computer.
  • If the mouse cable keeps knocking down the framed picture of your dog, lift the monitor and stuff the cable under it. Those skinny Mouse cables were designed to have 55 lbs. of computer monitor crushing them.
  • If the space bar on your keyboard doesn’t work, blame Ted for not upgrading it sooner. Hell, it’s not your fault there’s a half pound of pizza crust crumbs, nail clippings, and big sticky drops of Mountain Dew under the keys.
  • When you get the message saying « Are you sure? », click the « Yes » button as fast as you can. Hell, if you weren’t sure, you wouldn’t be doing it, would you?
  • Feel perfectly free to say things like « I don’t know nothing about that boneheaded computer crap. » It never bothers Ted to hear his area of professional expertise referred to as boneheaded crap.
  • Don’t even think of breaking large print jobs down into smaller chunks. God forbid somebody else should sneak a one-page job in between your 500-page Word document.
  • When you send that 500-page document to the printer, don’t bother to check if the printer has enough paper. That’s Ted’s job.
  • When Ted calls you 30 minutes later and tells you that the printer printed 24 pages of your 500-page document before it ran out of paper, and there are now nine other jobs in the queue behind yours, ask him why he didn’t bother to add more paper.
  • When you receive a 130 MB movie file, send it to everyone as a high-priority mail attachment. Ted’s provided plenty of disk space and processor capacity on the new mail server for just those kinds of important things.
  • When you bump into Ted in the grocery store on a Sunday afternoon, ask him computer questions. He works 24/7, and is always thinking about computers, even when he’s at super-market buying toilet paper and doggie treats.
  • If your son is a student in computer science, have him come in on the weekends and do his projects on your office computer. Ted will be there for you when your son’s illegal copy of Visual Basic 6.0 makes the Access database keel over and die.
  • When you bring Ted your own « no-name » brand PC to repair for free at the office, tell him how urgently he needs to fix it so you can get back to playing EverQuest. He’ll get on it right away, because everyone knows he doesn’t do anything all day except surf the Internet.
  • Don’t ever thank Ted. He loves fixing everything AND getting paid for it!
  • Share/Bookmark

Quand le media du catalog reste accroché et que tenter de le changer ca donne une erreur 177 (could not deassign media).

 

Voici comment j’ai réussi:

 

1: Fermer les services netbackup.

2: S’en assurer (bpps -a)

3: S’ils ne sont pas tous fermés, utiliser:  /usr/openv/netbackup/bin/goodies/bp.kill_all

4: Forcer Netbackup a recréer son fichier de sync du catalog: (mv /usr/openv/netbackup/db/config/sync /usr/openv/netbackup/db/config/sync.old)

5: Demarrer les services NEtbackup et ouvrir la console JAVA.

6: Aller recréer le tape de catalog (type de media, nom du media, remettre schedule, etc)

7: Tadam, rouler la copie du catalog.

  • Share/Bookmark

Voici les liens:

Windows

Mac

Linux

  • Share/Bookmark

Quand on a le probleme suivant dans SUSE en faisant les mises a jour:

ERROR(You:rpm failed

————

Prendre la DB YOU en backup:

cd /var/lib
tar cf /tmp/rpm.sav.tar rpm

Recréer la BD.

cd /var/lib/rpm
rpm -vv –rebuilddb

  • Share/Bookmark

[print_link]

Basically the setup details are:

SLES9: 192.168.1.10
Windows 2003 Server: 192.168.1.1
Required RPM:  heimdal-lib(kerberos), samba-client, samba-winbind, samba, sudo, xntp, glibc, pwdutils, openssh.

A. Time synchronization
Ensure Clock synchronization between your SLES9 and AD. Type #rcxntpd start

B. Kerberos setup
Edit /etc/krb5.conf

[libdefaults]
        default_realm = AD.YOURDOMAIN.COM
        clockskew = 300

[realms]
        AD.YOURDOMAIN.COM = {
                kdc = ad01.ad.yourdomain.com
                default_domain = ad.yourdomain.com
                admin_server = ad01.ad.yourdomain.com
        }
EXAMPLE.COM = {
        kdc = kerberos.example.com
        admin_server = kerberos.example.com
}

[logging]
        kdc = FILE:/var/log/krb5/krb5kdc.log
        admin_server = FILE:/var/log/krb5/kadmind.log
        default = SYSLOG:NOTICE:DAEMON
[domain_realm]
        .ad.yourdomain.com = AD.YOURDOMAIN.COM
[appdefaults]
        pam = {
                ticket_lifetime = 1d
                renew_lifetime = 1d
                forwardable = true
                proxiable = false
                retain_after_close = false
                minimum_uid = 1
                try_first_pass = true
}

Note: Be careful here. It’s CASE SENSITIVE and please make sure you can PING each others.

C. Samba setup
Edit /etc/samba/smb.conf

[global]
winbind separator = +
winbind cache time = 10
winbind use default domain = yes
workgroup = ADYOUDOMAIN
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
idmap gid = 10000-20000
idmap uid = 10000-20000
realm = AD.YOURDOMAIN.COM
security = ADS
template homedir = /home/%U
template shell = /bin/bash
password server = server.example.com
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n
Retype*new*password*%n\n*password:*all*authentication*tokens*updated*successfully
Pam password change = Yes

The example show as above is not complete. Please focus on realm and security.

D. /etc/nsswitch.conf setup
passwd: files winbind
shadow: files winbind
group: files winbind
hosts: files dns
networks: files dns
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files
bootparams: files
automount: files nis
aliases: files

E. PAM configuration
/etc/pam.d/passwd
auth required pam_unix2.so nullok
auth sufficient pam_winbind.so
account required pam_unix2.so
account sufficient pam_winbind.so
password required pam_pwcheck.so nullok
password required pam_unix2.so nullok use_first_pass use_authtok
session required pam_unix2.so

/etc/pam.d/sshd
auth sufficient pam_winbind.so
auth required pam_unix2.so # set_secrpc
auth required pam_nologin.so
auth required pam_env.so
account sufficient pam_winbind.so
account required pam_unix2.so
account required pam_nologin.so
password sufficient pam_winbind.so use_authtok
password required pam_pwcheck.so
password required pam_unix2.so use_first_pass use_authtok
password required pam_unix2.so use_authtok
session required pam_unix2.so none # trace or debug
session required pam_mkhomedir.so skel=/etc/skel/ umask=0077
session required pam_limits.so

/etc/pam.d/login
auth required pam_securetty.so
auth required pam_env.so
auth sufficient pam_winbind.so
auth sufficient pam_unix2.so nullok use_first_pass
auth required pam_deny.so
auth required pam_nologin.so
account sufficient pam_winbind.so
account required pam_unix2.so
password sufficient pam_winbind.so
password required pam_pwcheck.so nullok
password required pam_unix2.so nullok use_first_pass use_authtok
session required pam_mkhomedir.so skel=/etc/skel/ umask=0077
session sufficient pam_limits.so

Note:
Notice the highlighted pam_mkhomedir.so line. This helps to create a home directory in Unix if one does not already exists with umask 077 so that
only the user has access to it. Also, the highlighted pam_winbind.so will allow the authentication to the AD server.

 

/etc/pam.d/sudo (sudo rpm require)
auth sufficient pam_winbind.so
auth required pam_unix2.so

F. Join Domain
Make sure Samba and Winbind are stop
#/etc/init.d/smb stop
#/etc/init.d/winbind stop

For Debugging purposes kindly Disable the nscd Caching Daemon from all runlevels and stop nscd daemon if it is running with the following commands:
#/etc/init.d/nscd stop
#chkconfig nscd off

Make sure kerberos is working properly
#kinit domainadministrator@AD.YOURDOMAIN.COM
Enter your administrator password if required

Type #net ads join -U domainadministrator
Domainadministrator’s password:
Using short domain name — AD
Joined ‘AD.YOURDOMAIN.COM’ to realm ‘AD.YOURDOMAIN.COM’

You should be connect to Microsoft AD now. Now see if you can retrieve the Domain Information with the following commands:

wbinfo -u (Lists all domain users)
wbinfo -g (Lists all domain groups)

G. Testing
Open a new Putty SSH session, login with adyourdomain\youradusename and password

Note: Please make sure your winbind(/etc/init.d/winbind start) services is running.

If you’re require sudo, type #visudo and insert:
%ADYOURDOMAIN\\adgroupnamehere ALL=(ALL) ALL
and save.

After login as normal user and type #sudo su -
You’re require to enter your password for access as root.

Congratulations! You’re done!

source: http://www.planetmy.com/blog/how-to-authenticate-to-active-directory-on-suse-linux-9/

  • Share/Bookmark

Voici les commandes de compilation optimales pour apache et PHP5

APR:

./configure –prefix=/usr/local/apr –with-devrandom=/dev/urandom

APR-UTIL:

./configure –prefix=/usr/local/apr –with-apr=/usr/local/apr
APACHE:

./configure –prefix=/usr/local/apache2_php5_ssl –disable-include –disable-asis –enable-vhost-alias –disable-negotiation –disable-actions –disable-userdir –enable-rewrite –enable-so –enable-ssl –with-mpm=prefork –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr –libdir=/usr/local/apr/lib

PHP:

‘./configure’ ‘–prefix=/usr/local/apache2_php5_ssl/php’ ‘–with-apxs2=/usr/local/apache2_php5_ssl/bin/apxs’ ‘–with-zlib’ ‘–with-mysql’ ‘–with-gd’ ‘–with-jpeg-dir’ ‘–with-openssl’ ‘–with-curl’ ‘–enable-exif’ ‘–with-mysqli=/usr/bin/mysql_config’ ‘–with-mhash’ ‘–with-imap’ ‘–enable-mbstring’ ‘–with-kerberos’ ‘–with-imap-ssl’ ‘–enable-ftp’ ‘–enable-imap’

  • Share/Bookmark