Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 install oracle11g

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Centos7 install Oracle11g

Catalogue

I. Preface. .. 3

1.1 the purpose of writing. .. 3

1.2 introduction of related tools. .. three

1.3 system configuration requirements. .. 3

II. Operating system (LINUX) installation. . 5

2.1operating system (LINUX) installation and deployment. . 5

2.2 Database (ORACLE) installation and deployment. . 5

3. Oracle graphical interface options. . 10

I. Preface

1.1 purpose of writing

Install and deploy oracle11g database

1.2 introduction to related tools

SSH connection tool:

1.3 system configuration requirements

-- Server--

(64-bit operating system): Windows Server, Linux, SUN Solaris, IBM AIX

Database: Oracle 9i/10g/11g

Minimum configuration: Xeon dual-core CPU 2.2GHz more than 8G memory 500g hard disk

Recommended configuration: Xeon quad-core CPU*2 3.1GHz with more than 16G memory 1T hard disk

-- client-

Operating system: Windows

Browsers: IE8/9/10/11, Chrome, Safari

Note: the operating system should be guaranteed to be a simplified Chinese operating system, and if it is a non-simplified Chinese operating system under special circumstances, it should also be installed with a simplified Chinese language pack. 5 / 87

II. Operating system (LINUX) installation

2.1 operating system (LINUX) installation and deployment

The installation process is no longer described. Please check whether the current system uses the zh_CN.gbk character set before installation.

Install the necessary components

Yum-y install binutils- compat-libstdc elfutils-libelf elfutils-libelf-devel gcc- glibc glibc-common glibc-devel glibc-headers ksh libaio- libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC

2.2 Database (ORACLE) installation and deployment

Upload the ORACLE program files to the / root directory through the ssh tool.

Install the ORACLE software, create users and groups, and set password information:

/ usr/sbin/groupadd oinstall

/ usr/sbin/groupadd dba

/ usr/sbin/useradd-g oinstall-G dba oracle

Passwd oracle

Modify system parameters: edit / etc/sysctl.conf

In order to modify the system parameters, you need to add the following (note that the original two parameters need to be shielded):

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmall = 209715210 / 87

Kernel.shmmax = 536870912

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 9000 65500

Net.core.rmem_default = 262144

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048576

After modifying the system parameters, this interface needs to take effect: / sbin/sysctl-p

This interface modifies the system limit parameter editing / etc/security/limits.conf: vi / etc/security/limits.conf11 / 87

This interface adds a parameter interface for the system limit parameters. Add as follows:

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Oracle soft stack 10240

This interface creates the installation directory of the ORACLE software, gives the directory permission, and cuts to the oracle user. The relevant commands are:

Mkdir-p / u01/app/oracle/product/11.2.0/db_1

Chown-R oracle:oinstall / U01

Chmod-R 775 / U01

Su-oracle12 / 87

This interface is the environment variable file for configuring oracle users. The command is vi .bash _ profile

This interface is used to configure the environment variable file that adds oracle. Add the following information (SID,DBNAME equivalent can be adjusted according to the customer's actual situation, and the software directory of ORACLE needs to be consistent with the directory created above. )

Add parameters as follows:

Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_UNQNAME=ecology; export ORACLE_UNQNAME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_SID=ecology; export ORACLE_SID

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH13 / 87

Through the SSH tool, upload the installer for oracle to the root directory.

This interface is in SSH command line mode.

Step 1: copy the installer to the / U01 directory (/ U01 directory is the oracle installation directory created above).

Step 2: empower the installation file, give oracle users, oinstall groups.

Chown oracle:oinstall p10404530_112030Linux-x86-64

Chmod 777 p10404530_112030Linux-x86-64

Step 3: cut to the oracle user and go to the / U01 directory

Su-oracle

Cd / u01

Step 4: extract the installer file (extract the first file).

Unzip p10404530_112030_Linux-x86-64_1of7.zip14 / 87

This interface decompresses the first installation file and the second installation file. The command is:

Unzip p10404530_112030_Linux-x86-64_2of7.zip

Third, Oracle graphical interface options

1. = + + Configure Security Updates++==

Remove I wish to receive security updates via My Oracle Support.

Click "Next >"

2. = + + Installation Option++==

Select the first Create and configure a database

Click "Next >"

3. = + + System class++==

Select Server class

Click "Next >"

4. = + + Grid Options++==

Select singleton mode Single instance database installation

Click "Next >"

5. = + + Install Type++==

Select "Advanced Install"

Click "Next >"

6. = + + Product Languages++==

Select English English (selected according to the default of the system)

Click "Next >"

8. = = + + Database Edition++==

Select the first Enterprise Edition

9. = + + Installation Location++==

Determine the installation path of the data software and automatically read the values configured in the previous Oracle environment variables

Click "Next >"

After that, you also choose the default, do not modify it, just click "Next >"

10. = + + Configuration Options++==

"Character Sets" Select "Unicode standard UTF-8..." in the second or third item

"Sample Schemas" check "Create database with..."

Click "Next >"

After that, you also choose the default, do not modify it, just click "Next >"

11. = + + Schema Passwords++==

Select the second item and set the password

Click "Next >"

After that, you also choose the default, do not modify it, just click "Next >"

12. = + + Prepequisite Checks++==

Follow the prompts to solve them one by one.

Note:

The missing semmni under OS Kernel Parameter is not detected by Oracle. In fact, the missing dependent package is selected. If there is a mark (i386) or (i686) in parentheses in the Expected value in the details column below, it indicates that the 32-bit dependent package is missing, but the 64-bit dependent package is actually installed. Ignore them. The pdksh package has been installed, that is, the previously installed ksh dependent package.

If there are prompts for other missing dependent packages that have not been installed, install them, follow the prompts to solve the missing dependent packages, then click "Check Again", check again, there is no problem, check ignore all, click "Next"

13. = + + Summary++==

Click "Finsh"

14, = = + + Install Product++==

In this process, the installation interface will turn black, a long bar will appear (actually a prompt box), adjust the height and width to view

Two errors occur when connecting to the library during installation:

1) ins_ctx.mk compilation error

There are the following errors in viewing the log:

INFO: / lib64/libstdc++.so.5: undefined reference to `memcpy@GLIBC_2.14'

INFO: collect2: error: ld returned 1 exit status

INFO: make: * * [ctxhx] Error 1

It is said on the Internet that the version 2.17 of glibc is too high (higher than 2.14), the solution:

Enter administrator privileges to install glibc-static

1 [oracle@localhost ~] # su-root

2 password

3 [root@localhost] # yum-y install glibc-static

The package contains a static link library at / usr/lib64/libc.a

Modify / data/oracle/product/11.2.0/db_1/ctx/lib/ins_ctx.mk to set the

Ctxhx: $(CTXHXOBJ)

$(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)

Modified to:

Ctxhx: $(CTXHXOBJ)

-static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) / usr/lib64/libc.a

Click Retry to continue with the installation.

2) "Error in invoking target 'agent nmhs' of makefile' / data/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk.'

Solution: add parameters to the linked libnnz11 library in makefile

Modify / data/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk to set the

Change $(MK_EMAGENT_NMECTL) to: $(MK_EMAGENT_NMECTL)-lnnz11

Click Retry to continue with the installation.

Sometimes the gray vertical bar that appears in the installation interface cannot be opened, so you can rerun. / runInstaller, after repeating the above steps, step 11 will directly modify the two mk files according to the solutions to the above two problems, and you will not report an error when you modify the installation. The mk file is a makefile file, which starts with the tab key, so copying the above modification statement directly will report an error.

The space in front of static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) / usr/lib64/libc.an is changed to the tab key, otherwise an error will be reported.

3) it will take a long time to install Database Configuration Assistant. When the installation is complete, a dialog box will pop up, click "Password management...", and the vertical bar will be pulled into a dialog box to set passwords for SYS, System, Scoot and SH. Their default passwords are SYS:change_on_install, System:manager, Scoot:tiger and SH:sh, respectively, and enter them into the corresponding password input box before Scoot and SH set the password. Click on the check mark to set the password for them.

4) finally, when the progress is at 100%, a vertical bar will appear. Pull it apart, follow the prompts inside, enter the prompted address with root permission, and run the two sh files prompted above. The second sh file requires you to choose the address and enter directly.

This completes the installation.

Two minor problems after installation

Cursor Arrow cannot be used in sqlplus under 1.Linux

Solution: install the rlwrappackage

1) download the rlwrap package (I downloaded rlwrap-0.37.tar.gz)

2) yum install readline

[root@localhost oracle] # yum-y install readline

3) decompress, install

[root@localhost oracle] # tar-xzvf rlwrap-0.37.tar.gz

[root@localhost oracle] # cd rlwrap-0.37.tar.gz

[root@localhost oracle] #. / configure

[root@localhost oracle] # make

[root@localhost oracle] # make install

4) switch to the oracle user and edit the bash_profile file

[oracle@localhost ~] vi .bash _ profile

Add at the end

Alias sqlplus='rlwrap sqlplus'

Alias rman='rlwrap rman'

Save the exit and execute source .bash _ profile to make it effective.

Or do not modify the bash_profile file directly, just add rlwrap before entering the sqlplus command (I modified the bash_profile file, restart the system or re-enter the source command to make it effective, I then directly add rlwrap in front of the sqlplus command).

In this way, you can use the keys above and below to view the history in sqlplus.

2.vim Chinese garbled code

Set the .vimrc file under ~ or oracle, plus fileencodings, enc, fencs, the code is as follows:

Vim ~ / .vimrc # or vim / home/oracle (user name) / .vimrc

# add the following code

Set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1

Set enc=utf8

Set fencs=utf8,gbk,gb2312,gb18030

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 253

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report