2021年12月13日 星期一

Good Tools

 https://ngrok.com/

Mout file nfs

 1. 

https://www.linode.com/community/questions/17989/why-cant-mysql-access-the-aria-control-file


2. 

https://www.akiicat.com/2019/03/09/DevOps/setup-nfs-server/


3.  LOCK

https://www.alibabacloud.com/blog/how-can-we-ensure-the-consistency-of-nfs-file-locks_597359

File Locks

File locking is one of the basic features of file systems, and applications use it to control the concurrent file access of other applications. NFS is a standard network file system for UNIX and similar systems. As it has evolved, NFS has gradually gained native support for file locks, commencing with NFSv4. Since its inception in the 1980s, three versions of NFS have been released, which are NFSv2, NFSv3, and NFSv4.



4. docker name mount

https://larrylu.blog/using-volumn-to-persist-data-in-container-a3640cc92ce4

https://dywang.csie.cyut.edu.tw/dywang/docker/node45.html

https://stackoverflow.com/questions/45282608/how-to-directly-mount-nfs-share-volume-in-container-using-docker-compose-v3

https://docs.docker.com/storage/volumes/


https://sysadmins.co.za/create-a-docker-persistent-mysql-service-backed-by-nfs/


mariadb docker separate confing / data

 1. 

https://peihsinsu.gitbooks.io/docker-note-book/content/common-docker-mysql.html


2.

https://www.796t.com/article.php?id=8113


3. move data

https://www.digitalocean.com/community/tutorials/how-to-change-a-mariadb-data-directory-to-a-new-location-on-centos-7

maraidb lsof lock

 1. 

https://ephrain.net/linux-%E4%BD%BF%E7%94%A8-lsof-lslocks-fuser-%E6%8C%87%E4%BB%A4%E5%88%97%E5%87%BA%E7%9B%AE%E5%89%8D%E9%8E%96%E5%AE%9A%E4%B8%AD%E7%9A%84-file-locks/


2.

https://stackoverflow.com/questions/49179656/how-can-a-file-lock-be-checked-in-python-on-linux


3. program

https://gavv.github.io/articles/file-locks/


maraidb Setting user

# basic

https://blog.gtwang.org/linux/mysql-create-database-add-user-table-tutorial/ 


#

https://www.itread01.com/content/1549041846.html

https://webdock.io/en/docs/how-guides/database-guides/how-enable-remote-access-your-mariadbmysql-database

https://mariadb.com/kb/en/configuring-mariadb-for-remote-client-access/


#

http://southmaster.com/article/pub.php?page=red2.php&id=6463

docker entrypoint example in alpine

#################################################3


COPY ./docker-entrypoint.sh /

RUN chmod +x /docker-entrypoint.sh
 

ENTRYPOINT ["/docker-entrypoint.sh"] 


#

#!/bin/sh

echo 'Hello World!'
#################################

## good


Override ENTRYPOINT with docker run

https://phoenixnap.com/kb/docker-run-override-entrypoint


# good 2
https://ithelp.ithome.com.tw/articles/10250988

# ref
https://stackoverflow.com/questions/38905135/why-wont-my-docker-entrypoint-sh-execute

#
https://mileschou.github.io/blog/why-the-entrypoint-not-start-in-docker/

https://stackoverflow.com/questions/42494853/standard-init-linux-go178-exec-user-process-caused-exec-format-error

https://blog.tiger-workshop.com/docker-difference-between-entrypoint-and-cmd/


2021年12月9日 星期四

python test order

 https://codereview.stackexchange.com/questions/122532/controlling-the-order-of-unittest-testcases

python decorator

 https://www.artima.com/weblogs/viewpost.jsp?thread=240808

https://www.drmaster.com.tw/Bookinfo.asp?BookID=MP12113


python local variable

 https://ithelp.ithome.com.tw/articles/10223457

python string formater

https://realpython.com/python-string-formatting/ 

https://stackoverflow.com/questions/17895835/format-strings-and-named-arguments-in-python

2021年12月6日 星期一

docker run on diskless

 https://serverfault.com/questions/763805/how-to-place-docker-images-ontop-of-an-nfs-share-in-coreos


https://stackoverflow.com/questions/44942790/docker-error-failed-to-register-layer-symlink/61847010


https://stackoverflow.com/questions/66071815/docker-failed-to-register-layer-symlink-when-custom-data-root-is-set?noredirect=1&lq=1


https://blog.csdn.net/lj6052317/article/details/110095736


https://blog.csdn.net/weiguang1017/article/details/76212203


https://stackoverflow.com/questions/41453263/docker-networking-disabled-warning-ipv4-forwarding-is-disabled-networking-wil

https://newbedev.com/docker-error-failed-to-register-layer-symlink


https://stackoverflow.com/questions/19234831/where-are-docker-images-stored-on-the-host-machine


#good

https://coolshell.cn/articles/17200.html

https://docs.docker.com/storage/storagedriver/select-storage-driver/

https://blog.51cto.com/dengaosky/2062021

https://www.jianshu.com/p/63fdb0c0659c

## other

https://stackoverflow.com/questions/37672018/clean-docker-environment-devicemapper


https://github.com/moby/moby/issues/18867#issuecomment-169020478


https://stackoverflow.com/questions/31620825/usage-of-loopback-devices-is-strongly-discouraged-for-production-use


https://www.itread01.com/content/1547139087.html


https://jasonlee.xyz/docker-storage-drivershe-ding-wei-overlayfs/

https://ithelp.ithome.com.tw/articles/10197423?sc=iThelpR


https://opensource.com/article/20/5/systemd-units

https://blog.51cto.com/daibaiyang119/2160923

https://github.com/moby/moby/issues/21531#issuecomment-204184490

https://unix.stackexchange.com/questions/398304/how-can-i-run-docker-on-diskless-machines

https://unix.stackexchange.com/questions/436643/using-overlay2-on-centos-7-4

2021年11月29日 星期一

yum localdownload and install by docker

 1. https://www.slothparadise.com/how-to-download-yum-packages-locally/ 


2. https://unix.stackexchange.com/questions/50642/download-all-dependencies-with-yumdownloader-even-if-already-installed


3. good ch

https://ephrain.net/linux-%E5%9C%A8-centos-%E4%B8%8A%E4%BD%BF%E7%94%A8-yum%EF%BC%8C%E4%B8%8B%E8%BC%89%E6%89%80%E6%9C%89%E7%9B%B8%E9%97%9C%E8%81%AF%E7%9A%84-rpm-%E5%A5%97%E4%BB%B6/


4. 

https://unix.stackexchange.com/questions/151689/how-can-i-instruct-yum-to-install-a-specific-version-of-package-x


5. good ch install docker

https://www.stepbystep.tw/blog/post/118700937-centos-7-%E5%AE%89%E8%A3%9D-docker-ce


6. rpm list

https://phoenixnap.com/kb/how-to-install-rpm-file-centos-linux


7. office install docker

https://docs.docker.com/engine/install/centos/


8. rpm list 

https://linuxhint.com/check-available-package-yum/



python module

 https://codertw.com/%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80/88868/


https://docs.python.org/3/tutorial/modules.html#packages

2021年11月26日 星期五

drone

 1. 

https://www.tpisoftware.com/tpu/articleDetails/1884

https://ithelp.ithome.com.tw/articles/10240360

https://blog.wu-boy.com/2021/08/drone-license/

docker compose can commuicate

 1  

Day8 不同yml檔,也可以讓容器彼此都能溝通


只要網段一致,即可直接呼叫IP或容器名稱。因此,這邊示範如何在不同的容器中,讓他們有相同的網段。


https://ithelp.ithome.com.tw/articles/10218037

2021年11月23日 星期二

python go to pypi

 1.  打包python module 到PYPI 上


git learning

 1. https://w3c.hexschool.com/git/7b64aa34

2. https://git-scm.com/book/zh-tw/v2/Git-%E5%9F%BA%E7%A4%8E-%E5%8F%96%E5%BE%97%E4%B8%80%E5%80%8B-Git-%E5%80%89%E5%84%B2



2021年11月22日 星期一

solve: docker network can container access the localhost by host mode

 1.  

Lastly, under Linux you can run your container in the host network namespace by setting --net=host; in this case localhost on your host is the same as localhost inside the container, so containerized service will act like non-containerized services and will be accessible without any additional configuration.


docker-compose-running-containers-in-nethost

how-to-access-host-port-from-docker-container

2. other

iptables -A INPUT -i docker0 -j ACCEPT


3. ipforward

作業系統擁有 IP轉發(英語:IP forwarding功能,意味著該系統能接收從接口傳送進來的 網絡數據包(英語:network packets),如果識別到該數據包不用於該系統自身,那麼系統將會將該網絡數據包傳送到另外一個網絡去,用恰當地方式轉發該數據包。[1]

一個典型的場景是需要去搭建一個路由器以連接兩個不同網絡。


4. more discuss

https://ithelp.ithome.com.tw/articles/10206725

2021年11月15日 星期一

Centos7 yum kernel update

 # To update linux kernel

  cat /var/log/yum.log | less

   rpm -q kernel

  yum erase kernel-3.10.0-1160.45.1.el7.x86_64

yum-complete-transaction

yum check-update

yum install kernel.x86_64

2021年11月12日 星期五

python docker image choose

 1.  office lab https://hub.docker.com/_/python

Simple Tags

2.  aws
https://aws.amazon.com/cn/blogs/china/choose-the-best-docker-image-for-your-python-application/


  • Alpine 显然不适合作为Python 应用的基础映像。尽管它提供了惊人存储的空间上效率,但它对于Python包支持的不足的缺陷是难以弥补的。也许Alpine更适合于一些对于映像尺寸敏感的场合,还可以考虑将它用于你的Go 应用。



3. debian version https://www.debian.org/releases/index.zh-tw.html

發行版目錄

4.  Dissus and meaning
https://medium.com/swlh/alpine-slim-stretch-buster-jessie-bullseye-bookworm-what-are-the-differences-in-docker-62171ed4531d


docker compose

 1.  install method

https://phoenixnap.com/kb/install-docker-compose-centos-7


2.  directly download  https://github.com/docker/compose/releases



3. docker network

https://titangene.github.io/article/networking-in-docker-compose.html


https://ithelp.ithome.com.tw/articles/10242460


https://docs.docker.com/network/network-tutorial-standalone/


https://stackoverflow.com/questions/43904562/docker-how-to-find-the-network-my-container-is-in

\

https://ithelp.ithome.com.tw/articles/10205190

2021年11月11日 星期四

docker iptables

  • iptable is define in /etc/docker/daemon.json and default is false , must open it 



  •   default iptalbes

# iptables -S

-P INPUT ACCEPT

-P FORWARD ACCEPT

-P OUTPUT ACCEPT

-N DOCKER

-N DOCKER-ISOLATION-STAGE-1

-N DOCKER-ISOLATION-STAGE-2

-N DOCKER-USER

-A FORWARD -j DOCKER-USER

-A FORWARD -j DOCKER-ISOLATION-STAGE-1

-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

-A FORWARD -o docker0 -j DOCKER

-A FORWARD -i docker0 ! -o docker0 -j ACCEPT

-A FORWARD -i docker0 -o docker0 -j ACCEPT

-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2

-A DOCKER-ISOLATION-STAGE-1 -j RETURN

-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP

-A DOCKER-ISOLATION-STAGE-2 -j RETURN

-A DOCKER-USER -j RETURN


  • Look the chain

[root@localhost mybin]# iptables -L

Chain INPUT (policy ACCEPT)

target     prot opt source               destination         


Chain FORWARD (policy ACCEPT)

target     prot opt source               destination         

DOCKER-USER  all  --  anywhere             anywhere            

DOCKER-ISOLATION-STAGE-1  all  --  anywhere             anywhere            

ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED

DOCKER     all  --  anywhere             anywhere            

ACCEPT     all  --  anywhere             anywhere            

ACCEPT     all  --  anywhere             anywhere            


Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination         


Chain DOCKER (1 references)

target     prot opt source               destination         


Chain DOCKER-ISOLATION-STAGE-1 (1 references)

target     prot opt source               destination         

DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            

RETURN     all  --  anywhere             anywhere            


Chain DOCKER-ISOLATION-STAGE-2 (1 references)

target     prot opt source               destination         

DROP       all  --  anywhere             anywhere            

RETURN     all  --  anywhere             anywhere            


Chain DOCKER-USER (1 references)

target     prot opt source               destination         

RETURN     all  --  anywhere             anywhere            

[root@localhost mybin]# iptables -L

Chain INPUT (policy ACCEPT)

target     prot opt source               destination         


Chain FORWARD (policy ACCEPT)

target     prot opt source               destination         

DOCKER-USER  all  --  anywhere             anywhere            

DOCKER-ISOLATION-STAGE-1  all  --  anywhere             anywhere            

ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED

DOCKER     all  --  anywhere             anywhere            

ACCEPT     all  --  anywhere             anywhere            

ACCEPT     all  --  anywhere             anywhere            


Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination         


Chain DOCKER (1 references)

target     prot opt source               destination         


Chain DOCKER-ISOLATION-STAGE-1 (1 references)

target     prot opt source               destination         

DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            

RETURN     all  --  anywhere             anywhere            


Chain DOCKER-ISOLATION-STAGE-2 (1 references)

target     prot opt source               destination         

DROP       all  --  anywhere             anywhere            

RETURN     all  --  anywhere             anywhere            


Chain DOCKER-USER (1 references)

target     prot opt source               destination         

RETURN     all  --  anywhere             anywhere


##

[root@localhost mybin]# iptables-save

# Generated by iptables-save v1.4.21 on Fri Nov 12 14:52:09 2021

*filter

:INPUT ACCEPT [4092:1167973]

:FORWARD ACCEPT [0:0]

:OUTPUT ACCEPT [3144:1537085]

:DOCKER - [0:0]

:DOCKER-ISOLATION-STAGE-1 - [0:0]

:DOCKER-ISOLATION-STAGE-2 - [0:0]

:DOCKER-USER - [0:0]

-A FORWARD -j DOCKER-USER

-A FORWARD -j DOCKER-ISOLATION-STAGE-1

-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

-A FORWARD -o docker0 -j DOCKER

-A FORWARD -i docker0 ! -o docker0 -j ACCEPT

-A FORWARD -i docker0 -o docker0 -j ACCEPT

-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2

-A DOCKER-ISOLATION-STAGE-1 -j RETURN

-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP

-A DOCKER-ISOLATION-STAGE-2 -j RETURN

-A DOCKER-USER -j RETURN

COMMIT

# Completed on Fri Nov 12 14:52:09 2021

# Generated by iptables-save v1.4.21 on Fri Nov 12 14:52:09 2021

*nat

:PREROUTING ACCEPT [24:2684]

:INPUT ACCEPT [23:2600]

:OUTPUT ACCEPT [44:2799]

:POSTROUTING ACCEPT [44:2799]

:DOCKER - [0:0]

-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER

-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER

-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE

-A DOCKER -i docker0 -j RETURN

COMMIT

# Completed on Fri Nov 12 14:52:09 2021


#ref

https://www.itread01.com/content/1549511473.html

iptables: https://www.digitalocean.com/community/tutorials/how-to-list-and-delete-iptables-firewall-rules

docker and iptables

office docker and iptables

知呼 good


csdn docker firewall


firewall cmd


easy firewall


docker firwall , 睿揚




2021年11月10日 星期三

Jupyter install

 

1. 

Jupyter Notebook 使用技巧彙整:建置不同程式語言的核心



https://medium.com/pyradise/jupyter-notebook-tricks-kernels-9350502ccb69

2. 
https://ithelp.ithome.com.tw/articles/10192614

3. office
https://jupyter-notebook.readthedocs.io/en/stable/public_server.html

4. china
https://blog.csdn.net/donaldsy/article/details/96194346

5. 
https://tf.wiki/zh_hant/appendix/jupyterlab.html

6.
https://jupyter.readthedocs.io/en/latest/use/jupyter-directories.html

7.
https://kknews.cc/code/lmyoqne.html

8.
http://yhhuang1966.blogspot.com/2020/04/python-jupyterlab.html

9. docker
https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html

2021年11月3日 星期三

rabbitmq environment and docker file

 1. 

File and Directory Locations

https://www.rabbitmq.com/relocate.html


2.

https://hub.docker.com/_/rabbitmq

python how to package

 1. 

A sample Python project

https://github.com/pypa/sampleproject


2. 

Python Modules: Creating, Importing, and Sharing

https://stackabuse.com/python-modules-creating-importing-and-sharing/



3.

Packaging Python Projects

https://packaging.python.org/tutorials/packaging-projects/


4. 

Python: Creating a pip installable package

https://betterscientificsoftware.github.io/python-for-hpc/tutorials/python-pypi-packaging/



5. ch

https://www.gushiciku.cn/pl/gOIm/zh-tw



2021年11月2日 星期二

rabbitmq client ssl and consumer threading

0. config

https://www.cnblogs.com/masy-lucifer/p/13551090.html

 

1. ssl

https://cjshelton.github.io/blog/2019/12/18/rabbitmq-client-certificate-authentication.html


2. RabbitSSL example github

https://github.com/Nepitwin/RabbitSSL


3. closeing event

https://www.rabbitmq.com/event-exchange.html


4. mq confirm

https://blog.rabbitmq.com/posts/2011/02/introducing-publisher-confirms


5. mq reconnect

https://stackoverflow.com/questions/37182956/how-to-restart-consumer-rabbitmq-pika-python


6.  with statemnt

https://blog.gtwang.org/programming/python-with-context-manager-tutorial/


https://zcgnotes.com/python-%E4%BD%BF%E7%94%A8context-manager%E7%AE%A1%E7%90%86%E8%B3%87%E6%BA%90/


https://medium.com/@dhanushgopinath/automatically-recovering-rabbitmq-connections-in-go-applications-7795a605ca59


7. yield

https://chriskang028.medium.com/python-%E8%A3%A1%E7%9A%84-yield-%E8%AE%93%E4%BD%A0%E7%B0%A1%E5%96%AE-%E5%BF%AB%E9%80%9F%E7%9E%AD%E8%A7%A3-yield-%E7%9A%84%E6%A6%82%E5%BF%B5-f660521f3aa7


8. mq thread

https://stackoverflow.com/questions/21881533/rabbitmq-non-blocking-consumer

2021年10月29日 星期五

rabbitmq ssl

https://www.rabbitmq.com/ssl.html


https://zamhuang.medium.com/rabbitmq-%E5%BF%AB%E9%80%9F%E4%BD%BF%E7%94%A8-tls-64c9e88bde6


https://stackoverflow.com/questions/27379736/where-is-rabbitmq-config-file


https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbit/docs/rabbitmq.conf.example


https://www.baeldung.com/openssl-self-signed-cert


https://support.ptc.com/help/thingworx/analytics/r9/en/index.html#page/analytics/analytics_install/ssl_support_for_rabbitmq.html


https://stackoverflow.com/questions/56122407/vulnerability-in-rabbitmq-disable-cleartext-authentication-mechanisms-in-the-a


https://liquidwarelabs.zendesk.com/hc/en-us/articles/360019562832-Disable-cleartext-authentication-option-in-RabbitMQ


【RabbitMQ】讓訊息更安全吧!啟用 TLS 把 amqps 用起來


https://www.rabbitmq.com/configure.html#config-file

-----------ca

https://blog.miniasp.com/post/2019/02/25/Creating-Self-signed-Certificate-using-OpenSSL


https://mistech.pixnet.net/blog/post/80751019-certificate-authority%28ca%29-%E6%86%91%E8%AD%89%E7%B0%A1%E4%BB%8B


https://blog.cssuen.tw/create-a-self-signed-certificate-using-openssl-240c7b0579d3

https://joe0609.wordpress.com/%E7%94%A2%E7%94%9Fself-signed-san-%E6%86%91%E8%AD%89/


 

2021年10月25日 星期一

flask hook , global object, get post data

 1. hook

https://www.twblogs.net/a/5b80b2572b71772165a8cb2c

https://stackoverflow.com/questions/30514749/what-is-the-g-object-in-this-flask-code

https://codertw.com/%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80/360556/


2. g ojbect

g is an object provided by Flask. It is a global namespace for holding any data you want during a single app context. For example, a before_request handler could set g.user, which will be accessible to the route and other functions.


https://flask.palletsprojects.com/en/2.0.x/appcontext/

https://stackoverflow.com/questions/30514749/what-is-the-g-object-in-this-flask-code


3. get post data

https://www.maxlist.xyz/2019/03/17/flask-get-post/

https://medium.com/seaniap/python-web-flask-get-post%E5%82%B3%E9%80%81%E8%B3%87%E6%96%99-2826aeeb0e28

2021年10月21日 星期四

python retry decorator

 https://stackoverflow.com/questions/8069057/try-except-inside-a-loop/15267410

2021年10月20日 星期三

flask command

 https://zhuanlan.zhihu.com/p/30280143


https://ithelp.ithome.com.tw/articles/10262877?sc=iThomeR


https://www.jianshu.com/p/dcb4cecb2af7


https://flask-script.readthedocs.io/en/latest/

python logger

 https://shian420.pixnet.net/blog/post/350291572-%5Bpython%5D-logging-%E5%B9%AB%E4%BD%A0%E7%B4%80%E9%8C%84%E4%BB%BB%E4%BD%95%E8%A8%8A%E6%81%AF


https://stackoverflow.com/questions/50714316/how-to-use-logging-getlogger-name-in-multiple-modules



https://vimsky.com/zh-tw/examples/detail/python-method-logging.Formatter.html


https://stackoverflow.com/questions/6386698/how-to-write-to-a-file-using-the-logging-python-module

2021年10月19日 星期二

redis get key / get value / delete value

 # basick, get keys

https://ithelp.ithome.com.tw/articles/10105731


# get keys and value

https://stackoverflow.com/questions/8078018/get-redis-keys-and-values-at-command-prompt


#delete key

https://stackoverflow.com/questions/6301399/empty-delete-a-set-in-redis


#redis get keys

https://chartio.com/resources/tutorials/how-to-get-all-keys-in-redis/

https://linuxhint.com/see-all-redis-keys/


# redis persitent data

https://ithelp.ithome.com.tw/articles/10277020

https://tachingchen.com/tw/blog/redis-data-persistence/

https://medium.com/fcamels-notes/redis-%E5%92%8C-redis-cluster-%E6%A6%82%E5%BF%B5%E7%AD%86%E8%A8%98-fdc19a3117f3

https://blog.csdn.net/qq_43178138/article/details/119144986



#api

-https://redis-py.readthedocs.io/en/stable/redismodules.html#redistimeseries-commands

https://redis-py.readthedocs.io/en/stable/commands.html#core-commands

https://redis-py.readthedocs.io/en/stable/


#command

https://redis.io/commands/select/

2021年10月18日 星期一

vim python + pylint - not work

 https://carl830.pixnet.net/blog/post/83010629


https://www.vim.org/scripts/script.php?script_id=891


https://github.com/vim/vim/blob/master/runtime/compiler/pylint.vim


https://gist.github.com/urfolomeus/1558958


2021年8月19日 星期四

Network resource

 ### MPLS and SR-TE

#多重協定標籤交換式網路相關研究背景

https://ir.nctu.edu.tw/bitstream/11536/75779/5/751105.pdf


#淺談 MPLS 技術與應用

https://www.dgbas.gov.tw/public/Data/821316592971.pdf


#SR-TE

https://www.segment-routing.net/tutorials/2017-03-06-segment-routing-traffic-engineering-srte/

https://www.juniper.net/us/en/research-topics/what-is-segment-routing.html



#SDN

https://www.uuu.com.tw/Public/content/article/18/20180625.htm


2021年8月4日 星期三

supervidord

 https://segmentfault.com/a/1190000018342123


https://hoohoo.top/blog/supervisor-instructions-for-use/


http://supervisord.org/introduction.html#supervisor-components

2021年7月20日 星期二

DB galary and restoredb

 https://mariadb.com/kb/en/insert/


https://linuxhint.com/mariadb-dump-tutorial/


https://galeracluster.com/library/kb/deadlock-found.html


https://stackoverflow.com/questions/54753214/what-is-the-fastest-way-to-delete-millions-of-rows-from-a-mysql-database

2021年5月28日 星期五

centos7 repo and yum

 1. centos 7 all repo

https://pkgs.org/


2. install by rpm  

http://glidingphenomena.blogspot.com/2020/02/how-to-fix-error-requires.html


3.  remove pid

[root@localhost yum.repos.d]# rm -rf /var/run/yum.pid


4. yum instruct

yum info 

rpm -ql 

5. extract package

[root@localhost ffplay_test]# rpm2cpio ffplay-2.8-4.el7.centos.x86_64.rpm | cpio -idmv

2021年5月18日 星期二

nginx rtmp

 

1. https://straas.io/blog/archives/2726/


2. https://straas.io/blog/archives/2742/


3.https://docs.nginx.com/nginx/admin-guide/monitoring/logging/


4. https://www.cloudflare.com/zh-tw/learning/video/what-is-http-live-streaming/


5.https://docs.nginx.com/nginx/admin-guide/dynamic-modules/rtmp/

2021年5月17日 星期一

wowza

 https://www.wowza.com/docs/set-up-wowza-streaming-engine-on-google-cloud-platform


https://it001.pixnet.net/blog/post/344824115-it%E5%B0%88%E9%A1%8C-wowza%E5%BD%B1%E9%9F%B3%E4%B8%B2%E6%B5%81%E8%BB%9F%E9%AB%94%E5%AE%89%E8%A3%9D


https://www.wowza.com/free-trial


http://sj82516-blog.logdown.com/posts/4441080/audio-visual-streaming-services-basic-introduction-and-use-of-wowza-services


https://www.wowza.com/products/streaming-engine/deployment-options/docker


https://www.wowza.com/docs/how-to-set-up-wowza-streaming-engine-using-docker


https://www.wowza.com/docs/how-to-set-up-wowza-streaming-engine-using-docker


2021年5月7日 星期五

Docker apache remote ip

 https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html


https://www.x4b.net/kb/RealIP-Apache


https://www.tecmint.com/check-apache-modules-enabled/

2021年5月4日 星期二

RealTime Vido (直播基礎)

 

1. 

https://help.aliyun.com/document_detail/49787.html


可从电脑摄像头或桌面、手机摄像头、视频采集设备和视频文件推流

  • 台式计算机或笔记本电脑:使用摄像头或者桌面。

    使用第三方软件采集摄像头视频或桌面图像,将视频或桌面推流至RTMP推流地址。第三方推流软件包括:OBS(推荐)、FMLE、XSplit 等。

  • Android/iOS手机:使用手机摄像头。

    使用第三方软件或SDK采集摄像头视频,并推送视频流至RTMP推流地址。

  • 视频采集设备。

    高清摄像机类设备如果具备HDMI或者SDI输出接口,可以接入编码器,以RTMP推流的方式向直播服务推送直播内容。您需要将直播推流地址配置到编码器的RTMP发布地址。

    网络摄像头类设备,如果支持RTMP推流,则可将直播推流地址配置到摄像头的RTMP发布地址。

  • 视频文件转视频流。

    读取某个视频文件,并以RTMP流方式输出作为视频源来向直播服务的RTMP推流地址进行视频发布。可以使用ffmpeg命令来实现。

    说明 Windows/Linux/Mac 均适用。

    例如,使用如下命令行:

      ffmpeg -re -i {your_video_file} -r 30 -s 1280x720 -f flv {your_rtmp_address}   




https://git-scm.com/book/zh-tw/v2/Git-%E5%9F%BA%E7%A4%8E-%E8%88%87%E9%81%A0%E7%AB%AF%E5%8D%94%E5%90%8C%E5%B7%A5%E4%BD%9C


2021年5月3日 星期一

HTML5 envent input

 

https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onfocus



2021年4月26日 星期一

Docker centos7 to run systemd

 1. 

# docker run -d -name centos7 --privileged=true centos:7 /usr/sbin/init

進入容器:

# docker exec -it centos7 /bin/bash



再說到systemd,這個套件已經成為主流Linux發行版(比如CentOS7、Ubuntu14+)默認的服務管理,取代了傳統的SystemV風格服務管理。systemd維護系統服務程序,它需要特權去會訪問Linux內核。而容器並不是一個完整的作業系統,只有一個文件系統,而且默認啟動只是普通用戶這樣的權限訪問Linux內核,也就是沒有特權,所以自然就用不了!

原文網址:https://kknews.cc/code/ybkvyyg.html



ref: https://kknews.cc/zh-tw/code/ybkvyyg.html

https://plutoacharon.github.io/2020/02/23/Docker%E5%AE%B9%E5%99%A8%E5%87%BA%E7%8E%B0%E4%BD%BF%E7%94%A8systemctl%E9%97%AE%E9%A2%98%EF%BC%9AFailed-to-get-D-Bus-connection-Operation-not-permitted/

2021年4月19日 星期一

SRS content

 

https://longrm.com/2019/10/29/2019-10-29-srs_ffmpeg_transcode_as_needed/


https://hackmd.io/@Eotones/stream/%2F%40Eotones%2FHk42GMAJV



https://straas.io/blog/archives/2726/


https://blog.csdn.net/vn9PLgZvnPs1522s82g/article/details/78780562


https://github.com/ossrs/srs

2021年3月11日 星期四

Linux inotify

 https://www.centos.bz/2018/01/centos-6-9%E4%B8%8Ainotify-tools-%E5%AE%89%E8%A3%85%E5%8F%8A%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/


https://centos.pkgs.org/7/epel-x86_64/inotify-tools-3.14-9.el7.x86_64.rpm.html


https://blog.arkey.fr/2019/09/13/watchservice-and-bind-mount/


https://www.linuxjournal.com/content/linux-filesystem-events-inotify


https://github.com/gmethvin/directory-watcher

2021年3月3日 星期三

git merge and branch

 https://ithelp.ithome.com.tw/articles/10211792


https://gitbook.tw/chapters/branch/fix-conflict.html



# git  tracking and branch

https://matthung0807.blogspot.com/2019/09/git-head-detached-at-remote-branch.html


# config

git config --global credential.helper cache


# ref

https://git-scm.com/book/zh-tw/v2/%E4%BD%BF%E7%94%A8-Git-%E5%88%86%E6%94%AF-%E9%81%A0%E7%AB%AF%E5%88%86%E6%94%AF


https://matthung0807.blogspot.com/2019/09/git-head-detached-at-remote-branch.html

2021年2月25日 星期四

java watcher folder

 

A good guide:

https://www.baeldung.com/java-nio2-watchservice

https://www.codota.com/code/java/methods/java.nio.file.WatchKey/pollEvents



Generic

http://puremonkey2010.blogspot.com/2010/12/gossip-in-java-generics.html

https://www.journaldev.com/1663/java-generics-example-method-class-interface