linux process monitoring AI

2022-12-26   ES  

Creation time: Thursday, August 6, 2020 9:23 pm

Here all the operations are under Manjaro KDE 20.03 operating system. Other versions of Linux operations are similar.
#### first look at a simple one -MongoDB installation and configuration database directory port, etc.
first order to order and install

yay -S mongodb-bin

My configuration file is as follows
Configuration file position:/etc/mongodb.conf

# mongod.conf

# for documentation of all options, see:

# Where and how to store data.
  dbPath: /home/alair/Sources/Repositories/DBS/MongoDB/Datas
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:

# where to write logging data.
  destination: file
  logAppend: true
  path: /home/alair/Sources/Repositories/DBS/MongoDB/Logs/mongod.log

# network interfaces
  port: 27027

# how the process runs
  timeZoneInfo: /usr/share/zoneinfo





## Enterprise-Only Options:



default MongoDB’s service is not an accidental restart from mongoDB, so add:
service file location:/usr/lib/systemd/system/mongodb.service
Modify as follows:

Description=High-performance, schema-free document-oriented database

ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf

This configuration means to restart 10 seconds after the mongoDB is interrupted by accident
Now everyone can see the service fileUser=mongodbIt means that the service is started with MongoDB, so all files MongoDB required for the service must have the right to operate to start success. Therefore For MongoDB users:

sudo chown -R mongodb:mongodb /home/alair/Sources/Repositories/DBS/MongoDB
sudo chown -R mongodb:mongodb /usr/bin/mongod
sudo chown -R mongodb:mongodb /etc/mongodb.conf   

If there is any omissions to read the error log, it will be all OK
and the startup of MongoDB, check the service status command, and update the newly modified service command
Open start:

sudo systemctl enable mongodb

View status

sudo systemctl status mongodb


sudo systemctl restart mongodb


sudo systemctl stop mongodb

heavy load service

sudo systemctl daemon-reload

#### to see a pitfall -the installation and configuration database directory port of MariaDB, etc.
Installation command:

yay -S mariadb

First create a database installation directory:

mkdir -p /home/alair/Sources/Repositories/DBS/MariaDB
sudo chown -R mysql:mysql /home/alair/Sources/Repositories/DBS/MariaDB

Installation database

sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/home/alair/Sources/Repositories/DBS/MariaDB

service restart the switch status, etc. Look at MongoDB above, replace mongoDB with Mariadb
The most important thing about,If you want to replace the MariaDB’s database directory to the custom directory, then you have to modify the service in the service

# Prevent accessing /home, /root and /run/user

After finishing the market set settings:

sudo /usr/bin/mysql_secure_installation

If you succeed, then [email protected]! Intersection If you do n’t succeed in the service of the service, it will give you a lot of answers
End writing time: Thursday, August 6, 2020 at 10:13 pm


Related Posts

Android obtains the picture under DRAWABLE through the stitching name (obtain the ID in DRAWABLE according to the name name)

Android simulator king Genymotion!

Python, the difference between OS and SYS modules

Mybatis official document-dynamic SQL

linux process monitoring AI

Random Posts

$ .ajax 2.0 Error “Uncaught Typerror: Illegal Invocation” Calla

Golang generates C-Shared so for C language or golang calls to an example Analogous

Sword refers to offer binary search tree and two -way linked list pythongod

Lenovo YOGA 14S 2021 (Intel) Install Ubuntu

Use PyeChartsco in Django