2020年10月26日 星期一

Install Centos8

 Dell 710 Server Install CentOS 8.2

Downlead diver for Dell 710, 注意8.2 與8.1 有分別

https://elrepo.org/linux/dud/el8/x86_64/dd-megaraid_sas-07.710.50.00-1.el8_2.elrepo.iso

Copy to  USB and format under FAT32 rather NTFS !!

Put USB to Server with OS DVD (Or USB) 

到了Install 畫面, 按"TAB", 在底部那行加入 inst.dd=/dev/sda1

Start Install ( Default is "Server with GUI", suggest "Minimal Install" )

--------------------------------------

Install GUI 

yum -y groupinstall "Server with GUI"

......

systemctl set-default graphical

.....

reboot

-----------------------------------

dnf insted yum

指令與YUM一樣

check version:

dnf --version


-----------

after install, yum update not work "Failed to download metadata for repo ‘AppStream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist”"

cd /etc/yum.repos.d

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

如果沒有Wget. 可以執行 "yum install wget "

下載完成后執行

yum clean all

yum makecache

then, 

yum update

----Seems all steps must be performed once after the update. otherwise, no repo is workable---

2020年10月4日 星期日

MailScanner show error

 MailScanner show error:

User's home directory /var/spool/postfix is not writable
You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to

make sure  directory " /var/spool/postfix " owner is postfix

and MailScanner.conf

Run As User = postfix

 

 

Delete unused Linux Core

 

Check running core
# uname -a
 List all core
# rpm -q kernel
delete unwanted  core
# yum remove kernel (Kernet file name , example : kernel-3.10.0-1127.10.1.el7.x86_64 )
 wait for done

2020年7月1日 星期三

Win7 Pro Change UI


首先下載 Windows 7 語言包(下面以en-US, 改為zh-HK) , 双击将會解壓出文件一個文件 : lp.cab

這個文件如果在電腦解壓的只會停留幾秒,要馬上複製複製到 其他位置,否則文件就會自動消失,可能需要多試幾次。(但是放在USB好像可以停留)

抄到系統磁片 C: 裏面, 然後以管理員身份打開終端機 CMD 並輸入以下命令

DISM /Online /Add-Package /PackagePath:C:\lp.cab

按Enter , 安裝完成會出現提示符 c:\ , 這時要重新開機。

重新開機後,再次運行CMD , 注意還是以管理員運行, 進入終端機畫面輸入命令

bcdedit /set {current} locale zh-HK

請注意文件名字的 zh-HK是香港中文的意思,如果要中文換英文這裡就輸入en-US, 如果是大陸中文zh-CN, 當然要與剛才下載的語言包配合

看到出現 The operation completed successfully 就代表成功了, 然後輸入:

bcdboot %WinDir% /l zh-HK

完成后應該看到 Boot files successfully created 表示這部分完成了.



接著按“Win+R”彈出“運行”視窗,輸入“regedit” 按Enter

在登錄編輯程式中找到如下鍵值並刪除en-US

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MUI\UILanguages\

******* 請注意在修改前務必備份註冊表, 以防萬一! *************

裡面應該有2個值,分別是 en-US 和 zh-HK, 如果想要用香港中文系統就保留zh-HK,其他刪除掉 (如果有的話).

重啟電腦

Win7 旗艦版和企業版不需要這樣修改,已經自帶多語言


2020年6月1日 星期一

Windows 10 不能登入Samba (建立網盤,出現 "Password incorrect…" )


Windows 10 不能登入Samba (建立網盤,出現 "Password incorrect…" )


User Name 前面加上Server的命稱 “ Server Name\username ”, 實際上"本機名\Username" 都可以
另外,
·       執行optionalfeatures”, SMB 1.0/CIFS 伺服器/用戶端都打勾
·       修改注冊表, 執行“regedit” HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA
LMCompatibilityLevel 键直接删除或改值為5

2020年2月26日 星期三

Stop the Catalina update reminders:

Stop the Catalina update reminders:

  1. Launch "System Preferences" >> "Software Update"
  2. Click "Advanced"
  3. Uncheck "Check for Updates" , "Download New Updates When Available" , and "Install macOS Updates" then "OK"
  4. Launch Terminal : "Applications" >> "Utilities" >> "Terminal"
  5. Enter the below commands:
sudo softwareupdate --ignore "macOS Catalina"   (for new iOS Big Sur, put "big sur" insted "Catalina" )
defaults write com.apple.systempreferences AttentionPrefBundleIDs 0
killall Dock
________________________________

2020年1月5日 星期日

Windows10 Can't Login Microsoft app store, Error Code: 0x80131500

Windows10  Can't  Login Microsoft app store, Error Code: 0x80131500


右鍵 Network, >> Properties >>  Advance , 找到 Use Tls 1.2, 打勾, 然后記的"OK" 確認.

2019年12月13日 星期五

MAC 啟動 SSD Trim 的功能

MacBook 換SSD 后續 



啟動 SSD Trim 的功能:

打開終端機,然後輸入下列指令
sudo trimforce enable

完成之後會自動重新開機

——————————————————

可能會睡眠不醒, 或者叫“安全睡眠(深度睡眠)” 后叫不醒

打開終端機,然後輸入下列指令:

pmset -g

可以看到一些跟Power Management 有關的配置,查看 “hibernatemode ” 這行後面的數字, 一般是3,也就是3小時后進入深度睡眠,改為"0" 就可以(也就是停止這個功能)

使用終端機輸入:

sudo pmset -a hibernatemode 25

2019年10月16日 星期三

用 bind mount 將/home 移到其他地方 (/sdb/home)


將/sdb/home 掛到 /home

mkdir /sdb/home

cp -p -r /home/*.* /sdb/home

mount --bind  /sdb/home /home

vi /etc/fstab

加上

/sdb/home      /home       none       bind    0    0

:wq!

( save & quit)

2019年5月3日 星期五

Samba setup 問題


在CentOS安裝Samba4.6版),testparm檢測出現下面的錯誤

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) 

解決方法:編輯設定檔    vim /etc/security/limits.conf  在裡面加入以下一行

*            -       nofile          16384

------------------------------------------------------------

smb.conf 加上下面幾行,否則 testparm 會出現 “idmap ....." 的error :

idmap config * : backend = tdb
idmap config corp : range = 1000-2000
idmap config *: range = 2001-2999
idmap config corp : backend = ad


  • 中文亂碼 (似乎DOS不認UTF-8CP963 是ZH-CN , )
dos charset = cp936 

  • 有時權限造成設置問題,可以先開放全部的,再慢慢調
create mask = 777
directory mask = 777

-----------------------------------------------------------


Windows XP 登錄Samba 4.6 版本需要修改用戶端群組原則(gpedit.msc

本地安全設置>>安全選項>>網路安全:LAN Manager身份驗證級別的值為僅發送 NTLMv2回應


原因是samba4.5以後的版本不支持NTLMv1,winXP默認用的就是NTLMv1
------------------------------------------------
似乎有登記電腦名稱穩定些:

# groupadd  machines
# useradd -g machines -d /dev/null -c "machine id" -s /bin/false 機器帳號$
-----------------------------------------------

 YUM ( or DNF) upgrade PHP  listed running PHP version yum list installed |grep PHP Remove the old version yum remove php* Then install the ...