Tech

Giao dịch tiền điện tử với hummingbot

1. Tạo thư mục chứa dữ liệu bot mkdir hummingbot 2. Phân chia thư mục dữ liệu của bot cho file logs, file config và file database mkdir hummingbot/conf mkdir hummingbot/logs mkdir hummingbot/data mkdir hummingbot/scripts 3. Phân quyền thư mục Để tránh lỗi [Errno 13] Permission denied: 'conf/encrypted_default.json' thì cần phải phân quyền thư mục sudo chown -R $USER ~/hummingbot chmod -R 777 ./hummingbot 3. Tạo và chạy hummingbot docker create -it \ --name hummingbot-instance \ --network host \ --mount "type=bind,source=$(pwd)/hummingbot/conf,destination=/conf/" \ --mount "type=bind,source=$(pwd)/hummingbot/logs,destination=/logs/" \ --mount "type=bind,source=$(pwd)/hummingbot/data,destination=/data/" \ --mount "type=bind,source=$(pwd)/hummingbot/scripts,destination=/scripts/" \ coinalpha/hummingbot:latest docker start hummingbot-instance && docker attach hummingbot-instance Giới hạn tài sản có thể được sử dụng Trường hợp bạn muốn bot chỉ có thể thực thi trong 100USD có thể xem xét tính năng này.

Cài đặt LEMP để chạy Wordpress sử dụng Docker

1. NGINX version: '3' services: nginx: image: nginx:latest container_name: nginx ports: - '80:80' - '443:443' volumes: - './app:/var/www/html' - './config/nginx:/etc/nginx/conf.d' 2. MySQL (MariaDB) version: '3' services: nginx: image: nginx:latest container_name: nginx ports: - '80:80' - '443:443' volumes: - './app:/var/www/html' - './config/nginx:/etc/nginx/conf.d' mariadb: image: mariadb:10.3.9 container_name: mariadb restart: 'on-failure' environment: MYSQL_ROOT_PASSWORD: lab-skywirex volumes: - ${PWD} Luc nay co the truy cap vao container mariadb de thuc thi cau lenh SQL

Kích hoạt Repo testing và unstable trong Debian

https://www.binarytides.com/enable-testing-repo-debian/ Cài đặt và sử dụng backports https://wiki.debian.org/AptPreferences https://wiki.debian.org/DebianTesting https://www.debian.org/security/ VPN https://xalitech.com/wireguard-vpn-server-on-aws-lightsail/ https://golb.hplar.ch/2018/10/wireguard-on-amazon-lightsail.html

Chạy Alpine Linux trên Oracle Cloud

https://www.alextsang.net/articles/20191006-063049/index.html https://www.cyberciti.biz/faq/how-to-change-root-password-on-alpine-linux/ Cài đặt Open SSH https://wiki.alpinelinux.org/wiki/Setting_up_a_ssh-server vi /etc/ssh/sshd_config PermitRootLogin yes PasswordAuthentication no /etc/init.d/sshd restart Đọc thêm https://docs.genesys.com/Documentation/System/latest/DDG/InstallationofDockeronAlpineLinux https://gist.github.com/bakkujp/cdef0091f25b2a537307ab410809ea81 https://wiki.alpinelinux.org/wiki/Docker

Ghi chep Alpine Linux

https://danbruder.com/blog/what-is-the-alpine-equivalent-to-build-essential/ https://github.com/gliderlabs/docker-alpine/issues/24 RUN apk update && apk add –virtual build-dependencies build-base gcc wget git Dạo chơi với Alpine Linux Tại sao https://wiki.alpinelinux.org/wiki/Main_Page https://project.altservice.com/issues/930 Sau khi cai xong ban khong the login SSH voi tai khoan root vi alpine mac dinh ko cho login bang root apk add nano PermitRootLogin yes https://www.cyberciti.biz/faq/10-alpine-linux-apk-command-examples/ SAMBA SETUP http://www.allaboutlinux.eu/how-to-install-samba-server-on-ubuntu/2/ More info https://websiteforstudents.com/samba-setup-on-ubuntu-16-04-17-10-18-04-with-windows-systems/ https://wiki.alpinelinux.org/wiki/Setting_up_a_samba-server http://thonghoang.com/linux/dich-vu-file-tren-linux-nfs-va-samba-server.html https://superuser.com/questions/1324971/access-samba-share-running-in-virtualbox-with-alpine-linux-guest-from-windows-10?rq=1

Ghi chép kubernetes

https://www.thebigdatablog.com/kubernetes-and-docker-running-at-an-orangepi/ https://blog.alexellis.io/test-drive-k3s-on-raspberry-pi/ https://github.com/rancher/k3s/issues/1395 MASTER NODE Đổi tên hostname echo "masterpi" > /etc/hostname sudo nano /etc/hosts Cài đặt curl -sfL https://get.k3s.io | sh - sudo systemctl status k3s sudo cat /var/lib/rancher/k3s/server/node-token K104a57a00c6ca0b2d1e558a79e6ae4c3d151474eccfc08677f501426f6ede66ef3::server:1c7e84a0f9f90def290c62d503038dba NODE export K3S_URL="https://:<MASTERPI-IP>:6443" export K3S_TOKEN="K104a57a00c6ca0b2d1e558a79e6ae4c3d151474eccfc08677f501426f6ede66ef3::server:1c7e84a0f9f90def290c62d503038dba" ```` ```` curl -sfL https://get.k3s.io | sh - ```` Join node sudo k3s agent –server ${K3S_URL} –token ${K3S_TOKEN} DELETE NOT READY NODE Cordon the node Drain the node Delete the node Reset the node ( run kubeadm reset command if it is joined using kubeadm) Join the node again as a fresh node Sự cố Build với không điểm yếu nên nếu có sự cố xảy ra cũng cho phép khắc phục nhanh LINK.