廣告

2025 年 4 月
 123456
78910111213
14151617181920
21222324252627
282930  

彙整

菁英+有四維八德+專制 才是國家該走的路線

我說的菁英+有四維八德+專制 很重要,因為你會發現在號稱民主的台灣體制下,這個菁英+有四維八德的專業人才,都沒有在國家要職擔任任何職務,就算真的在國家要職擔任職務,基本上要推動相關政策,也很難執行或是要拖上很久的時間,但菁英+有四維八德+專制,則效率非常好,民富國強!很多人可能會說專制無法聽取大家意見,這個你真的不用擔心,如果意見是好的,這些有四維八德的菁英群,能不採納?他們高興都來不及我跟你說!專制唯一不好的就是像被蟾蜍黨這些鼠輩掌權,一來沒專業,二來沒四維八德,這些人才是不會聽你意見的人,國家社會怎麼會發展得好?

可能是 2 個人和顯示的文字是「郭: B:我們跟美國進口商品後也可以轉賣 卓: :比如政府買液化天然氣回來, 此如政府買液化天然氣回來,還可以再賣出去 還可以再賣出去 別人為啥不直接跟美國買就好,還要讓你賺 還要讓你賺差價? 」的圖像

有底氣

可能是文字的圖像

有學者說台積電有可能會跌破500大關

正在排除與客戶廠商往來信件問題,提供相關資訊處理到一段落等候對方回應,忽然想到有國內學者在台積電被強迫赴美建廠時,說台積電恐跌破500元大關,一堆人笑稱不可能!台積電天下無敵,世界需要台積電,如今看來沒有什麼是不可能的!止跌訊號沒出,忙著進場的韭菜機率很高阿,等待巴菲特進場時,你跟著進場比較保險喔

Synology 群暉 DSM 7.2.2 手動安裝Video Station-How to Add Video Station BACK to DSM 7.2.2

DSM 7.2.2 取消Video Station套件,對於想自己架設線上看串流影片的人很不方便,網路上有大神提供瞭手動安裝方式

https://www.youtube.com/watch?v=noJ0yDRPq-4&t=82s

抓套件網址 https://github.com/007revad/Video_Station_for_DSM_722/releases

套件連結 https://github.com/007revad/Video_Station_for_DSM_722/archive/refs/tags/v1.3.17.zip

記得安裝解碼器

image

Video Station還可以用API連接外掛取得相對應的影片資訊 建議可以照著官方教學申請 TMDB https://www.themoviedb.org/signup API掛入Video Station

image

image

image

image

LibreNMS Rocky Linux 9.5 安裝 設定 教學

參考:https://wiki.freedomstu.com/books/librenms/page/librenms-rocky-linux-8

開啟cockpit  IP:9090
[root@localhost ~]# systemctl enable --now cockpit.socket

$ sudo dnf install epel-release -y
$ sudo dnf install neofetch –y
 

Webmin:好用的web介面作業系統管理工具

Webmin 官方網站:http://www.webmin.com

先安裝相依檔案

[root@mail2 ~]# dnf install perl-lib perl-open perl-Encode-Detect

先抓到P上

https://sourceforge.net/projects/webadmin/files/webmin/2.000/webmin-2.000-1.noarch.rpm/download?use_mirror=altushost-swe&use_mirror=altushost-swe&r=

然後透過WINSCP上傳到LINUX

安裝WEBMIN RPM

rpm -ivh webmin-2.000-1.noarch.rpm

防火牆開啟WEBMIN 10000 PORT

到GUI安裝防火牆APP

clip_image004

新增10000 PORT

clip_image006

 

停用ipv6

sysctl net.ipv6.conf.all.disable_ipv6=1

sysctl net.ipv6.conf.default.disable_ipv6=1

關閉SELinux 不關閉FTP等服務會異常

[root@www2 ~]# vi /etc/selinux/config

SELINUX=disabled

重新開機

安裝SENDMAIL

[root@librenms ~]# dnf install sendmail*

開機啟動SENDMAIL

[root@librenms ~]# systemctl enable sendmail.service

設定root收信人

[root@librenms ~]# vim /etc/aliases

root: roger.lin@t3ex-techiview.com

在家目錄新增 .vimrc

set nu

set tabstop=4

· 安裝 Nginx 先決條件

1

dnf install yum-utils -y

· 設定 yum 存儲庫,在此目錄下新增一個 vim /etc/yum.repos.d/nginx.repo 屬於 官方提供載點

[nginx-stable]

name=nginx stable repo

baseurl=http://nginx.org/packages/centos/$releasever/$basearch/

gpgcheck=1

enabled=1

gpgkey=https://nginx.org/keys/nginx_signing.key

module_hotfixes=true

[nginx-mainline]

name=nginx mainline repo

baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/

gpgcheck=1

enabled=0

gpgkey=https://nginx.org/keys/nginx_signing.key

module_hotfixes=true

· 會建議使用 stable 穩定版本,如果想使用比較最新的版本請使用 nginx-mailine 會以當時官方釋出的版本為主,目前 BUBU 是使用官方比較新版為主

yum-config-manager –enable nginx-mainline

· 安裝 nginx 服務

dnf install MariaDB-server –y

· 啟動服務

systemctl start nginx ; systemctl enable nginx

安裝資料庫

· 在來源庫目錄下新增加 MariaDB.repo 增加上去,先到 MariaDB 來源庫查看

# 新增加MariaDB安裝檔

vim /etc/yum.repos.d/MariaDB.repo

# MariaDB 10.11 RedHat repository list – created 2025-01-10 14:22 UTC

# https://mariadb.org/download/

[mariadb]

name = MariaDB

baseurl = https://ftp.ubuntu-tw.org/mirror/mariadb/yum/10.11/rocky9-amd64/

module_hotfixes=1

gpgkey=https://ftp.ubuntu-tw.org/mirror/mariadb/yum/RPM-GPG-KEY-MariaDB

gpgcheck=1

· 增加完畢後在下命令安裝

dnf install MariaDB-server –y

· 啟動 mariadb 服務

systemctl start mariadb ; systemctl enable mariadb

· 資料庫安裝及設定

mariadb-secure-installation # 設定資料庫的root密碼

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current

password for the root user. If you’ve just installed MariaDB, and

haven’t set the root password yet, you should just press enter here.

Enter current password for root (enter for none):

OK, successfully used password, moving on…

Setting the root password or using the unix_socket ensures that nobody

can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer ‘n’.

Switch to unix_socket authentication [Y/n] <—– 直接按下 enter 鍵

Enabled successfully!

Reloading privilege tables..

… Success!

You already have your root account protected, so you can safely answer ‘n’.

Change the root password? [Y/n] <—– 直接按下 enter 鍵

New password: <—– 輸入 root 密碼

Re-enter new password: <—– 再次輸入 root 密碼

Password updated successfully!

Reloading privilege tables..

… Success!

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB without having to have a user account created for

them. This is intended only for testing, and to make the installation

go a bit smoother. You should remove them before moving into a

production environment.

Remove anonymous users? [Y/n]

… Success!

Normally, root should only be allowed to connect from ‘localhost’. This

ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]

… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can

access. This is also intended only for testing, and should be removed

before moving into a production environment.

Remove test database and access to it? [Y/n]

– Dropping test database…

… Success!

– Removing privileges on test database…

… Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n]

… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

· 在 server.cnf 檔手動增加以下內容 vim /etc/my.cnf.d/server.cnf

[mysqld]

innodb_file_per_table=1

lower_case_table_names=0

· 新增加 LibreNMS 表單 mariadb -u root -p

CREATE DATABASE librenms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

CREATE USER ‘librenms’@’localhost’ IDENTIFIED BY ‘password’; <—– 這裡的 password 修改成您自己記的住密碼 使用winpex@29 這組

GRANT ALL PRIVILEGES ON librenms.* TO ‘librenms’@’localhost’;

FLUSH PRIVILEGES;

Exit

· 重啟資料庫

systemctl restart mariadb

· 設定資料庫 root 免密碼就可以登入,請參考本篇進行修改 MariaDB root 可空白登入

安裝 php 服務

· Rocky Linux 8 預設版本是 PHP 7.2 版,那如果想要使用比較新的版本的話需要新增加來源庫安裝

· 安裝 epel-release 套件服務

dnf install -y epel-release

· 安裝官方所提供來源庫版本

dnf install https://rpms.remirepo.net/enterprise/remi-release-9.5.rpm -y

· 查詢目前可安裝的版本

dnf module list php –y

clip_image008

· 將 PHP 安裝版本預設成 8.4 版本

dnf module reset php -y

dnf module enable php:remi-8.4 –y

· 安裝 php 及其他必要套件

dnf install -y bash-completion cronie fping git ImageMagick mtr net-snmp net-snmp-utils nmap php-fpm php-cli php-common php-curl php-gd php-gmp php-json php-mbstring php-process php-snmp php-xml php-zip php-mysqlnd python3 python3-PyMySQL python3-redis python3-memcached python3-pip python3-systemd gcc python3-devel rrdtool unzip

· 安裝 Composer 作曲家

# 將dirs更改為我們希望將composer安裝到的位置

cd /usr/local/bin

# 安裝 composer

curl -sS https://getcomposer.org/installer | php

# 重新命名 composer

mv composer.phar composer

安裝 Librenms 服務

· 新增加 librenms 使用者

useradd librenms -d /opt/librenms -M -r -s “$(which bash)”

· 下載 Librenms 服務

cd /opt

git clone https://github.com/librenms/librenms.git

· 設定權限

chown -R librenms:librenms /opt/librenms

chmod 771 /opt/librenms

setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

· 安裝 LibreNMS 及 php 相關套件

su – librenms

./scripts/composer_wrapper.php install –no-dev

Exit

設定 php 服務

· 安裝好 PHP 要去修改 「vim /etc/php.ini」 設定檔

修改時區

[Date]

修改前

;date.timezone =

修改後

date.timezone = Asia/Taipei

存檔

:wq

# 指令修改

sed -i “s|^;date.timezone =.*$|date.timezone = Asia/Taipei|” /etc/php.ini

· 新增加 librenms PHP-FPM 設定檔

cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/librenms.conf

vim /etc/php-fpm.d/librenms.conf

· 設定 librenms PHP-FPM vim /etc/php-fpm.d/librenms.conf

將原是 [www] 修改為 [librenms]

user = librenms

group = librenms

listen = /run/php-fpm-librenms.sock

# 指令修改

sed -i ‘s/\[www\]/\[librenms\]/g’ /etc/php-fpm.d/librenms.conf

sed -i “s|^user = apache.*$|user = librenms|” /etc/php-fpm.d/librenms.conf

sed -i “s|^group = apache.*$|group = librenms|” /etc/php-fpm.d/librenms.conf

sed -i “s|^listen = /run/php-fpm/www.sock.*$|listen = /run/php-fpm-librenms.sock|” /etc/php-fpm.d/librenms.conf

· 設定開機自動啟動及重啟服務

systemctl enable php-fpm ; systemctl restart php-fpm

設定 Web 服務

· 新增加 LibreNMS 設定檔

vim /etc/nginx/conf.d/librenms.conf

· 將以下內容貼到 librenms.conf 編輯 server_name 修改成站台位置

server {

listen 80;

server_name librenms.winpex-gl.com;

root /opt/librenms/html;

index index.php;

charset utf-8;

gzip on;

gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;

location / {

try_files $uri $uri/ /index.php?$query_string;

}

location ~ [^/]\.php(/|$) {

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_path_info;

fastcgi_pass unix:/run/php-fpm-librenms.sock;

fastcgi_split_path_info ^(.+\.php)(/.+)$;

include fastcgi_params;

}

location ~ /\.(?!well-known).* {

deny all;

}

}

· 重啟服務

systemctl restart nginx

設定 lnms 服務

· 啟用 lnms

ln -s /opt/librenms/lnms /usr/bin/lnms

cp /opt/librenms/misc/lnms-completion.bash /etc/bash_completion.d/

設定 SNMP 服務

· 從樣版複製一份

cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf

· 編輯設定檔將 「RANDOMSTRINGGOESHERE」 修改或預設 public

vim /etc/snmp/snmpd.conf

# Change RANDOMSTRINGGOESHERE to your preferred SNMP community string

com2sec readonly default public

group MyROGroup v2c readonly

view all included .1 80

access MyROGroup “” any noauth exact all none non

syslocation Rack, Room, Building, City, Country [Lat, Lon]

syscontact Your Name <roger.lin@t3ex-techiview.com>

#OS Distribution Detection

extend distro /usr/bin/distro

#Hardware Detection

# (uncomment for x86 platforms)

#extend manufacturer ‘/bin/cat /sys/devices/virtual/dmi/id/sys_vendor

#extend hardware ‘/bin/cat /sys/devices/virtual/dmi/id/product_name’

#extend serial ‘/bin/cat /sys/devices/virtual/dmi/id/product_serial’

# (uncomment for ARM platforms)

#extend hardware ‘/bin/cat /sys/firmware/devicetree/base/model’

#extend serial ‘/bin/cat /sys/firmware/devicetree/base/serial-number’

· 下載 librenms-agent 套件

curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro

chmod +x /usr/bin/distro

systemctl enable snmpd && systemctl restart snmpd

設定排程

· 從 Librenms 目錄下複製到 cron.d 裡面

#cp /opt/librenms/librenms.nonroot.cron /etc/cron.d/librenms

cp /opt/librenms/dist/librenms.cron /etc/cron.d/librenms

cp /opt/librenms/dist/librenms-scheduler.cron /etc/cron.d/librenms

設定 logrotate

· 複製 logrotate 設定檔

#cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms

cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms

設定hosts

[root@librenms opt]# vim /etc/hosts

127.0.0.1 localhost librenms librenms.XXX.com librenms.XXX.com

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6


設定內部DNS解析

IP 對應 librenms.XXX.com

開始安裝 LibreNMS

· 開啟瀏灠器輸入 http://librenms.XXX.com/ (站台位置)

1. 檢測安裝環境是否有正常,如果出現異常要把缺的套件都安裝起來才能正常運行

clip_image011

2. 填入要連接的資料庫名稱及登入帳號及密碼

clip_image013

3. 會自動建立資料庫裡面表單

clip_image015

clip_image017

4. 確認完成的畫面,直接按下下一個圖示繼續

clip_image019

5. 填入要建立的系統管理員的帳號、密碼及電子郵件 admin Hiview這組密碼

clip_image021

clip_image023

7. 安裝完成了的畫面,可以點選 Finish Install 這個選項確認說服務是否有正確安裝完成

clip_image025

clip_image026

最後確認 Final steps

· 如果安裝有問題,請在「librenms」目錄下以「root」身份運行「 validate.php 」

cd /opt/librenms

./validate.php

· 以 librenms 權限來執行確認

sudo su – librenms

./validate.php

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer

#一人一票的意義 新加坡國父李光耀:我從不相信「民主」會帶來進步!

說到新加坡跟李光耀,相信沒人說新加坡專制黑暗權威覆闢,反而覺得新加坡強盛,嚴刑峻法社會很安全,李光耀說美國熱推民主選票,國企私有化,並不會帶給國家進步,反而是退步,這幾年很多國家受西方式推崇民主選票都驗證,越來越貪腐,每下愈況。而且國企私有化讓美元可以搞爛各國經濟後進場收割剪羊毛,一切都是美式民主的陰謀!中國歷史上輝煌的朝代都是明君所致,包括經國先生的台灣年代,與現在的習近平先生時代,能與美國剪羊毛手段抗衡的也只剩下中國,中國不會為世界帶來戰爭,美國會,好好想想吧!你要說台灣會有戰爭?那也只算內亂,如果你歷史夠清楚的話。

真的不要拖累台灣,不能進口中國車,沒有自己的技術也罷,但你可以引進很多油電系統,例如BYD的DMi五代系統放在國產車上阿。真的環保省油。

真的不要拖累台灣,不能進口中國車,沒有自己的技術也罷,但你可以引進很多油電系統,例如BYD的DMi五代系統放在國產車上阿。真的環保省油。
https://www.youtube.com/watch?v=fLXKAyvWrEs

台灣選舉哪裡是民主? 其實是"金主"

開場的訪問 頭腦跟我一樣清晰

台灣選舉哪裡是民主? 其實是"金主"

iPhone升級iOS 18後IMAP無法收發信

討論串在這,有些人說 IMAP目錄加/就可解決,我還沒試過,但我先幫同事用OUTLOOK替代IPHONE郵件。

https://discussions.apple.com/thread/255760038?sortBy=rank

WINDOWS 11 無法安裝SERVER 2003 或 XP分享的印表機出現 0x00000709 錯誤,印表機救星來了。

WINDOWS 11 無法安裝SERVER 2003 或 XP分享的印表機出現 0x00000709 錯誤,印表機救星來了,主要是更換C:\WINDOWS\SYSYTEM32\WIN32SPL.DLL檔案,估計是WIN11在連線網路印表機使用的通訊協定無法支援XP或SERVER2003共享印表機的早期連線協定造成。

Win11的印表機救星連結,解壓縮候用ADMIN權限執行BAT檔案,原系統檔案會自動幫您備份成WIN32SPL.DLL.OLD,方便您可以更換回來。

https://drive.google.com/file/d/1Las6H-9GfJxUd4GyjQsUtnWMWiaRYAxA/view?usp=sharing