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

How to install oracle11g in Redhat6.5

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

Share

Shulou(Shulou.com)05/31 Report--

How to install oracle11g in Redhat6.5? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

I. installation environment

Linux server: Redhat 6.564 bit

Oracle version: oracle11gR2

Remote windows server: Xmanager installed

Memory: 8GB

Storage space: 1T

2. System setup before installation

1. Soft link lib library: ln-s / lib/libc.so.6 / lib/libc.so.5

2. Modify the lib library search path vim / etc/ld.so.conf

The following content include ld.so.conf.d/*.conf is changed to:

Include ld.so.conf.d/*.conf / usr/X11R6/lib/

3. Modify the host name

Vim / etc/hosts

Add 192.200.239.40 ccod

Add this line above the line 127.0.0.1, and then

Vim / etc/sysconfig/networkHOSTNAME= ccod

This is the only way to completely change the hostname, and then

/ etc/init.d/network restart or service network restart

Finally, hostname to see if the name has been changed. If you want a virtual machine, you need to reboot it.

4. Set kernel parameters to ensure that the installation check can pass

Vim / etc/sysctl.conf

Add the following information:

Kernel.shmall = 4194304

Kernel.shmmax = 4147483648

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Fs.file-max = 6815744

Net.ipv4.ip_local_port_range = 9000 65500

Net.core.rmem_default = 1048576

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048576

After that, you need / sbin/sysctl-p "for the kernel to take effect immediately.

5. Adjust the environmental restrictions of oracle users

Vim / etc/security/limits.conf

Add on the upper line of # End of file

* 2047 soft nproc

* 16384 hard nproc

* 1024 soft nofile

* 65536 hard nofile

Where nofile is the maximum number of file descriptors that can be opened by Oracle users, and nproc is the maximum number of processes available to a single user.

Modify login configuration file, edit

Vim / etc/pam.d/login

Add under the bottom line of the file

* session required / lib/security/pam_limits.so

* session required pam_limits.so

The content added above is to enhance the privileges of Oracle users, where pam_limits.so controls the resources allocated to users, and different modules control different ranges of resources.

Modify system environment variabl

Vim / etc/profileunset iunset pathmunge

Add the following to these two lines:

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

We edit the user environment configuration file to set relevant restrictions for Oracle users (since the permissions of Oracle have been enhanced, so some restrictions need to be made here to ensure system security), where the ulimit-p option sets the size of the pipeline buffer in Kbytes; the ulimit-n option sets the maximum number of file descriptors that can be opened; and the ulimit-u option sets the maximum number of processes available to the user.

Check whether the / tmp folder has 400m of free space

Df / tmp

6. Setting of Selinux and protective wall

Turn off the firewall: service iptables stop

Vi / etc/selinux/config change SELINUX=enforcing to SELINUX=disabled

Restart takes effect

III. Configuration of users, user groups and environment variables in the installation directory

ROOT user, create oracle user:

Groupadd oinstall creates a primary group

Groupadd dba creates a secondary group

Useradd-g oinstall-G dba oracle creates oracle users and assigns oinstall as primary group dba as secondary group

# usermod-g oinstall-G dba oracle (oracle users already exist, which are assigned to oinstall as primary group and dba as secondary group)

Passwd oracle modify password oracle modify permission

Chown-R oracle:oinstall / home/oracle

Chmod-R 755 / home/oracle

Chown-R oracle:oinstall / oradata

Chmod-R 755 / oradata

Because 1T of space is mounted under /, so all installation directories are under / oradata

Create an installation folder:

Mkdir-p / oradata/app/oracle/oradata chown-R oracle:oinstall/oradata/app/oracle/ oradatachmod-R 755 / oradata/app/oracle/oradatamkdir / oradata/app/oraInventorychown-R oracle:oinstall/oradata/app/or aInventorychmod-R / oradata/app/oraInventorymkdir-p / oradata/app/oracle/product/11.2.0/dbhome_1 chown-R oracle:oinstall/oradata/app/oracle/product/11.2.0/dbhome_1

Set environment variabl

Edit the vim .bash _ profile file, add

Umask 022export PATHexport ORACLE_BASE=/oradata/app/oracleexport ORACLE_SID=ccodexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/libexport LC_CTYPE=en_US.UTF-8export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

Where ORACLE_BASE is the root directory of Oracle, ORACLE_HOME is the directory of Oracle products, ORACLE_SID is the name of Oracle instance, PATH and LD_LIBRARY_PATH are the startup path and dictionary library path, respectively. Execute the following command to make the environment variable take effect

$source .bash _ profile

IV. Perform installation

Put the prepared linux.x64_11gR2_database_1of2.zip and linux.x64_11gR2_database_2of2.zip under / oradata/app and decompress unzip to get the directory of database.

Then go to your windows and start X-manager.

To prevent garbled code during installation, you can set the environment variable of this shell.

$export LANG=en_US

Enter "export DISPLAY= your windows local IP:0.0" under the oracle user

Then type xhost, and then the script to start the installation will automatically install on the windows graphical interface; 1. Start Xmanager-Passive

2. $export DISPLAY=172.16.0.155:0.0

3. $xhost

4. $. / runInstaller is followed by a graphical interface

Keep the default installation for most of the installation. Click next, the database instance and the global database had better be set to the same. After the installation is completed, two scripts executed by root users will be executed by themselves as prompted:

Test whether it can be connected after the installation:

After entering the password, sqlplus sys as sysdba can enter the database:

The last thing to say is that there will be an environment check in the database before installation, which requires a lot of packages. This time, all the packages have been packaged and see the attachment; rpm-ivh XXX.rpm-nodeps

There is a higher version of rpm-ivh XXX.rpm-force or rpm-ivh XXX.rpm-nodeps

-- force forced installation

FAQ: listening cannot start or fails

/ etc/resolve.conf

Note nameserver when there is a network card and DNS configuration, the database cannot connect to the DNS, resulting in a monitoring error. Cancel the DNS, restart the network card, and monitor normally.

Configure ntp Services section:

The main task is to configure the service of the master server. For other client, you only need to enable the ntp service and then synchronize with the ntpdate command:

[root@localhost ~] # cat / etc/ntp.conf | awk'{if ($0! ~ / ^ $/ & & $0! ~ / ^ # /) {print $0}} 'restrict default ignore / / is not allowed to modify or query ntp by default And do not receive the special packet restrict 127.0.0.1 / / give all permissions to the local machine restrict 192.168.1.0 mask 255.255.255.0 notrap nomodify / / give the local network machine the permission to synchronize time server time.nist.gov prefer / / set the time server Add prefer to indicate priority server 0.asia.pool.ntp.org server 1.asia.pool.ntp.org server 2.asia.pool.ntp.org server 127.127.1.0 # local clock

10. Fudge 127.127.1.0 stratum 10

11. Driftfile / var/lib/ntp/drift

12. Keys / etc/ntp/keys

13. [root@localhost ~] # netstat-upnl | grep ntpd / / View schedule

14.

15. [root@localhost ~] # ntpq-pn / / View synchronized server IP

16. Remote refid st t when poll reach delay offset jitter

17. =

18. 50.77.217.185. INIT. 16 u-64 0 0.000 0.000 0.000

19. 202.90.158.4. Int. 16u-64 0 0.000 0.000 0.000

20. 202.71.100.89. INIT. 16 u-64 0 0.000 0.000 0.000

21. 202.134.1.10 .INIT. 16u-64 0 0.000 0.000 0.000

twenty-two。 * 127.127.1.0. LOCL. 10 l 18 64 377 0.000 0.000 0.001

23.

24. [root@localhost ~] # ntpstat / / result of synchronization

25. Synchronised to local net at stratum 11

twenty-six。 Time correct to within 12 ms

twenty-seven。 Polling server every 512 s

1. The configuration in server requires three points: server ip prefer

Server time.nist.gov prefer / / set time server, plus prefer means priority

Server 0.asia.pool.ntp.org

Server 1.asia.pool.ntp.org

Server 2.asia.pool.ntp.org

2. Ip in gateways and routes sets the format of general configuration

Restrict 192.168.1.0 mask 255.255.255.0 notrap nomodify / / machines on the LAN have permission to synchronize time

3. If there is no local network, you can only configure the address 127.127.1.0 of the local synchronization server.

Server 127.127.1.0 # local clock

Fudge 127.127.1.0 stratum 10

4. Close or lift the restriction on port 123

Service iptables stop; or configure firewall policy

View status:

Iptables-L-n

The following add methods that are open to specific ports:

Use iptables to open the following ports

/ sbin/iptables-I INPUT-p tcp-- dport 8000-j ACCEPT

Save

/ etc/rc.d/init.d/iptables save

Restart the service

Service iptables restart

Check to see if the port that needs to be opened is valid?

/ etc/init.d/iptables status

Law 2:

Or edit / etc/sysconfig/iptables directly

-An INPUT-p tcp-m tcp-- dport 4000-j ACCEPT

Save in the previous section

Restart again:

Service iptables restart

Open a port to a specific ip method: https://www.cnblogs.com/fengyefeiluo/p/5057617.html

Edit / etc/sysconfig/iptables, add

-An INPUT-m state-- state NEW-m tcp-p tcp-s 127.0.0.1-- dport 6379-j ACCEPT

-An INPUT-m state-- state NEW-m tcp-p tcp-s 126.212.173.185-- dport 6379-j ACCEPT

The above red spots only open port 6379 to the local machine and 126.212.173.185, and other ip cannot be connected with telnet.

If there are no restrictions on accessing ip, you do not need to add a-s ip address, for example

-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 6379-j ACCEPT

By the way, be sure to add it at the end.

-An INPUT-j REJECT-- reject-with icmp-host-prohibited

-A FORWARD-j REJECT-- reject-with icmp-host-prohibited

COMMIT

5. Edit / etc/sysconfig/ntpd add SYNC_HWCLOCK=yes

6. The ntp service of Cmurs starts.

7. Synchronization: / usr/sbin/ntpdate-u 192.168.13.17 & & / sbin/hwclock-w

FAQ:

1. Prompt for synchronization: no server suitable for synchronization, if there is no problem with the above configuration, it may take a few minutes to wait.

After reading the above, have you mastered how to install oracle11g in Redhat6.5? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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