Linux centos7 virtual machine installation Oracle11g complete tutorial

                                    Linux centos7 virtual machine installation Oracle11g complete tutorial

Installing Oracle under Linux is much more cumbersome than installing Oracle under Windows. There are a lot of cumbersome preparatory work. Oracle has two pre-installation checks. The preparatory work is actually done around these two checks.

The first check: check when the Oracle installer is started, check content: 1. swap size detection, at least 150M above swap2, remaining disk space, at least 120M disk space remaining 3, is the desktop environment.

The second check: 1. Optimization of some options of the kernel, 2. Check swap again, requiring swap to be at least equal to the size of physical memory, 3. Oracle installation requires some compilation tools and some link libraries. To speak of it, it means that you need some rely.



Build the environment before installation according to the above inspection requirements:

1. Install the desktop. If you have a minimal installation, there is no desktop. At this time, you need to mount your installation CD or keep the machine connected to the Internet to configure epel and available basic package sources. It is recommended to use the installation CD to configure the local source ( high speed).

Configuring local sources is not nonsense, there is nothing to say, Baidu that doesn't know, it's a basic thing. Regardless of whether it is a local source or an external network source, the commands used are the same, the commands are as follows:

yum group list

[root@centos55 ~]# yum group list
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Installed Environment Groups:
   GNOME Desktop#常用的是这个
Available Environment Groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI #这个是桌面,但其它无关的软件带的太多,不建议使用
   KDE Plasma Workspaces# 可以使用这个
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

Generally centos comes with two desktops, one is gnome, the other is kde, the most commonly used is gnome, the installation command is:

yum groupinstall 'GNOME Desktop' -y

Wait about 10 minutes to install the desktop. After the installation is complete, enter the command: startx to enter the desktop. (It should be noted that openjdk and vim and other software are installed at the same time as the desktop installation).

2. The establishment of Oracle users

groupadd oinstall && groupadd dba && useradd -g oinstall -G dba oracle #This command is to create two groups oinstall and dba groups, create a new Oracle user and add the user to these two groups.

Give Oracle this user password as a backup, the command is: passwd oracle (executed under root user)

3. To switch to the oracle user, usually use the command su-oracle. Edit the environment variable configuration file of the oracle user, vim ~/.bash_profile add the following at the end of the file:

DISPLAY=:0

export DISPLAY

Then activate the environment variable, source ~/.bash_profile, verify whether it takes effect: xhost +, the output is normal as follows:

4. Swap settings

As mentioned in the previous article, the second test is that the physical memory and swap are at least equal, so swap is mounted using the swap file method. The virtual machine's memory is 4g, so the swap plan is set to 4g. The command is as follows:

dd if=/dev/zero of=/opt/swap bs=100M count=40 #Wait a few minutes to generate a 4g file named swap in the /opt directory.

mkswap  /opt/swap && swapon /opt/swap

Since the swap size is only detected during the installation process, there is no need to write the fstab file. If you want to install again after restarting, execute mkswap /opt/swap && swapon /opt/swap again.

5. Dependent installation

yum -y install binutils compat compat-libstdc gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel

7. Modification of kernel parameters

[root@centos55 ~]# vim /etc/sysctl.conf 
[root@centos55 ~]# sysctl -p
fs.aio-max-nr = 65536
fs.file-max = 6553600
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
kernel.shmmni = 4096
kernel.sem = 250 32000 32 128
net.ipv4.ip_local_port_range = 32768    60999
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

Please refer to my blog post for the accurate parameter setting method: https://blog.csdn.net/alwaysbefine/article/details/108827495 

8. Preparation of the installation package

https://pan.baidu.com/s/1-7qjSD1LNVPzNXHtdMpLTw  Extraction code: orcl

There are three installation packages, after uploading them to the server, decompress them separately, and place the decompressed stuff in the root directory or /opt directory. (Since the system installed openjdk on its own initiative when installing the desktop, the Oracle pop-up window cannot be displayed normally, and the fault is as shown in the figure below, so use the built-in jdk)




If the above steps are strictly completed, then the formal installation can begin.

Formal installation:

1. As mentioned earlier, the decompressed files are placed in the /opt folder to execute the command:

[oracle@centos55 ~]$ bash /opt/database/runInstaller -jreLoc /usr/local/jdk/
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 54034 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3999 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

After three passes, the installation interface appears after waiting a few seconds. Note that the space after -jreLoc is not an equal sign. After decompressing the jdk compressed file, it is moved to the /usr/local/ directory and renamed to jdk. This jkd ​​does not need to set environment variables Oh.

2,

3, 

4,

5,

 

6.

 

7.

 

8.

 

9.

 

After the next step, you can finish, click Finish to enter the stage of establishing the database.

The stage of establishing the database:

For the solution to the error reported in the progress bar 68 or 84, see the blog: https://blog.csdn.net/alwaysbefine/article/details/112403053  .

 

 

bash /home/oracle/app/oraInventory/orainstRoot.sh  

bash /home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh

At this point, the Oracle installation is complete, and you still need to configure some environment variables for subsequent use. These are later things, I will talk about it later.

 

Guess you like

Origin blog.csdn.net/alwaysbefine/article/details/112425428