Linux Silent installation Oracle

Source: Internet
Author: User
Tags gz file sqlplus

Linux on the Web server generally does not have a graphical interface, all the way to install Linux through the graphical interface on Linux without a GUI is not feasible, we want to use the installation method called Linux silent installation . It is installed on Linux without a graphical interface.

1.

Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

To download the. tar.gz file, Oracle has a number of bits on the window, but there is no point on Linux, just download the x-86-64 version.

The tar.gz extension is a compressed file that is common to Linux and OSX, and both Linux and OSX can be extracted directly using this compressed file.

Note : The root user cannot use the installation, the root user cannot install it, and the root user is required to create a new user to install Oracle.

2. Hardware detection: physical memory of not less than 1G hard disk can space not less than 5Gswap partition space not less than 2G support 256 color graphics card CPU frequency is not smaller than 550mHZ
cat/etc/-/proc//proc/"model name" /proc/  Cpuinfo (CPU Information) free (available memory)

3. Check the installation of a specific package dependent on the operating System package, please refer to the official installation documentation.
binutils-2.17.50.0.6Compat-libstdc++- --3.2.3Compat-libstdc++- --3.2.3( +bit) Elfutils-libelf-0.125elfutils-libelf-devel-0.125GCC-4.1.2GCC-c++-4.1.2glibc-2.5- -glibc-2.5- -( +bit) glibc-common-2.5glibc-devel-2.5glibc-devel-2.5( +bit) glibc-headers-2.5Ksh-20060214Libaio-0.3.106Libaio-0.3.106( +bit) Libaio-devel-0.3.106Libaio-devel-0.3.106( +bit) LIBGCC-4.1.2LIBGCC-4.1.2( +bit) Libstdc++-4.1.2LIBSTDC++-4.1.2( +bit) Libstdc++-devel4.1.2 Make-3.81Sysstat-7.0.2UnixODBC-2.2. One( +-bit) or LATERUNIXODBC-devel-2.2. One( --bit) or LATERUNIXODBC-2.2. One( --bit) or later

Check for dependent packages

Rpm-q binutils compat-libstdc++- elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc-2.5 Glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make Sysstat UnixODBC Unix Odbc-devel

If the package has an installed (not installed), install it with the Yum Install command, such as:
Yum Install compat-libstdc++-

4. Create the required operating system groups and users

    groupadd oinstall    groupadd dba    -G oinstall-g dba Oracle

Set the Oracle user password

passwd Oracle

5. Modify kernel parameters in the/sbin/sysctl.conf file, use a text editor or VI command to add or modify the following parameters (vi/sbin/sysctl.conf)
FS.AIO-MAX-NR =1048576Fs.file-max =6815744Kernel.shmall=2097152Kernel.shmmax=536870912Kernel.shmmni=4096Kernel.sem= - 32000  -  -Net.ipv4.ip_local_port_range=9000 65500Net.core.rmem_default=262144Net.core.rmem_max=4194304Net.core.wmem_default=262144Net.core.wmem_max=1048576

After modification, make the settings effective

/sbin/sysctl-p

6. Modify user restrictions in the/etc/security/limits.conf file, use a text editor or VI command

Add the following parameters
204716384 1024x768 65536 10240

In the/etc/pam.d/login file, use the text editor or the VI command to add or modify the following

Session required/lib/security/pam_limits.sosession required pam_limits.so

In the/etc/profile file, use the text editor or the VI command to add or modify the following

if " Oracle "  ]; thenif"/bin/ksh"16384 65536 Else  1638465536Fifi

  

Make settings effective

Source/etc/profile

7. Create the installation directory (depending on the situation, select a more spatial directory creation)
Mkdir-p/usr/-Roracle:oinstall/usr/775 /usr/oracle

8. Create a/etc/orainst.loc file with the following content

nventory_loc=/usr/oracle/orainventoryinst_group=oinstall

Change permissions for a file

Chown oracle:oinstall/etc/664 /etc/orainst.loc

9. Setting Oracle Environment variables

Su-oracle    // Switch User to Oracle  ~/.bash_profile  // access or create home/ . bash_profile files under the Oracle directory

At the end, add the following:

Export oracle_base=/usr/oracleexport oracle_sid=ORCL

Note that in addition to Oracle_base and Oracle_sid, (/etc/profile and. Bash_profile) do not set any ORACLE-related environment variables (oracle_home, PATH, Ld_ Library_path, etc.). Other environment variables will be configured after the installation is complete.

Make settings effective

Source/home/oracle/.bash_profile

Check environment variables:

Env

At the same time, when using the silent installation will check the display settings, if often said check display does not work, to the root user under the "Xhost + your ip:0.0"

10. Extracting the Oracle installation files

11. Copy the response file template

/home/oracle/database/response/*  /home/oracle/etc/

Set Response file Permissions

Su- /home/oracle/etc/*. RSP (note owner, Oinstall)

12. Silent installation of Oracle software

Switch users

Su-oracle

Modify the response file that installs the Oracle software/HOME/ORACLE/ETC/DB_INSTALL.RSP
Vi/home/oracle/etc/db_install.rsp

Add a bit of content

Oracle.install.option=install_db_swonly//Installation TypeOracle_hostname=db//host name (hostname query)Unix_group_name=oinstall//Installation GroupInventory_location=/usr/oracle/orainventory//Inventory directory (default value is not required)Selected_languages=en,zh_cn,zh_tw//Select languageoracle_home=/usr/oracle/product/11.2.0/db_1//Oracle_homeOracle_base=/usr/oracle//Oracle_baseOracle.install.db.installedition=ee//Oracle VersionOracle.install.db.iscustominstall=false //Custom installation, no, using the default componentsOracle.install.db.dba_group=dba//DBA User GroupOracle.install.db.oper_group=oinstall//Oper user groupOracle.install.db.config.starterdb.type=general_purpose//Database TypeOracle.install.db.config.starterdb.globaldbname=orcl//GlobaldbnameOracle.install.db.config.starterdb.sid=orcl//SIDoracle.install.db.config.starterdb.memorylimit=81920 //Memory for automatic memory management (M)Oracle.install.db.config.starterdb.password.all=oracle//set all database users to use the same passwordsecurity_updates_via_myoraclesupport=false(Manual write false) Decline_security_updates=true //Set up security update (seems to have a bug, this must choose True, otherwise there will be unlimited reminder email address problems, terminate the installation. PS: No matter the address is right)

The other variables are not configured or default.

Start a silent installation

CD database. /runinstaller-silent-responsefile/home/oracle/etc/db_install.rsp

installation, if prompted [WARNING] to ignore, at this point the installation program is still in progress, if [FATAL], the setup has stopped.

View installation log information for installation progress
CD $ORACLE _base/orainventory/-F Installactions*.log

 

An indication similar to the following appears Installation Complete: #-------------------------------------------------------------------/usr/oracle/orainventory/orainstroot.sh/ Usr/oracle/product/11.2.0/db_1/root.shto execute the configuration scripts:1. Open a terminal window 2. Log in as "root" 3. Run the Scripts 4. Return to this window and hit "Enter" key to continue successfully Setup software.#--------------------------------------- ----------------------------

Execute script with root user

Here are two scripts to execute, just run for a minute.

Su- root  /usr/oracle/product/11.2.  0/db_1/root.sh/usr/oracle/orainventory/orainstroot.sh

Adding Oracle Environment variables

Su-~/.bash_profile

At the end, add the following:

Export Oracle_home= $ORACLE _base/product/11.2.0/Db_1export tns_admin= $ORACLE _home/network/Adminexport PATH=.:${path}: $HOME/bin: $ORACLE _home/Binexport PATH=${path}:/usr/bin:/bin:/usr/bin/x11:/usr/local/Binexport Ld_library_path=${ld_library_path}: $ORACLE _home/Libexport Ld_library_path=${ld_library_path}: $ORACLE _home/oracm/Libexport Ld_library_path=${ld_library_path}:/lib:/usr/lib:/usr/local/Libexport CLASSPATH=${classpath}: $ORACLE _home/Jreexport CLASSPATH=${classpath}: $ORACLE _home/jre/Libexport CLASSPATH=${classpath}: $ORACLE _home/Jlibexport CLASSPATH=${classpath}: $ORACLE _home/rdbms/Jlibexport CLASSPATH=${classpath}: $ORACLE _home/network/Jlibexport LIBPATH=${classpath}: $ORACLE _home/lib: $ORACLE _home/ctx/Libexport Oracle_owner=Oracleexport Spfile_path= $ORACLE _home/Dbsexport Ora_nls10= $ORACLE _home/nls/data

Make settings effective

Source/home/oracle/.bash_profile

Here, oracle11g's database instance is installed.

You can use the Sqlplus login database to see if the database is installed successfully!

Sqlplus username/password as   sysdba

Thanks: Thank you for your patience and reading!

Linux Silent installation Oracle

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.