自制冰棍的做法给宝宝:linux 下安装 oracle

来源:百度文库 编辑:九乡新闻网 时间:2024/04/28 15:22:27
p { margin-bottom: 0.21cm; }h1 { margin-bottom: 0.21cm; }h1.western { font-family: "Liberation Serif",serif; }h1.cjk { font-family: "DejaVu Sans"; font-size: 24pt; font-style: normal; font-weight: bold; }h1.ctl { font-family: "Lohit Hindi"; font-size: 24pt; font-weight: bold; }h2 { margin-bottom: 0.21cm; }h2.western { font-family: "Liberation Serif",serif; }h2.cjk { font-family: "DejaVu Sans"; font-style: normal; }h2.ctl { font-family: "Lohit Hindi"; }pre { font-family: "DejaVu Sans Mono",monospace; }a:link { }

Oracle Database11g Release 2 (11.2) Installation On Fedora

  • Download Software

  • Unpack Files

  • Hosts File

  • Set Kernel Parameters

  • Setup

  • Installation

  • Post Installation

DownloadSoftware

Download the followingsoftware:

  • Oracle Database 11g Release 2 (11.2) Software

UnpackFiles

Unzip the files:

unzip linux_11gR2_database_1of2.zipunzip linux_11gR2_database_2of2.zip

Youshould now have a single directory called "database"containing installation files.

Hosts File

The /etc/hosts file mustcontain a fully qualified name for the server:

    

$sudogedit /etc/hosts



Set KernelParameters

Oracle recommend the followingminimum parameter settings:

fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586

The current values can be testedusing the following command:

/sbin/sysctl -a | grep 

Add or amend the following linesin the "/etc/sysctl.conf" file.

fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048586

Run the following command tochange the current kernel parameters:

/sbin/sysctl -p

Add the following lines to the/etc/security/limits.conf file:

oracle              soft    nproc   2047oracle              hard    nproc   16384oracle              soft    nofile  1024oracle              hard    nofile  65536

Add the following line to the/etc/pam.d/login file, if it does not already exist:

session    required     pam_limits.so

Start the Firewall administrationdialog (System > Administration > Firewall). Click the"Disable" button followed by the apply button on thetoolbar, then close the dialog.

Disable secure linux byediting the /etc/selinux/config file, making sure the SELINUX flag isset as follows:

SELINUX=disabled

Alternatively, this alterationcan be done using the GUI tool (Applications > System Settings >Security Level). Click on the SELinux tab and disable the feature. IfSELinux is disabled after installation, the server will need a rebootfor the change to take effect.

Setup

If you have installed thesuggested package groups during the installation, the majority of thenecessary packages will already be installed. Install the followingpackages.

yum install binutilsyum install libaio libaio-develyum install kshyum install sysstatyum install unixODBC unixODBC-develyum install compat-libstdc++-33you can also type this command:sudo yum install binutils libaio libaio-devel ksh sysstat  unixODBC unixODBC-devel compat-libstdc++-33

Notice we have no explicitlyinstalled any 32-bit packages. The installer prerequisite checks willfail because of this, but they can be ignored and the installationwill proceed normally



Createthe new groups and users:

sudo groupadd oinstallsudo groupadd dbasudo groupadd opersudo groupadd asmadminsudo useradd -g oinstall -G dba,oper,asmadmin oraclesudo passwd oraclepass:orcl#0909*

Note. We are not going to use th"asmadmin" group, since this installation will not useASM.

Create the directories in which the Oracle software willbe installed:

sudo mkdir -p /oracle11G/app/oracle/product/11.2.0/db_1sudo chown -R oracle:oinstall /oracle11Gsudo chmod -R 775 /oracle11G

Login as root and issue thefollowing command:

xhost +sudo xhost +localhost#xhost +crazywing crazywing being added to access control list 

Edit the /etc/redhat-release filereplacing the current release information (Fedora release 12(Constantine)) with the following:

redhat release 5

Login as the oracle user and addthe following lines at the end of the .bash_profile file:

# Oracle SettingsTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_HOSTNAME=f1264.localdomain; export ORACLE_HOSTNAMEORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOMEORACLE_SID=orcl; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHif [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi

Installation

Log into the oracle user. Ifyou are using X emulation then set the DISPLAY environmentalvariable:

DISPLAY=:0.0; export DISPLAYexport DISPLAY=carzywing:0.0

Start the Oracle UniversalInstaller (OUI) by issuing the following command in the databasedirectory:

./runInstaller无法使用命令 /usr/bin/xdpyinfo 自动检查显示器颜色。请检查是否设置了 DISPLAY 变量。[root@localhost ~]# xhost local:oracle//若出现安装界面有方框#export LANG=enor     每次安装之前运行   
  unset   LANG  
  unset   LC_ALL  
  unset   LC_MESSAGE  
  然后  
  ./runInstaller

Proceed with the installation ofyour choice. You can see the installation I performed by clicking onthe links below to see screen shots of each stage. Note. Theprerequisites checks will show a number of packages missing, butthese can be ignored.

  1. Configure Security Updates

  2. Select Install Option

  3. System Class

  4. Node Selection

  5. Select Install Type

  6. Typical Install Configuration

    orcl#0909

  7. Create Inventory

  8. Perform Prerequisite Checks

  9. Summary

  10. Install Product

  11. Database Configuration Assistant

  12. Database Configuration Assistant 2

  13. Execute Configuration Scripts

  14. Finish



PostInstallation

Edit the /etc/redhat-releasefile restoring the original release information:

Fedora release 12 (Constantine)

Edit the /etc/oratab file settingthe restart flag for each instance to 'Y':

DB11G:/u01/app/oracle/product/11.2.0/db_1:Y