Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

107 total results found

BookStack 架設

開源軟體 BookStack 開源知識管理平台

運行環境 PVE LXC Debian 12 安裝nginx mariadb apt update apt -y install nginx mariadb-server unzip git systemctl enable nginx && systemctl start nginx systemctl enable mariadb && systemctl start mariadb 資料庫設定 mariadb -u root -p CREATE DATABASE ...

LibreNMS架設 - Debian 12

LibreNMS LibreNMS架設

運行環境 PVE LXC Debian 12 安裝nginx mariadb php apt update apt install php-mbstring php-cli php-common php-curl php-fpm php-gd php-mbstring php-mysql php-opcache php-readline php-snmp php-xml php-zip acl curl fping git graphviz imagemagick mariadb-client ...

LIBRENMS

LibreNMS架設 - Ubuntu 20

LibreNMS LibreNMS架設

安裝環境 PVE LXC Ubuntu 20 設定時區 timedatectl set-timezone Asia/Taipei 最新LibreNMS已強制要求>php8.1 apt update apt install software-properties-common add-apt-repository universe apt install php-mbstring php8.1-cli php8.1-common php8.1-curl php8.1-fpm php8.1-...

Wordpress架設 - Debian 12

Wordpress

運行環境 PVE LXC Debian 12 安裝nginx mariadb apt update apt -y install nginx mariadb-server systemctl enable nginx systemctl start nginx systemctl enable mariadb systemctl start mariadb 安裝PHP apt -y install php php-cli php-fpm php-mysql php-json ...

BookStack 改為子目錄

開源軟體 BookStack 開源知識管理平台

BookStack設定 cd /var/www/html/bookstack nano .env 修改為子目錄 APP_URL=http://ip/bookstack   NGINX設定 修改/etc/nginx/conf.d/bookstack.conf server { listen 8080; listen [::]:8080; server_name _; root /var/www/html/bookstack/public; index inde...

LibreNMS 被監控設備SNMP設定

LibreNMS

於被監控的主機上安裝Snmpd apt install snmpd -y 某些 Linux 發行版不會在SNMP中取得正確版本訊息,透過 LibreNMS 提供的 Distro 工具取得正確版本訊息 curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro chmod +x /usr/bin/distro 設定Snmpd 編輯/etc/snmp/snmpd.co...

phpMyAdmin 安裝

phpMyAdmin 安裝

運行環境 PVE LXC Debian 12 確認已安裝好NGINX Mariadb 下載phpMyAdmin cd /var/www/html wget https://files.phpmyadmin.net/phpMyAdmin/5.2.2/phpMyAdmin-5.2.2-all-languages.zip unzip phpMyAdmin-5.2.2-all-languages.zip mv phpMyAdmin-5.2.2-all-languages phpmyadmin ...

Wordpress - 修改網域

Wordpress

進入資料庫修正 mariadb -u root -p wordpress_db UPDATE wp_options SET option_value = replace(option_value, 'https://old', 'https://new') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'https://old','https://new...

Wordpress - 修改須強制登入

Wordpress

新增跳轉程式 於主題Theme的functions下新增程式 function admin_redirect() { if ( !is_user_logged_in()) { wp_redirect( home_url('login') ); exit; } } add_action('get_header', 'admin_redirect'); 即可須強制登入才能瀏覽 修改後若無法登入Wordpress 於主機內回復設定/var/www/html/wordpress/wp-co...

Wordpress - 反向代理

Wordpress

反向代理主機設定 新增location /wordpress/ 代理區塊 server { listen 443 ssl; ssl_certificate /etc/letsencrypt/live/example.com.pem; ssl_certificate_key /etc/letsencrypt/live/example.com.pem; root /var/www/html; index index.p...

Synology - 洗白+開啟photo人物辨識

Synology

運行環境 黑群暉SDM7.1.1 洗白設定 安裝VMM 安裝virtual machine manager套件,下載跟主機相應版本的Virtual DSM新增虛擬機選擇Synology Virtual DSM,點選免費授權後開機使用synology assistant搜尋新建立的虛擬機,紀錄序號及mac將主機更改為虛擬機的序號和mac Synology設定 sudo -i mkdir /tmp/boot cd /dev mount -t vfat synoboot1 /tmp/boot/ ...

Synology - 安裝 WireGuard 客户端

Synology

套件中心設定 新增社群https://synopackage.com/repository/spk/all,安裝Wiregurad 主機設定 修复套件权限 sudo sed -i 's/package/root/g' /var/packages/WireGuard/conf/privilege 在etc目录下创建wireguard文件夹 mkdir /etc/wireguard/ 进入Wireguard文件夹 cd /etc/wireguard/ 新建 conf 配置文件 touch gw0...

SYNOLOGY
WIREGUARD

Homeassistant - 安裝bitwarden密碼管理器

Homeassistant

運行環境 HA安裝在Synology VM上 安裝vaultwarden 附加元件內搜尋vaultwarden並安裝關閉SSL選項後啟動 修改設定 瀏覽器輸入http://ip:7277/admin,admin token在啟動日誌內 修改網址 修改token Synology設定反向代理 synology申請ssl憑證後使用內建反向代理 瀏覽器輸入https://XXX.com:7277

BookStack - SSL設定

開源軟體 BookStack 開源知識管理平台

運行環境 使用反向代理主機 反向代理主機設定 location /bookstack/ { client_max_body_size 50M; proxy_pass http://bookstack主機ip/bookstack/; } BookStack主機設定 進入bookstack目錄 cd /var/www/html/bookstack 更新網址 php artisan bookstack:update-url <oldUrl> <newUrl...

PHP - OTP驗證登入

PHP相關

安裝qrcode和oathtool apt-get install qrencode oathtool -y 建立產生qrcode的bash檔 #!/bin/bash secret=$(echo test123 | base32) echo $secret qrencode -t ANSI256 -o - $(echo otpauth://totp/CVG:wncvg?secret=${secret}&issuer=CVG&algorithm=SHA256&digits=6&period=30) -o ...

PHP - header 下載或開啟檔案設定

PHP相關

使用header隱藏實體路徑 PHP 下載檔案設定 <?php $file = '路徑'; if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file));...

Nginx 升級到1.20.1 以上

NGINX

運行環境 Ubuntu 20.04 echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \ | sudo tee /etc/apt/sources.list.d/nginx.list curl -o /tmp/nginx_signing.key https://nginx.org/keys/nginx_signing.key sudo mv /tmp/nginx_signing.key...

Nginx - 搭配Fail2ban檢測封鎖

NGINX

運行環境 Ubuntu 22.04 安裝Fail2ban # 安裝 apt install fail2ban -y # 設定開機自動啟動 systemctl enable --now fail2ban # 複製設定檔 cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local 設定Fail2ban 編輯/etc/fail2ban/jail.local [nginx-4xx] enabled = true port = 80,443...

Gitea 架設

Gitea

運行環境 PVE LXC Debian 12 安裝nginx mariadb apt update apt -y install nginx mariadb-server git systemctl enable nginx && systemctl start nginx systemctl enable mariadb && systemctl start mariadb 資料庫設定 mysql -u root -p CREATE DATABASE IF NOT EXIST...

Gitea 反向代理

Gitea

運行環境 使用反向代理主機 Nginx 反向代理主機設定 使用子目錄/gitea/ server { ... location ~ ^/(gitea)($|/) { client_max_body_size 512M; rewrite ^ $request_uri; rewrite ^/(gitea($|/))?(.*) /$3 break; proxy_pass http://ip:3000$uri; ...