Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation method of Linux Database

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to install Linux database". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "Linux database installation method" it!

After learning the linux course, you will begin the process of practice, so that you can remember firmly and put what you have learned into practice.

With the basic commands, you can try to install the database.

1. Enterprise environment

You need to install the VMWare ESXi virtual machine, and then create a new virtual machine in it.

Mirror vmware-viclient-all-5.1.0-1064113-5.1.exe

You can remotely connect the ESXi virtual machine through the client VMware vSphere Client 6.0.Then you can install the operating system.

two。 Create a new virtual machine after connecting the host

Linux cannot paste the workaround after the ESXi virtual machine has installed the operating system

Name Value

Isolation.tools.copy.disable false

Isolation.tools.paste.disable false

Configure the database after the completion of the 3.Linux operating system. How can I learn to install a database? Only if you have learned the basics and are proficient in Linux commands will you get started. For those of you who have no foundation, you need to learn the basics first, learn the basics first, and then you will know every step of installing the database.

4. Practice needs to have a theoretical basis. Turn off firewall, selinux, set static network and boot item, check if there is something wrong with the network configuration. This is a centoes or Linux7 version of the command, but it is universal. Linux6 or below is service iptables stop.

Turn off the firewall:

[root@khapp15 ~] # systemctl stop firewalld # stop the firewall service

[root@khapp15 ~] # systemctl disable firewalld # disable boot

Close SELINUX

[root@khapp15 ~] # vim / etc/sysconfig/selinux

SELINUX=disabled

# SELINUXTYPE=targeted # comment out

[root@khapp15 ~] # setenforce 0 # close selinux

Setenforce 0 # puts SELinux into Permissive mode (tolerance mode)

There are three modes for SELiunx:

Enforcing (mandatory mode): starts to restrict domain/type

Permissive (tolerance mode): there will only be warning messages

Disabled (off): turn off SELinux

[root@khapp15 ~] # / usr/sbin/sestatus-v # View SELinux status

Then carry on the network configuration, this is the most critical, the network configuration is not good, there will be problems.

[root@khapp15 ~] # vim / etc/sysconfig/network-scripts/ifcfg-ens33

# pay attention to the red part

TYPE=Ethernet

PROXY_METHOD=none

BROWSER_ONLY=no

BOOTPROTO=static # static IP

DEFROUTE=yes

IPV4_FAILURE_FATAL=no

IPV6INIT=yes

IPV6_AUTOCONF=yes

IPV6_DEFROUTE=yes

IPV6_FAILURE_FATAL=no

IPV6_ADDR_GEN_MODE=stable-privacy

NAME=ens33

UUID=59efd265-266c-4355-9a50-11961f1523bc

DEVICE=ens33

ONBOOT=yes # Boot start

IPADDR=172.22.0.203 # needs to be the same as the company environment

PREFIX=255.255.252.0 # needs to be the same as the company environment

GATEWAY=172.22.0.1 # needs to be the same as the company environment

DNS1=8.8.8.8

IPV6_PRIVACY=no

Restart the network card

[root@khdata16] # systemctl restart network or service restart network

5. Create users and set passwords, which can be found in "this is how Linux should learn", the first of which are the basic commands.

[root@khapp15 ~] # useradd oracle

[root@khapp15 ~] # passwd oracle

123456

6. Install the database yum, configure yum, this is the nose must know, if you forget, you can check out the "Linux should learn" this book, step by step.

Install dependency packages

Common installation packages

[root@khdata16 khtool] # yum-y install autoconf automake binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel

Oracle prerequisite dependency package

[root@khdata16 khtool] # yum-y install compat-db compat-gcc-34 compat-gcc-34-c++ compat-libstdc++-33 glibc-* glibc-*.i686 libXpm-*.i686 libXp.so.6 libXt.so.6 libXtst.so.6 libgcc_s.so.1 ksh libXp libaio-devel numactl numactl-devel unixODBC unixODBC-devel

# the second version, it is recommended to execute it again.

[root@khdata16 khtool] # yum-y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat

Install the Library of libXp, which must be installed, otherwise java Exception will appear when you install Oracle.

[root@khdata16 khtool] # yum install libXp

7. Configure the system kernel parameters, where these configuration files are, which must also be remembered. This is the organizational structure of the Linux file system, which needs to be understood. You can see "this is how Linux should learn."

Edit / etc/sysctl.conf

# vim / etc/sysctl.conf

Add the following

Kernel.shmall= 2097152

Kernel.shmmax= 2147483648

Kernel.shmmni= 4096

Kernel.sem= 250 32000 100 128

Net.ipv4.ip_local_port_range= 1024 65000

Net.core.rmem_default=4194304

Net.core.rmem_max=4194304

Net.core.wmem_default=262144

Net.core.wmem_max=262144

[root@oracle204 jxsoft] # / sbin/sysctl-p

Kernel.shmall = 2097152

Kernel.shmmax = 2147483648

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 1024 65000

Net.core.rmem_default = 4194304

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 262144

Edit / etc/security/limits.conf

[root@khdata16 khtool] # vi / etc/security/limits.conf

# add the following four lines in the trailing line

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Edit / etc/pam.d/login

[root@khdata16 khtool] # vi / etc/pam.d/login

# add the following two lines to the tail line

Session required / lib64/security/pam_limits.so

Session required pam_limits.so

Modify / etc/profile

[root@khdata16 khtool] # vi / etc/profile

Add the following code to profile, under pathmunge (). When adding code, be sure to note that in the syntax here, spaces are required between if and [] and on both sides of the =. If you do not add spaces, an error will be reported when the code here is executed.

If [$USER = "oracle"]; then

If [$SHELL = "/ bin/ksh"]; then

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

Fi

Set up oinstall and dba groups and set Oracle password

[root@oracle204 jxsoft] # groupadd oinstall

[root@oracle204 jxsoft] # groupadd dba

[root@oracle204 jxsoft] # useradd-g oinstall-G dba oracle

[root@oracle204 jxsoft] # passwd oracle

Change the password of user oracle.

New password:

Re-enter the new password:

Passwd: all authentication tokens have been successfully updated.

[root@oracle204 jxsoft] #

Modify Linux distribution information

# vim / etc/redhat-release

# CentOS Linux release 7.4.1708 (Core)

Redhat 4

Configure kernel parameters:

# vim / etc/sysctl.conf

-- add the following:

-1002 is the gid of the oracle user group dba (life: id oracle check gid)

Vm.hugetlb_shm_group=1002

# / sbin/sysctl-p

Create the installation folder and data storage directory for oracle

[root@oracle204 jxsoft] # mkdir-p / u01/app/oracle/product/10.2.0/db_1

[root@oracle204 jxsoft] # chown-R oracle:oinstall / u01/app/oracle/product/10.2.0/db_1

[root@oracle204 jxsoft] # chmod-R 775 / u01/app/oracle/product/10.2.0/db_1

[root@oracle204 jxsoft] #

Configure environment variables for oracle users

# cd / home/oracle

# vim .bash _ profile-add the following

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=jdjcdb

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

Configure Linux host

Check whether there is a record of localhost in the / etc/hosts file (point to 127.0.0.1). If not, there will be some problems when configuring Oracle snooping later, resulting in unable to start snooping. You can add this record here manually.

[root@khdata16 ~] # cat / etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

-- the first phase of configuration is completed--

Decompress and grant Oracle permission

[root@oracle204 oracle] # cd / opt/jxsoft/

[root@oracle204 jxsoft] # ls

10201_database_linux_x86_64.cpio.gz rcjgcp_tj.rar

Apache-tomcat-7.0.90.tar.gz readline-6.2.tar.gz

Exp_tjypjg.dmp rlwrap-0.37.tar.gz

Jdk-6u45-linux-x64.bin tjqxjg.dmp

P8202632_10205_Linux-x86-64.zip ypltjg.zip

Pdksh-5.2.14-37.el5_8.1.x86_64.rpm

[root@oracle204 jxsoft] # gunzip 10201_database_linux_x86_64.cpio.gz

[root@oracle204 jxsoft] # cpio-idmv

< 10201_database_linux_x86_64.cpio [root@oracle204 jxsoft]# chown -R oracle:oinstall /opt/jxsoft/database/ 注销及重新登录。注销掉root用户,使用Oracle用户登录(重要!!!必须重启进入) [oracle@oracle204 ~]$ cd /opt/jxsoft/database/ [oracle@oracle204 database]$ ls doc install response runInstaller stage welcome.html 解决安装时出现中文乱码问题: [root@khdata16 database]# export 解决图形化安装的问题: #先切换到root用户,执行xhost + [root@khdata16 ~]# xhost + access control disabled, clients can connect from any host 切回oracle用户执行,192.168.188.1:为客户端的ip [oracle@khdata16 database]$ export DISPLAY=192.168.188.1:0.0 执行安装 QUI -10035 chown -R oracle:oinstall /u01/app $ chmod -R 755 /u01/app QUI-25031 修改/etc/hosts文件,增加IP地址与主机名的映射如下: Ip hostname ora 27125 #id oracle 可以看到oracle组dba id 为501 修改内核参数 # echo "501" >

/ proc/sys/vm/hugetlb_shm_group

The above two options do not show ticking, indicating that the check failed.

# because it is warning, it does not have to be solved. The first solution (adding a swap partition):

[root@oracle204 oracle] # cd /

[root@oracle204 /] # mkdir swapimage

[root@oracle204 /] # cd swapimage/

[root@oracle204 swapimage] # dd if=/dev/zero of=/swapimage/swap bs=1024 count=2500000

Recorded the reading of 250000000000.

Recorded the write-out of 250000000000000.

2560000000 bytes (2.6GB) replicated, 47.8377 seconds, 53.5 MB/ seconds

[root@oracle204 swapimage] # mkswap / swapimage/swap

Setting swap space version 1, size = 2499996 KiB

No tag, UUID=9c2d05f0-f965-4e26-abe6-4e5fad52228c

[root@oracle204 swapimage] # vim / etc/fstab

/ swapimage/swap swap swap defaults 0 0

[root@oracle204 swapimage] # swapon / swapimage/swap

Swapon: / swapimage/swap: unsafe permission 0644. It is recommended to use 0600.

[root@oracle204 swapimage] #

The second solution:

1 check / etc/hosts to see if it is in this form:

Vi / etc/hosts

127.0.0.1 localhost

172.22.22.242 jcyoracle

Note: the first line should be written in this form, not 127.0.0.1 your hostname localhost.

The second line represents the machine IP and hostname

2 View / etc/sysconfig/network, check hostname

Vi / etc/sysconfig/network

NETWORKING=yes

HOSTNAME=jcyoracle

DNS1=8.8.8.8

3 check whether the hostname is the current hostname

[root@localhost swapimage] # hostname

Jcyoracle

# if not, make the running hostname temporarily effective as

[root@localhost swapimage] # hostname jiacuiyun

[root@localhost swapimage] # hostname

4. Restart the network service.

[root@localhost swapimage] # systemctl restart network

At this point, the database is installed. In fact, it is not difficult, as long as you have learned "this is how to learn Linux", you can install it, because all the basic commands are used, so the foundation is still very important.

At this point, I believe that everyone on the "Linux database installation method" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report