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

nuy

Rocky Linux 8.4 Building a server

Rocky Linux8.4 : FTP Server

FTP Server Inatall 1. vsftpd Install # dnf -y install vsftpd 2. vsftpd configuration Save the unedited vsftpd.conf with .bak
Rocky Linux 8.4 Building a server

Rocky Linux 8.4 ; Data Backup and Restore

1.Web site data backup 1-1.Backup under /var/www/html ①Create a backup script file [root@Lepard ~]# cd /opt opt]# vi backup_html.sh #!/bin/bash TODAY=`/bin/date +%Y%m%d`
Ubuntu 18.04 Building a server

Ubuntu Server 18.04 ; Obtaining and Installing an Image

Download the installation image The installation media for Ubuntu Server can be downloaded from the official website on the Internet.You will need to create an installation CD/DVD from the downloaded iso file. The download location for the iso file is Ubuntu official download site Install Change the BIOS so that the PC can boot from the installation disk created above, and then boot the PC.
Ubuntu 18.04 Building a server

Ubuntu Server 18.04 ; Installing MySQL

Installing MySQL 1.Install the necessary packages. # apt update # apt install mysql-server 2.Configure security settings for MySQL server. There is a tool called mysql_secure_installtion that can be used to configure security-related settings for the MySQL server. When you run it, it will ask you a series of questions to help you configure some security settings.
Rocky Linux 8.4 Building a server

Rocky Linux8.4 ; Database installation

1.Mysql8 Installation 1-1.Install [root@Lepard ~]# dnf module -y install mysql:8.0 [root@Lepard ~]# vi /etc/my.cnf.d/charset.cnf (Create New) # Set the default character encoding # To handle 4-byte characters such as pictograms, use [utf8mb4] [mysqld] character-set-server = utf8mb4 [client] default-character-set = utf8mb4 [root@Lepard ~]# systemctl enable --now mysql 1-2.Security measures
Rocky Linux 8.4 Building a server

Rocky Linux8.4 ; Tripwire, Chkrootkit and Snort installed

1.Tripwire Installation 1.1 Download and install [root@Lepard ~]# cd /usr/local/src src]# wget https://rpmfind.net/linux/epel/8/Everything/x86_64/Packages/t/tripwire-2.4.3.7-5.el8.x86_64.rpm src]# rpm -Uvh tripwire-2.4.3.7-5.el8.x86_64.rpm If you get a dependency error, enter the following
Rocky Linux 8.4 Building a server

Rocky Linux8.4 ; OS Installation

Rocky Linux CentOS, which was positioned as a downstream of RHEL (Red Hat Enterprise Linux), will no longer be supported for CentOS 8 on December 31, 2021. There are three distributions (AlmaLinux, RockyLinux, and CentOS Stream 8) that are attracting attention as a destination for migrating from CentOS, but this time we will build a server using the latest version of RockyLinux 8.4 for the following reasons. CentOS Stream 8 Stability concerns with RHEL upstream Support period until May 31, 2024 AlmaLinux AlmaLinux is a free RHEL clone that is being developed by CloudLinux, the developer of CloudLinux OS, a commercial Linux distribution, with the goal of binary compatibility with the current version of RHEL. Support period until 2029 Rocky Linux It is a free RHEL clone by the project started by Gregory Kurtzer, the founder of CentOS, and is being developed by the community as a "production downstream version of RHEL". The company is also eager to acquire sponsors, including Amazon Web Services (AWS) and Google Cloud. Support period until 2029
Ubuntu 18.04 Building a server

Ubuntu Server 18.04 ; SSL/TLS applied to web , mail , FTP server

1. Apache2 : SSL/TLS Configuration Describes how to apply an SSL certificate obtained with Let's Encrypt to apache. Domain name : hoge.com 1.1 Configuration of Apache2 ①Editing the Apache2 configuration file Rename and copy the default conf file (e.g. "hoge.com-ssl.conf")
Ubuntu 18.04 Building a server

Ubuntu Server 18.04 ; Mail Server Install

1.Postfix : Installation / Configuration Postfix is a software developed as an MTA (Mail Transport Agent) to replace Sendmail, and is a mail server with features such as high compatibility with Sendmail, security, easy maintenance, and speed. Also, since Postfix only functions as an SMTP server for sending mails, you will need to install a POP server for receiving mails separately as described later.
Ubuntu 18.04 Building a server

Ubuntu Server 18.04 ; Web server and antivirus installed.

1. WEB server installation 1. 1 Apache2 installation ① Install # apt -y install apache2 ② Edit configuration file # vi /etc/apache2/conf-enabled/security.conf # Line 25: Change ServerTokens  Prod
Ubuntu 18.04 Building a server

Ubuntu Server 18.04 ; FTP Serve , NTP Server

1.Install the FTP server vsftpd ① Install # apt install vsftpd ② Allow PORT21 to be used by FTP in UFW(firewall) # ufw allow ftp # ufw reload ③ Edit the configuration file (vsftpd.conf)
Ubuntu 18.04 Building a server

Ubuntu Server 18.04 Initial Setup

1. Set the root password and use the SU command $  passwd root password for ← Current user's password Enter new UNIX password: ← Enter the root password to be set. Retype new UNIX password: ← Re-enter the same password passwd: password updated successfully
systems-management

Display various information about the CPU

●Display the CPU information installed on the PC. To display the CPU information installed in the PC, refer to the "/proc/cpuinfo" file. This information is used to know the CPU load for top command, etc.
Network Management

Configuring the default gateway (router)

●Confirmation of the current default gateway Execute the "route -n" command. "-n" is an option to display the hostname as IP. ●Remove the default gateway Set "del" as the argument of the route command, and set the IP address of the default gateway device (192.168.11.1) that you want to delete after "default gw". ●Setting up a new default gateway Set "add" as the argument of the route command, and set the IP address (192.168.11.2) of the default gateway device you want to set after "default gw".
Rocky Linux 8.4 Building a server

Rocky Linux 8.4 ; antivirus, etc.

1.Synchronize the server time with Japan Standard Time. Edit chrony.conf # vi /etc/chrony.conf Per line 3. pool 2.centos.pool.ntp.org iburst ↓ server ntp.nict.jp server ntp1.jst.mfeed.ad.jp server ntp2.jst.mfeed.ad.jp Restart chrony 2.virus protection 2.1 Clam AntiVirus installation and definition/configuration file settings ①Installing Clam AntiVirus # dnf --enablerepo=epel -y install clamav clamav-update clamav-scanner-systemd