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 Oracle11gR2 in RHEL5 to modify user SHELL restrictions, environment configuration, kernel parameters

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Editor to share with you how to install Oracle11gR2 in RHEL5 to modify user SHELL restrictions, environment configuration, kernel parameters, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Modify restrictions on a user's SHELL

[root@localhost ~] # vi / etc/security/limits.conf

# / etc/security/limits.conf

#

# Each line describes a limit for a user in the form:

#

#

#

# Where:

# can be:

#-an user name

#-a group name, with @ group syntax

#-the wildcard *, for default entry

#-the wildcard%, can be also used with% group syntax

# for maxlogin limit

#

# can have the two values:

#-"soft" for enforcing the soft limits

#-"hard" for enforcing hard limits

#

# can be one of the following:

#-core-limits the core file size (KB)

#-data-max data size (KB)

#-fsize-maximum filesize (KB)

#-memlock-max locked-in-memory address space (KB)

#-nofile-max number of open files

#-rss-max resident set size (KB)

#-stack-max stack size (KB)

#-cpu-max CPU time (MIN)

#-nproc-max number of processes

#-as-address space limit

#-maxlogins-max number of logins for this user

#-maxsyslogins-max number of logins on the system

#-priority-the priority to run user process with

#-locks-max number of file locks the user can hold

#-sigpending-max number of pending signals

#-msgqueue-max memory used by POSIX message queues (bytes)

#-nice-max nice priority allowed to raise to

#-rtprio-max realtime priority

#

#

#

# * soft core 0

# * hard rss 10000

# @ student hard nproc 20

# @ faculty soft nproc 20

# @ faculty hard nproc 50

# ftp hard nproc 0

# @ student-maxlogins 4

# End of file

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Modification process: press the I key to enter the insert state, esc exit after editing, and then press: enter wq to save and exit.

Do the same as follows:

Edit the login file: [root@localhost ~] # vi / etc/pam.d/login

Session required / lib/security/pam_limits.so

Modify the profile file: [root@localhost ~] # vi / etc/profile

If [$user= "oracle"]; then

If [$user= "/ bin/ksh"]; then

Ulimit-p 16384

Ulimit-n 65535

Else

Ulimit-u 16384-n 65535

Fi

Fi

Modify kernel parameters

[root@localhost ~] # vi / etc/sysctl.conf

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmall = 2097152

Kernel.shmmax = 536870912

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.ipv4.tcp_wmem = 262144 262144 262144

Net.ipv4.tcp_rmem = 4194304 4194304 4194304

Net.ipv4.ip_local_port_range = 9000 65500

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Net.core.rmem_default = 262144

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048586

Kernel parameters can take effect immediately: [root@localhost /] # / sbin/sysctl-p

Check the value of kernel parameters: [root@localhost ~] # / sbin/sysctl-a | grep kernel.shmmax

Kernel.shmmax = 536870912

Modify the user's environment configuration

Log in as oracle:

[root@localhost ~] # cd /

[root@localhost /] # su-oracle

[oracle@localhost ~] $

Now it becomes the dollar $.

Check to see if the current directory is in the home directory of operating system user oracle:

[oracle@localhost ~] $pwd

/ home/oracle

Locate the environment profile. bash.profile:

[oracle@localhost] $ls-a

. .bash _ history .bash _ profile .emacs .viminfo

.. .bash _ logout .bashrc .mozilla

Modify the environment configuration file: [oracle@localhost ~] $vi .bash _ profile

Export ORACLE_bASE=/myoracle/app / / set the oracle root directory

Export ORACLE_HOME=/myoracle/app/product/11.2.0/db_1// sets the oracle home directory

Export ORACLE_SID=dbalala// instance name

Export umask=022

The search path of the export PATH=$PATH:$ORACLE_HOME/bin// command

You can view the environment variable: [oracle@localhost ~] $env

HOSTNAME=localhost.localdomain

SHELL=/bin/bash

TERM=xterm

HISTSIZE=1000

USER=oracle

LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00 31Whoa, whoa, whoa.

MAIL=/var/spool/mail/oracle

PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin

INPUTRC=/etc/inputrc

PWD=/home/oracle

LANG=zh_CN.UTF-8

SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass

SHLVL=1

HOME=/home/oracle

LOGNAME=oracle

CVS_RSH=ssh

LESSOPEN= | / usr/bin/lesspipe.sh% s

DISPLAY=:0.0

G_BROKEN_FILENAMES=1

_ = / bin/env

This time I really encountered a lot of problems:

1, the first time to modify the limits file, because of my own stupidity, has been leading to all the files have been modified, but I have been grammatical errors. Later, the limits file was not clear enough in the book, so I looked at other people's documents and tried again. But before I tried, I modified the configuration file sysctl.conf for kernel parameters.

2. When modifying the profile file, there is always the wrong .profile. swap, and I don't know where these principles come from. After multi-party verification, the mountain dropped the swap file here before it can proceed smoothly.

At this point, the operating system is finally ready.

These are all the contents of the article "how to install Oracle11gR2 in RHEL5 to modify user SHELL restrictions, environment configuration, and kernel parameters". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Servers

Wechat

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

12
Report