發表文章

Install MongoDB on CentOS8

1. su -
2. vim /etc/yum.repos.d/mongodb.repo  # add follows
[mongodb-org-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
3. dnf install mongodb-org

4. semanage --port -a -t mongod_port_t -p tcp 27017

5. firewall-cmd --add-port=27017/tcp --permanent
    firewall-cmd --reload

reference
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
https://www.osradar.com/install-mongodb-centos-8/
https://computingforgeeks.com/how-to-install-mongodb-4-0-on-rhel-8-centos-8/

https://docs.mongodb.com/manual/reference/ulimit/
https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.2/x86_64/RPMS/

解決'Microsoft.Jet.OLEDB.4.0' 提供者並未登錄於本機電腦上

圖片
1. https://3ctipsmemo.blogspot.com/2017/07/ms-windows-iis-10-x64.html

2. download
Microsoft Access Database Engine 2010 可轉散發套件

Microsoft Access Database Engine 2016 Redistributable
https://www.microsoft.com/en-us/download/details.aspx?id=54920

please uninstall 64bit Microsoft Office before install Access Database Engine 2010 

Reference
https://social.msdn.microsoft.com/Forums/zh-TW/c55decf8-53a4-4c82-8aa3-d9f3e6c627c0/microsoftjetoledb40?forum=238


To print message in a box on CentOS 8

$ dnf  install boxes
$ echo 'Merry Chrismas and Happy New Year 2020!' | boxes -d santa -a c



Reference
https://boxes.thomasjensen.com/download.html
https://www.tecmint.com/boxes-draws-ascii-art-boxes-in-linux-terminal/


Installing WineHQ on CentOS 8

1. download from https://dl.winehq.org/wine/source/4.0/wine-4.0.2.tar.xz

2. tar Jxvf wine-4.0.2.tar.xz

3. cd wine-4.0.2

4. ./configure --enable-win64

5. make && make install


reference
https://tecadmin.net/install-wine-centos8/

Linux調整一臺主機多網卡之route優先權

圖片
$ route -n    #route
$ sudo route del default dev nm-bond0
$ sudo route del default dev enp2s0
$ sudo route add default  via 192.168.1.1 netmask 0.0.0.0 dev nm-bond0 metric 0
$ sudo route add default  via 192.168.1.1 netmask 0.0.0.0 dev enp2s0 metric 1

將 script 加入 /etc/rc.local,讓開機即可改變






#centos Linux 7
nmcli c show dev enp5s0 | grep ipv4
nmcli c modify enp5s0 ipv4.route-metric 0
nmcli c modify enp2s0 ipv4.route-metric 1
nmcli connection up dev enp5s0
nmcli connection up dev enp2s0



參考
https://unix.stackexchange.com/questions/344974/how-can-i-make-changes-to-the-network-routing-metric-permanently

https://www.tecmint.com/configure-network-connections-using-nmcli-tool-in-linux/

Enable the IPython Clusters tab in Jupyter Notebook

@ on MS Windows
1. python get-pip.py

2. pip install jupyter

3. pip install --upgrade ipyparallel

4. jupyter serverextension enable --py ipyparallel --user
    jupyter nbextension install --py ipyparallel --user
    jupyter nbextension enable --py ipyparallel --user

5. ipcluster nbextension enable

6. jupyter notebook
# on Windows path: C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python36\Scripts\jupyter-notebook.exe

@ on CentOS Linux 8

I. pip install jupyter
II. pip install --upgrade ipyparallel
III.
jupyter-serverextension enable ipyparallel --py --user
jupyter-nbextension install ipyparallel --py --user
jupyter nbextension enable ipyparallel --py --user

IV. ipcluster nbextension enable
VI. jupyter-notebook&


reference
https://stackoverflow.com/questions/39301512/ipcluster-nbextension-enable-doesnt-have-subcommand-specified

https://github.com/ipython/ipyparallel#install

Hanoi tower problem with recursive solution

https://www.geeksforgeeks.org/c-program-for-tower-of-hanoi/

http://mathworld.wolfram.com/TowerofHanoi.html

密碼生成網站

感謝大神 創造
https://passwordsgenerator.net/

https://passwordsgenerator.net/plus/

加密生成網站
https://passwordsgenerator.net/sha256-hash-generator/

https://passwordsgenerator.net/md5-hash-generator/

https://passwordsgenerator.net/sha1-hash-generator/

https://passwordsgenerator.net/sha512-hash-generator/

Base 64
https://passwordsgenerator.net/base64-decode/

Name
https://passwordsgenerator.net/name-generator/

Counts Char
https://passwordsgenerator.net/character-count/

QRcode
https://passwordsgenerator.net/qr-code-generator/

ffmpeg transfer stream files mp4 on CentOS 8

圖片
1 Download tarball from following:
https://www.ffmpeg.org/download.html
2  go into folder
cd ffmpeg{}  # tab key
2. if your account has sudo option #/etc/sudeors
 $ sudo dnf install nasm
 $  sudo ./configure
 $ sudo make && sudo make install


 3.with Constant Bitrate Encoding(CBR)

$ffmpeg -i input.mp4 -vn -acodec libmp3lanme -ac 2 -ab 128k -ar 44100 output.mp3

  with Variable Bitrate Encodeing(VBR)

$ffmpeg -i input.mp4 -vn -acodec libmp3lanme -ac 2 -qscale:a 4 -ar 44100 output.mp3






4. Press enter to excute














reference
https://askubuntu.com/questions/84584/converting-mp4-to-mp3

移除 Norton Antivirus後在Windows 10 新增移除該程式會出現不定時重開機的問題

看登入檔可以發現新增移除程式並無把Norton完全移除,故開啟Denfender後,會一直出現衝突的不定時重開,從紀錄檔可以看到PCI-E錯誤與Localhost權限取得錯誤。故我們需使用專門移除程式移除Norton
1. 先停止 Windows Denfender
2. 從下方URL下載原廠移除工具
https://support.norton.com/sp/zh/tw/home/current/solutions/v60392881

http://liveupdate.symantecliveupdate.com/upgrade/RnR/NRnR.exe

3. 執行Norton移除工具,並重開機後
4. 開啟Windows Defender功能