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)06/01 Report--
Enter the / u01/softwares/ directory and extract the two Oracle files
# unzip oracle_Linux-x86-64_1of.zip
# unzip oracle_Linux-x86-64_2of.zip
Generate a databases directory back
1 the following RPM package needs to be installed before installation (the 32-bit version of the package is annotated with 32bit parentheses, and the 64-bit version of the package with the same name is not annotated. On 64-bit platforms, both versions should be installed):
# rpm-Q\
Binutils\
Compat-libstdc++-33\
Elfutils-libelf\
Elfutils-libelf-devel\
Expat\
Gcc\
Gcc-c++\
Glibc\
Glibc-common\
Glibc-devel\
Glibc-headers\
Libaio\
Libaio-devel\
Libgcc\
Libstdc++\
Libstdc++-devel\
Make\
Ksh\
Sysstat\
UnixODBC\
UnixODBC-devel xorg-x11-apps | grep "not installed"
If it is missing, continue to install the missing package.
2 adjust kernel parameters and user restrictions
Vim / 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.ip_local_port_range = 9000 65500
Net.core.rmem_default = 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048586
# sysctl-p # effective immediately
Edit the / etc/security/limits.conf file to modify the operating system's restrictions on oracle user resources. Add the following line to the file.
Vim / etc/security/limits.conf
Oracle soft nofile 131072
Oracle hard nofile 131072
Oracle soft nproc 131072
Oracle hard nproc 131072
Oracle soft core unlimited
Oracle hard core unlimited
Oracle soft memlock 50000000
Oracle hard memlock 50000000
# / sbin/sysctl-p
Vi / etc/profile
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi
If export DISPLAY=192.168.174.129:0.0# does not add this line, there will be an error when restarting dbca.
Check whether AIO is running in the operating system, run the command and display results similar to the following:
$cat / proc/slabinfo | grep kio
Kioctx 51 120 320 12 1: tunables 54 27 8: slabdata 10 10 0
Kiocb 30 30 256 15 1: tunables 120 60 8: slabdata 2 20
Creation of database installation users and groups
Using the root user, do the following:
Create an oinstall group
# groupadd-g 500 oinstall
Create a dba group
# groupadd-g 501 dba
Create an oracle user
# useradd-g oinstall-G dba oracle
Passwd oracle sets a password for oracle users
Settings for the profile file of the database installation user
First, determine the database name and the database instance name, which are generally the same for a single instance (non-RAC) environment.
Suppose the database (instance) is named powerdes, using the oracle user, edit / home/oracle/.bash_profile, and add the following
Export ORACLE_BASE=/oracle/app/oracle
Export ORACLE_HOME=/oracle/app/oracle/product/11.2.0/dbhome_1
Export ORACLE_SID=orcl
Export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
Export DISPLAY=192.168.174.129:1.0
Export DISPLAY=192.168.174.129:0.0
Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/oracm/lib:$ORACLE_HOME/lib
Export CLASSPATH=$CLASSPATH:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jlib:$ORACLE_HOME/network/lib
Export LANG=en
Note that to configure the LD_LIBRARY_PATH variable, sqlplus and other programs need to load the corresponding library when running. If it is not configured, the following error will occur at runtime:
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
Create the appropriate file system (or installation directory) and change the appropriate permissions
[root@powerlong4 oracle] # mkdir-p/oracle / app/oracle
[root@powerlong4 oracle] # chown-R oracle:oinstall / oracle/app/oracle
[root@powerlong4 oracle] # chmod-R 775 / oracle/app/oracle
Modify / etc/hosts to add parsing of hostname (executed by root users)
Vi / etc/hosts
192.168.174.129 xlw
Prepare vnc for remote connection to linux Desktop
Yum install tigervnc tigervnc-server libvncserver-y
After smooth installation, under check
[root@linuxidc rpms] # rpm-qa | grep vnc
Tigervnc-1.1.0-16.el6.CentOS.x86_64
Tigervnc-server-1.1.0-16.el6.centos.x86_64
Libvncserver-0.9.7-4.el6.x86_64
Pretend to be what is missing
Next comes the configuration problem after installation, use the following command to edit the configuration file:
Vim / etc/sysconfig/vncservers
VNCSERVERS= "1:root 2:oracle"
VNCSERVERARGS [1] = "- geometry 800x600"
Set vnc password
Use the following command to set the password for vnc (you need to use su to switch to the user who wants to set the vnc password, for example:
Su-oracle, where oracle is the account written in the configuration file above)
[root@powerlong4 ~] # vncpasswd
Password:
Password must be at least 6 characters-try again
Password:
Verify:
Start vnc
Service vncserver start
Yum-y install fontforge# corrects garbled code
Install vnc under Windows
To log in using oracle users, the installation needs to be in a graphical interface (in the console or with X-Window tools). Open a terminal window and execute the following command to install:
Export DISPLAY= Server ip:0.0
Enter the xclock test, if you can see the clock to prove that the graphics are available
On xshell's linux system, execute the following command:
# xhost +
Access control disabled, clients can connect from any host
Indicates the window environment under linux and prepares OK, and is ready for oracle installation.
Cd to / u01/softwares/databases directory
Execute. / runInstaller
If the following error occurs
Install the xdpyinfo command to solve the
Yum install-y xdpyinfo
If there is garbled code, solve it temporarily.
Export LANG=en temporarily changes the environment to English before installing it. The modification of this environment variable is only temporary and will be changed back after reboot or when logging in with oracle users.
Default setting all the way, fill in the installation path, and execute the last two scripts as root user
Then try to enter Oracle
Sqlplus / as sysdba
If it cannot be executed, find the absolute path of the sqlplus file to execute.
The following error occurred
When starting oracle, the following error occurred:
[oracle@oracle10g bin] $. / sqlplus / as sysdba
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
Reason:
1) the system will look for the sp1.msb file under the $ORACLE_HOME/sqlplus/mesg path. If you do not specify ORACLE_HOME and NLS_LANG correctly, you will not be able to find the message file, which will cause the sqlplus to fail. Check whether the $ORACLE_HOME/sqlplus/mesg directory can be accessed properly. If not, you need to modify the corresponding permissions.
[root@oracle10g db_1] # ls-l/home/oracle/oracle/product/10.2.0/db_1/sqlplus | grep mesg
Drwxr-x--- 2 oracle oinstall 4096 November 7 17:41 mesg
2) check whether the environment variable $ORACLE_HOME is set correctly
Open the / home/oracle/.bash_profile file, add the following two lines and set the $ORACLE_HOME path correctly
Export ORACLE_BASE=/home/oracle/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
Then put the export ORACLE_HOME absolute path on the command line to declare the following, solving the
Open the listener after installing the Oracle software
Start in the terminal interface
Lsnrctl start
Switch to the Oracle user, open a terminal in graphic mode, type dbca, and create the database
If an error is reported, try again under the display declaration under root user
Error about executing dbca
DISPLAY not set. Set DISPLAY environment variable, then re-run.
Variables need to be declared
Export DISPLAY=192.168.174.129:1.0
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.