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

nuy

OracleLinux9.5_en

OracleLinux9.5 : SSL Certificate Acquisition( Let's Encrypt ) , WEB/Mail server SSL

1. SSL Certificate Acquisition ( Let's Encrypt )Install the latest open ssl# dnf install openssl-devel1.1 advance preparation1.Package management system Snappy installationSince the SSL certificate issuing tool "certbot" of Let's Encrypt is recommended to be installed using "snap" after 2021, install Snapd first.(Can also be installed the traditional way with dnf or yum)2. Converting Apache to httpsInstall the following# dnf -y install mod_ssl2.1 Edit ssl.conf file3. SSL/TLS (Let's Encrypt) settings on the mail server3.1 Obtaining a certificate for the mail serverObtain 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.
OracleLinux9.5_en

OracleLinux9.5 : MySQL8 , WordPress

MySQL8 Install# dnf -y install mysql-servercharset.cnf   Create a new one with the fWordPress Install1. Create database for Word PressAs an example, assume database [wp_db] database user [wp_user] password [?W123456]
OracleLinux9.5_en

OracleLinux9.5 : Suricata Install

SuricataSURICATA 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.
OracleLinux9.5_en

OracleLinux9.5 : SNORT3 Install

SNORT3Snort 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 various attacks such as “buffer overflows,” “stealth port scans,” “CGI attacks,” “SMB probes,” “OS fingerprinting attempts,” “semantic URL attacks,” and “server message block probes. The system can be used to detect a variety of attacks, such as
OracleLinux9.5_en

OracleLinux9.5 : Tripwire , Chkrootkit , Logwatch , Disk Usage Check Script

Tripwire1.Download and installation# cd /usr/local/src# wget https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/t/tripwire-2.4.3.7-13.el9.x86_64.rpm# rpm -Uvh tripwire-2.4.3.7-13.el9.x86_64.rpmChkrootkit①Download and install chkrootkit# cd /usr/local/src# wget https://launchpad.net/chkrootkit/main/0.55/+download/chkrootkit-0.55.tar.gz# tar xvf chkrootkit-0.55.tar.gzLogwatch①Install# dnf install logwatchIntroduce disk usage check script1. Script Creation# cd /var/www/system# vi disk_capacity_check.sh
OracleLinux9.5_en

OracleLinux9.5 : System Backup and Restore

1.Website data backup1-1.Backup under /var/www/html①Create backup script file2.MySQL database backup①Create backup script file# cd /var/www/system# vi db_my_backup.sh3.Restore backup files under html① Store HTML backup files in "/ (root)" directory# cd /var/www/backup/html_bak# cp html_back_20220610.tar.gz / ←Specify the backup file with the latest date4.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# cd /var/www/backup/db_bak
openSUSE15.4_en

OpenSUSE15.4 : OS download and installation

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.The openSUSE project announced the official release of "openSUSE Leap 15.4" on June 8, 2022.This is the fourth point release of the community version of the "openSUSE 15" series, built from the same source code and the same binary packages as the enterprise version "SUSE Linux Enterprise 15 SP4".
openSUSE15.4_en

OpenSUSE15.4 : Initialization

1. su コマンド利用Not required if root password is set at the time of installationIf you set a root password, set it as followsLog in as a general user2. Modernize the systemTo modernize the system, enter the following command
openSUSE15.4_en

OpenSUSE15.4 : Firewall , SSH、NTP Server

1.Setting up remote connection by SSHSSH 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.2.How to set up a firewall (firewalld)In openSUSE, the firewall is set to firewalld by default and is enabled during OS installation.To briefly explain firewalld, when setting up a communication control policy, communication permission/blocking rules are applied to predefined zones, and the zones are assigned to each NIC (network adapter).
openSUSE15.4_en

OpenSUSE15.4 : SSH connection with public key

Create a private key for the client and a public key for the server to allow login with key pair authentication1.key pair creationCreate a public/private key pair for a user connecting to the Linux server using OpenSSH.Use ssh-keygen to create key pairs.Creation of public/private key pairs is performed with remote login user privileges.If you do not specify the creation destination and file name, id_ecdsa and id_ecdsa.pub will be created in /home/(user name)/.ssh/.On the way, also enter the password for the key.
openSUSE15.4_en

OpenSUSE15.4 : FTP Server

1. vsftpd1.1 vsftpd InstallIt is already installed at the time of openSUSE installation.If not, you can install it with the following command2. vsftpd SSL/TLSConfigure Vsftpd to use SSL/TLS2.1 Create self-signed certificatesThis work is not required if you are using a trusted, legitimate certificate such as Let's Encrypt.
openSUSE15.4_en

OpenSUSE15.4 : WEB Server (Apache) Install

1. Web Server (Apache)1.1 apache2 Install# zypper -n install apache21.2 Apache2 : Basic Settings2. Apache2 : Using Perl ScriptsConfigure Perl scripts to be used as CGI3. Apache2 : Virtual Host SettingsConfigure both domains sample1.korodes.com sample2.korodes.com to be displayed on one server# cd /srv/www/htdocs/Create a directory named sample1.korodes.com under /srv/www/htdocs/4. Apache2 : Using PHP ScriptsInstall and configure PHP so that PHP scripts are available
openSUSE15.4_en

OpenSUSE15.4 : Clamav , Mail Server Install

1. clamav ( anti-virus software )1.1 Clamav install2.  Mail server Install2.1 Postfix install①Install Postfix and build an SMTP server3. Mail Server: Postfix + Clamav + AmavisdSet up Postfix and Clamav to work together to scan incoming and outgoing mail in real time.4.virus scan script substitutionSet up a notification to a specified e-mail address after virus check scan.
openSUSE15.4_en

OpenSUSE15.4 : MariaDB , WordPress Install

1. MariaDBUpdate the server package# zypper ref# zypper up -y1.1 MariaDB  install①install1.2 phpMyAdmin InstallInstalled phpMyAdmin and configured it to operate MariaDB via web browser1.3 MariaDB Example of database and user creationI'll create a user, password, and database for wordpress to install next.2. Wordpress Install2.1 Required library installation# zypper install php-gd php-pdo php-mysql php-mbstring php-simplexml php-curl apache2-mod_php72.2 Wordpress Download and Installation
openSUSE15.4_en

OpenSUSE15.4 : Snort Install

1.SNORT installSnort is a network-based IDS (Intrusion Detection System). It captures packets flowing over a network and detects suspicious packets.The source file is used directly from https://snort.org/.1.1 Advance preparationInstall required libraries