In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Oracle 12c download address: https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
1. Check prerequisites
[root@k8s03 ~] # cat / proc/version
Linux version 3.10.0-693.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)) # 1 SMP Tue Aug 22 21:09:27 UTC 2017
[root@k8s03 ~] # uname-r
3.10.0-693.el7.x86_64
[root@k8s03] # free-m
Total used free shared buff/cache available
Mem: 2831 419 1994 8 417 2214
Swap: 0 0 0
[root@k8s03] # grep-I selinux= / etc/sysconfig/selinux
# SELINUX= can take one of these three values:
SELINUX=disabled
[root@k8s03 ~] # systemctl status firewalld
● firewalld.service-firewalld-dynamic firewall daemon
Loaded: loaded (/ usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld (1)
[root@k8s03 ~] # ping baidu.com
PING baidu.com (220.181.38.148) 56 (84) bytes of data.
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=1 ttl=128 time=24.7 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=2 ttl=128 time=26.5 ms
^ C
-baidu.com ping statistics
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
Rtt min/avg/max/mdev = 24.725 ms 25.624 Universe 26.524 Universe 0.913
[root@k8s03 ~] #
two。 Install dependency packages
[root@k8s03 ~] # yum-y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++
-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686 libXp xhost unzip zip libXtst libXp*.i686 libXt*.i686 xterm xdpyinfo smartmontools-* readline-devel*
[root@k8s03 ~] #
3. Modify kernel parameters
[root@k8s03 ~] # vim / etc/sysctl.conf
Kernel.shmall = 2097152
Kernel.shmmni = 4096
Kernel.sem = 250 32000 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 = 1048586
Fs.file-max = 6815744
Fs.aio-max-nr = 1048576
[root@k8s03] # sysctl-p
[root@k8s03 ~] # vim / etc/security/limits.conf
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
Oracle hard stack 10240
[root@k8s03 ~] # vim / etc/pam.d/login
Session required pam_limits.so
[root@k8s03 ~] #
4. Create users and add environment variables
[root@k8s03 ~] # groupadd oinstall
[root@k8s03 ~] # groupadd dba
[root@k8s03] # useradd-g oinstall-G dba oracle
[root@k8s03 ~] # passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password fails the dictionary check-it is based ona dictionary word
Retype new password:
Passwd: all authentication tokens updated successfully.
[root@k8s03 ~] # mkdir / u01/app/oracle/product/11.2.0.1/db_1-p
[root@k8s03] # chown-R oracle:oinstall / u01 /
[root@k8s03 ~] # vim / etc/profile
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=/u01/app/oracle/product/11.2.0.1/db_1
Export ORACLE_SID=orcl
Export PATH=$PATH:$ORACLE_HOME/bin
[root@k8s03] #. / etc/profile
5. Install Xmanager-Passive on the windows machine (graphical interface)
6. Use Xmanager-Passive graphical interface in linux
[root@k8s03 ~] # xhost +
Xhost: unable to open display ""
[root@k8s03 ~] # su-oracle
[oracle@k8s03 ~] $export DISPLAY=windows machine IP address: 0.0
[oracle@k8s03 ~] $unzip linuxx64_12201_database.zip
[oracle@k8s03 ~] $cd database/
[oracle@k8s03 database] $. / runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 18045 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3071 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from / tmp/OraInstall2019-11-309-04-09-35PM. Please wait... [oracle@k8s03 database] $
[root@k8s03 ~] # sh / u01/app/oraInventory/orainstRoot.sh
Changing permissions of / u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world. Changing groupname of / u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@k8s03 ~] # sh / u01/app/oracle/product/11.2.0.1/db_1/root.sh
Performing root user operation. The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= / u01/app/oracle/product/11.2.0.1/db_1 Enter the full pathname of the local bin directory: [/ usr/local/bin]:
Copying dbhome to / usr/local/bin...
Copying oraenv to / usr/local/bin...
Copying coraenv to / usr/local/bin...
Creating / etc/oratab file...
Entries will be added to the / etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now? Yes | [no]: Oracle Trace File Analyzer (TFA-User Mode) is available at:
/ u01/app/oracle/product/11.2.0.1/db_1/suptools/tfa/release/tfa_home/bin/tfactl OR Oracle Trace File Analyzer (TFA-Daemon Mode) can be installed by running this script:
/ u01/app/oracle/product/11.2.0.1/db_1/suptools/tfa/release/tfa_home/install/roottfa.sh [root@k8s03 ~] #
7. Download and install the rlwrap History tool
[root@k8s03 ~] # wget https://github.com/hanslub42/rlwrap/releases/download/v0.43/rlwrap-0.43.tar.gz
[root@k8s03 ~] # tar xvf rlwrap-0.43.tar.gz
[root@k8s03 ~] # cd rlwrap-0.43
[root@k8s03 rlwrap-0.43] #. / configure
[root@k8s03 rlwrap-0.43] # make check
[root@k8s03 rlwrap-0.43] # make install
[root@k8s03 rlwrap-0.43] # vim / home/oracle/.bash_profile
Alias sqlplus='rlwrap sqlplus'
Alias rman='rlwrap rman
[root@k8s03 rlwrap-0.43] # su-oracle
Last login: Sat Nov 30 16:07:06 CST 2019 on pts/0
[oracle@k8s03 ~] $sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Sun Dec 1 14:37:18 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production
SQL > select * from dual
D
-
X
SQL > select * from dual;-press the up arrow key to see the history command
8. Boot self-start
[root@k8s03 ~] $vim / etc/oratab
Orcl:/u01/app/oracle/product/11.2.0.1/db_1:Y-the last N to rewrite Y
[root@k8s03 ~] # chmod 755 / etc/rc.d/rc.local
[root@k8s03 ~] $vim / etc/rc.d/rc.local
Su oracle-lc "/ u01/app/oracle/product/11.2.0.1/db_1/bin/lsnrctl start"
Su oracle-lc / u01/app/oracle/product/11.2.0.1/db_1/bin/dbstart
[root@k8s03 ~] # reboot
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.