Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".

2022-10

fedora36_en

Fedora36 ; Logwatch , DiCE Install

Logwatch Introduction ①Install # dnf install logwatch ②Edit configuration file Installing DiCE Whenever the global IP changes, which happens when the network is disconnected or the router is disconnected and rebooted, the dynamic DNS must be accessed to inform the user that the global IP has changed. DiCE does this automatically! ①Download and install Dice
fedora36_en

Fedora36 ; OS Install

What is Fedora? Fedora is an open source operating system software, a Linux distribution. The project started as a successor to Red Hat Linux, whose development was terminated at the end of 2003. It is unique in that it is community-driven, proactively incorporates feedback from the field, and introduces advanced, flexible, and advanced features. The most obvious difference when compared to popular Linux distributions such as "Ubuntu" is the balance between "advanced" and "stable". However, its stability has now been greatly improved, and it is gaining a reputation as an OS that can be used regularly, not just for functional testing purposes. For those who want to incorporate new and useful features as soon as possible, Fedora will be the best choice. However, it should not be used as a production environment or corporate need. In this case, we will use the latest Fedora 36 Server, released May 10, 2022.
Debian11.5 Building a server

Debian11.5 ; OS Install

1.Debian11 Overview In this article, we will explain how to build a server with Debian, the basis of the user-friendly Linux distribution UBUNTU. The latest release is Debian 11.5 (codenamed "bullseye"). Released on August 14, 2021 with an update (point release11.5) on September 10, 2022. 2.Download Debian installation image Debian11 download site https://www.debian.org/ Access the above official website and download "debian-11.5.0-amd64-netinst.iso." which is convenient for setup in an environment connected to the Internet.(Fits on a single CD) NETINST allows you to download and install the necessary packages from the Internet, so you can use a smaller installer (approximately 391 MB for v11.5.0) than a full installer. Click through the following screens in order.
Debian11.5 Building a server

Debian11.5 ; WEB Server(Apache) Install

Web server Apache2 installation Allow http:80 and https:443 ports in UFW before installation # ufw allow http # ufw allow https # ufw reload 1 Apache2 Installation and Configuration Apache2 Install 3. Apache2; Using Perl Scripts Enable CGI to make Perl scripts available 4 Apache2 : Using PHP Scripts ①Install PHP # apt -y install php php-cgi libapache2-mod-php php-common php-pear php-mbstring 5. Virtual Host Settings Copy the default configuration file (file name is arbitrary, in this case vhost-yourdomain.conf as an example) and configure the virtual host
Debian11.5 Building a server

Debian11.5 ; SNORT2 , Tripwire Install

1.Install SNORT2 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. 2.Install Tripwire Implement a system to detect file tampering on Linux servers by crackers. This time, Tripwire, a host-based IDS (IDS=Intrusion Detection System), will be installed as the file tampering detection system. Tripwire creates a database of file status at the time of installation, and detects file additions/changes/deletions by comparing the database with the current status of the file.
Debian11.5 Building a server

Debian11.5 ; System Backup and Restore

1. System Backup 1.1 Backup under /var/www/html ① Create backup_all.sh script under /opt 1.2 Mysql database backup ①Create db_backup.sh script under /opt # vi /opt/db_backup.sh db_backup.sh script contents 2. System Restore 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.5 Building a server

Debian11.5 ; Let's Encrypt WEB , Mail Server SSL

1. Obtain a certificate (Let's Encrypt) 1.1 advance preparation ①Enable mod_ssl # a2enmod ssl 2. SSL/TLS (Let's Encrypt) configuration for Apache2 ①Edit Apache2 SSL-related configuration files 3. SSL/TLS (Let's Encrypt) settings on the mail server 3.1 Obtaining a certificate for the mail server Obtain 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.
Debian11.5 Building a server

Debian11.5 ; 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
fedora36_en

Fedora36 ; Various settings after installation

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 2. System modernization & Services suspended due to security measures 3.Network Settings 3.1 Set host name Set the hostname to "Lepard" since the hostname was not set during OS installation. 4.Install NTP server and set up time synchronization service 4.1 Chrony Install 5.Set server time zone Set time zone to Japan (Tokyo)
Almalinux9.1_en

AlmaLinux 9.1 ; System Backup and Restore

1.Website data backup 1-1.Backup under /var/www/html ①Create backup script file # cd /var/www/system # vi backup_html.sh 2.MySQL database backup ①Create backup script file # cd /var/www/system # vi db_my_backup.sh 3.Restore backup files under html ①Store HTML backup files in "/ (root)" directory 4.Restore Mysql backup file ①Save the database backup file to any directory and (In the example, the directory is "/var/www/backup/db_bak".)Extracting data
Debian11.5 Building a server

Debian11.5 ; 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 1.2. MySQL Server Security Settings Run the tool mysql_secure_installation to configure security-related settings for the MySQL server. Once executed, several security settings are initiated in the form of questions. First, you will be asked if you want to use a plugin for password validation as follows 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") 2.2 Wordpress Download and Installation ①Download and Deployment
Debian11.5 Building a server

Debian11.5 ; SSH connection using public key cryptography

RSA SSH connection with authentication using public key cryptography Create public and private key pairs Create 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 (e.g., 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.
fedora36_en

Fedora36 ; System Backup and Restore

Web configuration file (under html) backup ①Create backup script file # cd /var/www/system/ # vi html_backup.sh Contents of html_backup.sh MySQL database backup ①Create backup script file Web configuration file (under html) restored ① Copy the HTML backup file to the "/ (root)" directory of the server to be used for restoration Restore MySQL data ① Save database backup file to any directory
fedora36_en

Fedora36 ; SSL Certificate ( Let's Encrypt ) , Apache ・Mail Server SSL

1.Obtain SSL Certificate ( Let's Encrypt ) Install the latest open ssl # dnf install openssl-devel 2. Apache SSL Install the following just in case # dnf -y install mod_ssl 3.Mail SSL/TLS(Let's Encrypt) 3.1 Obtaining a certificate for the mail server Obtain 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.
fedora36_en

Fedora36 ; Mysql8 , WordPress Install

Mysql8 installation #dnf module -y install mysql:8.0 #vi /etc/my.cnf.d/charset.cnf Create a new charset.cnf with the following contents # Set default character encoding # To handle 4-byte characters such as pictographs, use [utf8mb4]. [mysqld] character-set-server = utf8mb4 [client] default-character-set = utf8mb4 WordPress Installation 1. Create a database for WordPress As an example, assume database [wp_db] database user [wp_user] password [?W123456]