2022年10月19日 星期三

ubuntu searial rj32

 https://it001.pixnet.net/blog/post/325021405-it%E4%BA%8B%E4%BB%B6%E7%B0%BF-%E6%80%8E%E9%BA%BC%E7%94%A8ubuntu%E9%80%A3%E6%8E%A5%E7%B6%B2%E8%B7%AF%E8%A8%AD%E5%82%99%E7%9A%84serial-conso

2022年9月1日 星期四

Harbor reference

 

1. https://www.gushiciku.cn/pl/ggGW/zh-tw



Rabbitmq cluster reference

 1. Firewall port: will open in 4369 and 25672

https://www.rabbitmq.com/clustering.html#node-names


  • 4369: epmd, a helper discovery daemon used by RabbitMQ nodes and CLI tools
  • 6000 through 6500: used by RabbitMQ Stream replication
  • 25672: used for inter-node and CLI tools communication (Erlang distribution server port) and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). Unless external connections on these ports are really necessary (e.g. the cluster uses federation or CLI tools are used on machines outside the subnet), these ports should not be publicly exposed. See networking guide for details.
  • 35672-35682: used by CLI tools (Erlang distribution client ports) for communication with nodes and is allocated from a dynamic range (computed as server distribution port + 10000 through server distribution port + 10010).

2.  what is the port 35672-35682
https://www.rabbitmq.com/configure.html

ABBITMQ_CTL_ERL_ARGS






3. other port
https://www.rabbitmq.com/troubleshooting-networking.html
  • Inter-node and CLI tool communication on port 25672
  • AMQP 0-9-1 (and 1.0, if enabled) listener for non-TLS connections, 5672
  • AMQP 0-9-1 (and 1.0, if enabled) listener for TLS-enabled connections, 5671
  • HTTP API listener on ports 15672 (HTTP only)

4. rabbitmq command line
https://www.rabbitmq.com/management-cli.html

Parameters for the erl command used when invoking rabbitmqctl. This could be set to specify a range of ports to use for Erlang distribution:
-kernel inet_dist_listen_min 35672
-kernel inet_dist_listen_max 35680

2022年8月31日 星期三

certificate use text with multi-domain

 https://www.ibm.com/docs/en/ztpf/1.1.0.15?topic=gssccr-configuration-file-generating-self-signed-certificates-certificate-requests


https://infra.engineer/windows/12-use-openssl-to-generate-a-multi-domain-ucc-certificate


https://serverfault.com/questions/694105/how-to-generate-a-multi-domain-and-or-wildcard-openssl-certificate


https://thesecmaster.com/how-to-generate-a-csr-for-multi-domain-ssl-certificates-using-openssl/


https://support.qacafe.com/knowledge-base/how-do-i-display-the-contents-of-a-ssl-certificate/

2022年8月23日 星期二

alpine nginx logrote with supervisord

ls -alh /var/lib/logrotate.status

   8 cat /var/lib/logrotate.status

   9 history

  10 logrotate -v /etc/logrotate.d/nginx

  11 history

  12 logrotate -vdf /etc/logrotate.conf

  13 ls -al /var/log/nginx/

  14 logrotate -vdf /etc/logrotate.conf


https://blog.toright.com/posts/4622/nginx-log-%E4%BB%A5%E6%97%A5%E6%9C%9F%E6%AD%B8%E6%AA%94.html

https://jiaming0708.github.io/2021/01/26/logrotate-nginx/

 


log does not need rotating (log has already been rotated)

###########################

# good at logrotate

###########################

https://www.baeldung.com/linux/rotating-logs-logrotate

https://www.onitroad.com/jc/linux/how-to-install-and-configure-log-roate-in-alpine-linux.html

https://weinan.io/2019/04/06/cron.html


##############

# crond

###############

https://asaba.sakuragawa.moe/2018/10/%E5%9C%A8-alpine-linux-%E5%AE%B9%E5%99%A8%E4%B8%AD%E4%BD%BF%E7%94%A8-crontab/

https://askubuntu.com/questions/907388/start-cron-service-with-supervisor


###############################

 supervisdrd

###################################

https://stackoverflow.com/questions/49090469/docker-alpine-linux-running-2-programs

https://www.huweihuang.com/article/linux/supervisor-usage/


1. Dockerfile is:

FROM alpine:latest
RUN apk update && apk add --no-cache supervisor openssh nginx
COPY supervisord.conf /etc/supervisord.conf
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

2. supervisord.conf is:


[supervisord]

nodaemon=true


[program:crond]

command=/usr/sbin/crond -f


[program:nginx]

command=nginx -g 'daemon off;'




##

var/www # crond --help

BusyBox v1.28.4 (2018-07-17 15:21:40 UTC) multi-call binary.


Usage: crond -fbS -l N -d N -L LOGFILE -c DIR


    -f  Foreground

    -b  Background (default)

    -S  Log to syslog (default)

    -l N    Set log level. Most verbose:0, default:8

    -d N    Set log level, log to stderr

    -L FILE Log to FILE

    -c DIR  Cron dir. Default:/var/spool/cron/cro



#######################

 for reference

#####################

https://stackoverflow.com/questions/43792897/supervisorctl-3-3-1-not-working-complaining-about-not-finding-conf-file

https://askubuntu.com/questions/911940/error-ini-file-does-not-include-supervisorctl-section


2022年8月17日 星期三

Open switch

 https://www.openvswitch.org/


https://www.dell.com/zh-tw/shop/productdetailstxn/networking-s-series-25-100gbe


install:

https://sites.google.com/a/cnsrl.cycu.edu.tw/da-shu-bi-ji/sdn/floodlight


https://github.com/YanHaoChen/Learning-SDN/blob/master/Switch/OpenvSwitch/Walkthrough/README.md


https://readthedocs.org/projects/python-ovs-vsctl/downloads/pdf/latest/


https://github.com/openvswitch/ovs

https://www.796t.com/content/1530269779.html

Book:

https://www.tenlong.com.tw/products/9787121413605?list_name=srh

https://www.tenlong.com.tw/products/9787121367861?list_name=sp

https://www.tenlong.com.tw/products/9787121310423?list_name=srh

2022年8月10日 星期三

Linux ssh key script

 #https://blog.gtwang.org/linux/linux-ssh-public-key-authentication/

cd ~

mkdir -p .ssh

chmod 700 ~/.ssh

ssh-keygen

ssh-copy-id andychung@TPDT-AMR-01045