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

nuy

Debian12.8_en

Debian12.8 ; SSH , UFW(Firewall)Setting

1. SSH Service Security SettingsThe 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 Userf 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 following2. Firewall SettingsSince 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
Debian12.1_en

Debian12 ; OS Install

1.Debian12 OverviewIn this article, we will explain how to build a server with Debian, the basis of the user-friendly Linux distribution UBUNTU.The latest is Debian 12.0 (codenamed "bookworm"), released on June 10, 20232.Download Debian installation imageDebian12 download site  https://www.debian.org/Access the above official website and download "debian-12.0.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 than a full installer.Click through the following screens in order.
Ubuntu20.04_en

Ubuntu Server 20.04 : Logwatch & Disk usage check scripts

1. Introduction of disk usage check scripts1.1 Script creation# cd /opt/script/# vi disk_capacity_check.shContents of disk_capacity_check.sh#!/bin/bash#Specify email address for notificationMAIL=" "
Ubuntu20.04_en

Ubuntu Server 20.04 Anti-virus & mail server

1. Introduction of Clamav anti-virus software1.1 Install# apt install clamav clamav-daemonClamav-related configuration files are installed in the /etc/clamav/ folder1.2 Update your virus definitions# freshclamThe above command will update the virus definitions, but if you get the following error, change the log settings and run it again
Ubuntu20.04_en

Ubuntu Server 20.04 NTP , FTP , WEB server

2. Install the FTP server vsftpd①Install# apt install vsftpd②Open PORT 21 at UFW# ufw allow ftp# ufw reload③Configuration file changes3. Apache2 installationFirst allow port http:80 and port https:443 on UFW# ufw allow http# ufw allow https# ufw reload3.1 Install Apache 2
Ubuntu22.04_en

Ubuntu22.04 Server : Backup and Restore

1. System Backup1.1 Backup under /var/www/html①Create /var/www/system directory# mkdir -p /var/www/system②/Create backup_all.sh script under var/www/system# vi /var/www/system/backup_all.shbackup_all.sh script contents
Ubuntu22.04_en

Ubuntu22.04 Server : MySQL 8 , WordPress

1. MySQL 8 Install1. 1Install# apt -y install mysql-server1.2. MySQL Server Security SettingsRun 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. Password validation is a way to check the strength of a user's password for MySQL and restrict it to only accepting passwords that are secure enough. For example, it must be at least as many characters long as the user's password and must contain at least one symbol and one number. You can set this requirement by asking the following questionsType y and press Enter if you like
Ubuntu22.04_en

Ubuntu22.04 Server : Anti-virus , Mail Server

1.Introduced Clamav antivirus software1.1 Install# apt install clamav clamav-daemonThe clamav-related configuration files are installed in the /etc/clamav/ folder.1.2 Virus Definition Update# systemctl stop clamav-freshclam # freshclam
Ubuntu22.04_en

Ubuntu Server 22.04 : NTP , FTP Server(Vsftpd)

1. Install a time synchronization service NTP server# apt -y install chrony# vi /etc/chrony/chrony.conf# Lines 20-23.:Comment the default settings and add the NTP server for your time zone.#pool ntp.ubuntu.com     iburst maxsources 4#pool 0.ubuntu.pool.ntp.org iburst maxsources 1#pool 1.ubuntu.pool.ntp.org iburst maxsources 1#pool 2.ubuntu.pool.ntp.org iburst maxsources 2
FreeBSD14.2_en

FreeBSD14.2 ; OS Install

FreeBSDFreeBSD is UNIX-like open source OS software. In particular, its performance as a network operating system exceeds that of Linux-based systems, and it maintains stable performance even under high loads.FreeBSD is designed to be robust and sturdy with an emphasis on practicality, making it suitable for operating FTP, WWW, and e-mail servers for major companies and services.In this project, we will install FreeBSD 14.2, released on December 3, 2024, and build the server.FeaturesHigh-speed, high-performance multi-platform capable of withstanding high workloadsAdopted by many major companiesNetwork security measures can be applied by restricting accessCapable of operating small to large serversMore than 33,000 dedicated software applications from commercial to personal use
FreeBSD14.2_en

FreeBSD14.2 ; Initial setting (Update binaries, Packages and Ports Collection)

After installing FreeBSD, we will start building the server, but it is difficult to work on the console screen, so we will change the SSH connection settings for now in order to operate the server from Windows using TeraTerm or other software.The OpenSSH server allows password authentication login by default.If the service is enabled, you can log in remotely.Confirm validity of sshd service
FreeBSD14.2_en

FreeBSD14.2 ; Initial setup (Vim , SSH , Firewall, NTP server)

1. Vim InstallInstall Vim, which you are familiar with as an editor, as follows# pkg install -y vimEdit the ".shrc" to make Vim available as the standard editor, and log in again to reflect the change.FreeBSD14 has sh as default shell.You can check the current SHELL with the following command2. Use of locate databaseOn FreeBSD, I get the following error when using updatedb3. SSH Connection Security Measures3.1 SSH port changed, root user login disabled
FreeBSD14.2_en

FreeBSD14.2 ; WEB Server(Apache2) , MySQL8

1. Apache21.1 Install# cd /usr/ports/www/apache24# make configThere are many options, but we will proceed wit1. Apache21.1 Install# cd /usr/ports/www/apache24# make configThere are many options, but we will proceed wit
FreeBSD14.2_en

FreeBSD14.2 ; FTP Server , Samba Fileserver

1. FTP(Vsftpd)1.1 advance preparation①Private Key Creation# cd /etc/ssl# openssl genrsa -des3 -out server.key 2048Enter PEM pass phrase:Verifying - Enter PEM pass phrase:➁Passphrase Deletion2. File Server with SambaUse Samba to build a file server for Windows and Mac file sharing2.1 Samba Install# cd /usr/ports/net/samba416/# make configRemove the active directory relationships for ADS and AD_DC, as they will not be used this time.LDAP is also removed because account management is not done through LDAP.By default, Zeroconf Support is checked for AVAHI, but change it to MDNSRESPONDER
FreeBSD14.2_en

FreeBSD14.2 ; Postfix ClamAV + Amavis + SpamassAssin

Install ClamAV on FreeBSD 14.1 and link it with Amavis against Postfix.ClamAV is anti-virus software.We will proceed on the assumption that you have already implemented Postfix.Before proceeding, update the Ports Collection.1. ClamAV1.1 Install# cd /usr/ports/security/clamav# make install cleanEach option is installed by default for nowclamav version check