helloworld

作業系統環境: ubuntu-20.04.2.0-desktop-amd64
無線網卡: 【EDIMAX 訊舟】EW-7822UAD AC1200 雙頻 長距離USB 3.0無線網路卡

undefined

1. 至官方網站下載 driver
https://www.edimax.com/edimax/download/download/data/edimax/global/download/product/wireless_adapters/wireless_adapters_ac1200_dual-band/ew-7822uad/

image
2. 解壓縮
# unzip EW-7822UAD_Linux_Driver_1.0.0.1.zip

3. 安裝 driver
安裝需要的套件套件
# apt-get update
# apt install net-tools make make-guile gcc

安裝驅動程式
# cd ./Linux/driver
# make && make install 

4. 重開機
# reboot

5. 檢查是否啟用
# ifconfig -a
查看是否多一個interface
 

helloworld 發表在 痞客邦 留言(0) 人氣()

執行 wifi up 
root@OpenWrt:/etc/config# wifi up

wifi status 觀察是否啟用,但"up": false,
root@OpenWrt:/etc/config# wifi status
{
        "radio0": {
                "up": false,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": true,
                "config": {
                        "channel": "11",
                        "hwmode": "11g",
                        "path": "pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0",
                        "htmode": "HT20"
                },
                "interfaces": [
                        {
                                "section": "default_radio0",
                                "config": {
                                        "mode": "ap",
                                        "encryption": "psk-mixed",
                                        "ifname": "wlan0",
                                        "wds": true,
                                        "ssid": "aptest",
                                        "key": "password",
                                        "network": [
                                                "lan"
                                        ],
                                        "mode": "ap"
                                }
                        }
                ]
        }
}

查看log,發現少了一個工具 ./mac80211.sh: eval: line 793: /usr/sbin/hostapd: not found
root@OpenWrt:/etc/config# logread | grep radio
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): command failed: Not supported (-95)
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): ./mac80211.sh: eval: line 793: /usr/sbin/hostapd: not found
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): WARNING (wireless_add_process): executable path /usr/sbin/hostapd does not match process  path (/proc/exe)
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): Command failed: Invalid argument
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): Device setup failed: HOSTAPD_START_FAILED
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): command failed: Not supported (-95)
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): ./mac80211.sh: eval: line 793: /usr/sbin/hostapd: not found
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): WARNING (wireless_add_process): executable path /usr/sbin/hostapd does not match process  path (/proc/exe)
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): Command failed: Invalid argument
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): Device setup failed: HOSTAPD_START_FAILED

安裝 hostapd
root@OpenWrt:/etc/config# opkg install hostapd
Installing hostapd (2019-08-08-ca8c2bd2-7) to root...
Downloading http://downloads.openwrt.org/releases/19.07.8/packages/x86_64/base/hostapd_2019-08-08-ca8c2bd2-7_x86_64.ipk
Configuring hostapd.

重新啟用 wifi
root@OpenWrt:/etc/config# wifi up

確認是否正常啟用
root@OpenWrt:/etc/config# wifi status
{
        "radio0": {
                "up": true,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": false,
                "config": {
                        "channel": "11",
                        "hwmode": "11g",
                        "path": "pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0",
                        "htmode": "HT20"
                },
                "interfaces": [
                        {
                                "section": "default_radio0",
                                "config": {
                                        "mode": "ap",
                                        "encryption": "psk-mixed",
                                        "ifname": "wlan0",
                                        "wds": true,
                                        "ssid": "aptest",
                                        "key": "password",
                                        "network": [
                                                "lan"
                                        ],
                                        "mode": "ap"
                                }
                        }
                ]
        }
}
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

1. 首先找一台linux ,並提升至 root 權限,至 https://www.finnix.org/Download 下載最新版的 iso 
目前最新版本為 122
# cd /workdir/
# wget https://www.finnix.org/releases/122/finnix-122.iso

2. 掛載 iso 檔
mkdir /mnt/finnixiso
# mount -o loop /workdir/finnix-122.iso /mnt/finnixiso
# mkdir /workdir/myfinnix-122

3. 因為mount 上來的iso 是唯讀狀態,所以我們要複製一份檔案至 /workdir/myfinnix-122
# rsync -a /mnt/finnixiso/ /workdir/myfinnix-122/

4. 解壓檔案系統
#  cd /workdir/myfinnix-122/isolinux/live
# unsquashfs filesystem.squashfs

5. 這時候可以將需要的檔案放進解壓縮出來的檔案系統
# cd squashfs-root/home/

例如,把 openwrt-19.07.8-x86-64-combined-ext4.img 放進 ./home/openwrt/
# mkdir openwrt
# cd openwrt/
# cp /path/openwrt-19.07.8-x86-64-combined-ext4.img .

6. 重新壓縮檔案系統
# cd /workdir/myfinnix-122/isolinux/live
# rm -r filesystem.squashfs
# mksquashfs squashfs-root filesystem.squashfs
#  rm -rf squashfs-root

7. 製作 iso 檔
# cd ../
# genisoimage -l -r -J -V "myfinnix-122" -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o ../myfinnix-122.iso ./

以上步驟即可完成客製化 finnix livecd

也可以利用 rufus 工具將客製化 iso 製作成開機 usb 隨身碟

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

1. 安裝 haproxy
# cd /usr/ports/net/haproxy
# make install clean 

2. 安裝完後不會自動產生預設的設定檔,所以要自己建立
# vi /usr/local/etc/haproxy.conf

global
    daemon
    maxconn 4096

defaults
   log global
   mode http
   timeout connect 5s
   timeout client 10s
   timeout server 10s

#以mysql 為例
listen mydb
bind 0.0.0.0:3306
mode tcp
balance roundrobin
server db11 192.168.2.11:3306 check
server db11 192.168.2.12:3306 check

# web 管理介面,可以透過這個網址檢視backend 狀態
listen webinterface
bind 0.0.0.0:8080
mode http
stats enable
stats uri /
stats realm Strictly\ Private
stats auth admin:12345 #這邊分別是登入的帳號:密碼

3. 設定重開機時,自動啟用 haproxy
# /usr/local/etc/rc.d/haproxy enable

4. 第一次手動啟動 haproxy
# /usr/local/etc/rc.d/haproxy onestart

image

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

Linux mount windows 分享的資料匣指令如下
1. 建立 Linux 本機目錄
mkdir /mnt/windir

2. 掛載分享空間,帳號密碼,及路徑依需求調整
mount -t cifs -o username=user1,password=a12345678 "\\\192.168.1.10\MY DIR" /mnt/windir/

3. 查看是否 mount 成功
df -h

4. 卸載
umount /mnt/windir

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

linux server 跑久了之後,系統時間難免會有誤差
以前的習慣是執行 ntpdate [ntp-server]
發現 CentOS 沒有這個 ntp client 的指令
[root@example ~]# ntpdate time.stdtime.gov.tw
-bash: ntpdate: command not found

所以試試用 yum 安裝 ntp 套件,喔喔,找不到這個套件!!??
[root@example ~]# yum  -y install ntp
Last metadata expiration check: 0:02:43 ago on Mon 02 Aug 2021 11:00:28 AM CST.
No match for argument: ntp
Error: Unable to find a match: ntp

原來 CentOS 8 要安裝 chrony 套件來取代 ntp
[root@example ~]# yum -y install chrony
Last metadata expiration check: 0:04:50 ago on Mon 02 Aug 2021 11:00:28 AM CST.
Dependencies resolved.
=========================================
 Package            Architecture    Version               Repository       Size
=========================================
Installing:
 chrony             x86_64          3.5-2.el8             baseos          270 k
Installing weak dependencies:
 timedatex          x86_64          0.5-3.el8             baseos           32 k

Transaction Summary
=========================================
Install  2 Packages

Total download size: 302 k
Installed size: 580 k
Downloading Packages:
(1/2): chrony-3.5-2.el8.x86_64.rpm              8.5 MB/s | 270 kB     00:00
(2/2): timedatex-0.5-3.el8.x86_64.rpm           235 kB/s |  32 kB     00:00
--------------------------------------------------------------------------------
Total                                           265 kB/s | 302 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : timedatex-0.5-3.el8.x86_64                             1/2
  Running scriptlet: timedatex-0.5-3.el8.x86_64                             1/2
  Running scriptlet: chrony-3.5-2.el8.x86_64                                2/2
  Installing       : chrony-3.5-2.el8.x86_64                                2/2
  Running scriptlet: chrony-3.5-2.el8.x86_64                                2/2
  Verifying        : chrony-3.5-2.el8.x86_64                                1/2
  Verifying        : timedatex-0.5-3.el8.x86_64                             2/2

Installed:
  chrony-3.5-2.el8.x86_64               timedatex-0.5-3.el8.x86_64

Complete!

修改 /etc/chrony.conf , 改成你習慣的 ntp server
[root@example ~]# vi /etc/chrony.conf
#pool 2.centos.pool.ntp.org iburst
server time.stdtime.gov.tw iburst

重啟 chronyd 服務
[root@example ~]# systemctl restart chronyd

完成
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

1. 建立帳號密碼檔
1.1 初次建立,或是想清空之前紀錄,請加參數 -c
htpasswd -c /etc/httpd/.htpasswd user1
New password: <輸入user1的密碼>
Re-type new password: <確認密碼>
Adding password for user user1

1.2 接著建立第二位以上的user,千萬不要加參數 -c 
htpasswd /etc/httpd/.htpasswd user2
New password: <輸入user1的密碼>
Re-type new password: <確認密碼>
Adding password for user user2

2. 編輯 .htaccess
2.1 假設網站路徑是 /var/www/html/admin
vi /var/www/html/admin/.htaccess
AuthName "admin login"
AuthUserFile /etc/httpd/.htpasswd
AuthType Basic
require valid-user

開啟網頁測試,正確的話,會跳出一個帳號密碼對話框
輸入剛剛建立的帳號密碼即可登入
 

image

 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

google workspace 成員使用gmail 要新增其他email 寄件者時出現以下錯誤訊息
Functionality not enabled.

image

解決方式
系統管理員登入 https://admin.google.com/
應用程式 -> google workspace -> gmail -> 使用者存取 ->  允許視每位使用者情況開放外送閘道
[打勾]如果使用者設定的代管「寄件者」地址不屬於您的郵件網域,則允許使用者透過外部 SMTP 伺服器傳送郵件。
儲存
image

 

undefined

 

 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

1. 登入 pfsense 管理介面
image

2. System -> Package Manager
image

3. Available Packages 搜尋 vmware 關鍵字 -> install
image

4. Confirm
image

5. 開始安裝
image

6. 安裝成功
image

7. 進到 vmware 管理介面查看是否成功

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

範例:

    CustomLog       /var/log/httpd/access_log.web1 combined

    # %Y-%m-%d_access_log 檔名格式為年月日
    # 86400 一天rotate 一次
    # 480 台灣時區 +8
    CustomLog       "| /usr/local/sbin/rotatelogs /var/log/httpd/web1/%Y-%m-%d_access_log 86400 480" combined

 

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

材料: 首先備好小黃瓜和食鹽
調味料: 糖、香油、白醋、蒜泥

首先將小黃瓜洗淨、切片
IMG_7963

IMG_7964

加入食鹽混和均勻好讓他待會可以脫水
IMG_7965
放進冰箱靜置約30分鐘後,瀝乾水分

加入以上調味料,家裡有醃酸梅或是脆梅的話也可以加入,風味又是另一個層次
再放入冰箱後讓糖可以充分融化並讓小黃瓜入味
IMG_7967

下次拿出冰箱的話就是夏天開胃的涼拌小黃瓜囉
個人喜歡搭配炸物或是香腸真的很對味

undefined

文章標籤

helloworld 發表在 痞客邦 留言(1) 人氣()

假設往 192.168.10.0/24 要改走 192.168.20.253 路由出去
在macos 下如果要調整 static route 的語法如下
sudo route -n add -net 192.168.10.0/24 192.168.20.253

檢查剛剛設定的route 有沒有成功
netstat -rn
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

錯誤訊息:
[Fri Jun 11 13:48:51 2021] [error] [client xx.xx.xx.xx] FastCGI: server "/usr/local/sbin/php-fpm" stderr: PHP message: PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1370 execute command denied to user 'user1'@'192.168.0.%' for routine 'mydatabase1.myprocedure1'' in /var/www/html/xxx.php:88, referer: http://myip.pass.tw/example.php

解決方式:
GRANT EXECUTE ON PROCEDURE mydatabase1.myprocedure1    TO 'user1'@'192.168.0.%';
flush privileges;

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

情境
server-1 不用輸入密碼遠端登入 server-2 

1. 在sever-1 執行以下程式
[demo@server-1 ~]$ ssh-keygen
Generating public/private rsa key pair.

Enter file in which to save the key (/home/demo/.ssh/id_rsa): Created directory '/home/demo/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/demo/.ssh/id_rsa.
Your public key has been saved in /home/demo/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:NVuWJ+wjm/tsVEAOhYew*********9ycOM demo@server-1.example
The key's randomart image is:
+---[RSA 3072]----+
|        o..=o    |
|     o o oo+o.   |
|    o + * o.B..  |
|   .   O + * o.  |
|  . . o S = o.   |
|   o * . + =..   |
|  . + . o E.     |
|   +     + o.    |
|  o..     .oo    |
+----[SHA256]-----+

2. 複製金鑰到遠端sevrer 
[demo@server-1 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub demo@server-2
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/demo/.ssh/id_rsa.pub"
The authenticity of host 'server-2 (server-2)' can't be established.
ECDSA key fingerprint is SHA256:XrU/twqZ2xOUZzel******VZV2SLOtiEo.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
demo@server-2's password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'demo@server-2'"
and check to make sure that only the key(s) you wanted were added.

3. 測試是否可以登入執行程式,並且無須輸入密碼
[demo@server-1 ~]$ ssh demo@server-2 hostname
server-2

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

# mysqldump -h 10.1.1.100 -u root -p mydb
Enter password:
-- MySQL dump 10.13  Distrib 5.7.xx-xx, for Linux (x86_64)
--
-- Host: 10.1.1.100    Database: mydb
-- ------------------------------------------------------
-- Server version       5.0.xx-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!50717 SELECT COUNT(*) INTO @rocksdb_has_p_s_session_variables FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'performance_schema' AND TABLE_NAME = 'session_variables' */;
/*!50717 SET @rocksdb_get_is_supported = IF (@rocksdb_has_p_s_session_variables, 'SELECT COUNT(*) INTO @rocksdb_is_supported FROM performance_schema.session_variables WHERE VARIABLE_NAME=\'rocksdb_bulk_load\'', 'SELECT 0') */;
/*!50717 PREPARE s FROM @rocksdb_get_is_supported */;
/*!50717 EXECUTE s */;
/*!50717 DEALLOCATE PREPARE s */;
/*!50717 SET @rocksdb_enable_bulk_load = IF (@rocksdb_is_supported, 'SET SESSION rocksdb_bulk_load = 1', 'SET @rocksdb_dummy_bulk_load = 0') */;
/*!50717 PREPARE s FROM @rocksdb_enable_bulk_load */;
/*!50717 EXECUTE s */;
/*!50717 DEALLOCATE PREPARE s */;

--
-- Not dumping tablespaces as no INFORMATION_SCHEMA.FILES table on this server
--

然後就沒了

解決方式

mysqldump 時加入  --compatible 參數
如: 
mysqldump -h 10.1.1.100 -u root -p
--compatible=mysql40 mydb mytable
 

-- MySQL dump 10.13  Distrib 5.7.xx-xx, for Linux (x86_64)
--
-- Host: 10.1.1.100    Database: mydb
-- ------------------------------------------------------
-- Server version       5.0.xx-log
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL40' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!50717 SELECT COUNT(*) INTO @rocksdb_has_p_s_session_variables FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'performance_schema' AND TABLE_NAME = 'session_variables' */;
/*!50717 SET @rocksdb_get_is_supported = IF (@rocksdb_has_p_s_session_variables, 'SELECT COUNT(*) INTO @rocksdb_is_supported FROM performance_schema.session_variables WHERE VARIABLE_NAME=\'rocksdb_bulk_load\'', 'SELECT 0') */;
/*!50717 PREPARE s FROM @rocksdb_get_is_supported */;
/*!50717 EXECUTE s */;
/*!50717 DEALLOCATE PREPARE s */;
/*!50717 SET @rocksdb_enable_bulk_load = IF (@rocksdb_is_supported, 'SET SESSION rocksdb_bulk_load = 1', 'SET @rocksdb_dummy_bulk_load = 0') */;
/*!50717 PREPARE s FROM @rocksdb_enable_bulk_load */;
/*!50717 EXECUTE s */;
/*!50717 DEALLOCATE PREPARE s */;

--
-- Not dumping tablespaces as no INFORMATION_SCHEMA.FILES table on this server
--

--
-- Table structure for table `mytable`
--

DROP TABLE IF EXISTS `mytable`;
CREATE TABLE `mytable` (
........
 

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

1. 安裝 nfs-utils 套件
[root@example test]# yum -y install nfs-utils

2. 依需求編輯 /etc/exports 設定檔
[root@example test]# vi /etc/exports
/home/backup      192.168.1.100 (rw,async,no_root_squash)
/tmp      192.168.1.55(rw,sync)

3. 啟用 nfs server 
[root@example test]# systemctl start nfs-server

4. 使用 showmount 測試是否有分享
[root@example test]# showmount -e 127.0.0.1

5. 設定下次重開機後自動啟動
[root@example test]# systemctl enable nfs-server
Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.

6. 如果重新修改 /etc/exports 設定檔,執行以下指令讓設定檔生效
[root@example test]# exportfs -av

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

$ sudo apt install openssh-server

安裝完後測試使用 putty 等 clinet 工具登入
但如果出現以下錯誤訊息
Couldn't agree a key exchange algorithm (available: ecdh-sha2-nistp256, ......

應該是你的 putty 版本太舊
請重新下載新版 putty
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

helloworld 發表在 痞客邦 留言(0) 人氣()

2021愛T恤... 愛心大使 陳昊森
一人衣愛助兒盟12周年
贈原燒350元愛心折抵券乙張 
2021/05/04 開賣,限量4萬件,售完為止
博客來 2021愛T恤 一人衣愛助兒盟

Q&A
https://www.books.com.tw/exep/assp.php/es/activity/fashion/2021/05/lovekids/about/qa.html
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

如果 apache proxypass 的 backend 是 https 網址的話
ProxyPass / https://backend.pass.tw/test.html
ProxyPassReverse / https://backend.pass.tw/test.html

可能會出現以下錯誤訊息
[Mon May 03 16:57:15.995493 2021] [ssl:error] [pid 2682:tid 34531960832] [remote x.x.x.x:443] AH01961: SSL Proxy requested for example.pass.tw:443 but not enabled [Hint: SSLProxyEngine]
[Mon May 03 16:57:15.995532 2021] [proxy:error] [pid 2682:tid 34531960832] AH00961: HTTPS: failed to enable ssl support for x.x.x.x:443 (backend.pass.tw)

解決方式
在 apache 新增一行設定
SSLProxyEngine on

然後重啟 apache , 完工
 

 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

# 最小安裝預設沒有安裝 showmount 指令
[root@example ~]# showmount -e nas
-bash: showmount: command not found

# 安裝 nfs-utils 套件
[root@example ~]# yum install nfs-utils
Last metadata expiration check: 0:49:59 ago on Mon 03 May 2021 01:03:19 PM CST.
Dependencies resolved.
========================================================================================
 Package                               Architecture               Version                              Repository                  Size
========================================================================================
Installing:
 nfs-utils                             x86_64                     1:2.3.3-35.el8                       baseos                     494 k
Installing dependencies:
 gssproxy                              x86_64                     0.8.0-16.el8                         baseos                     118 k
 keyutils                              x86_64                     1.5.10-6.el8                         baseos                      63 k
 libverto-libevent                     x86_64                     0.3.0-5.el8                          baseos                      16 k
 python3-pyyaml                        x86_64                     3.12-12.el8                          baseos                     193 k
 quota                                 x86_64                     1:4.04-10.el8                        baseos                     214 k
 quota-nls                             noarch                     1:4.04-10.el8                        baseos                      94 k
 rpcbind                               x86_64                     1.2.5-7.el8                          baseos                      70 k

Transaction Summary
========================================================================================
Install  8 Packages

Total download size: 1.2 M
Installed size: 3.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): libverto-libevent-0.3.0-5.el8.x86_64.rpm                                                         667 kB/s |  16 kB     00:00
(2/8): keyutils-1.5.10-6.el8.x86_64.rpm                                                                 2.0 MB/s |  63 kB     00:00
(3/8): gssproxy-0.8.0-16.el8.x86_64.rpm                                                                 2.9 MB/s | 118 kB     00:00
(4/8): python3-pyyaml-3.12-12.el8.x86_64.rpm                                                             11 MB/s | 193 kB     00:00
(5/8): quota-nls-4.04-10.el8.noarch.rpm                                                                 9.7 MB/s |  94 kB     00:00
(6/8): quota-4.04-10.el8.x86_64.rpm                                                                      11 MB/s | 214 kB     00:00
(7/8): nfs-utils-2.3.3-35.el8.x86_64.rpm                                                                 12 MB/s | 494 kB     00:00
(8/8): rpcbind-1.2.5-7.el8.x86_64.rpm                                                                   8.0 MB/s |  70 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                   1.0 MB/s | 1.2 MB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1
  Running scriptlet: rpcbind-1.2.5-7.el8.x86_64                                                                                     1/8
  Installing       : rpcbind-1.2.5-7.el8.x86_64                                                                                     1/8
  Running scriptlet: rpcbind-1.2.5-7.el8.x86_64                                                                                     1/8
  Installing       : quota-nls-1:4.04-10.el8.noarch                                                                                 2/8
  Installing       : quota-1:4.04-10.el8.x86_64                                                                                     3/8
  Installing       : python3-pyyaml-3.12-12.el8.x86_64                                                                              4/8
  Installing       : libverto-libevent-0.3.0-5.el8.x86_64                                                                           5/8
  Installing       : gssproxy-0.8.0-16.el8.x86_64                                                                                   6/8
  Running scriptlet: gssproxy-0.8.0-16.el8.x86_64                                                                                   6/8
  Installing       : keyutils-1.5.10-6.el8.x86_64                                                                                   7/8
  Running scriptlet: nfs-utils-1:2.3.3-35.el8.x86_64                                                                                8/8
  Installing       : nfs-utils-1:2.3.3-35.el8.x86_64                                                                                8/8
  Running scriptlet: nfs-utils-1:2.3.3-35.el8.x86_64                                                                                8/8
  Verifying        : gssproxy-0.8.0-16.el8.x86_64                                                                                   1/8
  Verifying        : keyutils-1.5.10-6.el8.x86_64                                                                                   2/8
  Verifying        : libverto-libevent-0.3.0-5.el8.x86_64                                                                           3/8
  Verifying        : nfs-utils-1:2.3.3-35.el8.x86_64                                                                                4/8
  Verifying        : python3-pyyaml-3.12-12.el8.x86_64                                                                              5/8
  Verifying        : quota-1:4.04-10.el8.x86_64                                                                                     6/8
  Verifying        : quota-nls-1:4.04-10.el8.noarch                                                                                 7/8
  Verifying        : rpcbind-1.2.5-7.el8.x86_64                                                                                     8/8

Installed:
  gssproxy-0.8.0-16.el8.x86_64      keyutils-1.5.10-6.el8.x86_64 libverto-libevent-0.3.0-5.el8.x86_64 nfs-utils-1:2.3.3-35.el8.x86_64
  python3-pyyaml-3.12-12.el8.x86_64 quota-1:4.04-10.el8.x86_64   quota-nls-1:4.04-10.el8.noarch       rpcbind-1.2.5-7.el8.x86_64

Complete!

[root@example ~]# which showmount
/usr/sbin/showmount

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

如果懶得查 log 到底是哪一筆 commit 出錯
可以用以下懶人排除法

SLAVE STOP;

SET GLOBAL sql_slave_skip_counter = 1;

SLAVE START;

上述做法即是跳過有問題的 commit , 直接往下繼續同步

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

目前 CentOS 8.3 安裝iso 大約是 8G
如果是安裝實體機器,而不是安裝vm 
不大適合再使用傳統的安裝光碟片安裝
本文測試如何透過 internet 安裝 CentOS 8.x Linux

1. 找一個速度比較快的mirror 站下載 CentOS 8.x 開機iso 
該範例為 http://mirror01.idc.hinet.net/centos/8.3.2011/isos/x86_64/CentOS-8.3.2011-x86_64-boot.iso

2. 燒錄成光碟片或是 下載 rufus 做成開機usb 隨身碟

3. 用剛剛製作好的光碟片或是 usb 開機

4. 進入 Installation Destination,設定要安裝的硬碟
注意不要選到剛剛開機的usb 隨身碟

5. 進入 Network &  Host Name 設定網路,首先請確認已經接上網路線
可以經由dhcp 或是手動設定ipv4 環境

6. 進入Installation Source,設定安裝來源
(1) 勾選 On the network
(2) 下拉通訊協定可以選擇 http , https, ftp , nfs , 我們這邊選 http
(3) 文字框內輸入 http://mirror01.idc.hinet.net/centos/8.3.2011/BaseOS/x86_64/os/
(4) Done
image

7. 進入 Software Selection, 選擇要安裝的軟體
我的習慣是只安裝最小安裝,畢竟透過網路安裝,如果在機房安裝,頻寬也是一個成本

8. 設定 Root Password

9. 完成上述流程,基本上已經可以開始安裝了

10. 安裝完後,重開機

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

環境:
CentOS 8.x
MySQL Server 5.x

在編譯的過程中出現以下錯誤
mysqld.cc:6503:1: error:narrowing conversion of 「18446744073709551615」 from 「long unsigned int」 to 「longlong」 {aka 「long long int」} inside { } [-Wnarrowing]

解決方式:
在原來的 ./configure 指令後面 加上 CXXFLAGS="-std=gnu++98"

如:
./configure --prefix=/usr/local/mysql  --with-mysqld-user=mysql --localstatedir=/home/mysql CXXFLAGS="-std=gnu++98"

再重新 make 就不會出現錯誤了

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

客委會與紙風車劇團攜手推出客家親子劇「雨馬」現在在國父紀念館展示
同時可以跟台北101 一同入鏡
趁這幾天天氣好,趕快去拍個照

另外
3月27日至28日的行動劇演出採實聯制,限制入場人數,一天預訂演出3場。紙風車劇團提醒觀眾,可提早到現場排隊,沒有排到的觀眾們仍可到廣場外欣賞。

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

進入 linode 管理介面
https://cloud.linode.com/linodes

點選需要設定反解紀錄的主機

選擇network -> 點選 Edit RDNS -> 修改完後存檔離開

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

[root@centos6 ~]# yum -y install net-snmp net-snmp-utils
Loaded plugins: fastestmirror, security
Setting up Install Process
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

解決方式
[root@centos6 ~]# cd /etc/yum.repos.d
[root@centos6 yum.repos.d]# vi CentOS-Base.repo

編輯以下三個區塊,用下列設定取代
[base]
name=CentOS-$releasever - Base
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# released updates
[updates]
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

存檔離開

清除暫存檔案
[root@centos6 yum.repos.d]# yum clean all

再試試剛剛的yum 安裝指令看看
如果遇到以下錯誤訊息
[root@centos6 yum.repos.d]# yum -y install net-snmp net-snmp-utils
Loaded plugins: fastestmirror, security
Setting up Install Process
Determining fastest mirrors
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

同一個目錄編輯 epel.repo
找到 [epel] 區段
用以下設定取代
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://archives.fedoraproject.org/pub/archive/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

之後再試試
[root@centos6 yum.repos.d]# yum -y install net-snmp net-snmp-utils
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel                                                | 4.7 kB     00:00
epel/primary_db                                     | 6.1 MB     00:10
extras                                              | 3.4 kB     00:00
extras/primary_db                                                              |  29 kB     00:00
updates                                             | 3.4 kB     00:00
updates/primary_db                                                             |  12 MB     01:26
Resolving Dependencies
--> Running transaction check
---> Package net-snmp.x86_64 1:5.5-60.el6_10.2 will be installed
--> Processing Dependency: net-snmp-libs = 1:5.5-60.el6_10.2 for package: 1:net-snmp-5.5-60.el6_10.2.x86_64
--> Processing Dependency: libsensors.so.4()(64bit) for package: 1:net-snmp-5.5-60.el6_10.2.x86_64
--> Processing Dependency: libnetsnmptrapd.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6_10.2.x86_64
--> Processing Dependency: libnetsnmpmibs.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6_10.2.x86_64
--> Processing Dependency: libnetsnmphelpers.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6_10.2.x86_64
--> Processing Dependency: libnetsnmpagent.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6_10.2.x86_64
--> Processing Dependency: libnetsnmp.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6_10.2.x86_64
---> Package net-snmp-utils.x86_64 1:5.5-60.el6_10.2 will be installed
--> Running transaction check
---> Package lm_sensors-libs.x86_64 0:3.1.1-17.el6 will be installed
---> Package net-snmp-libs.x86_64 1:5.5-60.el6_10.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================
 Package                           Arch                     Version                              Repository                 Size
=================
Installing:
 net-snmp                          x86_64                   1:5.5-60.el6_10.2                    updates                   309 k
 net-snmp-utils                    x86_64                   1:5.5-60.el6_10.2                    updates                   177 k
Installing for dependencies:
 lm_sensors-libs                   x86_64                   3.1.1-17.el6                         base                       38 k
 net-snmp-libs                     x86_64                   1:5.5-60.el6_10.2                    updates                   1.5 M

Transaction Summary
=================
Install       4 Package(s)

Total download size: 2.1 M
Installed size: 6.7 M
Downloading Packages:
(1/4): lm_sensors-libs-3.1.1-17.el6.x86_64.rpm                                 |  38 kB     00:00
(2/4): net-snmp-5.5-60.el6_10.2.x86_64.rpm                                     | 309 kB     00:00
(3/4): net-snmp-libs-5.5-60.el6_10.2.x86_64.rpm                                | 1.5 MB     00:01
(4/4): net-snmp-utils-5.5-60.el6_10.2.x86_64.rpm                               | 177 kB     00:00
---------------------------------------------------------------------------------------------------
Total                                      619 kB/s | 2.1 MB     00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : lm_sensors-libs-3.1.1-17.el6.x86_64                                                1/4
  Installing : 1:net-snmp-libs-5.5-60.el6_10.2.x86_64                                             2/4
  Installing : 1:net-snmp-utils-5.5-60.el6_10.2.x86_64                                            3/4
  Installing : 1:net-snmp-5.5-60.el6_10.2.x86_64                                                  4/4
  Verifying  : 1:net-snmp-libs-5.5-60.el6_10.2.x86_64                                             1/4
  Verifying  : 1:net-snmp-utils-5.5-60.el6_10.2.x86_64                                            2/4
  Verifying  : 1:net-snmp-5.5-60.el6_10.2.x86_64                                                  3/4
  Verifying  : lm_sensors-libs-3.1.1-17.el6.x86_64                                                4/4

Installed:
  net-snmp.x86_64 1:5.5-60.el6_10.2                            net-snmp-utils.x86_64 1:5.5-60.el6_10.2

Dependency Installed:
  lm_sensors-libs.x86_64 0:3.1.1-17.el6                          net-snmp-libs.x86_64 1:5.5-60.el6_10.2

Complete!

恭喜,成功了

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

範例: 將 CentOS-8.3.2011-x86_64-dvd1.iso 分成每個為700MB 的檔案
[root@lab workdir]# split -b 700M CentOS-8.3.2011-x86_64-dvd1.iso "CentOS-8.3.2011-x86_64-dvd1.iso.part-"

預設會以小寫英文為流水號
[root@lab workdir]# ls -lh
total 18G
-rw-r--r-- 1 root root 8.7G Feb 25 10:55 CentOS-8.3.2011-x86_64-dvd1.iso
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-aa
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ab
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ac
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ad
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ae
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-af
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ag
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ah
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ai
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-aj
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ak
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-al
-rw-r--r-- 1 root root 435M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-am

也可以換成 -n 參數來指定要切分成幾等分
[root@lab workdir]# split -n 10 CentOS-8.3.2011-x86_64-dvd1.iso "CentOS-8.3.2011-x86_64-dvd1.iso.part-"
[root@lab workdir]# ls -lh
total 18G
-rw-r--r-- 1 root root 8.7G Feb 25 10:55 CentOS-8.3.2011-x86_64-dvd1.iso
-rw-r--r-- 1 root root 884M Feb 25 11:01 CentOS-8.3.2011-x86_64-dvd1.iso.part-aa
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ab
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ac
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ad
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ae
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-af
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ag
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ah
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ai
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-aj

透過cat 指定合併檔案
[root@lab workdir]# cat CentOS-8.3.2011-x86_64-dvd1.iso.part-* > CentOS-8.3.2011-x86_64-dvd1.iso-cp
[root@lab workdir]# ls -lh
total 26G
-rw-r--r-- 1 root root 8.7G Feb 25 10:55 CentOS-8.3.2011-x86_64-dvd1.iso
-rw-r--r-- 1 root root 8.7G Feb 25 11:05 CentOS-8.3.2011-x86_64-dvd1.iso-cp
-rw-r--r-- 1 root root 884M Feb 25 11:01 CentOS-8.3.2011-x86_64-dvd1.iso.part-aa
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ab
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ac
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ad
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ae
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-af
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ag
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ah
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ai
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-aj

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

mysql error log 顯示以下訊息
210203  9:20:44 [ERROR] /usr/local/mysql/libexec/mysqld: Table './mydb/mytable1' is marked as crashed and should be repaired
210203  9:20:44 [Warning] Checking table:   './mydb/mytable1'

解決方式
# mysqlcheck -u root -p --repair mydb mytable1

其他使用方式
Usage: mysqlcheck [OPTIONS] database [tables]
OR     mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...]
OR     mysqlcheck [OPTIONS] --all-databases

預設值
  -r, --repair        Can fix almost anything except unique keys that aren't unique.
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

修復 mysql replication 失敗筆記

因為 master 資料庫無預警電源異常
導致 mysql 主從同步失敗

show slave status\G;
mysql> show slave status\G;
*************************** 1. row ***************************
             Slave_IO_State:
                Master_Host: 192.168.x.x
                Master_User: repl
                Master_Port: 3306
              Connect_Retry: 3
            Master_Log_File: MYDB-Master101-bin.001031
        Read_Master_Log_Pos: 329886971
             Relay_Log_File: MYDB-Slave130-relay-bin.003254
              Relay_Log_Pos: 98
      Relay_Master_Log_File: MYDB-Master101-bin.001031
           Slave_IO_Running: No
          Slave_SQL_Running: Yes
            Replicate_Do_DB: db1,db2,db3
        Replicate_Ignore_DB: mysql,test
         Replicate_Do_Table:
     Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
                 Last_Errno: 0
                 Last_Error:
               Skip_Counter: 0
        Exec_Master_Log_Pos: 329886971
            Relay_Log_Space: 98
            Until_Condition: None
             Until_Log_File:
              Until_Log_Pos: 0
         Master_SSL_Allowed: No
         Master_SSL_CA_File:
         Master_SSL_CA_Path:
            Master_SSL_Cert:
          Master_SSL_Cipher:
             Master_SSL_Key:
      Seconds_Behind_Master: NULL
1 row in set (0.00 sec)

slave 資料庫的錯誤訊息
210202 15:39:14 [Note] Slave I/O thread: connected to master 'repl@192.168.x.x:3306',  replication started in log 'MYDB-Master101-bin.001031' at position 329886971
210202 15:39:14 [ERROR] Error reading packet from server: Client requested master to start replication from impossible position ( server_errno=1236)
210202 15:39:14 [ERROR] Got fatal error 1236: 'Client requested master to start replication from impossible position' from master when reading data from binary log
210202 15:39:14 [Note] Slave I/O thread exiting, read up to log 'MYDB-Master101-bin.001031', position 329886971

原因:
因為重啟 master 資料庫後,會重新產生一個新檔名的 binlog file
但是 slave 資料庫不知道,還繼續往下要拉資料回來

解決方式
先停掉 slave 同步
slave stop;

重新指向新的bin log
CHANGE MASTER TO MASTER_LOG_FILE='MYDB-Master101-bin.001032',MASTER_LOG_POS=0;

重新同步
slave start;

重新再看一次同步狀態,沒意外的話應該就正常了
show slave status\G;

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

當你還有舊版mysql server 需要維護
用 phpmysqladmin 登入時,卻出現 "您應升級到 MySQL 5.5.0 或更新版本" 

先確認一下 mysql server 版號
進入mysql ,輸入以下sql
SHOW VARIABLES LIKE "%version%";

如果你的mysql server 版本是 5.1 的話

編輯 config.inc.php
$cfg['MysqlMinVersion'] = array(
    'internal' => 50100,
    'human' => '5.1.0'
);

存檔,重新再登入即可
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼