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--
The centos6.6 system used in this experiment is oracle 10g.
Centos version: CentOS-6.6_X64-bin-DVD1.iso
OracleDatabase version: 10201_database_linux_x86_64.cpio.gz
To install the oracle database, linux must install destoop. Otherwise the oracle database cannot be installed.
1. Install the installation packages required for oracle
Yum-y install binutilscompat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelfelfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-develglibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devellibaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-develmake sysstat
Finally, you need to install libXp, the Library, which must be installed, otherwise java Exception will appear when you install Oracle.
Yum install libXp libXt.i686 libXtst.i686
Some bags are 64 and some are 32, all of which need to be loaded.
two。 Modify the configuration files required by the linux system
The installation of Oracle database is not recommended on superuser root, and it is recommended to add another user oracle on linux system. However, before adding this user, we also need to set some system kernel parameters for this user.
Use the Vi editor to add the following parameters to the end of the / etc/sysctl.conf file:
Kernel.shmall= 2097152 # represents the total amount of shared memory (in pages) that the system can use at a time.
Kernel.shmmax= 2147483648 # defines the maximum size of shared memory segments in bytes. The default is 32m, which is too low for oracle and is usually set to 2G.
Kernel.shmmni= 4096 # is used to set the maximum number of system-wide shared memory segments. The default value for this parameter is 4096
Kernel.sem= 250100100128 # indicates the set semaphore
Net.ipv4.ip_local_port_range= 1024 65000 # maximum number of local ports
Net.core.rmem_default=4194304 # default receive window size
Net.core.rmem_max=4194304 # maximum size of the receive window
Net.core.wmem_default=262144 # default send window size
Net.core.wmem_max=262144 # maximum size of the send window
[root@CentOS6~] # / sbin/sysctl-p # execution takes effect
Edit the / etc/security/limits.conf file to set system resource limits. If the user oracle installs the oracle database in the future, you will need your system administrator to add the following parameters to limits.conf.
# vi/etc/security/limits.conf
Add the following four lines:
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Then in the edit / etc/pam.d/login file, add the following parameters:
# vi/etc/pam.d/login
Session required / lib/security/pam_limits.so
Session required pam_limits.so
Note:
The etc directory includes the pam.d directory, and there is a login subdirectory under the pam.d directory. Etc refers to the directory of system configuration files, pam.d refers to verifying the login configuration, and login refers to the login configuration file. To put it simply, it is the login profile of the linux operating system.
3. Create the appropriate user name and user group
Only the single host environment is discussed here, regardless of the configuration of the RAC environment. Execute the following instructions to add users and groups required for oracle installation.
3.1 set up a group oinstall
# groupadd oinstall
3.2 create a group dba
# groupadd dba
3.3.The user oracle will join the oinstall and dba groups and test
# useradd-g oinstall-G dba oracle
3.4 create a new password for oracle
# passwd 123456
4. Modify / etc/profile, modify the user's shell limits
Add the following code to the profile file:
If [$USER = "oracle"]; then
If [$SHELL= "/ bin/ksh"]; then
Ulimit-p16384
Ulimit-n65536
Else
Ulimit-u16384-n 65536
Fi
Fi
5. Modify Linux distribution information
Because CentOS6.6 was not released when Oracle10g was released, Oracle10g did not confirm the support for CentOS6.6, so you need to modify the relevant files to make Oracle10g support CentOS6.
We need to manually modify the release notes of Linux so that Oracle 10g supports CentOS6.5.
Edit / etc/redhat-release file
# vim / etc/redhat-release
Modify the content CentOS release 6.5 (Final) to redhat 4
6. Create the installation folder and data storage directory for oracle
Mkdir-p / u01/app/oracle
6.1 modify the users and groups to which the / u01/app/oracle directory belongs, and change it to oracle and oinstall groups.
View the users and groups of the current oracle directory: ls-la | grep oracle
Modify oracle directory users and groups:
Chown-R oracle:oinstall / u01/app/oracle
6.2 modify the directory permissions of / u01/app/oracle so that the oinstall group also has read and write permissions to the / u01/app/oracle directory.
Use the following command:
Chmod-R 775 / u01/app/oracle
7. Configure environment variables for oracle users
Open cd / home/oracle and edit .bash _ profile using Vi. As shown below:
Modify and add the following content:
Export TMP=/tmp
Export TMPDIR=$TMP
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
Export ORACLE_SID=orcl
Export ORACLE_TERM=xterm
Export PATH=/usr/sbin:$PATH
Export PATH=$ORACLE_HOME/bin:$PATH
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
Export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
After saving, use the following command to make the settings take effect:
Source / home/oracle/.bash_profile
8. Install Oracle and make related settings
8.1 extract the installation file
Put the downloaded package in the folder / uo1/app/oracle where oracle will be installed:
To extract the file, use the following command:
# gunzip 10201_database_linux_x86_64.cpio.gz
# cpio-idmv < 10201_database_linux_x86_64.cpio
After unzipping, you will see the folder of database in the same folder.
Currently, both the owner and user group of the database folder are root. Now we should change it:
# chown-R oracle:oinstall/u01/app/oracle/database
8.2 install the oracle database
After the above unzipped oracle installation package, we need to log out the root user, log in with the Oracle user, and then use that user to install oracle.
Under the terminal, enter the / u01/app/oracle/database directory:
Prepare to perform database installation, if your centos is a Chinese environment, there will be Chinese garbled during the installation, please issue the following instructions. Make the system temporarily in English state:
Export LC_ALL=en_US.UTF-8
Then execute the following command to install:
. / runInstaller
Pop up this interface and our installation will be smooth.
If we have no other requirements, we can install it step by step according to the instructions of the software.
But if you use it, suddenly one day you will find. You will cry when you import databases from other servers (including Chinese characters) into this oracle database to show garbled codes.
Because the oracle database character set installed by following this prompt is an English character set rather than a Chinese character set.
Some people will say, "I can modify the Chinese character set after installing the oracle database." Hehe, I will laugh. Because in the end, you will find that even if you modify the character set of the database through the SQL statement, the Chinese characters in the database are still garbled!
But you will also find that if you are in the windows system, it is possible to use SQL statements to modify the character set.
Then in the Linux system, we only need to select the advanced installation, as shown below:
Note: modify the storage directory.
The image above is the directory where the specified certificate is stored.
The above figure selects the type of database installed and the language supported by oracle. Here, select Enterprise Edition, and choose English and simplified Chinese.
The figure above specifies the oracle environment variable and the installation path. Because we have already declared it in .bash _ profile, it will be populated automatically.
Oracle begins pre-installation checks.
Check and find 1 warning and 1 requirement, check the log and find
-warning
Expectedresult: 2214MB
ActualResult: 0MB
Checkcomplete. The overall result of this check is: 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.