OS

空ファイル作成

OS

Ubuntu (16)touch afile(18)touch afile Debian (9)touch afile CentOS (7)touch afile Windows Server (2012R2)https://www.softel.co.jp/blogs/tech/archives/4596 type nul > afile

ホスト名の設定と確認

OS

Ubuntu (16)hostnamectlhostnamectl set-hostname ubu16 (18)https://qiita.com/miyagaw61/items/dba800ee404d70792481 vim /etc/cloud/cloud.cfg preserve_hostname: false↓preserve_hostname: true hostnamectlhostnamectl set-hostname ubu18 Debian (9)h…

MySQL

OS

Ubuntu (16) apt install mysql-server mysql-client systemctl enable mysqlsystemctl restart mysqlsystemctl status mysql mysql -u root -p (18) apt install mysql-server mysql-client mysql_secure_installation systemctl enable mysqlsystemctl res…

Nginx

OS

Ubuntu https://www.nginx.com/resources/wiki/start/topics/tutorials/install/(16) vim /etc/apt/sources.list.d/nginx.list deb http://nginx.org/packages/ubuntu/ xenial nginxdeb-src http://nginx.org/packages/ubuntu/ xenial nginx apt-get updatea…

PostgreSQL

OS

Ubuntu (16)apt updateapt -y install postgresql (18) apt updateapt -y install postgresql Debian (9)apt updateapt -y install postgresql CentOS (7) --yum リポジトリの追加yum install -y https://download.postgresql.org/pub/repos/yum/9.4/redhat/…

サービス起動

OS

Ubuntu (16)systemctl list-unit-files systemctl status postgresqlsystemctl enable postgresqlsystemctl stop postgresqlsystemctl start postgresql (18)systemctl list-unit-files systemctl status postgresqlsystemctl enable postgresqlsystemctl st…

デフォルトエディタの変更

OS

Ubuntu https://linuxfan.info/set-default-editor-ubuntu-debian (16)apt -y install vimapt -y install nano update-alternatives --list editorupdate-alternatives --config editor (18) apt -y install vimapt -y install nano update-alternatives --l…

パスワードなしsudo

OS

Ubuntu (16)visudo test ALL=(ALL) NOPASSWD: ALL (18)visudo test ALL=(ALL) NOPASSWD: ALL Debian (9) apt -y install sudo visudo test ALL=(ALL) NOPASSWD: ALL CentOS (7) visudo test ALL=(ALL) NOPASSWD: ALL Windows Server (2012R2) https://hrkwor…

ユーザ追加

OS

Ubuntu (16) cat /etc/passwduseradd -d /home/test -s /bin/bash testpasswd testmkdir /home/test (18)cat /etc/passwduseradd -d /home/test -s /bin/bash testpasswd testmkdir /home/test Debian (9)cat /etc/passwduseradd -d /home/test -s /bin/bash…

輻輳制御アルゴリズム

OS

Ubuntu (16)sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_congestion_control = cubic (18)sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_congestion_control = cubic Debian (9)sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_cong…

ディスク容量負荷

OS

Ubuntu (16)dd if=/dev/zero of=dummy.1G bs=1M count=1024 (18)dd if=/dev/zero of=dummy.1G bs=1M count=1024 Debian (9)dd if=/dev/zero of=dummy.1G bs=1M count=1024 CentOS (7) dd if=/dev/zero of=dummy.1G bs=1M count=1024 Windows Server (2012R2)…

IPv6無効化

OS

Ubuntu (16) ip a s vim /etc/sysctl.conf net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1 sysctl -pip a s reboot ip a s (18)https://note.spage.jp/archives/413 ip a s cat <<'EOF' | tee -a /etc/sysctl.d/70-disable-ipv6…

リリース日

OS

Ubuntu 16.04 2016年4月 ~ 2021年4月 Xenial18.04 2018年4月 ~ 2023年4月 Bionic20.04 2020年4月 ~ 2025年4月 Focal Debian 9 stretch 2017年6月 ~ 2022年6月10 buster 2019年7月 ~ 2024年11 bullseye CentOS 6 2011年7月 ~ 2020年11月7 2014年7月 ~ …

システムログ確認

OS

Ubuntu (16)(18) cat /var/log/syslog Debian (9) cat /var/log/syslog CentOS (7) cat /var/log/messages Windows Server (2012R2) https://qiita.com/sta/items/957d78a8e884f23cb8be wevtutil qe System /f:Text /rd:true > system.txt

Wireshark

OS

Ubuntu https://qiita.com/kasama123/items/aa3c6ffd0cff1d951888 # リポジトリ追加add-apt-repository ppa:wireshark-dev/stableapt update# wiresharkインストールapt install wireshark #権限設定usermod -aG wireshark testuser 再ログイン Debian (9) a…

メール送信

OS

Ubuntu (16)(18) https://off.tokyo/blog/ubuntu-mail-send/ --1.メール送信ユーザ作成 useradd -d /home/mailuser mailuser mkdir /home/mailuserchmod 700 /home/mailuserchown mailuser:mailuser /home/mailuser --2.インストール apt install ssmtp vi /…

バージョン確認

OS

Ubuntu (16)(18)cat /etc/os-release Debian (9)cat /etc/os-release CentOS (7) cat /etc/redhat-release Windows Server (2012R2) winver

ファイアウォール

OS

Ubuntu (16)(18) apt install ufw ufw status ufw disable ※OCIの場合、下記も確認必要iptables -L Debian (9) apt install ufw ufw status ufw disable CentOS (7) systemctl disable firewalldsystemctl stop firewalldsystemctl status firewalld firewal…

パッケージマネージャ

OS

Ubuntu (16)(18)apt updateapt upgrade Debian (9) vi /etc/apt/sources.list deb http://ftp.jp.debian.org/debian/ stretch maindeb-src http://ftp.jp.debian.org/debian/ stretch main deb http://security.debian.org/debian-security stretch/updates …

SSH

OS

Ubuntu (16)(18)apt install openssh-server systemctl enable sshsystemctl restart ssh Debian (9)apt install openssh-server systemctl enable sshsystemctl restart ssh CentOS (7) yum install openssh-server systemctl enable sshdsystemctl restart…

ネットワーク設定

OS

Ubuntu (16) ----NetworkManagerを使う場合nmtui ----NetworkManagerを使わない場合 systemctl stop NetworkManagersystemctl disable NetworkManager vi /etc/network/interfaces auto loiface lo inet loopback auto ens33iface ens33 inet staticaddress …