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

Rhel7.4 install oracle 11G

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

I. operating system

Red hat 7.4

Oracle database version

11.2.0.4

Corresponding file

P13390677_112040_Linux-x86-64_1of7.zip-database software

P13390677_112040_Linux-x86-64_2of7.zip-database software

IP address Planning:

DNS server:192.168.1.168

IP address: 192.168.1.212

II. Basic configuration

1. Modify the host name:

# vi / etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.1.212 testvi / etc/hostname configuration file localhost.localdomain changed to test or hostnamectl set-hostname

2. Change dynamic IP to static IP

Cd / etc/sysconfig/network-scripts/BOOTPROTO= "static" # dhcp changed to static

3. Modify the network card configuration:

# vi / etc/sysconfig/network-scripts/ifcfg-ens32TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticIPADDR=192.168.1.212NETMASK=255.255.255.0GATEWAY=192.168.1.1DNS1=192.168.1.168DEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=noIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens32UUID=8e974238-8aa9-486a-8e02-8f844afc767eDEVICE=ens32ONBOOT=yesZONE=public

If DNS is configured at the end of the network card, you can configure it in the resolv.conf file.

# vim / etc/resolv.confnameserver 218.2.2.2

Restart the network card:

Systemctl restart network.service

4. Turn off the firewall directly

Systemctl stop firewalld.service # stop firewallsystemctl disable firewalld.service # disable firewall boot

5. Close selinux

# vim / etc/sysconfig/selinux modification file SELINUX=disabled temporarily closes # setenforce 0

III. Software environment configuration

1. Necessary development tools for oracle

# yum-y install glibc\ glibc-devel\ glibc-headers\ libaio\ libaio-devel\ libgcc\ libstdc++\ libstdc++-devel\ make\ unixODBC\ unixODBC-devel\ pdksh\ compat-libcap1\ compat-libstdc++-33\ elfutils-libelf-devel\ gcc\ gcc-c++\ smartmontools\ pdksh\ compat-libstdc\ cvuqdisk

If there is not enough swap space, you can increase it with the following command:

Dd if=/dev/zero of=/test bs=1G count=4mkswap-f / testswapon / testfree-m

2. Modify core parameters of the operating system

Perform the following steps under Root user:

1) modify the user's SHELL restrictions, modify the / etc/security/limits.conf file

Enter the command: vi / etc/security/limits.conf, press I to enter edit mode, and add the following to the file.

Vi / etc/security/limits.conforacle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536

2) modify the / etc/pam.d/login file, enter the command: vi / etc/pam.d/login, press I to enter edit mode, and add the following to the file.

Vi / etc/pam.d/loginsession required pam_limits.so

3) modify the linux kernel, modify the / etc/sysctl.conf file, enter the command: vi / etc/sysctl.conf, press I to enter edit mode, and add the following to the file

# vim / etc/sysctl.conf fs.aio-max-nr = 1048576fs.file-max = 6815744 kernel.shmall = 1073741824 kernel.shmmax = 4398046511104 kernel.shmmni = 4096 kernel.sem = 25032000 100128 net.ipv4.ip_local_port_range = 900065500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586

Note: there are two parameters in the sysctl.conf file, please remember to comment them out.

# kernel.shmmax#kernel.shmall

Make sysctl effective

# sysctl-p

3. Create oracle users and groups

# groupadd oinstall / / create installation group # groupadd dba / / create administrative group # mkdir-p / opt/app#useradd-g oinstall-G dba oracle / / create a running user (here oracle uses the default home directory / home/oracle, so it does not refer to the home directory with-d) # passwd oracle / / set the password of the oracle user

Modify directory permissions:

# chown-R oracle:oinstall / opt/app#chmod 755-R / opt/app

Put the ready installation package: p13390677_112040_Linux-x86-64_1of7-data1.zip p13390677_112040_Linux-x86-64_2of7-data2.zip into the oracle user directory, make its owner and group oracle:oinstall, and unzip it

Fourth, install oracle 11.2.0.4 software

Switch to oracle user:

1) configure environment variables for oracle users

$vi .bash _ profile adds # .bash _ profile# Get the aliases and functionsif [- f ~ / .bashrc] to the end of the file; then. ~ / .bashrcfi # User specific environment and startup programsPATH=$PATH:$HOME/binexport PATH adds the following information at the end of the file: export ORACLE_SID=orclexport ORACLE_BASE=/opt/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/libexport PATH=/opt/app/oracle/product/11.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/binexport PATH=$ORACLE_HOME/bin:$PATH:/sbin/LANG=zh_CN.UTF-8 Export LANG NLS_LANG='AMERICAN_AMERICA.AL32UTF8'; export NLS_LANG#LANG=en_US.utf8; export LANG NLS_LANG='AMERICAN_AMERICA.AL32UTF8'; export NLS_LANG

2) start installation

# su-oracle$ export DISPLAY=ip:0.0 / / ip is your native ip$ xhost + $export LANG=zh_CN.UTF-8$ cd database$. / runInstaller if you need to install the interface is in Chinese: the system code is set to utf8, not the code set of oracle database, and does not need to be set to 16GBK#vi .bash _ profileLANG=zh_CN.UTF-8; export LANGNLS_LANG='SIMPLIFIED CHINESE_CHINA.AL32UTF8' Export NLS_LANG add Chinese language Pack # mkdir-p / usr/share/fonts/zh_CN/TrueType put the zysong.ttf file in the / usr/share/fonts/zh_CN/TrueType directory

Run the installation script in the unzipped database, which is the same as installing grid, start the installation wizard

It doesn't make sense for us not to fill in the mos account and not to connect to the Internet. Click next.

We only install database software here, click next

Choose the cluster installation method here, and you can choose one of the following three options:

Select to install single instance database software, and click next.

Select product language, simplified Chinese and English, and click next

Select the database version, default enterprise version, and click next.

Configure the Oracle installation directory. Due to the configuration of the environment variables before installation, the installer automatically reads the configuration and automatically selects the Oracle base directory (Oracle Base) and software location (Software Location). Click Next as shown in the figure.

As above, the product list (Oracle Inventory Directory) is also automatically selected. Click Next.

Keep the default, click Next

Installation check

Click to install after testing

Execute the following two scripts under the root user to execute the finished OK

Installation completed

V. Building a database

1) entering the command dbca will pop up the following interface

Create a library

Select general purpose or transaction

Configure the global database name and SID

Configure four built-in Super Admin passwords. A unified password is recommended for easy memory.

Memory allocation (check use automatic memory management)

Specify character set

Completion of creating database point

After a long wait, when you see this interface, you can see that the oracle database has been built.

VI. Installation of monitoring

1) enter the command netca and the following interface pops up. Create a listening service (act as an oracle server and let other oracle clients connect to this oracle server)

2) configure the local network service name (act as an oracle client and connect to another oracle server)

Complete

In this way, the installation and configuration of the oracle server is basically completed. Check that there are two files, listener.ora and tnsnames.ora, in the oracle home directory.

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: 0

*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