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--
I. Preface
Recently, we are going to prepare for the exam and review the relevant knowledge of Oracle database. Then the prerequisite for learning Oracle must be deployment. At present, the mainstream version of Oracle is 11g. Then let's take a look at how to deploy Oracle to monitor and start database operations such as opening and starting the database.
II. Precautions for installing Red Hat Enterprise Linux 5.8operating system
Installation requirements:
Firewall configuration option: disabled
SElinux configuration: disablin
Default installation: software development
Due to the simple deployment of the system, it is no longer elaborated here, if there is any doubt, please do it on your own Baidu!
III. Preparation of preconditions
Oracle database is a relatively large application software, which has corresponding requirements for server system type, memory and swap memory, hard disk space, kernel parameters, software environment, user environment and so on. Only by meeting these necessary conditions can we ensure the successful installation and stable operation of Oracle 11g.
1. System and configuration requirements
The Linux systems explicitly supported by Oracle 11g include Asianux 2.0, Oracle Enterprise Linux 4.0, Red Hat Enterprise 4.0, and SUSE Linux Enterprise Server 10.0. Individual software or configuration files may need to be adjusted appropriately when installed in other Linux systems
Linux system requirements:
Physical memory: must be higher than 1G, not less than 1.5GB is recommended for VMware virtual machines
Swap space: the convention you should refer to is: when the physical memory is 1~2GB, the swap partition is 1.5 to 2 times the physical memory; when the physical memory is 2~16GB, the swap partition is the same size as the physical memory; when the physical memory exceeds 16GB, the swap partition uses 16GB.
For Oracle 11g database, if the program files and data files are installed in the same partition, the hard disk space requirements of the partition are: enterprise version 5.65GB, standard version 5.38GB; in addition, make sure that the space of the partition where the / tmp directory is located is not less than 1GB. Overall, it is recommended to prepare at least 8GB hard disk space for Oracle 11g
The hostname and IP should be planned. The hostname and IP address of the server should also be determined in advance. Once the installation of the Oracle database is completed, it is recommended not to modify the hostname, otherwise the database startup will fail.
two。 Software environment requirements
The installation process of Oracle 11g is usually carried out on a graphical desktop, so it is recommended that you use a RHEL 5.8server with an GNOME Chinese desktop environment installed. Of course, software development tools are also essential, such as gcc, glibc, binutils and other software packages. It is recommended to use rpm tools to check and install the necessary software environment.
Configure a local YUM source
Mount / dev/cdrom / mnt rm-rf / etc.repos.d/*vim / etc/yum.repos.d/local.repo [local] name=local baseurl= gpgcheck=0
Yum-y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel\ elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel\ glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp\ libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC\ unixODBC-devel pdksh
Oracle 11g itself integrates the Java runtime environment, but the Chinese language support in the installation interface is not perfect. Therefore, if you want to use the Chinese Oracle installation interface, it is recommended to install the java-1.6.0 package in advance.
3. Kernel requirements
In order to ensure the stable operation of the database, Oracle 11g puts forward some requirements for Linux kernel parameters and process session restrictions, some of which can be automatically detected and repaired during installation, but they are not necessarily complete, so it is best to configure them in advance according to the installation documentation.
Kernel parameter adjustment is reflected in the / etc/sysctl.conf file, which mainly includes some settings related to memory scheduling, port range, number of open files, Icano request and so on. The relevant values should not be lower than the installation requirements. After modification, execute the "sysctl-p" command to make the new configuration take effect immediately.
Kernel.shmmax = 536870912kernel.shmall = 2097152kernel.shmmni = 4096kernel.sem = 32000 128fs.aio-max-nr = 1048576fs.file-max = 6815744net.ipv4.ip_local_port_range = 900065500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586
Explanation of relevant kernel parameters:
Kernel.shmmax: defines the maximum value of a single shared memory segment. The default value is greater than this value.
Kernel.shmall: controls the number of shared memory pages. The default value is greater than this value.
Kernel.shmmni: maximum number of shared memory segments
Kernel.sem:semaphore semaphores or IPC flags for each process communication
Fs.aio-max-nr: number of asynchronous IO requests
Fs.file-max: the total number of files that can be opened by all processes in the system
Net.ipv4.ip_local_port_range: the range of ports connected outward
Net.core.rmem_default: kernel sockets accept the default cache size
Net.core.rmem_max: the maximum size of the kernel socket to accept the cache
Net.core.wmem_default: default size of kernel socket send cache
Net.core.wmem_max: the maximum size of the kernel socket send cache
Finally, sysctl-p reloads the configuration file
4.Oracle user environment requirements
Oracle 11g requires a fixed operating user oracle, installation group oinstall, and management group dba. These accounts should be established in advance. The basic directory for storing Oracle programs and database files (such as / opt/oracle) should also be created in advance.
Groupadd-g 500 oinstall / / create installation group groupadd-g 501 dba / / create management group useradd-g oinstall-G dba oracle / / create run user passwd oracle / / set user password mkdir / opt/oracle / / create a basic directory chown-R oracle:oinstall / opt/oraclechmod-R 775 / opt/oraclemkdir / opt/tmp/ make use of when creating installation Temporary folder chmod + wr / opt/tmp used
The installation task of Oracle 11g should be performed as the user oracle, and the environment configuration of Oracle users should be adjusted appropriately to meet the requirements.
Vim / home/oracle/.bash_profile... umask 022 / / File permission mask export ORACLE_BASE=/opt/oracle/ define basic directory export ORACLE_HOME=$ORACLE_BASE/product/11.2/db_1/ define home directory export ORACLE_SID=orcl / / define database instance name export LANG=en_US.UTF-8 / / make sure to use the locale export NLS_LANG= "AMERICAN_AMERICA" .ZHS16GBK / / Oracle messages to use the language export PATH=$ORACLE_HOME/bin:$PATHexport DISPLAY=:0.0 / / tell the default display port number
5.Oracle user resource restriction requirements
The process session restriction can be realized by the pam_limits authentication module. The authentication is enabled by modifying the PAM setting of the login program login, and then the / etc/security/limits.conf file is modified to increase the number of processes that can be opened and the number of files used by the user oracle.
Vim / etc/pam.d/login...session required / lib/security/pam_limits.sosession required pam_limits.so
Vim / etc/security/limits.conf...oracle soft nproc 2047 / / soft limit on the number of processes oracle hard nproc 16384 / / hard limit on the number of processes oracle soft nofile 1024 / / soft limit on number of files oracle hard nofile 65536 / / hard limit on the number of files Oracle soft stack 10240 / / Oracle soft stack limit
Vim / etc/profile / / add the following. If [$USER = "oracle"]; then if [$SHELL = "bin/ksh"]; then ulimit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 fifi
In the part of Oracle user resource limit, if it is not configured, it will not affect the successful installation of Oracle database. However, considering that the server resources are infinitely occupied by bad SQL statements, resulting in no response to user requests for a long time, it is recommended to limit Oracle user resources in advance.
Note: restart the system after the preparatory work is installed
IV. Oracle 11g installation process
The official Chinese website of Oracle, which provides free download of Oracle 11g installation files (you need to register an account). Correctly select the system platform used (such as Linux x86), and then download the two ZIP packages, 1of2 and 2of2, respectively. After decompression, you can get the database folder, Oracle installation scripts, product manuals and other documents are located in this folder.
Unzip linux.x64_11gR2_database_1of2.zipunzip linux.x64_11gR2_database_2of2.zip
The installation of Oracle 11g is mainly carried out through runInstaller scripts. Visiting the web page, welcome.html can consult the product manual, including product instructions, release notes, installation guides and other documents, which provides a wealth of help information for administrators.
Once all the prerequisites are ready, you can begin the formal installation. If the current graphical desktop environment is logged in as another user, such as root, an authorization should also be added to allow the user oracle to use the graphics terminal. For example, "xhost + oracle@localhost" means to allow user oracle to access and execute from the local machine, and "xhost +" means to remove all restrictions.
Log in to the graphical desktop environment of RHEL 5.8 as user oracle and start the runInstaller script file in the database/ directory
Xhost + / / this operation requires su-oraclecd database in a graphical environment.
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.