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

2023-06

Debian12.1_en

Debian12 ; OS Install

1.Debian12 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 is Debian 12.0 (codenamed "bookworm"), released on June 10, 2023 2.Download Debian installation image Debian12 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.
OpenSUSE15.5_en

OpenSUSE15.5 ; Server backup and restore

1. Server Backup 1.1 Backup under /srv/www/ ①Create backup script file 1.2. MariaDB Database Backup ①Create backup script file 2.Data Restore 2.1 Restore backup files under www ① Save backup files used for restore to the "/ (root)" directory of the server 2.2 Restore MariaDB data ① Save the database backup file to any directory Extract data
OpenSUSE15.5_en

OpenSUSE15.5 ; Tripwire, Logwatch Install

1. Tripwire Tripwire is a host-based intrusion detection system (IDS) that monitors files and directories and notifies you when changes are made. 1.1 Install and configuration ①Install 2. Logwatch ①Logwatch install
OpenSUSE15.5_en

OpenSUSE15.5 ; Obtain SSL Certificate (Let's Encrypt) 、Web Server SSL

1.Obtain an SSL Certificate (Let's Encrypt) Preparation Enable mod_ssl 1.1Certificate Installation 2. Web server SSL conversion 2.1 SSL Configuration
OpenSUSE15.5_en

OpenSUSE15.5 ; Clamav , Mail Server Install

1. Clamav ( anti-virus software ) 1.1 Clamav Install 2.  Mail server Install 2.1 Postfix Install ①Install Postfix and build an SMTP server 3. Mail Server: Postfix + Clamav + Amavisd Set up Postfix and Clamav to work together to scan incoming and outgoing mail in real time.
OpenSUSE15.5_en

OpenSUSE15.5 ; WEB Server (Apache) Install

1. Web Server (Apache) 1.1 apache2 Install 2. Apache2 : Using Perl Scripts  Configure Perl scripts to be used as CGI 3. Apache2 : Virtual Host Settings Configure both domains sample1.korodes.com sample2.korodes.com to be displayed on one server 4. Apache2 : Using PHP Scripts Install and configure PHP so that PHP scripts are available
OpenSUSE15.5_en

OpenSUSE15.5 ; FTP Server

1. Vsftpd 1.1vsftpd Install It is already installed at the time of openSUSE installation. If not, you can install it with the following command
OpenSUSE15.5_en

OpenSUSE15.5 ; Various settings after OS installation

1.Using su command Not required if root password is set at the time of installation If you set a root password, set it as follows Log in as a general user 2. Modernize the system To modernize the system, enter the following command 3.locate Install The find command is used to search for a specific file on the entire Linux system, but find's options are somewhat confusing. In such cases, it is useful to have the locate command available, which can extract all files with a given filename
OpenSUSE15.5_en

OpenSUSE15.5 ; OS Install

OpenSUSEとは OpenSUSE is a Linux distribution that is community-based, free to the public, and active in adopting the latest technologies. It is sponsored by Novell and developed by the community. Originally, SUSE Linux was developed by SUSE, but after the acquisition of SUSE by Novell in 2003, Novell shifted the development structure to community-based by the OpenSUSE project as a distribution aiming for 100% open source, and changed the name from SUSE Linux to OpenSUSE Linux The name was changed to the current name. openSUSE is available as Leap, the stable version, and Tumbleweed, which uses a rolling-release model and is also the basis for the paid-for version of SUSE Linux Enterprise.
Debian12.1_en

Debian12 ; System Backup and Restore

1. System Backup 1.1 Backup under /var/www/html ① Create backup_all.sh script under /opt/script 1.2 MariaDB database backup ①Create db_backup.sh script under /opt/script # vi /opt/script/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 MariaDB database ①Save DB backup file to any directory and extract data # cd /var/www/backup/db_bak
Debian12.1_en

Debian12 ;  Suricata , Logwatch , Chkrootkit , Disk Usage Check Script

Suricata SURICATA IDS/IPS is an open source IDS that monitors communications on the network and detects suspicious traffic. The basic mechanism is signature-based, so it can detect predefined unauthorized communications. Suricata is also characterized by its ability to provide protection as well as detection. Logwatch,Chkrootkit,Disk Usage Check Script install
Debian12.1_en

Debian12 ; MariaDB , WordPress Install

1. MariaDB 1.1 Install 1.4. MariaDB Server Security Settings MariaDB comes with a default security script, mariadb-secure-installation, which can be used to improve the security of your MariaDB installation, including Set a password for the root account (if necessary). Disable remote root login to the database. Delete anonymous user accounts. Delete the test database to which anonymous users have access by default. 2.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")
Debian12.1_en

Debian12 ; WEB Server(Apache) Install

Web server Apache2 installation Allow http:80 and https:443 ports in UFW before installation 3.  Apache2; Using Perl Scripts Enable CGI to make Perl scripts available ①Install Perl 4 Apache2 : Using PHP Scripts ①Install PHP 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 6. Digest authentication with Apache2 Since Basic Authentication, a well-known authentication authorization method for http, sends authentication information in plain text, there is a risk of ID and password leakage if the packet is intercepted. On the other hand, Digest Authentication encrypts and transmits authentication information, so there is almost no risk of information leakage.
Debian12.1_en

Debian12 ; 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.
Debian12.1_en

Debian12 ; 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. 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. 3 Applied ClamAV to mail server Postfix Set up Postfix and Clamav to work together to scan incoming and outgoing mail in real time. 4 Apply spam checks to the mail server 4.1 Spam checking using spamassassin and procmail ①spamassassin and procmail installation