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) 人氣()

更新ports tree
# portsnap fetch update

安裝 postfix,目前最新版為 postfix-3.5.8
# cd /usr/ports/mail/postfix
# make install clean

設定開機時執行
# vi /etc/rc.conf
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
postfix_enable="YES"

重開機即可
# reboot

文章標籤

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

mysqldump 在備份資料庫時預設不會把 trigger 也備份出來
如果要備份的話
利用下面語法

mysqldump -h servername -u root -pxxxx --no-data --routines --triggers --all-databases > mydb-schema.sql

undefined

文章標籤

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

# vi /usr/local/etc/apache24/httpd.conf
找到 ServerTokens 關鍵字
如果沒有的話,自己加一行

ServerTokens 有以下幾個選項,如果不願意暴露太多資訊,建議設定成 Prod

ServerTokens Full (or not specified)
Server sends (e.g.): Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2

ServerTokens Prod[uctOnly]
Server sends (e.g.): Server: Apache

ServerTokens Major
Server sends (e.g.): Server: Apache/2

ServerTokens Minor
Server sends (e.g.): Server: Apache/2.4

ServerTokens Min[imal]
Server sends (e.g.): Server: Apache/2.4.2

ServerTokens OS
Server sends (e.g.): Server: Apache/2.4.2 (Unix)

最後重啟 apache 服務

可以用 curl -I http://server/ 測試看看是否生效

參考資訊: https://httpd.apache.org/docs/2.4/mod/core.html

undefined

文章標籤

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

升級thunderbird 版本後
可能會遇到無法收發信件的狀況
出現類似以下的錯誤訊息
訊息傳送失敗。
對方使用不支援的安全通訊協定版本。
必須修正與 xxx.xxx.xxx.xxx  相關的設定。
image

原因是 thunderbird 78 以後預設不支援 TLS 1.0 or TLS 1.1 以下的加密傳輸
image

如果mail server 不方便調整的話
解決方式
1. 工具 > 選項 > 在搜尋欄中輸入 about:config
2. 在搜尋結果中會出現 組態編輯器
3. 點進組態編輯器,系統會提醒你 "隨便亂搞會讓保固失效",請接著點選 "我發誓,我一定會小心der"
4. 在組態編輯器中搜尋 "security.tls.version.min"
5. 把數值調整為1
6. 重啟 thunderbird 再試試

undefined

文章標籤

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

以下情境為單機模式
port: tcp/27017
資料庫路徑: /var/lib/mongodb

1. 在shell 啟動一個mongod 服務
# mongod --port 27017 --dbpath /var/lib/mongodb

2. 另開一個shell 登入mongodb,預設沒有認證功能,直接登入
# mongo --port 27017

3. 在mongo shell 新增資料庫管理員

> use admin
db.createUser(
  {
    user: "myUserAdmin",
    pwd: passwordPrompt(), // or cleartext password
    roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]
  }
)

4. 停用並重啟mongodb 時加入 --auth 參數

> db.adminCommand( { shutdown: 1 } )

 

# mongod --auth --port 27017 --dbpath /var/lib/mongodb

 

 

如果是呼叫設定檔,請在設定檔加入以下參數

security:
    authorization: enabled

5. 測試用資料庫管理員帳號登入

# mongo --port 27017  --authenticationDatabase "admin" -u "myUserAdmin" -p

6. 新增一般使用者

> use test
db.createUser(
  {
    user: "myTester",
    pwd:  passwordPrompt(),   // or cleartext password
    roles: [ { role: "readWrite", db: "test" },
             { role: "read", db: "reporting" } ]
  }
)

7. 測試一般使用者登入

# mongo --port 27017 -u "myTester" --authenticationDatabase "test" -p

8. 測試新增資料

> db.foo.insert( { x: 1, y: 1 } )

參考資訊
https://docs.mongodb.com/manual/tutorial/enable-authentication/

undefined

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

example:
# pecl install mongodb
出現以下錯誤訊息
Connection to `ssl://pecl.php.net:443' failed: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)

檢查 php -i | grep 'Registered Stream Socket Transports'
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
明明有 ssl 啊

原來 pecl 使用的php cli 參數會加上 -n
也就是不參考 php.ini 的設定

偷吃步的解決方式
# vi /usr/local/bin/pecl
把 -n 的參數拿掉,存檔離開
exec $PHP -C -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"
 

重新再安裝試試看 :D

undefined
 

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

如果出現以下錯誤訊息

 # mount /dev/sdc1 /mnt/usb/
 mount: unknown filesystem type 'exfat'

先檢查是否有以下兩個套件
# rpm -qa | grep exfat
fuse-exfat-1.2.7-1.el7.nux.x86_64
exfat-utils-1.2.7-1.el7.nux.x86_64

如果沒有的話,依照以下步驟安裝
# yum -y install epel-release http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

# yum -y install fuse-exfat exfat-utils

# mount /dev/sdc1 /mnt/usb/
FUSE exfat 1.2.7

# df -h
/dev/sdc1                466G   18M  466G   1% /mnt/usb

undefined

文章標籤

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

更新 cisco catalyst switch IOS

1. 將ios 檔案放在 tftp server 

2. 登入 cisco switch 
(1) 測試是否可以連上 tftp server
sw3750#ping 10.1.2.26
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.26, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

(2) dir 列出目前 flash 上的檔案
sw3750#dir
Directory of flash:/

    2  drwx         256   Mar 1 1993 00:08:18 +00:00  c3750-ipservicesk9-mz.150-2.SE11
  528  -rwx         110   Mar 1 1993 00:14:45 +00:00  info
  530  -rwx         796   Mar 2 1993 04:51:48 +00:00  vlan.dat
  531  -rwx        4120   Mar 1 1993 00:02:43 +00:00  multiple-fs
  532  -rwx        3012   Mar 1 1993 00:02:43 +00:00  config.text
  533  -rwx        3817   Mar 1 1993 00:02:43 +00:00  private-config.text

32514048 bytes total (10212864 bytes free)

(3) 移除原來存在 flash 的檔案
sw3750#delete /f /r flash1:c3750-ipservicesk9-mz.150-2.SE11

(4) 再次確認是否已經移除
sw3750#dir
Directory of flash:/

  528  -rwx         110   Mar 1 1993 00:14:45 +00:00  info
  530  -rwx         796   Mar 2 1993 04:51:48 +00:00  vlan.dat
  531  -rwx        4120   Mar 1 1993 00:02:43 +00:00  multiple-fs
  532  -rwx        3012   Mar 1 1993 00:02:43 +00:00  config.text
  533  -rwx        3817   Mar 1 1993 00:02:43 +00:00  private-config.text

32514048 bytes total (32499712 bytes free)

(5) 從 tftp server 上傳ios 檔案到 switch 的 flash 上
sw3750#copy tftp flash1
Address or name of remote host []? 10.1.2.26
Source filename []? c3750-ipbasek9-mz.122-55.SE12.bin
Destination filename [flash1]? c3750-ipbasek9-mz.122-55.SE12.bin
Accessing tftp://10.1.2.26/c3750-ipbasek9-mz.122-55.SE12.bin...
Loading c3750-ipbasek9-mz.122-55.SE12.bin from 10.1.2.26 (via Vlan254): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 12111413 bytes]

12111413 bytes copied in 140.065 secs (86470 bytes/sec)

(6) 檢查上傳結果
sw3750#dir
Directory of flash:/

    2  -rwx    12111413   Mar 1 1993 16:23:12 +00:00  c3750-ipbasek9-mz.122-55.SE12.bin
  528  -rwx         110   Mar 1 1993 00:14:45 +00:00  info
  530  -rwx         796   Mar 2 1993 04:51:48 +00:00  vlan.dat
  531  -rwx        4120   Mar 1 1993 00:02:43 +00:00  multiple-fs
  532  -rwx        3012   Mar 1 1993 00:02:43 +00:00  config.text
  533  -rwx        3817   Mar 1 1993 00:02:43 +00:00  private-config.text

32514048 bytes total (20387840 bytes free)

(7) sh boot 檢查 BOOT path-list 狀態,目前是空的
sw3750#sh boot
BOOT path-list      :
Config file         : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break        : no
Manual Boot         : no
Allow Dev Key         : yes
HELPER path-list    :
Auto upgrade        : yes
Auto upgrade path   :
NVRAM/Config file
      buffer size:   524288
Timeout for Config
          Download:    0 seconds
Config Download
       via DHCP:       disabled (next boot: disabled)

(8) 指定開機的 IOS
sw3750(config)#boot system switch all flash:c3750-ipbasek9-mz.122-55.SE12.bin
sw3750(config)#end
sw3750#show boot
BOOT path-list      : flash:c3750-ipbasek9-mz.122-55.SE12.bin
Config file         : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break        : no
Manual Boot         : no
Allow Dev Key         : yes
HELPER path-list    :
Auto upgrade        : yes
Auto upgrade path   :
NVRAM/Config file
      buffer size:   524288
Timeout for Config
          Download:    0 seconds
Config Download
       via DHCP:       disabled (next boot: disabled)

(9) 存檔,重開機
sw3750#write
Building configuration...
[OK]

sw3750#reload
Proceed with reload? [confirm]y

undefined

 

文章標籤

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

以下作法適用於已知的enable 密碼或是尚未設定enable 密碼
sw01#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]y[OK]
Erase of nvram: complete

sw01#reload
Proceed with reload? [confirm]y


undefined

 

文章標籤

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

不是家用的網路設備或是儲存設備多半都會提供console 介面供初始化設定
或是故障排除的時候使用
目前市面上幾乎找不到有rs232 介面的電腦了
所以首先必須買一條usb to rs232 轉接頭,如下
undefined

有些舊版的轉接線不支援win10 , 所以採購前請先確認規格

開啟裝置管理員,檢查一下usb to rs232 編號是多少
以下範例是COM3
image

打開 putty,選擇serial , 並輸入COM3 ,speed: 9600 , 其他都預設值即可
如果常用的話,可以選擇儲存,方便下次連線
image

undefined

文章標籤

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

除了三倍券還有農遊券、藝FUN券、動滋券可以抽喔

相關資訊請參考以下連結

農遊券 7/9 開放登記
https://ezgo.coa.gov.tw/zh-TW/Front/ETicket/Index

藝FUN券  7/18 開放登記
https://www.moc.gov.tw/webarticle_111116.html

動滋券  7/20 開放登記
https://don500.sa.gov.tw/FOAS/actions/SportsAdmin.action
 

undefined

補充: 客委會 浪漫客庄遊振興與遊券
侍親優先方案 7/15 開放登記
一般民眾 7/22 開放登記

https://www.hakka.gov.tw/Content/Content?NodeID=34&PageID=42735



文章標籤

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

發現 netgear r7800 預設的韌體沒有 snmp 功能
所以無法遠端監控流量
一個路由器沒有 snmp 總覺得哪邊怪怪的
爬了一下網路上建議的方法是重新安裝 DD-WRT
undefined


參考資料
https://zh.wikipedia.org/wiki/DD-WRT
https://wiki.dd-wrt.com/wiki/index.php/Netgear_R7800
ftp://ftp.dd-wrt.com/betas/2020/06-25-2020-r43516/netgear-r7800/

筆記下來,抽空測試
 

文章標籤

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

https://im.qq.com/linuxqq/
雖然還是 beta 版本,今年的四月有最新的更新也算是有誠意了
image

文章標籤

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

節錄博客來facebook粉絲頁
中衛醫療口罩第二波資訊更正:
1. 6月9號早上11點限量開賣
2. 預計販售軍綠、薰衣紫、深丹寧三色平面口罩
3. 每盒50片售價$300,每ID每個顏色限購1盒
4. 放入購物車不代表取得購買資格,數量有限

undefined undefined
undefined


詳情依博客來網頁公告為準

文章標籤

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

有些時候可能需要調整mysql 原來的編碼,以達到預期的功能
如為了要存放emoji icon時

1. 修改 my.cnf 預設值
[client]
default-character-set=utf8mb4

[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci

2. 修改已經存在的 database 預設值
ALTER DATABASE `example_db` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

3. 修改已經存在的 table 預設值
ALTER TABLE `example_db`.`example_table` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ;
但上面這串語法,只會改變table 的預設值,對於已經存在的欄位編碼不會調整

4. 如果要變更欄位編碼,需要再下以下的sql 語法
ALTER TABLE `example_db`.`example_table` MODIFY `example_col` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
或是
ALTER TABLE ``example_db`.`example_table` CHANGE `example_col` `example_col` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; 

5. 如果想要table,column 都一起被調整 (強烈建議)
可以直接執行以下語法
ALTER TABLE `example_db`.`example_table` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

 


undefined

 

文章標籤

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

預設google bot 或是spider 會根據你的網站效能來評估抓取網站內容的頻率
但是如果你的網站真的已經被爬到吃不消
或是流量費超支
或是後端有其他瓶頸,google 也無從得知

這時候可以透過 google search console 暫時限制 google bot 爬網頁的頻率
進入
https://www.google.com/webmasters/tools/settings
image

請選取資源
image

選擇 限制 Google 的檢索頻率上限
並調整到一個適合的檢索頻率
image

儲存

文章標籤

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

活動預告 5/21 無印良品不限金額結帳81折
undefined

文章標籤

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

以下是各大瀏覽器的錯誤訊息 

[IE]
此內容無法在框架中顯示
為了協助保護您在此網站所輸入的資訊安全性,此內容的發行者不允許在框架中顯示資訊。
您可以嘗試的方式:
在新視窗中開啟此內容  
解決因X-Frame-Options 無法載入 iframe

[Firefox]
因 X-Frame-Options 封鎖
連線到 example.com 時發生錯誤。
因為這個頁面包含 X-Frame-Options 政策,不允許以這種方式載入,Firefox 封鎖了這個頁面載入。
解決因X-Frame-Options 無法載入 iframe

[google chrome]
Refused to display 'https://example.com/xxx.html' in a frame because it set 'X-Frame-Options' to 'deny'.
解決因X-Frame-Options 無法載入 iframe

如果你有iframe 中網址的管理權限
請檢察apache 設定檔是否有以下設定
Header always set X-Frame-Options "xxx"

設定這個參數可以防止你的網站被攻擊
有三種設定值
1. DENY
不允許插入iframe 中

2. SAMEORIGIN
只允許插入同一個域名的網頁iframe中

3. ALLOW-FROM uri
只能插入指定的域名中
如: X-Frame-Options: ALLOW-FROM https://helloworld.pixnet.net/

 

文章標籤

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

首先到ga首頁 https://analytics.google.com/
為你的blog 申請一個ga code
系統會自動幫你生成一段java script
你可以選擇將這段script 貼在某個側邊欄中
但是可能會改壞,可能手機版頁面不會載入這個側邊攔

建議的做法
到痞客幫應用市集 https://appmarket.pixnet.tw/
下載安裝Google數據分析
image

並設定事前已經申請好的ga code
image

格式應該是 UA-123456789-0 
image

如果你的網站持續有流量的話
在 google analytics 管理頁面中應該可以看到數據產生
image

undefined

文章標籤

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

如果你是用gmail 當MUA, 也就是利用gmail 來收發外部的郵件
最近在寄信時出現這個錯誤訊息

郵件未傳送
你已設定使用「以這個地址寄送郵件」功能,透過其他電子郵件地址或別名傳送這封郵件。不過,該地址所屬帳戶的設定錯誤或已失效。請檢查相關設定,然後再嘗試重新傳送。
瞭解詳情
伺服器的回應如下:
TLS Negotiation failed, the certificate doesn't match the host.
image

以postfix + comodo wildcard ssl 為例
1. 取得合法的 ssl 憑證
免費或是購買1~2年憑證 (略)

2. 合併ca憑證
# cd /ssldir/example.com/
# cat COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ca-bundle.crt


3. 修改 postfix main.cf
# vi /usr/local/etc/postfix/main.cf
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /ssldir/example.com/example.com.key
smtpd_tls_cert_file = /ssldir/example.com/STAR_example_com.crt
smtpd_tls_CAfile = /ssldir/example.com/ca-bundle.crt
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

4. 重啟 postfix 服務
# /usr/local/etc/rc.d/postfix restart

5. 測試
# openssl s_client -connect mail.example.com:25 -starttls smtp
觀察 Certificate chain 是否有噴錯誤訊息,如果都正常的話,就開開心心的寄一封信到別的網域測試看看吧
 

文章標籤

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

dell r310 server 如果無法利用usb 隨身碟開機的話
請在開機時按F12 進入BIOS 設定畫面

1. 在開機設定的地方確認 Hard drive C: 是否已勾選
image

2. 按+ 將usb 開機順序移到內接硬碟/raidcard 前
image

文章標籤

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

如果要把一個已經有加入密碼的PDF 文件轉給他人,但又不想提供密碼
可以善用 google chrome 瀏覽器
說穿了也不是把密碼移除,而是另存一份沒有密碼的版本
前提是你自己知道這個pdf 的文件的密碼

1. 首先用 Google Chrome 開啟有加密碼的PDF 文件
2. 列印 -> 目的地 -> 另存為 PDF -> 儲存

image

undefined

文章標籤

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

因為 Linode 政策關係,2019 年底後註冊的新使用者
預設對外不開放 tcp 25 468 587 port
也就是不能收發郵件
目的是為了要減少spam 

但新用戶也不用擔心,租了卻不能發信
只要按照以下步驟
還是可以收發信的
1. 在 DNS server 上設定該台 linode 的正解 A 紀錄
2. 在 linode 管理介面設定相對應的反解紀錄
http://blog.sina.com.tw/helloworld/article.php?entryid=695484

3. 開 tickets 說這台linode 有寄信的需求

原則上只要你設定正確,很快就會幫你開通了

參考資料
https://www.linode.com/2019/11/05/a-new-policy-to-help-fight-spam/

https://www.linode.com/docs/email/running-a-mail-server/#sending-email-on-linode
 

【午茶夫人】微糖金鑽鳳梨乾-100g/袋

 

文章標籤

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

因為疫情關係
很多公司行號都在演練異地或是居家辦公,WFH (work from home)

vpn 是一個方式
但如果已經習慣辦公場所的電腦環境
沒有他不行的話

現有遠端連現有幾個方式可以使用
可以使用商業軟體如 team viewer
team viewer 的好處是
可以不受防火牆限制
dhcp client 也不用特別去記目前的ip

windows 有內建的 remote desktop 
可以讓其他 windows 用戶連線到遠端主機的桌面
甚至是 iphone 和 mac os 也可以下載 app 連線到 windows remote desktop
https://apps.apple.com/tw/app/remote-desktop-mobile/id714464092

而 Mac OS 內建也有類似的設定

server 端
1. 系統偏好設定 -> 共享
image

2. 開啟螢幕共享 -> 桉 + 號 允許下列使用者存取
image

client 端
1. 前往  -> 連接伺服器
image

2. 輸入 vnc://IP:5900 , 連線即可
image

如果 client 是 windows 環境也可以下載 vnc viewer 連線
https://www.realvnc.com/en/connect/download/viewer/

undefined

文章標籤

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

$ sudo dnf install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
$ sudo dnf module disable mysql
$ sudo percona-release setup pxc57
$ sudo dnf install Percona-XtraDB-Cluster-57

undefined

文章標籤

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

如果在 CentOS + apache + php 的環境下面出現 Warning: file_get_contents(http://xxx): failed to open stream: Permission denied in xxx
或是一些摸不著頭緒的錯誤訊息

當確定程式沒有問題,在其他設備上也可以正常執行
請檢察看看 selinux 的設定
最簡單的方式就是 修改 /etc/selinux/config
SELINUX=disabled
重開機

文章標籤

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

今天發現 Percona XtraDB Cluster 一個node掛掉,準備要把程式切到另一個正常node 的時候
連線到資料庫時出現這個錯誤

WSREP has not yet prepared node for application use

解決方式
登入mysql 後
mysql> SET GLOBAL wsrep_provider_options='pc.bootstrap=YES';
Query OK, 0 rows affected (0.00 sec)

即可

undefined

文章標籤

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

Close

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

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

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

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

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼