RHEL5中如何安裝Oracle11gR2修改用戶SHELL限制、環(huán)境配置、內(nèi)核參數(shù)

小編給大家分享一下RHEL5中如何安裝Oracle11gR2修改用戶SHELL限制、環(huán)境配置、內(nèi)核參數(shù),相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

創(chuàng)新互聯(lián)2013年至今,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站制作、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢想脫穎而出為使命,1280元鐘山做網(wǎng)站,已為上家服務(wù),為鐘山各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18982081108

修改用戶的SHELL的限制
[root@localhost ~]# vi /etc/security/limits.conf

# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> 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
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> 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
#
#<domain>      <type>  <item>         <value>
#

#*               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

<domain>      <type>  <item>         <value>
oracle          soft    nproc           2047
oracle          hard    nproc           16384
oracle          soft    nofile          1024
oracle          hard    nofile          65536

修改過程:按i鍵進(jìn)入insert狀態(tài),編輯完成后esc退出,然后按:輸入wq保存并退出。

同樣的如下進(jìn)行操作:

編輯login文件:[root@localhost ~]# vi /etc/pam.d/login

session    required     /lib/security/pam_limits.so

修改profile文件:[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

修改內(nèi)核參數(shù)

[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

可以是內(nèi)核參數(shù)馬上生效:  [root@localhost /]# /sbin/sysctl -p  

查看內(nèi)核參數(shù)的值:[root@localhost ~]# /sbin/sysctl -a |grep kernel.shmmax
kernel.shmmax = 536870912

 

修改用戶的環(huán)境配置

以oracle身份登錄:

[root@localhost ~]# cd /
[root@localhost /]# su - oracle
 

[oracle@localhost ~]$

此時(shí)變成了美元$哦。

查看當(dāng)前目錄是否在操作系統(tǒng)用戶oracle的主目錄:

[oracle@localhost ~]$ pwd
/home/oracle
 
 

找到環(huán)境配置文件.bash.profile:

[oracle@localhost ~]$ ls -a
.   .bash_history  .bash_profile  .emacs    .viminfo
..  .bash_logout   .bashrc        .mozilla

修改環(huán)境配置文件:[oracle@localhost ~]$ vi .bash_profile

export ORACLE_bASE=/myoracle/app //設(shè)置oracle根目錄
export ORACLE_HOME=/myoracle/app/product/11.2.0/db_1//設(shè)置oracle主目錄
export ORACLE_SID=dbalala//實(shí)例名
export umask=022
export PATH=$PATH:$ORACLE_HOME/bin//命令的搜索路徑
 
 可以查看環(huán)境變量:[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;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
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
 
 
 

這回著實(shí)遇到了很多的問題:

1、先是修改limits文件的時(shí)候,因?yàn)槲冶救说挠掴g,一直導(dǎo)致所有的文件都修改好了,我卻還是一直是語法錯(cuò)誤。后來,limits文件是書上表述的不夠明晰,我自己又看了下別人的文檔,重新嘗試后行了。但是在這嘗試之前我又修改了內(nèi)核參數(shù)的配置文件sysctl.conf。

2、在修改profile文件的時(shí)候,一直包錯(cuò).profile.swap存在,而我一直不懂得這些原理來自何方。在經(jīng)過多方求證后,山掉了此處的swap文件才得以順利進(jìn)行。

至此,終于準(zhǔn)備好了操作系統(tǒng)。

以上是“RHEL5中如何安裝Oracle11gR2修改用戶SHELL限制、環(huán)境配置、內(nèi)核參數(shù)”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

文章名稱:RHEL5中如何安裝Oracle11gR2修改用戶SHELL限制、環(huán)境配置、內(nèi)核參數(shù)
網(wǎng)站鏈接:http://muchs.cn/article12/ighedc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供營銷型網(wǎng)站建設(shè)、定制網(wǎng)站動態(tài)網(wǎng)站、網(wǎng)站設(shè)計(jì)、網(wǎng)站策劃、微信公眾號

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)