In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. About Oracle database
1. Brief introduction of Oracle database.
Oracle is a database management system and the core product of Oracle. It has excellent performance in data security and security control, as well as data operation ability across operating systems and hardware platforms. Based on the client / server (Client/Server) system structure.
It can be said that Oracle database system is a popular relational database management system in the world at present. The system has good portability, easy to use and strong function, and is suitable for all kinds of large, medium, small and microcomputer environments. It is a database solution with high efficiency and good reliability, which adapts to high throughput.
2. Main features:
(1) support multi-user, large transaction volume transaction processing.
(2) excellent performance in maintaining data security and integrity.
(3) support distributed data processing. The databases published in different physical locations are connected with a communication network to form a logically unified database.
(4) data processing task.
(5) it is transplantable. Oracle can be used on Windows, Linux and other operating system platforms.
3. Basic concepts:
(1) Database. The database here is a collection of data stored on disk, which is physically represented as data files, log files, control files and so on. Logically exists in the form of tablespaces. You must create a database before you can use Oracle. Can be created on Database Configuation Assistant.
(2) Global database name. The identity used to distinguish a database. It consists of database name and domain name, which is similar to the domain name in the network, so that the naming of the database is unique in the whole network environment.
(3) Database instance. Each launched database corresponds to a database instance that accesses the data in the database.
(4) tablespace. Each database is made up of several tablespaces, and all the content created by the user in the database is stored in the tablespace. A tablespace can consist of multiple data files, but a data file can only belong to one tablespace.
(5) data file. The extension is .dbf, which is the file used to store database data. The data of many tables may be stored in a data file, and the data of a table can also be stored in multiple data files. There is no one-to-one relationship between data files and database tables.
(6) Control documents. The exhibition name .ctl is a binary file. Control files are necessary for database startup and operation. The name and location of the data file and log file are stored. Oracle 11g contains three control files by default.
(7) log files. The extension .log records all changes to the data and provides a data recovery mechanism to ensure that the database is restored after a system crash or other unexpected occurrence. In the course of work, multiple log filegroups are recycled.
(8) pattern and pattern object. A schema is a collection of database objects (tables, indexes, etc., also known as schema objects).
Second, install oracle
1. Experimental environment
physical memory is not less than 4G
swap switch partition not less than 8G
add a new disk space of not less than 15G
mount partition file type is xfs
GNOME Chinese Desktop Environment
2. Change the hostname and hosts files
Vi / etc/hostname / / change hostname Oracle vi / etc/hosts / / add host IP and hostname mapping
192.168.80.170 Oracle
Note: restart the virtual machine after the change
3. Install the software environment corresponding to Oracle
Yum-y install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel
4. Adjust kernel parameters
Vi / etc/sysctl.conf / / add the following
Fs.aio-max-nr = 1048576 # the recommended value for the number of asynchronous IO requests is: 1048576, in fact, it equals 1024,1024, that is, 1024K.
Fs.file-max = 6815744 # maximum number of open file handles to prevent file descriptor exhaustion
Kernel.shmall = 2097152 # Total shared memory pages, divided by 4K
Kernel.shmmax = 4294967295
Kernel.shmmni = 4096
Kernel.sem = 32000 32000 128 # SEMMSL: maximum number of signals per signal set SEMMNS: maximum number of signals used to control the entire Linux system SEMOPM: kernel parameters are used to control the number of signal operations that can be performed per semop system call SEMMNI: kernel parameters are used to control the maximum number of signal sets in the entire Linux system
Net.ipv4.ip_local_port_range = 9000 65500 # Port range for outbound connections
Net.core.rmem_default = 262144 # default value of socket receive buffer size
Net.core.rmem_max = 4194304 # maximum size of socket receive buffer size
Net.core.wmem_default = 262144 # default value of socket send buffer size
Net.core.wmem_max = 1048576 # maximum size of socket send buffer size
Sysctl-p / / reload the configuration file
5. User environment configuration
Groupadd oinstall / / add software installation group groupadd dba / / add database group useradd-g oinstall-G dba oracle/ / create oracle user passwd oracle/ / password 123123mkdir-p / orc/app/oracle/ / create Oracle installation directory chown-R oracle:oinstall / orc/app/ specify group chmod-R 755 / orc/app/oracle/ specify file read and write permissions
Vi / home/oracle/.bash_profile / / oracle user environment configuration
Add the following
Umask 022
ORACLE_BASE=/orc/app/oracle
ORACLE_HOME=/orc/app/oracle/product/12.2.0/dbhome_1/
ORACLE_SID=orcl
NLS_LANG= "SIMPLIFIED CHINESE_CHINA" .UTF8
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
LANG=zh_CN.UTF-8
Export PATH LANG NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID
Refresh the environment
Source / home/oracle/.bash_profile
6. Oracle user resource restrictions
Vi / etc/pam.d/login / / use pam_limits authentication module
Add the following
Session required / lib/security/pam_limits.so
Session required pam_limits.so
Deployment of vi / etc/security/limits.conf / / system resources
Add the following
Oracle soft nproc 2047 # number of processes available to a single user
Oracle hard nproc 16384
Oracle soft nofile 1024 # number of files that users can open
Oracle hard nofile 65536
Oracle soft stack 10240 # Stack Settings
Control of vi / etc/profile / / process and file count
Add the following
If [$USER = "oracle"]
Then
If [$SHELL = "/ bin/ksh"]
Then
Ulimit-p 16384 # buffer size
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536 # number of processes and files
Fi
Fi
7. Upload and download data files
Https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Transfer the downloaded installation package to / home/oracle/ chmod 755-R / home/oracle/database/export DISPLAY=:0xhost + / / to root user operation su-oracle/ / switch oracle user export DISPLAY=:0.0cd database./runInstaller installation!
8. Log in to the graphical interface as oracle
Next, after the summary appears in the following figure, you can continue with the installation.
The pop-up window in the main picture is directly selected and determined.
9. Log in using the oracle user
Sqlplus / as sysdba (sys users are the top administrators of oracle, so add as)
10. Opening and closing of the database
Enable: startup
Start the three stages
Open an instance
Load the database
Open the database
Close:
Shutdown normal (transaction wait, long time) shutdown immediate (recommended) shutdown transactionalshutdown abort (special case, data may be lost)
Monitoring will be turned off by default after restarting the database!
11. Enable monitoring mode
[oracle@Oracle ~] $lsnrctl LSNRCTL > start [oracle@Oracle ~] $lsnrctl stop
12. Open the web management page
Https://oracle:5500/em/login
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.