In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Installation preparation
O create user groups, users
O Database installation
O modify the archive mode
First, installation preparation
1. Installation proc
two。 Hardware and software description
CPU at least 4 cores, memory at least 2GB,
It is recommended to modify the file system mount parameter to noatime,nobarrier.
Example:
Open the / etc/fstab file:
Vi / etc/fstab
Find the specific file system mount configuration, and add the parameter noatime,nobarrier after defaults:
/ dev/sdb1 / data ext4
Defaults,noatime,nobarrier 0 0
You need to remount the file system after modifying the / etc/fstab setting:
Mount-o remount / data
Parameter description:
Noatime: performance can be improved by not updating the inode access time on the file system.
Nobarrier: disable write operations for log and data integrity of the file system to improve
Performance of the file system.
3. Environment settin
(1) close Selinux
Vi / etc/selinux/config
Change SELINUX=enforcing to SELINUX=disabled
(2) turn off the firewall
Systemctl stop firewalld.service
Systemctl disable firewalld.service
(3). Edit sshd_config file
Vi / etc/ssh/sshd_config
Modify the PermitRootLogin configuration to allow users to log in remotely.
You can do this in two ways:
Comment out "PermitRootLogin no".
# PermitRootLogin no
Change PermitRootLogin to yes.
PermitRootLogin yes
Modify the Banner configuration to remove the welcome message prompted by the system when connecting to the system.
Comment out the line where "Banner" is located.
# Banner none
Modify the PasswordAuthentication configuration to allow users to authenticate their passwords when logging in.
Change PasswordAuthentication to yes.
PasswordAuthentication yes
Use the following command to make the settings take effect.
Service sshd restart
If the prompt message Redirecting to / bin/systemctl restart sshd.service is returned after executing the command, execute the following command:
Systemctl restart sshd.service
(4) set corefile configuration
Corefile configuration is mainly used to generate core files when the database exits abnormally, which makes it easy to locate database problems.
Specifies the maximum size of the corefile file.
Add the following to the configuration file / etc/profile. The recommended configuration is unlimited, which means that there is no restriction on the generation of core text.
The size of the piece.
Ulimit-c unlimited
(5) specify the corefile generation path and corefile file format.
Add the following to / etc/sysctl.conf:
Kernel.core_pattern = / corefile/core-%e-%p-%t
The / corefile directory is the path generated by the core file created by the user, and the user needs to have
Read and write permissions. Core-%e-%p-%t generates the format for the file, and the supported configuration formats are as follows:
% p: process ID.
% u: user ID.
% g: the group ID to which the user belongs.
% s: the number of the signal that caused the dump.
Time of% t:dump.
% e: name of the execution file.
% h: hostname.
# sysctl-p
Kernel.core_pattern = / corefile/core-%e-%p-%t
[root@gaussdb GaussDB_100_1.0.0-DATABASE-REDHAT-64bit] #
Sysctl-p
Create user groups / users / folders
(1) create user group users
[root@gaussdb ~] # groupadd dbgrp
[root@gaussdb] # useradd-g dbgrp-d / home/omm-m-s / bin/bash omm
[root@gaussdb ~] # passwd omm
(2) create a folder
Mkdir-p / data/gaussdb/app
Mkdir-p / data/gaussdb/data
III. Database installation
(1) decompression software
(1) install the database
Description:
As this installation is carried out by a virtual machine, the operating system and software need to be modified as follows
File
[root@gaussdb GaussDB_100_1.0.0-DATABASE-REDHAT-64bit] # vi install.py
Change to-2
Reinstall
[root@gaussdb GaussDB_100_1.0.0-DATABASE-REDHAT-64bit] # python install.py-U omm:dbgrp-R / data/gaussdb/app-D / data/gaussdb/data-C LSNR_ADDR=127.0.0.1192.168.82.83-C LSNR_PORT=1521
Checking runner.
Checking parameters.
End check parameters.
Checking user.
End check user.
Checking old install.
End check old install.
Checking kernel parameters.
Checking directory.
Checking integrality of run file...
Decompressing run file.
Setting user env.
Checking data dir and config file
Initialize db instance.
Creating database.
Creating database succeed.
Changing file permission due to security audit.
Install successfully, for more detail information see / home/omm/zengineinstall.log.
SQL > select count (1) from sys_tables
COUNT (1)
-
seventy-three
After installation, the database status is archived by default.
IV. Modify to non-archiving mode
You need to modify the default mode of the database in the Mount state:
[omm@gaussdb bin] $python zctl.py-t start-m mount
Successfully started instance.
[omm@gaussdb bin] $
SQL > select OPEN_STATUS,LOG_MODE from dv_database
OPEN_STATUS LOG_MODE
MOUNTED ARCHIVELOG
SQL > alter database noarchivelog
Succeed.
SQL > alter database open
Succeed.
SQL > select OPEN_STATUS,LOG_MODE from dv_database
OPEN_STATUS LOG_MODE
READ WRITE NOARCHIVELOG
1 rows fetched.
At this point, the database is installed completely.
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.