In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Zero error report installation of oracle11glinux platform
One: preparatory work:
Required software: VMware-workstation-full-10.0.0-1295980
Operating system: Linux] .TLF-SOFT-Redhat.Enterprise.Linux.v5.UPDATE.8.X86_64.DVD-HOTiSO.iso
Remote login software: Xmanager Enterprise 3
Database software: linux.x64_11gR2_database_1of2.zip
Linux.x64_11gR2_database_2of2.zip
Linux.x64_11gR2_grid.zip
Second: first install the linux system (prepare before installing the database)
1. Use VMware-workstation-full-10.0. Install a Redhat.Enterprise.Linux.v5.UPDATE.8.X86_64 system
New virtual machine
Choose linux 5 because version 5 is more stable
Enter the name of the virtual machine and where to store it-- next step
The size of the disk is larger, and other experiments will be done later.
For the newly built virtual machine, add linuxISO image, and enlarging the memory is necessary for the installation experiment. The minimum requirement for oracle is 1G oracle-OK.
Second: partition the new virtual machine
Select a custom partition and disk allocation.
/ boot 100M
Swap 4G
/ tmp 4G
/ 15G
/ U01 the rest is for oracle software installation
Set up IP
Set hostname
Select time zone
Select UTC
Login password
Select package customization
Editor browser
Development: right-click all installations
Three: select the installation package
Five: turn off the firewall and SELinux
Etc.
Set the local address of VMnet2 to 192.168.100.123Universe 24
Installation tool
Next all the way
Chkconfig sendmail off accelerates startup speed
Rpm-aq | grep ssh checks SSH
Free checks swap and storage
[root@loveoracle ~] # grep MemTotal / proc/meminfo (check memory first, 2G is recommended)
MemTotal: 2058780 kB
[root@loveoracle ~] # grep SwapTotal / proc/meminfo (check swap)
SwapTotal: 4192924 kB
[root@loveoracle ~] # df-hT (check the U01 directory)
Filesystem Type Size Used Avail Use% Mounted on
/ dev/sda6 ext3 27G 173M 25G 1% / U01
Add shmfs / dev/shm tmpfs size=10g 0 (modify startup item)
two。 Check the installed version
Df-h / dev/shm/ (check)
Uname-rm (check version)
Df-h / tmp (check tmp)
3. Check the installation of the package
Then comes the most troublesome part of checking the package installation
To check that we installed the following packages: 11.2.0.1
Binutils-2.17.50.0.6
Compat-libstdc++-33-3.2.3
Compat-libstdc++-33-3.2.3 (32 bit)
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 (32 bit)
Glibc-common-2.5
Glibc-devel-2.5
Glibc-devel-2.5 (32 bit)
Glibc-headers-2.5
Ksh-20060214
Libaio-0.3.106
Libaio-0.3.106 (32 bit)
Libaio-devel-0.3.106
Libaio-devel-0.3.106 (32 bit)
Libgcc-4.1.2
Libgcc-4.1.2 (32 bit)
Libstdc++-4.1.2
Libstdc++-4.1.2 (32 bit)
Libstdc++-devel 4.1.2
Make-3.81
Sysstat-7.0.2
Rpm-qa | grep libaio-devel (this package is not installed by default)
Rpm-qa | grep unixODBC (this package is very important for the driver)
This ODBC package is dependent-"it is recommended to install it in yum."
Configure yum
1 establish yum source-> CD
Insert CD (system disk)
Mount / dev/cdrom / mnt
2 set yum source
Cd / etc/yum.repos.d/
Cp rhel-debuginfo.repo rhel-debuginfo.repo.bak
Vim rhel-debuginfo.repo
Modify it.
[rhel-debuginfo]
Name=Red Hat Enterprise Linux $releasever-$basearch-Debug
Baseurl= file:///mnt/Server specifies the yum source
Enabled=1 enables yum
Gpgcheck=0 disable parity
Yum clean all clears the cache
Yum list test
Pack a bag
Yum-y install unixODBC
Check at the same time
Still missing unixODBC-devel-2.2.11 (64 bit) or later
Yum-y install unixODBC-devel
Then we go back one by one to check whether the bags are installed or not.
Rpm-qa | grep sysstat (this is the last one, all of you need to check)
4. Create users and groups
Next, let's start to set up groups and users [root@loveoracle ~] # / usr/sbin/groupadd oinstall (first set up oinstall groups)
[root@loveoracle] # / usr/sbin/groupadd-g 502 dba to establish dba group
[root@loveoracle] # / usr/sbin/groupadd-g 503 oper to establish oper group
[root@loveoracle] # / usr/sbin/groupadd-g 504 asmadmin to establish asmadmin group
[root@loveoracle] # / usr/sbin/groupadd-g 506 asmdba to establish asmdba group
[root@loveoracle] # / usr/sbin/groupadd-g 505 asmoper to establish asmoper group
[root@loveoracle ~] # / usr/sbin/useradd-u 502-g oinstall-G dba,oper,asmdba oracle create oracle users
[root@loveoracle ~] # passwd oracle set password oracle
[root@loveoracle ~] # / usr/sbin/useradd-u 503-g oinstall-G asmadmin,asmdba,asmoper,dba grid create grid group
[root@loveoracle ~] # passwd grid set password oracle
Let's check it out when we're done.
[root@loveoracle ~] # id oracle
Uid=502 (oracle) gid=501 (oinstall) groups=501 (oinstall), 502,503 (oper), 506 (asmdba)
Grid must belong to the oinstall group, the primary group is oinstall, and its additional group is dba,oper,asmdba
[root@loveoracle ~] # id grid
Uid=503 (grid) gid=501 (oinstall) groups=501 (oinstall), 502,504 (asmadmin), 506 (asmdba), 505 (asmoper)
At this point, our users and groups have been established.
Configure kernel parameters
Vim / etc/security/limits.conf
# for oracle
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
# for grid
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft stack 10240
[root@loveoracle ~] # vim / etc/sysctl.conf modify parameters at the bottom of the text
# for oracle softe
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 4294967295
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 = 1048576
Effective configuration directory after [root@loveoracle] # / sbin/sysctl-p is modified
We need to set up a total of three directories, the first is the root directory of the software installation, the second belongs to the list directory, and the third belongs to the software directory.
[root@loveoracle] # mkdir-p / u01/app/oracle
[root@loveoracle] # mkdir-p / u01/app/grid
[root@loveoracle] # chown-R grid:oinstall / U01
[root@loveoracle] # chown-R oracle:oinstall / u01/app/oracle
[root@loveoracle] # chmod-R 775 / U01
Check
[root@loveoracle] # ll-d / u01/app/grid
Drwxrwxr-x 2 grid oinstall 4096 Jul 16 21:21 / u01/app/grid
[root@loveoracle] # ll-d / u01/app/oracle
Drwxrwxr-x 2 oracle oinstall 4096 Jul 16 21:20 / u01/app/oracle
Configure the user's environment variables
Both oracle grid users need to configure environment variables.
Cd / home/oracle/
Vim .bash _ profile
Join:
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_SID=orcl (name of instance)
Export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/dbhome_1 (oracle software installation directory)
Cd / home/grid
Vim .bash _ profile
Join:
Export ORACLE_BASE=/u01/app/grid
Export ORACLE_SID=+ASM (ASM instance name)
Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid (grid software installation directory)
Extension: check variable settings or take effect
Method 1: echo $variable name
Echo $ORACLE_HOME
Method 2: env | grep ORACLE_HOME
Umask 022
Source .bash _ profile takes effect immediately after the addition is completed.
So far, we have built an installation environment for oracle.
4. Install grid software
Oracle installation ideas:
Oracle to use ASM as storage must install 2 software, first install grid, then install oracle software, finally build library, configure client end user connection. Be sure to install it in this order.
Next we prepare two ASM disk groups, one for data storage and one for database recovery.
In a general production environment, we all have external redundancy (External redundancy), that is, hardware RAID+data.
Save data High redundancy+fra Storage recovery File Normal redundancy
At least 5 hard drives are required, each of which is at least 20g (this environment is more like a real production environment)
[grid@loveoracle ~] $uname-rm (check the kernel, because the driver will be installed soon)
2.6.18-308.el5 x861664
Http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html downloads and installs drivers, and downloads drivers according to the kernel.
General package download
Shut down the virtual machine and add 5 hard drives for 20g
Check the hard drive and partition after power on
Fdisk-l check to see if 5 new hard drives have been created.
Partition: one hard disk, one partition.
Fdisk / dev/sdb
N
P
one
Enter
Enter
W this should be easy, and it doesn't matter to the students who haven't studied linux.
Partprobe / dev/sdb effective
The rest of the sdc,sdd,sde,sdf needs to complete the same steps.
Be sure to check it after the division.
1. Install the ASM driver and go to the official website to download according to the system architecture.
When the download is complete, we upload it to the system and install it.
[root@loveoracle disk] # rpm-ivh *. Rpm then installs the three packages together, as long as there are only three packages.
-- so we can install the drive.
[root@loveoracle disk] # rpm-qa | grep oracleasm is installed and checked.
[root@loveoracle disk] # / etc/init.d/oracleasm configure configuration driver
[root@loveoracle disk] # / etc/init.d/oracleasm status check whether the ASM is ready
-- so we can install the drive.
After checking, put 5 partitioned asm disks.
[root@loveoracle] # / etc/init.d/oracleasm createdisk DISK1 / dev/sdb1
Marking disk "DISK1" as an ASM disk: [OK]
[root@loveoracle] # / etc/init.d/oracleasm createdisk DISK2 / dev/sdc1
Marking disk "DISK2" as an ASM disk: [OK]
[root@loveoracle] # / etc/init.d/oracleasm createdisk DISK3 / dev/sdd1
Marking disk "DISK3" as an ASM disk: [OK]
[root@loveoracle] # / etc/init.d/oracleasm createdisk DISK4 / dev/sde1
Marking disk "DISK4" as an ASM disk: [OK]
[root@loveoracle] # / etc/init.d/oracleasm createdisk DISK5 / dev/sdf1
Marking disk "DISK5" as an ASM disk: [OK]
In this way, we will turn all the five disks into ASM disks.
[root@loveoracle ~] # / etc/init.d/oracleasm listdisks (check whether the disk is configured)
DISK1
DISK2
DISK3
DISK4
DISK5
! Start installing grid software
An obvious error occurred here and the remote server could not be opened.
Solution:
After the cache of the connection is clear, after reconnecting
Exit the current terminal and reconnect
Ctrl+D exits the current user's shortcut
The Xclock command tests whether the Xwindows service is turned on
Upload the server, and then
Su-grid
Cd / disk
Unzip linux.x64_11gR2_grid.zip decompression
Check whether the software is completely decompressed by cd grid.
Open xamnager-passive
Export DISPLAY=192.168.10.123:0.0 modifies variables
Xhost +
. / runInstaller startup software
It is successful when you see the interface below (the speed of starting the interface is determined by the computer)
Select stand-alone server
Choose English
Choose high and 3 disks, which is very important. If the 5 disks we defined are not shown here, then we are making a mistake.
Password all oracle
We establish the correspondence of the group.
Our root directory and software installation directory
Our list directory this directory must have write permission, and the group to which it belongs is oinstall
All checks are complete.
Start installation
Install to the last prompt to execute 2 scripts with root identity
/ u01/app/oraInventory/orainstRoot.sh
/ u01/app/grid/product/11.2.0/grid/root.sh
After the execution, click ok and we will continue.
Finally, the installation is complete.
5. Install the oracle database
Upload the installation package to the / disk directory
Switch to the oracle user to extract the installation package and install it in turn.
Install oracle
If there is no mailbox, it will not be filled in. In the production environment, you can fill in as needed; prompt not to fill in the e-mail address, ignore the point yes
Install database software
Select the configuration window for installing single instance and node selection
Select English, language selection configuration window
Enterprise version of the database, select the database version
Database software root directory, specify installation location
What group is the database in? the operating system group permissions are all in accordance with the default, and then the next step is to check the necessary configuration.
Check for 100% fault-free, and after the check, there is a summary of all options to see if the configuration is wrong.
The pop-up box runs the script / u01/app/oracle/product/11.1.0/dbhome_1/root.sh with root
The script is not finished, do not click OK.
Finally finish a little OK.
6. Create a database with the name oracle
1. First create FRA disk groups to store backups and logs, which need to be created by using the grid user
Under the grid user, cd ~ returns to the user's home directory
The last line of vim .bash _ profile adds: export PATH=$ORACLE_HOME/bin:$PATH
Add / u01/app/grid/product/11.2.0/grid/bin to PATH
Source .bash _ profile
If there is no asmca command, the environment variable is misconfigured.
Pop up. Create a disk group.
Then click OK
The server is creating a FRA disk group
Ok exits after it is successfully created. This is the FRA disk group created above.
At this point, our database is officially installed.
Next, build the library.
two。 Next, switch to the oracle user and build the library.
Su-oracle
Vim .bash _ profile join: export PATH=$ORACLE_HOME/bin:$PATH
Source .bash _ profile
Check echo $PATH
The configuration interface appears after initialization
Create a database
Select generic database
Database name
Select configure single instance Enterprise Manager (EM), and then click Next
Set the administrator password to oracle, and then Next
Select storage type: ASM, and then select the database area as + DATA
Select the specified FRA, and then select the + FRA we created
Create a recovery area
To enable a style database, we need to learn. There is no need in production.
If you give 512m memory, you can give 1024.
Select ZHS16GBK for character set, other defaults.
Click Finish, and an overview of creating a database will appear
Select Create Database
This will begin the installation
In 20 minutes,
After waiting for the installation to complete, a dialog box will pop up, you can use Password Management, and if you don't need it, you can Next
7. For oracle users, use sqlplus to test whether the database is established successfully.
Su-oracle
Sqlplus / as sysdba
Show user
Select status from v$instance
Fi exit sql statement
Show parameter instgance
Selectg ename,sal from scott.emp
Error report:
[oracle@master ~] $sqlplus sysdba/oracle@10.1.1.10:1521/orcl
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 26 13:01:12 2019
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
Descriptor
Note: paste directly and don't mess up the format.
[oracle@master admin] $cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = master.example.com) (PORT = 1521))
)
)
ADR_BASE_LISTENER = / oracle/oracle
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = / oracle/oracle/11g)
(SID_NAME = orcl)
)
)
[oracle@master admin] $
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.