Click here for "Error Codes for Commercial Air Conditioners".(Japanese Version)

2022-06

Almalinux8.6 Building a server

AlmaLinux 8.6 : OS Install

AlmaLinux 8.6  InstallAlmaLinux OS is a project launched by CloudLinux in the US as an alternative to CentOS.Currently, the AlmaLinux OS Foundation is the development parent organization.AlmaLinux OS 8.6 is a Linux distribution compatible with "Red Hat Enterprise Linux 8"
Rocky Linux8.6 Building a server

Rocky Linux8.6 : OS Install

Rocky Linux 8.6 Install1.DownloadRocky Linux 8 installation image can be downloaded from the following sitehttps://rockylinux.org/download
Almalinux8.6 Building a server

AlmaLinux 8.6 : WEB Server Install

1. Apache2 installation and virtual host configuration1.1 Apache2 Install①httpd install# dnf -y install httpd# httpd -vServer version: Apache/2.4.37 (AlmaLinux)1.3 Virtual Host SettingsAssign and configure the FQDN [alma.korodes.com] to be operated by the virtual host in the document root [/var/www/html/alam.korodes.com] directory
Rocky Linux8.6 Building a server

Rocky Linux8.6 : WEB Server

1. Install Apache2  & Virtual Host1.1 Install Apache2①Install httpd# dnf -y install httpdVersion Check# httpd -vServer version: Apache/2.4.37 (rocky)Server built: May 10 2022 18:05:142. Use of CGI Scripts①Confirmation of CGI availability# grep -n "^ *ScriptAlias" /etc/httpd/conf/httpd.conf3. PHP installation and configuration1.Install PHP①install4. Digest authentication with Apache2Since Basic Authentication, a well-known authentication authorization method for http, sends authentication information in plain text, there is a risk of ID and password leakage if the packet is intercepted.On the other hand, Digest Authentication encrypts and transmits authentication information, so there is almost no risk of information leakage.
Rocky Linux8.6 Building a server

Rocky Linux8.6 : FTP Server

Install FTP Server1. Instaa  Vsftpd# dnf -y install vsftpd2.Vsftpd configuration
Almalinux8.6 Building a server

AlmaLinux 8.6 : FTP Server Install

FTP Server Installation1. Vsftpd Install# dnf -y install vsftpd2.Vsftpd configurationSave the unedited vsftpd.conf with .bak# cp /etc/vsftpd/vsftpd.conf /home/huong/vsftpd.conf.bak
Almalinux8.6 Building a server

AlmaLinux 8.6 : Snort2 , Tripwire , Chkrootkit Install

SNORT2  Install1. advance preparation①Add the CodeReady Red Hat repository and install the required software# dnf config-manager --set-enabled powertoolsTripwire  Install1.Download and installation# cd /usr/local/srcChkrootkit  Install①chkrootkit Download and Install# cd /usr/local/src
Almalinux8.6 Building a server

AlmaLinux 8.6 : Logwatch , Disk Usage Check Script

1. Logwatch Install① Install# dnf install logwatch② Edit configuration file2. Introduce disk usage check script2.1 Script Creation# cd /var/www/system# vi disk_capacity_check.sh
Almalinux8.6 Building a server

AlmaLinux 8.6 : SSL Certificate Acquisition , WEB・Mail SSL

1. Obtain an SSL certificate ( Let's Encrypt )Install the latest open ssl# dnf install openssl-devel1.1 Certificate Installation# dnf -y install certbot2. Converting Apache to httpsInstall the following# dnf -y install mod_ssl3. SSL/TLS (Let's Encrypt) settings on the mail server3.1 Obtaining a certificate for the mail serverObtain a certificate for the mail server, but it cannot be obtained in the same way as above, so the following with the "--standalone" option fails.
Almalinux8.6 Building a server

AlmaLinux 8.6 : Public key SSH connection

SSH connection with authentication using RSA public key cryptographyCreation of public and private key pairsCreate a public/private key pair for a user connecting to a Linux server using OpenSSH.Use ssh-keygen to create the key pair.This time, we will create a key set using the RSA cipher used in the SSH protocol Version 2.The creation of a public/private key pair is performed with remote login user privileges (huong).If you do not specify the destination and file name, id_rsa and id_rsa.pub will be created in /home/huong/.ssh/. On the way, enter the password for the key.
Debian11.3 Building a server

Debian11.3 : System Backup and Restore

1.1 Backup under /var/www/html① Create backup_all.sh script under /opt# vi /opt/backup_all.shbackup_all.sh script contents1.2 Mysql database backup①Create db_backup.sh script under /opt# vi /opt/db_backup.shdb_backup.sh script contents2.1 Restore backup files under HTML① Store HTML backup files used for backup in the "/ (root)" directorySelect the backup file with the latest timestamp (e.g. www_back_20220501.tar.gz)2.2 Restore MySQL database①Save DB backup file to any directory and extract data# cd /var/www/backup/db_bak
Debian11.3 Building a server

Debian11.3 : Disk Usage Check、Logwatch

1. Introduce disk usage check script1.1 Scripting# cd /opt/script/# vi disk_capacity_check.shContents of disk_capacity_check.sh#!/bin/bash#Email Address for NotificationMAIL=" "2. Log analysis tool logwatch installed2.1 Install logwatch# apt -y install logwatch2.2 Edit logwatch configuration file①Copy the default configuration file
Debian11.3 Building a server

System Integration Monitoring Debian11 : Zabbix6 Install

Open source integrated monitoring software "ZabbixZabbix is an open source integrated monitoring software for centralized monitoring of servers, networks and applications. It provides monitoring, fault detection and notification functions required for integrated monitoring. With Zabbix agent and SNMP support for many platforms, you can monitor your entire system with a single Zabbix.To run Zabbix, you will need the PHP programming language, MySQL as a database server, and a web server such as Apache or Nginx. In this article, we will assume that all of these have already been configured.
Rocky Linux8.6 Building a server

Rocky Linux8.6 : Let's Encrypt , Apache Mail SSL

1.Obtain SSL Certificate ( Let's Encrypt )Install the latest open ssl# dnf install openssl-devel1.1 Certificate Installation2. Apache SSLInstall the following just in case# dnf -y install mod_ssl2.1 Edit ssl.conf file3. Mail SSL/TLS(Let's Encrypt)3.1 Obtaining a certificate for the mail serverObtain a certificate for the mail server, but it cannot be obtained in the same way as above, so the following with the "--standalone" option fails.
Rocky Linux8.6 Building a server

Rocky Linux8.6 : Initial Settings

1. Disable SELinuxFirst, disable selinux. selinux is a feature that improves auditing and security in Linux, but when enabled, it places considerable restrictions on the behavior of services and on what can be configured. Therefore, it is basically disabled in many cases.