業務用エアコン関連の技術情報、エラーコード、環境問題対策に関する別サイト「エアコンの安全な修理・適切なフロン回収」

nuy

MiracleLinux8.4_en

MiracleLinux8.4 : Initial Setup

1. Disable SELinuxselinux is a feature that improves auditing and security in Linux, but when it is enabled, it can be quite restrictive in how services work and what settings are available.Therefore, in many cases, it is basically invalidated.  If you build a server while looking at a website and it doesn't work as expected, it may be because this selinux is enabled.Therefore, remember to disable it after installation.3. Adding Repositories3.1 PowerTools / HighAvailabilityThis is a repository that has been newly provided with MIRACLE LINUX 8.4.Utilization MethodPowerTools and HighAvailability can be used by updating miraclelinux-repos and enabling the repositories.Update miraclelinux-repos to 8.4-3.el8 or later.After the update, the following repository files will be added to /etc/yum.repos.d.miraclelinux-powertools.repomiraclelinux-highavailability.repo
MiracleLinux8.4_en

MiracleLinux8.4 : Firewall , SSH , NTP server

1.Setting up SSH remote connectionSSH is a service to connect to a server remotely, and is basically running right after the OS installation, but the default settings are somewhat insecure.In this section, we will configure the settings to change the default settings and increase the security of the ssh connection.1.1 Change the configuration file of SSH service.2.How to set up a firewall (firewalld)In MiracleLinux, the firewall is set to firewalld by default, which is enabled when the OS is installed.To briefly explain firewalld, when setting up a communication control policy, communication permission/blocking rules are applied to predefined zones, and the zones are assigned to each NIC (network adapter).3.Synchronize the server time with Japan Standard Time.① Change the configuration file as follows
MiracleLinux8.4_en

MiracleLinux8.4 : SSH public key cryptography setting

Public key1.Create a key pair with RSABecome an ordinary user and create a key pair with RSA2.Private Key Login Settings3.Change to login only with private key# vi /etc/ssh/sshd_config●Per line 694.Creating a private key using PuTTYgenLaunch Winscp and start puttygen.exe from Tools
MiracleLinux8.4_en

MiracleLinux8.4 : Vsftpd (FTP server installation)

FTP Server Installation1. Install vsftpdDownload vsftpd-3.0.3-33.el8.x86_64.rpm from the download site to /usr/local/src/.# cd /usr/local/src/# wget ftp://ftp.pbone.net/mirror/ftp.centos.org/8-stream/AppStream/x86_64/os/Packages/vsftpd-3.0.3-33.el8.x86_64.rpm# rpm -ivh vsftpd-3.0.3-33.el8.x86_64.rpm2.Configuring vsftpd
MiracleLinux8.4_en

MiracleLinux8.4 : Web Server, Virtual Host

Installa apache2 and virtual host configuration1.Install apa...
MiracleLinux8.4_en

MiracleLinux8.4 : Anti-virus, mail server

Install clamav (anti-virus software)1.Install Clam AntiVirus...
MiracleLinux8.4_en

MiracleLinux8.4 : SNORT ,Tripwire , Checkrootkit

Install  SNORT1.Preliminary preparations①Add the CodeReady R...
MiracleLinux8.4_en

MiracleLinux8.4 : Mysql , WordPress

Install  Mysql8# dnf module -y install mysql:8.0# vi /etc/my.cnf.d/charset.cnfCreate a new "charset.cnf" with the following contents[mysqld]character-set-server = utf8mb4[client]default-character-set = utf8mb4
MiracleLinux8.4_en

MiracleLinux8.4 : Let’s Encrypt , Apache Mail SSL

1.Obtain SSL Certificate ( Let's Encrypt )Install the latest open ssl# dnf install openssl-devel
MiracleLinux8.4_en

MiracleLinux8.4 : System Backup & Restore

Web configuration file (under html) backup①Create a backup script file under html# cd /var/www/system/# vi html_backup.shContents of html_backup.sh#!/bin/bash#Date processing (save 10 days)TODAY=`/bin/date +%Y%m%d`DAY_AGO=`/bin/date --date '10day ago' +%Y%m%d`
MiracleLinux8.8_en

MiracleLinux8.8 : OS Install

MiracleLinuxMIRACLE LINUX is a Japanese Linux distribution provided by Cybertrust Corporation.Development was started by Miracle Linux (now Cybertrust), a company established by Oracle Japan and NEC in June 2000 to ensure stable operation of the Oracle Database for business to enterprise use.It has been built as a RHEL base since Version 2.0 released in May 2001, and as a complete RHEL clone since Version 6.0 released in January 2012.The latest version is 8.8, released on October 05, 2023, but can be installed just like 8.4.MIRACLE LINUX, a well-known domestic RHEL clone, was initially a commercial OS with a paid license, but following the demise of CnetOS8, it was announced that it would be offered free of charge starting with the latest 8.4 version. Therefore, this OS is currently in the limelight as a candidate for migration from CentOS8.
MiracleLinux8.8_en

MiracleLinux8.8 : Initial setup after OS installation

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. If you build a server while browsing a website and it does not work as expected, it may be due to the fact that selinux is enabled. Therefore, do not forget to disable it after installation.You can disable it by doing the following
MiracleLinux8.8_en

MiracleLinux8.8 : SSH , Firewalld , NTP Server

1.Setting up a remote connection via SSHSSH is a service for connecting remotely to a server and is basically running immediately after the OS is installed, but the default settings are somewhat insecure.Here we will configure the default settings to increase the security of ssh connections.1.1 SSH service configuration file changesModify the configuration file to change the SSH service settings.The SSH service configuration file is "/etc/ssh/sshd_config".
MiracleLinux8.8_en

MiracleLinux8.8 : SSH public key cryptography setting

SSH public key cipher setting1.Create a key pairCreate a public/private key pair for a user connecting to a Linux server using OpenSSH.Use ssh-keygen to create the key pair.The creation of a public/private key pair must be done as a user with remote login privileges.If you do not specify the destination and file name, id_ed25519 and id_ed25519.pub will be created in /home/(user name)/.ssh/. On the way, enter the password for the key.
MiracleLinux8.8_en

MiracleLinux8.8 : FTP Server , Samba FileServer Install

2. Vsftpd over SSL/TLSLS2.1 Create self-signed certificatesThis work is not required if you are using a trusted, legitimate certificate such as Let's Encrypt.3. File server installation with SambaBuild a file server with access rights that requires user authentication with Samba.Installation Procedure①Create shared folders with access rights that require user authentication②Accessible group creation③Creation of users belonging to accessible groups④Configuration File Editing