It is undeniable that FreeBSD is one of the best operating systems, but the lack of support for large commercial databases has hindered FreeBSD's entry into high-end and enterprise applications. Oracle, as the database's leading geese, if we can build a house on FreeBSD, this is an encouragement from FreeBSD fans. After two days of efforts and referring to a Russian website's introduction to installing Oracle8i on freebsd5.2, Oracle9i was successfully installed on freebsd5.2. The Installation notes are as follows.
1. Kernel configuration
# Add for Oracle
Option nbuf = 2048
Options maxdsiz = "(1024ul * 1024*1024 )"
Options maxssiz = "(1024ul * 1024*1024 )"
Options dfldsiz = "(1024ul * 1024*1024 )"
#
Options sysvshm
Options shmmaxpgs = 65536
Options shmmin = 2
Options shmmni = 256
Options shmseg = 256
#
Options sysvsem
Options semmaps = 512
Options semmni = 512
Options semume = 512
Options semmns = 1024
Options semmnu = 512
Options semmmsl = 256
Options semopm = 256
#
Options sysvmsg # sysv-stylmessage queues
Options Ms. gmnb = 8192
Options msgmni = 256
Options msgseg = 8192
Options msgssz = 16
Options Ms. gtql = 128
# Add end
In addition, set maxusers to 512. I chose the ule scheduler when customizing the kernel. Now the ule is the default scheduler.
2. System Configuration
1 swap partition size is 1 GB, ram256m, ORACLE_HOME requires more than 5 GB space.
2. Install the Linux Simulation Environment.
The linux_base-7.1 and linux_devtools-7.1 must be installed on both pkgs, but I found that devtools-7.1 cannot be installed from ports at installation, so I was forced to transfer the entire rh7.3 system CP to FreeBSD based on the introduction of two ports from a machine with rh7.3 installed. If necessary, can I add this directory? Create a tar package in the tree to provide and bits. No matter how you build the/compat/Linux directory tree, you must ensure that? The Zookeeper environment contains AR, As, LD, nm, TR, CPP, chmod, G ++, printf, find, chgrp, chown, and other programs.
3. Adjust the Linux Simulation Environment
A creates a mtab-to-/etc/fstab link in/compat/Linux/etc.
Ln-S/etc/fstab/compat/Linux/etc/mtab
B creates the awk, sed, and chown links in/compat/Linux/bin.
Ln-S/compat/Linux/usr/bin/awk/compat/Linux/bin/awk
Ln-S/compat/Linux/usr/bin/SED/compat/Linux/bin/SED
Ln-S/usr/sbin/chown/compat/Linux/bin/chown
The above configuration is to meet the requirements of some scripts during Oracle9i installation. What I know is to run root. sh uses the above configuration, but you can also modify this script before running. What is the post ??, I wonder if this is the cause of the following error.
C. Create an arch executable file in/compat/Linux/bin.
Content:
#! /Compat/Linux/bin/bash
Echo i686 # based on whether your machine is i586 or i86
Mark the executable:
Chmod + x Arch
4. Open the Linux Simulation support and modify the RC. conf file. You can also use the kldload LINUX module.
Enable_linux = "yes"
5 Mount Linux proc file system
Mkdir/compat/Linux/proc
Mount-T linproc/dev/device/compat/Linux/proc
Step 2: add the/etc/fstab file and automatically intercept the file at startup.
6. Add Oracle user groups and users
PW groupadd-n dba-G 94
PW groupadd-N oinstall-G 95
PW useradd-N Oracle-u 94-c "Oracle daemon"-D/home/Oracle-S
/Compat/Linux/bin/bash-g dba-G oinstall, wheel
7. Configure the Oracle user environment
Mkdir/home/Oracle
Chown ORACLE: DBA/home/Oracle
CD/home/Oracle
Edit. profile to configure the Oracle user environment:
Path =/compat/Linux/bin:/compat/Linux/sbin: compat/Linux/usr/bin:/compat/Linux/usr/sbin: /home/Oracle/920/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin: /usr/x11r6/bin; export path
Oracle_base =/home/Oracle; export oracle_base
# The following is the directory for installing oracle.
ORACLE_HOME =/home/Oracle/920; export ORACLE_HOME
LD_LIBRARY_PATH = $ ORACLE_HOME/lib: $ LD_LIBRARY_PATH; export LD_LIBRARY_PATH
Oracle_sid = orcl; export oracle_sid
Ora_nls33 = $ ORACLE_HOME/ocommon/NLS/admin/data; export ora_nls33
Export display =: 0
3. Installation preparation
Download the three files of Oracle9i (9.2.0) for Linux and decompress them in a sufficient size (> 2 GB) to obtain three directories: disk1, disk2, and disk3.
4. Installation
1. Log On As an oracle user
2 go to X
Startx
3. Open a terminal window in X and run the installer in the window.
CD/path/disk1
./Runinstaller
The installation program starts to run. After the interface appears, select the installation as prompted.
In Windows, the default temporary files are in the/tmp directory. You can view the installation directory and some temporary files of Oracle9i in/tmp.
4. manual intervention required during installation
A will prompt you to run a script at the beginning of installation. In this case, you can create an orainst name in/compat/Linux/etc as the root in another terminal window. loc file and set the owner to Oracle
CD/compat/Linux/etc
Touch orainst. Loc
Chown ORACLE: DBA orainst. Loc
Then run the script as Oracle and continue the installation.
B. After the installation is complete, an error occurs during database connection (related to ins_ctx.mk). Ignore the error and the basic functions of the database are not introduced, however, an error occurs during agent configuration, and other tasks are normal. I don't know if this error is reported every time I install it, or why.
C. run $ ORACLE_HOME/root as root before database configuration. sh, observe its output at this time, and there is no error. If there is any program that cannot be found, you can modify this script to specify the correct path of the program prompted.
5. Configure the database as needed after installation, which is the same as that in windows.
5. Start the database after installation
1. restart the system.
2. Log On As an oracle user
3. Start the database
When you start the database for the first time, you must first set initorcl. ora file (in the pfile directory where the global data name you specified is located) is copied to the $ ORACLE_HOME/DBS directory, and orapw is stored in the DBS directory. copy a file named orapw, and then you can start the database normally.
Summary
From the usage perspective, using sqlplus directly on the machine does not feel any difference, and the efficiency has not yet been tested. Please criticize the shortcomings and ask the experts to correct the installation errors.
Thank you.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service