Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

nuy

Ubuntu 20.04 Building a server

Ubuntu Server 20.04 Obtaining and installing an image

Download Ubuntu Server 20.04 installation image The Ubuntu Server installation image can be downloaded from the official website. You will need to create an installation CD/DVD from the downloaded iso file.(About 1.2G) If you are installing on a virtual machine using Vmware or similar, you can use the iso file itself. Download the iso file   :  Ubuntu official download site Ubuntu Server 20.04 installation Change the BIOS so that the PC can boot from the installation disc created above, and then boot the PC.
Ubuntu 20.04 Building a server

Ubuntu Server 20.04 : SSH Service & Firewall

1. SSH service security settings The SSH service allows root user login by default. Since the root user already knows the username, if the password is known, he can log in to the server with administrator rights. 1.1 Creating a general user If you have created a general user during the installation of Ubuntu 20, this step is not necessary. If the only user created on the server is root, you will not be able to log in remotely via SSH, so if you have not created a user when you installed the OS, you will need to create one beforehand. To create a user, use the "useradd" command. The "-m" option is used to create a home directory and the "-p" option is used to specify a password. For example, to set "ubuntuuser" as the user account name and "123456" as the password, you would run
Ubuntu 20.04 Building a server

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 changes 3. Apache2 installation First allow port http:80 and port https:443 on UFW # ufw allow http # ufw allow https # ufw reload 3.1 Install Apache 2
Ubuntu 20.04 Building a server

Ubuntu Server 20.04 Anti-virus & mail server

1. Introduction of Clamav anti-virus software 1.1 Install # apt install clamav clamav-daemon Clamav-related configuration files are installed in the /etc/clamav/ folder 1.2 Update your virus definitions # freshclam The above command will update the virus definitions, but if you get the following error, change the log settings and run it again
Ubuntu 20.04 Building a server

Ubuntu Server 20.04 : MySQL 8 , WordPress

1. Install MySQL 8 1. Install # apt -y install mysql-server-8.0 2. MySQL server security settings Run the tool mysql_secure_installtion to configure security-related settings for your MySQL server. When you run it, you will be asked a series of questions to help you configure your security settings. You will first be asked if you want to use a password validation plugin, as shown below. Password validation means that you can check the password strength of users for MySQL and restrict them to accepting only passwords that are secure enough. For example, it should be at least a few characters long and always contain at least one symbol and one number. Type y if you like and press Enter
Ubuntu 20.04 Building a server

Ubuntu Server 20.04 : SNORT , Tripwire install

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

Ubuntu Server 20.04 : Logwatch & Disk usage check scripts

1. Introduction of disk usage check scripts 1.1 Script creation # cd /opt/script/ # vi disk_capacity_check.sh Contents of disk_capacity_check.sh #!/bin/bash #Specify email address for notification MAIL=" "
Ubuntu 20.04 Building a server

Ubuntu Server 20.04 : System Backup and Restore

1. System backup 1.1 Backup under /var/www/html ①Create the /var/www/system directory # mkdir /var/www/system ②Create a script "backup_all.sh" under /var/www/system # vi /var/www/system/backup_all.sh Contents of the "backup_all.sh" script #!/bin/bash #=========================================================== # : Environment initialization #=========================================================== #Date processing TODAY=`/bin/date +%Y%m%d` DAY_AGO=`/bin/date --date '7day ago' +%Y%m%d`
Ubuntu22.04_en

Ubuntu Server 22.04 : SSH , Firewall

1. SSH Service Security Settings The SSH service allows root user login by default. The root user can log in to the server with administrator privileges if the password is known because the user name is already known. 1.1 Creating a General User If you have created a general user when installing Ubuntu 22, 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.
Ubuntu22.04_en

Ubuntu22.04 Server : Anti-virus , Mail Server

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

Ubuntu22.04 Server : MySQL 8 , WordPress

1. MySQL 8 Install 1. 1Install # apt -y install mysql-server 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. 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 questions Type y and press Enter if you like
Ubuntu22.04_en

Ubuntu22.04 Server : Logwatch , Disk usage check

1. DiCE  Install 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!
Rocky Linux8.6 Building a server

Rocky Linux8.6 : Initial Settings

1. Disable SELinux First, 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.
Rocky Linux8.6 Building a server

Rocky Linux8.6 : SSH、firewall、NTP

1. Setting up SSH remote connection SSH 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 changes 2. How to set up a firewall (firewalld) In Rocky, the firewall is set to firewalld by default and is enabled during OS installation. To briefly explain "firewalld," when setting communication control policies, communication permission/blocking rules are applied to predefined zones, and these zones are then assigned to each NIC (network adapter). 4. NTP Server Settings Build an NTP server to synchronize the server time with Japan Standard Time
Rocky Linux8.6 Building a server

Rocky Linux8.6 : Anti-Virus 、Mail Server

Install Clamav ( anti-virus software ) 1.  Install 2. Edit C...