In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Bayaim_linuxRedHat5_install_oracle11gR2
Linux_install_oracle_11g:
To check the server's memory, you can use the following command:
[] # grep MemTotal / proc/meminfo
Check memory and swap space: Oracle requires at least 1G of memory. When the memory is 1G-2G, swap space should be
Beg for
1.5 times memory:
[] # free
To view the current server swap swap partition size, you can use the following command:
[] # grep SwapTotal / proc/meminfo
To view the current shared memory of the system, you can use the df command, for example:
[root@jssnode1~] # df-h / dev/shm
View system architecture
[root@jssnode1~] # uname-m
First of all, / tmp must have at least 1g of free space. Check the disk space of / tmp, or you can check it through the df command, for example
Such as:
[root@jssnode1~] # df-h / tmp
Software environment check
[root@jssnode1~] # cat / etc/issue
You can view the kernel version through the uname command, for example:
[root@jssnode1~] # uname-r
Find the missing package from the "server" directory of CD and copy it to the newly created directory / rpms:
Remount:
Different operating systems and architectures require different system packages to be installed. Here, only think twice about using 64bit.
For example, OracleEnterpriseLinux5 requires the following system packages: (29 packages)
Binutils-2.17.50.0.6
Compat-libstdc++-33-3.2.3
Compat-libstdc++-33-3.2.3 (32bit)
Elfutils-libelf-0.125
Elfutils-libelf-devel-0.125
Gcc-4.1.2
Gcc-c++-4.1.2
Glibc-2.5-24
Glibc-2.5-24 (32bit)
Glibc-common-2.5
Glibc-devel-2.5
Glibc-devel-2.5 (32bit)
Glibc-headers-2.5
Ksh-20060214
Libaio-0.3.106
Libaio-0.3.106 (32bit)
Libaio-devel-0.3.106
Libaio-devel-0.3.106 (32bit)
Libgcc-4.1.2
Libgcc-4.1.2 (32bit)
Libstdc++-4.1.2
Libstdc++-4.1.2 (32bit)
Libstdc++-devel4.1.2
Make-3.81
Sysstat-7.0.2
UnixODBC-2.2.11
UnixODBC-2.2.11 (32bit)
UnixODBC-devel-2.2.11
UnixODBC-devel-2.2.11 (32bit)
To check that the installation of the specified system package is still quite large, you can use the rpm-q command, for example
Such as:
[root@jssnode1~] # rpm-aq gcc
[root@jssnode1~] # rpm-aq grep | gcc
[root@localhost /] # rpm-aq | grep compat
[root@localhost /] # rpm-aq | grep elfutils
[root@localhost /] # rpm-aq | grep libstdc
[root@localhost /] # rpm-aq | grep sysstat
[root@localhost /] # rpm-aq | grep unixODBC
[root@localhost /] # rpm-aq | grep libaio
[root@localhost /] # rpm-aq | grep libgcc
[root@localhost /] # rpm-aq | grep make
[root@localhost /] # rpm-aq | grep ksh
[root@localhost /] # rpm-aq | grep binu
.
Create a directory for uninstalled packages:
[root@linuxserv5 ~] # mkdir / rpms
Get the uninstalled package:
[root@localhost rpms] # ls
Compat-libstdc++-33-3.2.3-61.i386.rpm unixODBC-2.2.11-7.1.i386.rpm
Libaio-devel-0.3.106-3.2.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm
Sysstat-7.0.2-3.el5.i386.rpm
For system packages that have not yet been installed, you can also install them through the rpm command, such as installing sysstat system packages.
The line operation is as follows (of course, rpm must first find the package before installing, usually to the installation CD of the operating system.
Looking for
If it is not on the CD, you can also check the operating system website):
[root@localhost rpms] # rpm-Uvh *
Or install one by one:
[root@jssnode1Server] # rpm-ivh sysstat-7.0.2-3.el5.x86_64.rpm
Warning:sysstat-7.0.2-3.el5.x86_64.rpm: HeaderV3DSAsignature: NOKEY,key ID
1e5e0159
Preparing... # [100%]
1:sysstat # # [100%]
Modify Linux kernel parameters
Use the vi command to edit the / etc/sysctl.conf file, for example:
Press the "o" key to enter the paste, ": wq" to save exit:
[root@jssnode1Server] # vi/etc/sysctl.conf
Add the following to the file:
Fs.aio-max-nr=1048576
Fs.file-max=6815744
Kernel.shmall=2097152
Kernel.shmmax=536870912
Kernel.shmmni=4096
Kernel.sem=25032000100128
Net.ipv4.ip_local_port_range=900065500
Net.core.rmem_default=262144
Net.core.rmem_max=4194304
Net.core.wmem_default=262144
Net.core.wmem_max=1048586
Or:
Kernel.sem = 250 32000 100 128
Net.ipv4.ip_local_port_range = 1024 65000
Net.core.rmem_default = 4194304
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 262144
Make the kernel parameters take effect immediately:
[root@linuxserv7] # sysctl-p
Use the groupadd command to create a group as follows:
[root@jssnode1~] # groupadd-g 502 dba
Then create an OracleInventory group, whose name is usually defined as oinstall, with the following creation command:
[root@jssnode1~] # groupadd oinstall
Generally speaking, the owner user who created ORACLE is also ordered to oracle, and the operations are as follows:
[root@jssnode1~] # useradd-u 502-g oinstall-G dba oracle
Then set the password for the user as follows:
[root@jssnode1~] # passwd oracle
Verify the nobody user:
[root@localhost rpms] # id nobody
Uid=99 (nobody) gid=99 (nobody) groups=99 (nobody)
Context=root:system_r:unconfined_t:SystemLow-SystemHigh
[root@localhost rpms] # id oracle
Uid=501 (oracle) gid=501 (oinstall) groups=501 (oinstall), 502 (dba)
Context=root:system_r:unconfined_t:SystemLow-SystemHigh
Create a file system / db (if / space size allows, you can also create a directory directly under the / file system
/ db).
Change the owner of the file system / db so that the database is later mounted on the / db file system:
[root@localhost rpms] # cd /
[root@localhost /] # ls
Bin dev home lost+found misc net proc rpms selinux sys usr
Boot etc lib media mnt opt root sbin srv tmp var
[root@localhost /] # mkdir db
[root@localhost /] # ls
Bin dev lib misc opt rpms srv usr
Boot etc lost+found mnt proc sbin sys var
Db home media net root selinux tmp
[root@localhost /] # chown oracle:oinstall / db
[root@linuxserv7 ~] # chown oracle:oinstall / db/sw
[root@localhost /] # mkdir / db/sw
[root@localhost /] #
Set the environment variable for the oracle user:
Edit the .bash _ profile parameter file with the text editor vi:
[oracle@linuxserv7 ~] $pwd
/ home/oracle
[oracle@linuxserv7 ~] $vi .bash _ profile
# .bash _ profile
# Get the aliases and functions
If [- f ~ / .bashrc]; then
. ~ / .bashrc
Fi
# User specific environment and startup programs
ORACLE_SID=sdzy
ORACLE_BASE=/db/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
Export ORACLE_SID ORACLE_BASE ORACLE_HOME
PATH=$PATH:/$ORACLE_HOME/bin:$HOME/bin
Export PATH
~
In the previous step, you can set it as follows:
/ *
Finally, use the chown command to change the owner of the directory to oracle:
[root@jssnode1~] # chown-Roracle:oinstall/data/ora11g
[root@jssnode1~] # chown-Roracle:oinstall/data/software
Use the vi command to edit / home/oracle/.bash_profile, adding the following:
ExportTMP=/tmp
ExportTMPDIR=$TMP
ExportORACLE_BASE=/data/ora11g
ExportORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
ExportORACLE_SID=jssdb
ExportORACLE_TERM=xterm
ExportPATH=/usr/sbin:$PATH
ExportPATH=$ORACLE_HOME/bin:$PATH
Export
LD_LIBRARY_PATH=
$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64/
Export
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
ExportLD_ASSUME_KERNEL=2.6.18
ExportNLS_LANG= "AMERICAN_AMERICA.ZHS16GBK"
Umask022
If [$USER= "oracle"]; then
If [$SHELL= "/ bin/ksh"]; then
Ulimit-p16384
Ulimit-n65536
Else
Ulimit-u16384-n65536
Fi
Fi
/
Set Shell limits for Oracle users:
[oracle@localhost ~] $su-root
[oracle@localhost ~] $vi / etc/security/limits.conf
Enter the following at the bottom of the file:
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
[oracle@localhost ~] $vi / etc/pam.d/login
Enter the following at the bottom of the file:
Session required / lib/security/pam_limits.so
[oracle@localhost ~] $vi / etc/profile
Enter the following at the bottom of the file:
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
Upload database software to / db/sw directory
Xmanager
Or: VMware Tools directly drag it over:
Upload and extract the database software as oracle users:
[oracle@linuxserv5 sw] $pwd
/ db/sw
[oracle@linuxserv5 sw] $ls
Linux_x86_11gR1_database.zip
[oracle@linuxserv5 sw] $unzip linux_x86_11gR1_database.zip
/ *
/
After some preparation, we finally entered the installation step. Here we use OUI to install ORACLE because
This operation needs to be done under the window interface. As the oracle user starts to the window state, open a terminal.
Tip:
If you start as a root user, you need to execute the following first:
[root@jssnode1~] # xhost+
Access control disabled,clients can connect from any host
Close all connections to execute successfully
/ *
LINUX sets xhost access control disabled, clients can connect from any host
Step 1: log in to linux with root and start the vnc service
Step 2: according to the port of vnc, set export DISPLAY=localhost:1 (1 means that vnc is in the first
Launched on tty)
Step 3: execute xhost + and prompt "access control disabled, clients can connect"
"from any host" is correct.
The operation log under linux is as follows:
New 'localhost:1 (root)' desktop is localhost:1
Starting applications specified in / root/.vnc/xstartup
Log file is / root/.vnc/localhost:1.log
/
[root@jssnode1~] # su-oracle
[oracle@jssnode1~] $
Go to the installation directory of the oracle software and execute runInstall:
[oracle@jssnode1~] $cd / db/sw/database/
[oracle@jssnode1database] $. / runInstaller
StartingOracleUniversalInstaller...
To set the environment variable, log in to the IP address of the client (the local remote login using SecureCRT), note
Start
Xmanager passive and start X11 in the SecureCRT setting.
[oracle@localhost Disk1] $export DISPLAY=134.98.105.169:0.0
[oracle@localhost Disk1] $
[root@jssnode1~] # su-root
[root@linuxserv7 ~] # sh / db/or acle/oraInventory/orainstRoot.sh
[root@linuxserv7 ~] # sh / db/ oracle/product/11.1.0/db_1/root.sh
$ORACLE_HOME/bin/netca
[oracle@linuxserv7 ~] $netca
[oracle@linuxserv7 ~] $dbca
Instead of using remote management tools to manage desktops, later positioning is a problem with xhost. The solution is as follows:
1 use root users to log in, check the DISPLAY variable-echo $DISPLAY, and make sure it is ": 0.0"
2 run xclock to ensure that the clock can be ejected
3 run "xhost +", the explanation of this command:
+
+
Because Xserver does not allow graphics from other users' graphics programs to be displayed on the current screen by default. If necessary
If you want the graphics of another user to be displayed on the current screen, you should use the user who is currently logged in, that is, before switching identities.
The user executes the following command
Xhost +
This command will allow graphics programs started by other users to display graphics on the current screen.
Xhost is used to control X server access.
Usually when you log in from hostA to hostB to run applications on hostB
As an application, hostA is client, but as a graphic,
It is displayed on hostA and needs to use hostA's Xserver, so hostA is
Server. So you need to run xhost + on hostA before logging in to hostB
To enable other users to access hostA's Xserver.
Xhost + enables all users to access Xserver.
Xhost + ip enables users on ip to access Xserver.
Xhost + nis:user@domain enables nis user user on domain to access
Xhost + inet:user@domain makes it accessible to inet users on domain.
+
+
4 switch to oracle, run. / runInstall to install.
The GUI cannot be started when installing Oracle11g on RedHat as5. The error is as follows:
[oracle@sense disk1] $. / runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 80 MB. Actual 1184 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3027 MB
Passed
Checking monitor: must be configured to display at least 256 colors
> Could not execute auto check for display colors using command
/ usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed
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.