2025年10月29日水曜日

メモリテスト lsusb

 # dmidecode --type memory | grep -E "Speed|Configured"

Speed: 4800 MT/s

Configured Memory Speed: 4800 MT/s

Configured Voltage: 1.1 V

Speed: 4800 MT/s

Configured Memory Speed: 4800 MT/s

Configured Voltage: 1.1 V


sudo dnf install -y memtester
sudo memtester 2G 1

# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0db0:0076 Micro Star International MYSTIC LIGHT 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 003 Device 003: ID 0e8d:0616 MediaTek Inc. Wireless_Device
Bus 003 Device 004: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 003 Device 005: ID 054c:06c3 Sony Corp. RC-S380
Bus 003 Device 006: ID 214b:7250 Huasheng Electronics USB2.0 HUB
Bus 003 Device 007: ID 056e:011c Elecom Co., Ltd HUGE TrackBall
Bus 003 Device 008: ID 056e:013d Elecom Co., Ltd ELECOM OpticalMouse
Bus 003 Device 009: ID 1ea7:0066 SHARKOON Technologies GmbH [Mediatrack Edge Mini Keyboard]
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
[root@rocky92 takahab]# lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge GPP Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge GPP Bridge
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Internal GPP Bridge to Bus [C:A]
00:08.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Internal GPP Bridge to Bus [C:A]
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 7
01:00.0 Non-Volatile memory controller: Phison Electronics Corporation E18 PCIe4 NVMe Controller (rev 01)
02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Upstream Port (rev 01)
03:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
03:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
03:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
03:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
03:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
03:08.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
03:0c.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
03:0d.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
04:00.0 Non-Volatile memory controller: Phison Electronics Corporation PS5021-E21 PCIe4 NVMe Controller (DRAM-less) (rev 01)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
09:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Upstream Port (rev 01)
0a:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
0a:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
0a:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
0a:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
0a:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
0a:08.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
0a:0c.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
0a:0d.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Downstream Port (rev 01)
0c:00.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter
10:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller S4LV008[Pascal]
11:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset USB 3.2 Controller (rev 01)
12:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset SATA Controller (rev 01)
13:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset USB 3.2 Controller (rev 01)
14:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset SATA Controller (rev 01)
15:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raphael (rev c9)
15:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Radeon High Definition Audio Controller [Rembrandt/Strix]
15:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 19h PSP/CCP
15:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge USB 3.1 xHCI
15:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge USB 3.1 xHCI
15:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller
16:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge USB 2.0 xHCI




2025年10月27日月曜日

rtar リモートファイルコピー

#!/bin/bash
usage(){
echo "USAGE rtar get takahab@rocky88:/m2_1/xxxx"
echo " rtar put src takahab@rocky88:/m2_1/xxxx "
}
SRC_DIR=$2
DST_DIR=$2

#---------------------------------------------------------------------------
main(){
case "$1" in
"get" )
ssh takahab@rocky88 "tar czf - ${SRC_DIR}" |pv| tar xzf - -C .
;;

"put" )
tar czf - ${SRC_DIR} |pv| ssh takahab@rocky88 "tar xzf - -C ${DST_DIR}"
;;

*)
usage
;;

esac
}

main $@

$ find /m2_2/work/disk1/final_写真保存/1996-7 -type f -exec touch -t 199607010000 {} +

 ./organize.py --move --cleanup /m2_2/写真 /m2_2/dest_dir


2025年10月24日金曜日

WOL

rocky92 -> rockyi7
【rocki7 BIOS】
(1) Power On By PCI-E/PCI -> enable
(2) Onboard devices Configuration/Realtek LAN Controller -> on
(3) Onboard devices Configuration/Realtek PXE OPROM -> On
※「PME Event Wake Up」と言う項目はない。

【rockyi7側 Rocky linux9】
# nmcli c
NAME UUID TYPE DEVICE
lan000 423e4c49-31e4-4932-bdd8-9f8ffe0cd1c2 ethernet enp4s0
# ip a
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 9c:5c:8e:97:48:5f brd ff:ff:ff:ff:ff:ff

# nmcli connection modify lan000 802-3-ethernet.wake-on-lan magic
# systemctl restart NetworkManager
# nmcli connection up lan000
# ethtool enp4s0
Supports Wake-on: pumbg
Wake-on: g

【rocky92 側】
$ pip3 install wakeonlan
$ wakeonlan ---host 192.168.1.255 9c:5c:8e:97:48:5f


【SCRIPTS例】
#!/bin/bash
#----------------------------------------------------------
#  pip3 install wakeonlan
#----------------------------------------------------------
usage(){
echo "USAGE    rockyi7 on/off"
echo "                  rocky3900 on/off"
echo "                 rocky7950 on/off"
}

WOLTOOLS_PASS="/usr/local/bin"
WOLTOOLS_NAME="woltools"

HOST_INFO_LISTS="rockyi7|192.168.1.197|9c:5c:8e:97:48:5f|user1|password \
                 rocky39|192.168.1.199|00:d8:61:fb:99:74|user1|password \
                 rocky3900|192.168.1.199|00:d8:61:fb:99:74|user1|password \
                 rocky79|192.168.1.198|d8:43:ae:19:cf:26|user1|password \
                 rocky7950|192.168.1.198|d8:43:ae:19:cf:26|user1|password"

#---------------------------------------------------------------------------
main(){

get_hostinfo $0 $1

case "$1" in
"link" )
cmd_link
;;

"unlink" )
cmd_unlink
;;

"on" )
echo $TARGET_HOST_NAME  ip=$TARGET_HOST_IP mac=$TARGET_HOST_MAC broadcast=$TARGET_BROADCAST_IP
echo wakeonlan --host ${TARGET_BROADCAST_IP} ${TARGET_HOST_MAC}
wakeonlan --host ${TARGET_BROADCAST_IP} ${TARGET_HOST_MAC}
;;

"off" )
echo "${TARGET_PASSWORD}" |ssh -T ${TARGET_USER}@${TARGET_HOST_IP} "sudo -S -p '' shutdown -h now"
  ;;

*)
;;
esac
}

#---------------------------------------------------------------------------
cmd_link(){
for ROW in ${HOST_INFO_LISTS}; do
TARGET_HOST_NAME=`echo $ROW | cut -d "|" -f 1`
( cd ${WOLTOOLS_PASS} ; sudo ln -s ${WOLTOOLS_NAME} ${TARGET_HOST_NAME} )
done
echo link completed
}

cmd_unlink(){
for ROW in ${HOST_INFO_LISTS}; do
TARGET_HOST_NAME=`echo $ROW | cut -d "|" -f 1`
( cd ${WOLTOOLS_PASS} ; sudo unlink ${TARGET_HOST_NAME} )
done
echo unlink completed
}

get_broadcast_ip(){
ip=$1
new_ip=$(echo "$ip" | awk -F. '{printf "%d.%d.%d.255", $1, $2, $3}')
TARGET_BROADCAST_IP=$new_ip
}

get_hostinfo(){
case "$2" in
"on" )
                ACTION="を起動します。"
;;
"off" )
                ACTION="を停止します。"
;;
*)
                ACTION="無効なアクションです。"
;;
esac

HOST_NAME=`basename $1`
        TARGET_HOST_NAME=""
      TARGET_HOST_IP=""
        TARGET_HOST_MAC=""
for ROW in ${HOST_INFO_LISTS}; do
TARGET_HOST_NAME=`echo $ROW | cut -d "|" -f 1`
if [ $HOST_NAME == $TARGET_HOST_NAME ]; then
TARGET_HOST_IP=`echo  $ROW | cut -d "|" -f 2`
TARGET_HOST_MAC=`echo $ROW | cut -d "|" -f 3`
TARGET_USER=`echo     $ROW | cut -d "|" -f 4`
TARGET_PASSWORD=`echo $ROW | cut -d "|" -f 5`
get_broadcast_ip $TARGET_HOST_IP
                        #echo  NAME=${TARGET_HOST_NAME}${ACTION} IP=${TARGET_HOST_IP} USER=${TARGET_USER} PW=${TARGET_PASSWORD}
                        echo  NAME=${TARGET_HOST_NAME}${ACTION} IP=${TARGET_HOST_IP} USER=${TARGET_USER}
break
fi
done
}

main $@
 

2025年10月17日金曜日

samsung 990 Pro のファーム更新(Rocky linux9)

https://semiconductor.samsung.com/jp/consumer-storage/support/tools/

mkdir /mnt/iso
sudo mount -o loop ./Samsung_SSD_990_PRO_7B2QJXD7.iso /mnt/iso/
mkdir /tmp/fwupdate
cd /tmp/fwupdate
gzip -dc /mnt/iso/initrd | cpio -idv --no-absolute-filenames
cd root/fumagician/
sudo ./fumagician
sudo smartctl -a -s on /dev/nvme2n1 | grep "Firmware Version"
Firmware Version:                   4B2QJXD7  → 7B2QJXD7

# nvme list
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1  /dev/ng0n1   511230612051000688  MSI M480 PRO 2TB           0x1          2.00  TB /   2.00  TB    512   B +  0 B   EIFM31.6
/dev/nvme1n1  /dev/ng1n1   511230411274000010  MSI M461 2TB                     0x1          2.00  TB /   2.00  TB    512   B +  0 B   ELFMC1.0
/dev/nvme2n1  /dev/ng2n1   S7HPNJ0Y301818H      Samsung SSD 990 PRO with Heatsink 2TB   0x1   993.64  MB /   2.00  TB  512   B +  0 B  7B2QJXD7

【SSD比較】

https://kakaku.com/prdcompare/prdcompare.aspx?pd_cmpkey=K0001673420_K0001588762_K0001559684_K0001504089_K0001546441_K0001662527&pd_ctg=0537

https://kakaku.com/prdcompare/prdcompare.aspx?pd_cmpkey=K0001673415_K0001647870_K0001673416_K0001656275_K0001712041_K0001656599_K0001656276&pd_ctg=0540&spec=101_3-1_1-1_2-1-2_4-1-2-3_9-1,107_6-1-2-3-4-5,108_12-1-2-3-4,109_13-1-2-3-4,110_14-1-2,104_8-1-2-3-4-5-6-7-8,106_10-1-2-3,103_7-1-2-3-4

https://www.microsoft.com/en-us/software-download/windows11?utm_source=chatgpt.com



2025年10月12日日曜日

Rocky Linux10 インストール

dd if=Rocky-10.2-x86_64-dvd1.iso of=/dev/sda bs=4M status=progress oflag=direct


timedatectl set-timezone Asia/Tokyo
localectl set-locale LANG=ja_JP.utf8

nmcli general hostname rockyi7

nmcli c delete internet
nmcli c add type ethernet ifname enp4s0 con-name "internet" ethernet.mtu 1500
nmcli connection modify internet ipv4.method manual ipv4.addresses 192.168.1.197/24
nmcli connection modify internet ipv4.dns 8.8.8.8
nmcli connection modify internet ipv4.gateway 192.168.1.1
nmcli connection modify internet connection.autoconnect yes 

nmcli connection up internet

systemctl daemon-reload
systemctl restart NetworkManager

nmcli connection modify internet 802-3-ethernet.wake-on-lan magic
nmcli connection up internet
ethtool enp4s0                          # 確認
Supports Wake-on: pumbg
Wake-on: g


# CRB リポジトリの有効化
dnf config-manager --set-enabled crb
# EPEL リポジトリのインストールと有効化
dnf install -y epel-release
# パッケージキャッシュの更新
dnf makecache

dnf install -y ibus  ibus-anthy

GNOME 設定から
日本語(Anthy)
英語(US)

[epel]
...
excludepkgs=zabbix*
# rpm -Uvh https://repo.zabbix.com/zabbix/8.0/release/rocky/10/noarch/zabbix-release-latest-8.0.el10.noarch.rpm
# dnf clean all

# dnf install zabbix-agent2 zabbix-agent2-plugin-postgresql
# systemctl restart zabbix-agent2
# systemctl enable zabbix-agent2

# firewall-cmd --add-port=10050/tcp --zone=public --permanent
# firewall-cmd --reload
 # dnf install zabbix-selinux-policy

# vi /etc/zabbix/zabbix_agent2.conf
Server=192.168.1.xxx


# dnf install gnome-tweaks   # 古いのでいらない。


$ sudo dnf install gnome-browser-connector
$ dnf search gnome-shell-extension

$ sudo dnf install gnome-shell-extension-apps-menu gnome-shell-extension-places-menu
$ sudo dnf install  gnome-shell-extension-desktop-icons
$ sudo dnf install  gnome-shell-extension-system-monitor
$ sudo dnf install  gnome-shell-extension-no-overview
$ sudo dnf install  gnome-shell-extension-window-list
$ sudo dnf install  gnome-shell-extension-user-theme
$ sudo dnf install  gnome-shell-extension-dash-to-dock.noarch
$ sudo dnf install  gnome-shell-extension-places-menu

$ dnf list installed |grep  gnome-shell-extension
gnome-shell-extension-appindicator.noarch            61-1.el10_2          @epel         
gnome-shell-extension-apps-menu.noarch               49.0-7.el10_3     @appstream 
gnome-shell-extension-background-logo.noarch   49.0-1.el10         @AppStream    
gnome-shell-extension-blur-my-shell.noarch           70-1.el10_2        @epel         
gnome-shell-extension-caffeine.noarch                58-1.el10_2              @epel         
gnome-shell-extension-common.noarch                  49.0-7.el10_3      @appstream    
gnome-shell-extension-dash-to-dock.noarch            102-1.el10         @appstream    
gnome-shell-extension-desktop-icons.noarch           49.0-7.el10_3   @appstream    
gnome-shell-extension-drive-menu.noarch              49.0-7.el10_3     @appstream    
gnome-shell-extension-just-perfection.noarch         35.0-1.el10_2    @epel         
gnome-shell-extension-launch-new-instance.noarch 49.0-7.el10_3 @appstream  
gnome-shell-extension-no-overview.noarch             49-1.el10                @crb          
gnome-shell-extension-places-menu.noarch             49.0-7.el10_3     @appstream  gnome-shell-extension-system-monitor.noarch          49.0-7.el10_3  @appstream  
gnome-shell-extension-user-theme.noarch              49.0-7.el10_3      @appstream   
gnome-shell-extension-window-list.noarch             49.0-7.el10_3      @appstream    


$ gnome-extensions list

$ gnome-extensions enable    apps-menu@gnome-shell-extensions.gcampax.github.com
$ gnome-extensions enable places-menu@gnome-shell-extensions.gcampax.github.com

$ gnome-extensions-app  #手動でEnable


【Appsメニューカスタマイズ】
# find /usr/share ~/.local/share -path "*/ja/*" -name "*gnome-shell-extension*.mo" 2>/dev/null

MO_FILE="/home/takahab/.local/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-apps-menu.mo"
cp "$MO_FILE" "${MO_FILE}.bak"
msgunfmt "$MO_FILE" -o ~/apps-menu.po
sed -i '/msgid "Apps"/{n;s/msgstr "アプリ"/msgstr "アプリケーション"/}' ~/apps-menu.po
msgfmt ~/apps-menu.po -o "$MO_FILE"

logout→login

【CPU温度、ファン】
https://extensions.gnome.org/extension/1460/vitals/


sudo dnf install -y git make gcc dkms kernel-devel-$(uname -r) kernel-headers-$(uname -r)
cd /usr/src
sudo git clone https://github.com/Fred78290/nct6687d    ※TOMAHAWK X670E
cd nct6687d
sudo make dkms/install
sudo modprobe nct6687

sudo dnf install -y lm_sensors
sudo sensors-detect
sensors

 再起動後も自動読み込み
echo "nct6687" | sudo tee /etc/modules-load.d/nct6687.conf




下記は、古い拡張機能がはいってしまうので、上記手順で拡張機能をON
Apps Menu
Places Status Indicator
#Dash to Panel    #古い
Vitals
windows list


【Google chrome】
# cat << 'EOF' > /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=https://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
EOF
#dnf makecache
# dnf install -y google-chrome-stable


 ※Googleアカウント移行


【LibreOffice】
# flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# flatpak install flathub org.libreoffice.LibreOffice
再ログイン(一回ログアウトするとアプリメニューに登録される)

【GIMP】
# flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# flatpak install flathub org.gimp.GIMP

# dnf install ImageMagick

【プリンタードライバ】
#  rpm -ihv --nodeps  dcpj982npdrv-1.0.5-1.i386.rpm
# rpm -qa | grep -e dcp
dcpj982npdrv-1.0.5-1.i386
 

【スキャナ】
# dnf install sane-backends sane-backends-drivers-scanners sane-backends-daemon  libnsl

# rpm -ivh --nodeps brscan4-0.4.11-2.x86_64.rpm

# firewall-cmd --add-port=54925/udp --permanent
# firewall-cmd --add-port=54921/tcp --permanent
# firewall-cmd --reload

# dnf install -y sane-backends-daemon
# systemctl daemon-reload
# systemctl enable --now saned.socket

# flatpak install flathub org.kde.skanlite

# brsaneconfig4 -a name=DCP-J982N model=DCP-J982N ip=192.168.1.200
# flatpak override org.kde.skanlite --env=SANE_NET_HOSTS=localhost

# scanimage -L
device `brother4:net1;dev0' is a Brother DCP-J982N DCP-J982N

【cursor】
ここからrpmをダウンロード
https://cursor.com/ja/download
# dnf  install cursor-3.30.14.el8.x86_64.rpm

右上からIDE起動
拡張機能→Japanese Language Pack for Visial Studio Code
vim
cntl+shift+P → Configure Display Langage     → 日本語
Vim emulation for Visual Studio Code
Color Theme     → Monokai
AutoRenameTag
CSS Peak
Error Lens
ESLint
GItLens
Japanize Language Pack for Visual Studil Code
Prettier-Code formatter
Python
Phyton Debugger
Django
djLing
Database Client JDBC
SQLTools


1) Ctrp + Shift + P   Preferences: Color Theme
2) Ctrl + Shift + J      Agnets → Default Model→Last Used
3) Ctrl + Shift + P   settings →Genaral→テキストエディタ→ FONT16→18


【マウスサイズ】
設定→アクセスビリティ→表示中→カーソルの大きさ(特大)

【ssh 公開鍵】
$ ssh-keygen -t ed25519 -C ホスト名
$ ssh-copy-id -i ~/.ssh/id_ed25519.pub ユーザー名@サーバーのIPアドレス
$ ssh -i ~/.ssh/id_ed25519 ユーザー名@サーバーのIPアドレス
$ mkdir ~/.ssh/config.d
$ vi ~/.ssh/config  __EOF__
Include ~/.ssh/config.d/*.conf
__EOF__
$ vi ~/.ssh/config.d/home.conf  <<__EOF__
Host rocky7950
    HostName 192.168.1.198 
    User ユーザー名
    IdentityFile ~/.ssh/rocky7950/id_ed25519
__EOF__
$ chmod go-rwx ~/.ssh/config ~/.ssh/config.d ~/.ssh/config.d/*

# vi /etc/ssh/sshd_config         # サーバ側(リモート)
 PasswordAuthentication no


【データコピー】
$ ssh rocky7950 "tar czf - -C ~ Make" | tar xzf -
$ ssh rocky7950 "tar czf - -C ~ ドキュメント" | tar xzf -


【VIM】
$ ssh rocky7950 "tar czf - -C ~ .vimrc" | tar xzf -
# ln -s  /usr/bin/vim /usr/local/bin/vi 
# hash -r

【nginx】
本家のnginxリポジトリからインストール
# systemctl stop httpd
# systemctl disable httpd

# cat << 'EOF' > /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=https://nginx.org
gpgcheck=1
enabled=1
module_hotfixes=true

[nginx-mainline]
name=nginx mainline repo
baseurl=https://nginx.org
gpgcheck=1
enabled=0
module_hotfixes=true
EOF
# dnf install --nogpgcheck nginx
# systemctl start nginx
# systemctl enable nginx
# firewall-cmd --permanent --add-service=http
# firewall-cmd --permanent --add-service=https
# firewall-cmd --reload
# nginx -t
# systemctl restart nginx
# setsebool -P httpd_can_network_connect 1

※確認
$ curl -I https://office.dom.mydns.jp
HTTP/1.1 200 OK
Server: nginx/1.30.8
Date: Tue, 24 Nov 2026 04:43:02 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 9593
Connection: keep-alive
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self'; base-uri 'self'; object-src 'none'; form-action 'self'; frame-ancestors 'none'; script-src 'self' 'unsafe-inline'; style-src  'self' 'unsafe-inline'; connect-src 'self' https://dom.mydns.jp https://office.dom.mydns.jp; img-src 'self' data: blob: https://dom.mydns.jp https://office.dom.mydns.jp; font-src 'self' data:
X-Content-Type-Options: nosniff
Vary: rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding
x-nextjs-cache: HIT
x-nextjs-prerender: 1
x-nextjs-prerender: 1
link: </>; rel=preconnect; crossorigin=""
x-nextjs-stale-time: 300
Cache-Control: s-maxage=31536000
ETag: "d6dua02rsm7dh"
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff


【PYTHON・Django開発環境】
※先にデータベースを構築
$ sudo dnf update -y
$ sudo dnf install -y python3.14 python3.14-pip
$ sudo dnf install -y python3.14-devel gcc libpq-devel
$ sudo ln -s /usr/pgsql-19/bin/pg_config /usr/local/bin/pg_config
$ cd  DjangoNextAuth/backend
./clean all
./env create
 ■gunicorn 起動
※本番環境構築後に実施。
$ cd /home/takahab/Make/DjangoNextAuth/backend
$ . ./env
$ pip install gunicorn
$ sudo vi /etc/systemd/system/gunicorn.service << __EOF__
[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=nginx
Group=nginx
WorkingDirectory=/var/www/DjangoNextAuth/backend
Environment="PYTHONPATH=/var/www/DjangoNextAuth/.venv/lib/python3.14/site-packages"
ExecStart=/usr/bin/python3.14 /var/www/DjangoNextAuth/.venv/bin/gunicorn \
--workers 3 \
--bind 127.0.0.1:8000 \
Config.wsgi:application

[Install]
WantedBy=multi-user.target
__EOF__

# systemctl daemon-reload
# systemctl restart gunicorn
# systemctl status gunicorn

※アプリのデプロイ
# mkdir /share
# chown nginx:nginx /share
$ cd /home/takahab/Make/DjangoNextAuth
$ ./deploy

【NEXTJS環境】
# PM2をグローバルにインストール
# dnf install nodejs-npm
# npm install -g pm2


【サーバ証明書】Let'sEncryptのSSL証明書
# firewall-cmd --add-service=http --permanent
# firewall-cmd --add-service=https --permanent
firewall-cmd --reload
※firewall-cmd --remove-service=http --permanent
※firewall-cmd --reload
# vi /etc/nginx/conf.d/office.dom.mydns.jp.conf <<__EOF__
server {
    listen 80;
    server_name office.dom.mydns.jp;

    root /usr/share/nginx/html;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }
}
__EOF__
# nginx -t
# systemctl reload nginx

# dnf install -y epel-release
# dnf install -y certbot python3-certbot-nginx

# certbot --nginx -d office.dom.mydns.jp    # conf.d/99_office.dom.mydns.jp.conf 自動追加

systemctl reload nginx
systemctl restart nginx


■サーバ証明書自動更新(90日)
# 自動更新タイマーの有効化と確認
sudo systemctl enable --now certbot-renew.timer
sudo systemctl status certbot-renew.timer

# 更新の予行演習(エラーが出なければOK)
sudo certbot renew --dry-run


【postgres】
# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm

# vi  /etc/yum.repos.d/pgdg-redhat-all.repo                    # 該当バージョン意外をDISEBLE
# dnf install -y postgresql19-server postgresql19
# /usr/pgsql-19/bin/postgresql-19-setup initdb
# systemctl enable --now postgresql-19
# passwd postgres
# su - postgres
$ psql -V
psql (PostgreSQL) 19.0
$ psql
alter user postgres with password 'password';
exit
$  vi /var/lib/pgsql/19/data/pg_hba.conf 
#local   all             all                                     peer
host    all             all             127.0.0.1/32           scram-sha-256
host     all             all            192.168.1.0/24      scram-sha-256

$ vi /var/lib/pgsql/19/data/postgresql.conf 
listen_addresses = '*'          
port = 5432 
max_connections = 100 
log_timezone = 'Asia/Tokyo'
timezone = 'Asia/Tokyo'
lc_messages = 'ja_JP.utf8'    # locale for system error message
lc_monetary = 'ja_JP.utf8'    # locale for monetary formatting
lc_numeric = 'ja_JP.utf8'       # locale for number formatting
lc_time = 'ja_JP.utf8'
# systemctl restart postgresql-19
# firewall-cmd --add-port=5432/tcp --zone=public --permanent
# firewall-cmd --reload

【データディレクトリの変更】
$ psql
show config_file ;
show data_directory;
# systemctl stop postgresql-19.service
# mkdir -p /pg_data/data
# chown postgres:postgres /pg_data
# chown postgres:postgres /pg_data/data
# chmod -R 700  /pg_data/data
# rsync -av /var/lib/pgsql/19/data/  /pg_data/data

# vi /var/lib/pgsql/19/data/postgresql.conf
data_directory = '/pg_data/data'
# vi /lib/systemd/system/postgresql-19.service
#Environment=PGDATA=/var/lib/pgsql/19/data/
Environment=PGDATA=/pg_data/data/
# systemctl daemon-reload
# systemctl start postgresql-19

■ Django データベース作成
$ cd ~/Make/DjangoNextAuth/backend
$ ./build initdatabase

【dbeaver】
URL: https://dbeaver.io/download/
# dnf install  dbeaver-ce-26.2.5-linux-x86_64.rpm
# DjangoNextAuth/backend/Config/.env      ID/PW


【zabbix】
https://www.zabbix.com/jp/download?zabbix=8.0&os_distribution=rocky_linux&os_version=10&components=server_frontend_agent_2&db=pgsql&ws=nginx

画面内の手順にしたがってインストール
※ZABBIX8.0は、まだPostgres19に対応していないため待機。
下記設定だけは先にしておく。
# vi /etc/zabbix/zabbix_server.conf
AllowUnsupportedDBVersions=1


【KVM】
dnf  install qemu-kvm libvirt virt-install
dnf install virt-manager

./virctl spool create
./verctl vlan create
./verctl host define
./verctl host start


【保存版】Rocky Linux 10 リモートデスクトップ(システムモード)設定手順
すべてサーバー側の root ユーザー(または各コマンドの頭に sudo を付与)で実行します。
1. システム用の証明書配置ディレクトリを作成する
bash
mkdir -p /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop
コードは注意してご使用ください。
2. 絶対パスに配置する自己署名証明書(10年有効)を生成する
bash
openssl req -new -x509 -days 3650 -nodes -newkey rsa:2048 \
  -keyout /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.key \
  -out /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.crt \
  -subj "/CN=Rocky10-System-RDP"
コードは注意してご使用ください。
3. 生成したファイルの所有権を専用ユーザーに変更する
bash
chown -R gnome-remote-desktop:gnome-remote-desktop /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop
コードは注意してご使用ください。
4. 生成した正しい「絶対パス」をシステム(--system)に登録する
bash
grdctl --system rdp set-tls-cert /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.crt
grdctl --system rdp set-tls-key /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.key
コードは注意してご使用ください。
5. RDP接続用のユーザー名とパスワードを登録する
  • ※ takahab-rdp や password は任意の設定値に置き換え可能です。
bash
grdctl --system rdp set-credentials 'takahab-rdp' 'password'
コードは注意してご使用ください。
6. 閲覧のみモードを解除し、システムモードのRDPを有効化する
bash
grdctl --system rdp disable-view-only
grdctl --system rdp enable
コードは注意してご使用ください。
7. ファイアウォールを開放する
bash
firewall-cmd --permanent --add-service=rdp
firewall-cmd --reload
コードは注意してご使用ください。
8. サービスを有効化(常駐)&起動する
bash
systemctl enable gnome-remote-desktop
systemctl restart gnome-remote-desktop
コードは注意してご使用ください。

クライアント(接続元)からの接続コマンド
bash
xfreerdp /v:[サーバーのIP] /u:takahab-rdp /size:3200x1800 /dynamic-resolution /cert:ignore
コードは注意してご使用ください。
  • 1段階目のパスワード: xxxxxx(上記手順5で決めたもの)
  • 2段階目の画面操作: Linux標準のログイン画面が表示されるので、実在するユーザー(takahabなど)を選択して、Linux本体のパスワードを入力。
こちらのまとめ手順で、頭の中やメモはすっきりと整理できましたでしょうか?
もし今回の設定に関して、「PCが再起動したときにも自動で起動するかテストしたい」や「画面の解像度や挙動をさらに微調整したい」などがあれば、いつでもお声がけください!




















セキュリティ

1) nginx Version with Known Vulnerablities →本家nginxn版に更新 sudo dnf install -y dnf-utils # リポジトリ管理ツール sudo dnf config-manager --set-enabled n...