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

nuy

fedora35_en

Fedora35 : Initialization

1. SELinux Disable First, disable selinux. selinux is a feature that improves auditing and security in Linux, but when enabled, it can limit the behavior of services and the configuration considerably. Therefore, it is basically invalidated in many cases. You can disable it by doing the following
Debian11.5 Building a server

Debian11.5 ; logwatch , Disk Usage Check Script

1. Introduce disk usage check script 1.1 Scripting # cd /opt/script/ # vi disk_capacity_check.sh Contents of disk_capacity_check.sh Configured to notify when disk usage exceeds 80%. 2. Log analysis tool logwatch installed 2.1 logwatch Install # apt -y install logwatch 2.2 Edit logwatch configuration file
Debian11.5 Building a server

Debian11.5 ; Anti-virus(Clamav) 、Mail Server

1. Antivirus software Clamav installed Install Clam AntiVirus, a free anti-virus software for Linux, as an anti-virus measure. By installing this anti-virus software, you can not only scan the entire server for viruses, but also scan incoming and outgoing mail for viruses if you build and configure a mail server. 1.1 Install # apt install clamav clamav-daemon 2. Mail server installation Postfix was developed as a Mail Transport Agent (MTA) to replace sendmail, and is a mail server that is highly compatible with sendmail, secure, easy to maintain, and fast. In addition, since Postfix only functions as an SMTP server for sending mail, the POP server Dovecot for receiving mail will be installed separately in the latter half. 2.1 Postfix : Installation Configuration 3 Applied ClamAV to mail server Postfix Set up Postfix and Clamav to work together to scan incoming and outgoing mail in real time. ①Install Amavisd and Clamav Daemon and start Clamav Daemon
Debian11.5 Building a server

Debian11.5 ; NTP ,FTP Server Installation

1. Install NTP server # apt -y install chrony # vi /etc/chrony/chrony.conf # Line 8.:Comment the default settings and add the NTP server for your time zone. #pool 2.debian.pool.ntp.org iburst pool ntp.nict.jp iburst # Add to the last line (Range for which time synchronization is allowed) allow 192.168.11.0/24 2. Install FTP Server 2.1 Install Vsftpd # apt install vsftpd FTP Port21 allowed # ufw allow ftp # ufw reload
Debian11.5 Building a server

Debian11.5 ; SSH , Firewall Setting

1. SSH Service Security Settings The SSH service allows the root user to log in by default, and since the root user already knows the user name and can log in to the server with administrative privileges once the password is known, we will deny this setting. 2. Firewall Settings Since Debian often uses software called "ufw" to configure firewalls, we will configure firewall settings using ufw. Since ufw is not installed when the OS is installed, the ufw package must be installed prior to configuration. The following is a procedure to configure minimal filter settings after installation. Filter rules to be set in ufw • All packets forwarded to the server are rejected • All packets sent from the server to the outside are allowed • The first port to allow is the port for SSH • Limit packets coming into the server
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.sh backup_all.sh script contents 1.2 Mysql database backup ①Create db_backup.sh script under /opt # vi /opt/db_backup.sh db_backup.sh script contents 2.1 Restore backup files under HTML ① Store HTML backup files used for backup in the "/ (root)" directory Select 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 script 1.1 Scripting # cd /opt/script/ # vi disk_capacity_check.sh Contents of disk_capacity_check.sh #!/bin/bash #Email Address for Notification MAIL=" " 2. Log analysis tool logwatch installed 2.1 Install logwatch # apt -y install logwatch 2.2 Edit logwatch configuration file ①Copy the default configuration file
Debian11.3 Building a server

Debian11.3 : SNORT2 , Tripwire Install

1.Install SNORT Snort is an open source network intrusion detection system capable of performing real-time traffic analysis and packet logging on IP networks. It can perform "protocol analysis," "content search," and "matching," and can be used to detect a variety of attacks, including "buffer overflows," "stealth port scans," "CGI attacks," "SMB probes," "OS fingerprinting attempts," "semantic URL attacks," and "server message block probes.
Debian11.3 Building a server

System Integration Monitoring Debian11 : Zabbix6 Install

Open source integrated monitoring software "Zabbix Zabbix 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.
Debian11.3 Building a server

Debian11.3 : MySQL8 , WordPress Install

1. Install MySQL 8 1. 1 Install The MySQL team provides the official MySQL PPA for Debian Linux. After downloading and installing the package on your Debian system, the PPA file will be added to your system. To enable the PPA, run the following command 2.Install WordPress 2.1 Database Creation Create a database for Word Press (for example, in this case, the database name is "wp_db", the user name is "wp_user", and the password is "?Y123456y") If you receive a message "Your password does not satisfy the current policy requirements" when creating an account, please make sure your password is at least 8 characters long and includes upper and lower case letters, numbers, symbols, etc.
Debian11.3 Building a server

Debian11.3 : Let's Encrypt WEB , Mail Server SSL

1. Obtain a certificate (Let's Encrypt) 1.1 advance preparation ①Enable mod_ssl # a2enmod ssl ②Install client tool to obtain Let's Encrypt certificate # apt -y install certbot
Debian11.3 Building a server

Debian11.3 : Anti-virus , Mail server

1. Antivirus software Clamav installed Install Clam AntiVirus, a free anti-virus software for Linux, as an anti-virus measure. By installing this anti-virus software, you can not only scan the entire server for viruses, but also scan incoming and outgoing mail for viruses if you build and configure a mail server.
Debian11.3 Building a server

Debian11.3 : NTP , FTP(Vsftpd) install

1. Install NTP server # apt -y install chrony # vi /etc/chrony/chrony.conf # Line 8.:Comment the default settings and add the NTP server for your time zone. #pool 2.debian.pool.ntp.org iburst pool ntp.nict.jp iburst # Add to the last line (Range for which time synchronization is allowed)
Debian11.3 Building a server

Debian11.3 : SSH , Firewall

1. SSH Service Security Settings The SSH service allows the root user to log in by default, and since the root user already knows the user name and can log in to the server with administrative privileges once the password is known, we will deny this setting. 1.1 Creating a General User If you have created a general user when installing Debian, this procedure is not necessary. If the only user created on the server is root, remote login via SSH will not be possible, so if a user has not been created during OS installation, a user must be created in advance. Users can be created with the "useradd" command. The "-m" option creates a home directory and the "-p" option specifies the password. For example, to set "debianuser" as the user account name and "123456" as the password, execute the following
Debian11.3 Building a server

Debian11.3 : Initialization

1. Installing and configuring the vim editor Debian has "nano" as the default editor. nano is somewhat difficult to use, and there are few environments where it is used, so we will introduce the procedure for changing the editor to "vim".。 1.1 Check vim package Debian has vim installed by default, but it is a package called "vim-tiny", which is a less functional version. Let's check the installed vim package. Debian uses the "dpkg" command to check packages. The "-l" option displays a list of packages. Since the "dpkg" command as is will show all packages installed on the system, we will use the "grep" command to extract only those packages that contain the string "vim". Execute as follows