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

Linux system installation Oracle 11g

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Due to the needs of the project, we need to install Oracle 11g in the 64-bit linux system, looked up a lot of content on the Internet, combined with my own practical experience, finally successfully installed, recorded it, and shared it with comrades in need.

First, installation preparation

If you are using linux with a text interface, install the linux graphical interface first. Because the oracle here is installed in the graphical interface, otherwise the graphical installation will be started after recurrence.

Check whether the required dependency packages are installed

Rpm-Q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel

You can use the rpm in the CD to install. If you still lack some rpm, you can download it to http://rpmfind.net/ and install it. Pay attention to the version.

Second, modify the 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.

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

Press ESC key after editing, and type ": wq" to save and exit.

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.

123session required / lib/security/pam_limits.so

Session required pam_limits.so

Press ESC key after editing, and type ": wq" to save and exit.

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

123456789101112131415161718192021fs.file-max = 6815744 fs.aio-max-nr = 1048576 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 25032000 100128 net.ipv4.ip_local_port_range = 900065500 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576

Press ESC key after editing, and type ": wq" to save and exit.

4) for the / etc/sysctl.conf changes to take effect immediately, execute the following command. Input: sysctl-p is displayed as follows:

123456789101112131415161718192021222324252627linux sysctl-p net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.all.rp_filter = 1 fs.file-max = 6815744 fs.aio-max-nr = 1048576 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 25032000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576

5) Edit / etc/profile, enter the command: vi / etc/profile, press I to enter edit mode, and add the following to the file.

123456789101112131415if [$USER = "oracle"]; then if [$SHELL = "/ bin/ksh"]; then ulimit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 fi fi

Press ESC key after editing, and type ": wq" to save and exit.

6) create relevant users and groups as owners of software installation and support groups.

To create an Oracle user and password, enter the command:

123useradd-g oinstall-g dba-m oracle passwd oracle

Then you will be asked to enter the password, the password will be entered 2 times at will, but must be consistent, enter to confirm.

7) create a database software directory and a data file storage directory. The location of the directory is determined according to your own situation, and you can pay attention to the disk space. Here, I put it under the oracle user, for example:

Enter the command:

1234567mkdir / home/oracle/app mkdir / home/oracle/app/oracle mkdir / home/oracle/app/oradata mkdir / home/oracle/app/oracle/product

8) change the directory owner to Oracle user, and enter the command:

1chown-R oracle:oinstall / home/oracle/app

9) configure the environment variables for the oracle user. First, switch to the newly created oracle user.

Enter: su oracle, then directly in the input: vi .bash _ profile

Press I to edit .bash _ profile, enter edit mode, and add the following:

123456789export ORACLE_BASE=/home/oracle/app export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

Press ESC key after editing, and type ": wq" to save and exit.

III. Installation process

1) when all the operations of the above system are completed, log out of the system and log in as an Oracle user in the graphical interface. First copy the downloaded Oracle installation package into linux and copy it with SSH's other ftp tools.

Open a terminal and run the unzip command to extract the oracle installation file, such as:

Enter the command:

123unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip

After decompression, cd enters its decompressed directory database.

Enter the command:

Cd database

Use the ls command to view the files contained in the decompressed database, as shown below:

2) to perform the installation, enter the command:. / runInstaller

Description: if there is no graphical interface, an error will be reported here.

After the installation is complete, you will be prompted to execute 2 shell scripts with root permissions. Follow the prompted path to find its location, such as: mine is on / home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh

Open a new terminal with / home/oracle/oraInventory/orainstRoot.sh and enter the command:

123456789su root cd / home/oracle/app/oracle/product/11.2.0/dbhome_1 sh root.sh cd / home/oracle/oraInventory sh orainstRoot.sh

IV. Building a database

1) still in the graphical interface of oracle users, oracle users, open a new terminal, directly enter the command dbca will pop up the following interface. We use a custom database here.

After a long wait, when you see this interface, it shows that the construction of the oracle library is complete.

At this point, oracle can log in locally through sqlplus. To log in remotely, the following configuration is required

4. Configure monitoring and local network services

1) in the graphical interface of oracle users, oracle users, open a new terminal, enter the command netca will pop up the following interface.

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