In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to install Oracle in Linux environment? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
1. View system information
System information view
First, the server ip:192.168.8.120
Server system: Oracle Linux Server release 6.5
Server hostname: oracle-learn
Check the disk space:
[root@oracle-learn] # df-hFilesystem Size Used Avail Use% Mounted on/dev/sda1 32G 4.8G 26G 17% / tmpfs 3.9G 224K 3.9G 1% / dev/shm/dev/sdc1 197G 60M 187G 1% / oracle/dev/sdb1 40G 48m 38G 1% / soft
/ oracle directory is used to place oracle
/ soft is used to store tool installation packages such as oracle.
2. Mount the CD-ROM drive
After booting the system, check the virtual machine optical drive settings to see if it is connected, or if not.
Mount the CD-ROM drive
[root@oracle-learn ~] # mount / dev/cdrom / mntmount: block device / dev/sr0 is write-protected, mounting read-only
Check whether the mount is successful
[root@oracle-learn] # df-hFilesystem Size Used Avail Use% Mounted on/dev/sda1 32G 4.8G 26G 17% / tmpfs 3.9G 224K 3.9G 1% / dev/shm/dev/sdc1 197G 60M 187G 1% / oracle/dev/sdb1 40G 48m 38G 1% / soft/dev/sr0 3.7G 3.7G 0100% / mnt
1. Set yum configuration
Modify the name of the original yum file
[root@oracle-learn ~] # cd / etc/yum.repos.d/ [root@oracle-learn yum.repos.d] # mv public-yum-ol6.repo public-yum-ol6.repofuben [root@oracle-learn yum.repos.d] # ll
Total dosage 4
-rw-r--r--. 1 root root 2545 October 29 2018 public-yum-ol6.repofuben [root@oracle-learn yum.repos.d] #
2. Set yum configuration
[root@oracle-learn yum.repos.d] # vim / etc/yum.conf
Add the following:
[EL] name = Oracle Linux 6.5 baseurl= file:///mnt/Server/gpgcheck=0enabled=1
Save and exit
Test whether the configuration is successful
[root@oracle-learn yum.repos.d] # yum install binutils-y
If the configuration is successful
3. Install the software packages required by Oracle
Yum install binutils-yyum install compat-libcap1-yyum install compat-libstdc++-33-yyum install gcc- yyum install gcc-c++-yyum install glibc- yyum install glibc-devel-yyum install ksh-yyum install libgcc-yyum install libgcc-yyum install libstdc++- yyum install libstdc++-devel-yyum install libXext-yyum install libXtst-yyum install libX11-yyum install libXau-yyum install libxcb-yyum install libXi-yyum install make-yyum install sysstat-yyum install unixODBC- yyum install unixODBC-devel-y
4. Hosts file configuration
Edit / etc/hosts file, [root@db01 /] # vi / etc/hosts
Add the following at the end:
192.168.8.120 oracle-learn
The server ip is preceded by the server hostname
5. Add groups and users
[root@oracle-learn] # / usr/sbin/groupadd-g 60001 oinstall/usr/sbin/groupadd-g 60002 dba [root@oracle-learn] # / usr/sbin/groupadd-g 60002 dba/usr/sbin/groupadd-g 60003 oper [root@oracle-learn] # / usr/sbin/groupadd-g 60003 oper [root@oracle-learn] # / usr/sbin/useradd-u 61002-g oinstall-G dba oracle [root@oracle-learn ~] # / usr/sbin/useradd-u 61002-g oinstall-G dba oracle
View oracle users
[root@oracle-learn ~] # id oracleuid=61002 (oracle) gid=60001 (oinstall) group = 60001 (oinstall), 60002 (dba) [root@oracle-learn ~] #
Set the Oracle user password
[root@oracle-learn ~] # passwd oracle
Change the password of user oracle.
New password:
Invalid password: it is based on dictionary words
Invalid password: too simple
Re-enter the new password:
Passwd: all authentication tokens have been successfully updated.
[root@oracle-learn ~] #
6. Add a file system
Create / oracle to store oracle
[root@oracle-learn ~] # cd / oracle [root@oracle-learn oracle] # mkdir-p/oracle/ app/oracle/product/11.2.0/db_1 [root@oracle-learn oracle] # chown-R oracle:oinstall / oracle [root@oracle-learn oracle] # chmod-R 775 / oracle/ [root@oracle-learn oracle] #
7. Modify operating system parameters
7.1Modification of / etc/security/limits.conf file
[root@oracle-learn oracle] # vi / etc/security/limits.conf
The additions are as follows:
# ORACLE SETTINGoracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768
7.2 modify the contents of the / etc/security/limits.d/90-nproc.conf file
[root@oracle-learn oracle] # vi / etc/security/limits.d/90-nproc.conf
Comment out
# * soft nproc 1024
Add
*-nproc 16384
View changed files
[root@oracle-learn oracle] # cat / etc/security/limits.d/90-nproc.conf# Default limit for number of user's processes to prevent# accidental fork bombs.# See rhbz # 432903 for reasoning.#* soft nproc 1024*-nproc 16384root soft nproc unlimited [root@oracle-learn oracle] #
7.3 disable SELINUX
[root@oracle-learn oracle] # vi / etc/selinux/config
SELINUX=enforcing
Change to
SELINUX=disabled
Make SELINUX effective:
[root@oracle-learn oracle] # setenforce 0
7.4 turn off iptables Firewall
Turn off the firewall
[root@oracle-learn oracle] # service iptables stopiptables: set chain to policy ACCEPT:filter [OK] iptables: clear firewall rules: [OK] iptables: uninstalling module: [OK] [root@oracle-learn oracle] #
You can also set the firewall to be turned off permanently
[root@oracle-learn oracle] # chkconfig iptables off [root@oracle-learn oracle] #
7.5 modify / etc/pam.d/login file
[root@oracle-learn oracle] # vi / etc/pam.d/login
Add
# ORACLE SETTINGsession required pam_limits.so
7.6 modify the sysctl.conf configuration file
[root@oracle-learn ~] # vi / etc/sysctl.conf
Annotation
# kernel.shmmax = 68719476736
# kernel.shmall = 4294967296
Add
# ORACLE SETTINGfs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmmax = 8589934592kernel.shmall = 2097152kernel.shmmni = 4096kernel.sem = 25032000100 128net.ipv4.ip_local_port_range = 900065500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586
Note:
The calculation method of kernel.shmmax and kernel.shmall:
Kernel.shmmax is greater than SGA and less than physical memory
The memory of my server is 8 gigabytes.
So the value of kernel.shmmax is
`1024,1024,1024,8589934592`kernel.shmmni = 4096`kernel.shmall = kernel.shmmax/ 4096`
Let the configuration take effect:
[root@oracle-learn] # sysctl-p
8. Environment variable setting
Switch to oracle user
[root@oracle-learn ~] # su-oracle [oracle@oracle-learn ~] $
Modify environment variabl
[oracle@oracle-learn] $vi ~ / .bash_profile
Add as follows:
# Oracle Settings oracleTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIR#export LANG=en_USORACLE_BASE=/oracle/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOMEORACLE_SID=orcl; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib Export CLASSPATHNLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMATNLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANGif [$USER = "oracle"] | | [$USER = "grid"]; thenif [$SHELL = "/ bin/ksh"]; thenulimit-p 16384ulimit-n 65536elseulimit-u 16384-n 65536fiumask 022fi
ORACLE_SID=orcl; can customize the sid of the database
Exit the user
[oracle@oracle-learn ~] $exitlogout [root@oracle-learn ~] #
Check the environment variable parameters when logging in to oracle
[root@oracle-learn ~] # su-oracle [oracle@oracle-learn ~] $env | grep ORACLEORACLE_SID=orclORACLE_BASE=/oracle/app/oracleORACLE_TERM=xtermORACLE_HOME=/oracle/app/oracle/product/ 11.2.0 [oracle @ oracle-learn ~] $what is a Linux system Linux is a free-to-use and free-spread UNIX-like operating system, which is a multi-user, multi-task, multi-thread and multi-CPU operating system based on POSIX. Using Linux, you can run major Unix tools, applications, and network protocols.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.