Linux platform up to the dream database instance V7 single command line mode of installation

I. Introduction

When we learn any application, understand its initial step is usually to learn how to install configuration, after the sequence before going to care about how to use the learning database up to the dream, too, and dream up a database installation provides a variety of ways, then each installation will be introduced one by one, up to the dream database supports the installation of multiple operating system platforms, This part describes the command line in Linux platform installation.

Two installation requirements

2.1 Hardware requirements

The user should select the appropriate hardware configuration, such as CPU indicators, memory, disk capacity and the like according to the needs and applications of DM. Some grades should generally be as high as possible, especially as the database server machine, preferably with a large memory to run Java-based procedures. Other devices such as UPS applications, etc. should also be considered important. DM installed below give the required basic hardware configuration:

  • CPU: Intel Pentium4 (recommended Pentium 41.6G or more) processors
  • Memory: 256M (512M or more recommended)
  • HDD: 5G free space above
  • NIC: 10M or more NICs support TCP / IP protocol
  • Drive: CD-ROM drive 32 or more
  • Graphics Support: 1024 768 256 or more color display
  • Display: SVGA monitor
  • Keyboard / Mouse: ordinary keyboard / mouse

Since DM is based on a client / server database management system a large, generally should be used in a network environment, the client and server are on different machines, the hardware environment typically includes a network environment (e.g., a LAN). If only a single PC, DM also allows the use of all software installed on the same PC.

2.2 Software Requirements

DM run the required software requirements are:

  • Operating System: Windows (Simplified Chinese Edition server sp2 above) / Linux (glibc2.3 above, the kernel 2.6, KDE / GNOME desktop environment has been installed, it is recommended UnixODBC pre-installed components)
  • Network protocols: TCP / IP
  • System disk: free space of at least more than 1G

In addition, if you want the database application development, the client can be equipped with VC, VB, DELPHI, C ++ Builder, PowerBuilder, JBuilder, Eclipse, DreamWeaver, Visual Studio.NET and other application development tools. To use DM ODBC driver, make sure the Windows operating system already installed ODBC Data Source Administrator, and it works fine.

Before you install three

The installation of the Linux platform for Kylin 6.0:
[dmdba @ dm3 Desktop] $ CAT / etc / Issue
NeoKylin General Linux Server Release 6.0 (Dhaulagiri)

3.1 operating system information checks

DM user before installation, you need to check information about the current operating system, make sure the installer DM match the current operating system, to ensure that the DM able to correctly install and run. The user can check the basic operating system information, use the following command. As shown below:
- # Get System-digit
getconf LONG_BIT
- # querying the operating system release information
lsb_release -a
- # query system information
CAT / etc / Issue
- # query system name
uname -a
Linux platform up to the dream database instance V7 single command line mode of installation

3.2 firewall and SELinux off

For Kylin 6.0 system, firewall and SELinux is off by default, as shown below:
Firewall:
command: system-config-firewall

SELinux:
[root@dm3 etc]# getenforce
Disabled

3.3 edit the hosts file

Modify / etc / hosts file on the host name and IP address corresponding to:
[root @ dm3 etc] # CAT / etc / hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.128 .1.3 dm3

3.4 Creating installation and user groups

To reduce the impact on the operating system, the user should not have to install and run the DM system as root user. Users can create a dedicated system for the DM user prior to installation.

  1. Create an installation user group dinstall.
    groupadd dinstall
  2. Create an installation user dmdba.
    useradd -g dinstall -m -d / home / dmdba -s / bin / bash dmdba
  3. Initialize the user password.
    passwd dmdba
  4. After the prompt for the password set by the system.
    Note: After you create a user completes the operation after the default installation manual installation using the installation system, users of the system to operate.

    3.5 plan and create the installation directory

    Contents Planning:
    / usr / appsoft / dmdbms: DaMeng database software installation location
    / usr / appsoft / dmdata: DaMeng database data storage directory
    / usr / appsoft / dmarch: dream up a database archive log directory
    / usr / appsoft / dmbak: up dream database backup directory

[root@dm3 ~]# mkdir -p /usr/appsoft/dmdbms
[root@dm3 ~]# mkdir -p /usr/appsoft/dmdata
[root@dm3 ~]# mkdir -p /usr/appsoft/dmarch
[root@dm3 ~]# mkdir -p /usr/appsoft/dmbak
[root@dm3 ~]# chown -R dmdba:dinstall /usr/appsoft/dmdbms
[root@dm3 ~]# chmod -R 775 /usr/appsoft/dmdbms
[root@dm3 ~]# chown -R dmdba:dinstall /usr/appsoft/dmdata
[root@dm3 ~]# chmod -R 775 /usr/appsoft/dmdata
[root@dm3 ~]# chown -R dmdba:dinstall /usr/appsoft/dmarch
[root@dm3 ~]# chmod -R 775 /usr/appsoft/dmarch
[root@dm3 ~]# chown -R dmdba:dinstall /usr/appsoft/dmbak
[root@dm3 ~]# chmod -R 775 /usr/appsoft/dmbak

3.6 Check the configuration operating system resource limits

In Linux (Unix) systems, because there ulimit command, the program will use the operating system resource limit. In order to make the DM to function properly, it is recommended to check ulimit parameters currently installed user. Run ulimit -a queries. As shown below:
Linux platform up to the dream database instance V7 single command line mode of installation
Parameter Restrictions:

  1. seg size the Data
    the Data seg size (Kbytes, -d)
    recommends that users set to 1048576 (ie 1GB) above or unlimited (unlimited), this parameter is too small, the database failed to start.
  2. size File
    File size (Blocks, -f)
    recommends that users set to unlimited (unlimited), this parameter is too small, the database installation or initialization failed.
  3. Files Open
    Open Files (-n)
    recommends that users set to 65536 or more, or unlimited (unlimited).
  4. Memory Virtual
    Virtual Memory (Kbytes, -v)
    recommends that users set to 1048576 (ie 1GB) above or unlimited (unlimited), this parameter is too small, the database failed to start.
    If users need to install the current resource limits users to change the ulimit, modify the file /etc/security/limits.conf.

    3.7 Configuration Environment Variables

    Add the following in / etc / profile or user dmdba ~ / .bash_profile Lane:
    Export DM_HOME = "/ usr / appsoft / dmdbms"
    Export the LD_LIBRARY_PATH = "$ DM_HOME / bin: $ the LD_LIBRARY_PATH"
    Export the PATH = "$ DM_HOME / bin: $ PATH "

    Three of the dream database software command-line installation

    Insert DaMeng database on CD-ROM or ISO convey dream database file to the server, the installation program can be installed to open, following the ISO file, for example:
    mount ISO File:
    [the root dm3 @ ~] -o Loop # Mount dm7_setup_rh6_64_ent_7.6.0 .171_20190704.iso / mnt
    [the root @ dm3 /] # CD / mnt
    [the root @ dm3 mnt] # LS
    DMInstall.bin DM_Install_en.pdf DM_Install_zh.pdf release_en.txt release_zh.txt
    For dmdba the user can perform the mounting operation, preferably copy the installation files to a directory dmdba have sufficient rights, such as / home / dmdba, and given the appropriate file execute permission dmdba;
    in reality, many on Linux (Unix) operating system is no graphical interface, in order to DM can be successfully installed on these operating systems, DM provides a command-line installation. Terminal enters the Setup in the folder, the following command to execute the command line installation:
    [dmdba @ -i dm3 /home/dmdba]$./DMInstall.bin
    installation process is as follows:
    [dmdba @ dm3 mnt] $ ./DMInstall. -i bin
    # select the language
    Please select the installer's language (E / e: English C / c: Chinese) [E / e]: c
    -extracting installer ..........
    # automatic inspection system resource limits
    core file size (blocks, -c) 0
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 7739
    max locked memory (kbytes, -l) 64
    max memory size (kbytes, -m) unlimited
    open files (-n) 4096
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 10240
    cpu time (seconds, -t) unlimited
    max user processes (-u) 1024
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited

Can open files is too small, the proposed set to at least 65536 or more.

# If the current operating system already exists in DM, will pop up at the terminal prompt, enter options: continue, the next step of the command-line installation, or exit the command-line installation.
# Note: Note: If the operating system before the DM is installed, re-install, should completely uninstall the existing DM. And prior to re-installation, be sure to back up data.
This system already exists in other versions of the database dream, please uninstall. If you continue to install other versions that may affect the normal use of the database up to the dream.

Continue? (Y / y: is N / n: N) [Y / y]:
Welcome to dream up a database installer ***

Key file # verify
the user can choose whether to enter Key file path. Do not enter into the next installation, enter the file path Key
path, the installation program details Key file will be displayed, if it is legitimate Key file and within the validity period, the user
can proceed with the installation.
Key whether the input file path (Y / y: is N / n: no)? [Y / y]:

# Input area when
the user can select the DM time zone information, the default is 21 : GTM + 08 = China Standard Time.
Time zone is set (Y / y: is N / n: no)? [Y / y]:
setting zone:

Please select the time zone setting 21 :

# Select the type of installation
command-line installation and graphical installation of the selected type of installation is the same.
Note: the user selects the need to manually enter the type of installation, default typical installation. If the user selects the custom installation, the mounting assembly of all the print information. Assembly by the user ID input command window to be installed, the space required for mounting the plurality of components selected interval. After input components need to install the transport number, the print size selecting component mounting storage space required.

Installation Type:
1 typical installation
2 server
3 client
4 custom
select the type of installation serial number [1 Typical Installation]:
required space: 924M

# Installation path selection
user may enter the installation path of DM, do not specify the default path, the default value is $ HOME / dmdbms (if installed root user, the default installation directory is / opt / dmdbms, but not recommended root system user to install DM).
Note: The installation program will print the available space in the current installation path, if space is insufficient, the user must re-select the installation path. If the current path is available installation space is sufficient, the user needs to confirm. Not confirmed, then re-select the installation path, confirmed, the process proceeds to the next step.

Selecting an installation directory [/ home / dmdba / dmdbms]
Available Space: 4G
whether verify the path (/ home / dmdba / dmdbms)is N / n: no)? [Y / y]:

# Installation summary
input of the user before installing the program will print part of the installation information.
Note: After installation is complete, the terminal prompts "Please execute commands with root system user." Since the non-root system user installation, the mounting step portions do not have permission system, the user needs to manually command is executed. The user may be prompted to complete the relevant operations.

Summary before mounting
installation location: / home / dmdba / dmdbms
space required: 924M
available space: 4G
version information:
Expiration Date:
Installation Type: Typical installation
you sure mounting (Y / y: is N / n: no):? Y
08:47:23 2019-11-01
[the INFO] mounted DaMeng database ...
2019-11-01 08:47:24
[the INFO] ... mounting base module
2019-11-01 08:47:29
[ INFO] install the server module ...
2019-11-01 08:47:30
[INFO] client installation ...
2019-11-01 08:47:34
[INFO] ... drive module mounted
2019-11 08:47:34 -01
[INFO] installation Manual module ...
2019-11-01 08:47:35
[INFO] installation service module ...
2019-11-01 08:47:37
[INFO] moving ant the log file.
08:47:37 2019-11-01
[the INFO] to complete the installation of dream database.

Please execute commands with root system users:
/home/dmdba/dmdbms/script/root/root_installer.sh

Installation is complete

To open windows executed as root:
[root @ dm3 dmdba] # /usr/appsoft/home/dmdbadbms/script/root/root_installer.sh
moved to /usr/appsoft/home/dmdbadbms/bin/home/dmdba_svc.conf / etc directory
to modify server permission to
create DmAPService service
mobile service script file (/ usr / appsoft / home / dmdbadbms / bin / home / dmdbaAPService to /etc/rc.d/init.d/home/dmdbaAPService)
to create a service (DmAPService) completed
start DmAPService services
starting DmAPService: [the OK]
[root @ dm3 dmdba] #

Initialization four database instances

In the previous section we installed the dream of database software, where we create a separate database instance, DM database instance is created in two ways:
1) dminit command: This is a command-line tool;
2) dbca.sh tool, / usr / appsoft / dmdbms / directory under the tool, a graphical interface;
here we choose to create a command line (for the specific use dminit behind the more specific explanation)
[dmdba @ dm3 dmdba] # cd / usr / appsoft / dmdbms / bin
[dmdba @ dm3 bin] $ dminit
initdb V7.6.0.171-Build (2019.07.02-109059) ENT
db Version: 0x7000a
! dm.key File not found, use default License
License by Will The expire ON 2020-07 -02
the iNPUT System dir:
during installation you are prompted to enter the required information, such as the installation directory, page size, cluster size, database name, instance name, port number, log file path and size, whether the case-sensitive and so on, because the installation is relatively simple, it is no longer a specific expansion, interested friends can experiment on their own.

Registered five database services

In mounting a graphic way, make the final instance initialization, you will be prompted to register services by the root user graphically; in the command line mode, the service will not be registered automatically, we need to manually register, use tools to: (described later with respect to use of the registered scripts and tools example) $ DM_HOME / script / root / dm_service_installer.sh, as follows:
[the root @ DMl dmdba] # / usr / appsoft / dmdbms / script / the root /dm_service_installer.sh -s / usr / appsoft / dmdbms / bin / DmServiceIESDB
mobile service script file (/ usr / appsoft / dmdbms / bin / DmServiceIESDB to /etc/rc.d/init.d/DmServiceIESDB)
to create a service (DmServiceIESDB) complete
[root @ dm1 dmdba] #
is now complete example of the initialization, the connection can be tested by means disql:
[dmdba @ dm3 tool] $ disql SYSDBA / the SYSDBA

Server [LOCALHOST: 5236]: the open state in the normal
login time: 60.245 (ms)
disql the Build-V7.6.0.171 (2019.07.02-109059) the ENT
the SQL> SELECT * from V $ Version;

The line number BANNER


1 DM Database Server x64 V7.6.0.171-Build(2019.07.02-109059)ENT
2 DB Version: 0x7000a

Elapsed time: 15.469 (ms) the implementation of decision:. 8.
SQL>
At this point, the dream of a single-instance database V7 command line mode installation is completed, the next we install the database silently introduce up to dream of.

Guess you like

Origin blog.51cto.com/semiter/2446982