Tác giả: khoinv.kpwzto
-
set limit request nginx req zone
config ở /etc/nginx/nginx.conf trong http{} limit_req_zone $binary_remote_addr zone=ip:50m rate=30r/s; In location của từng config: limit_req zone=ip burst=30 delay=10; bài viết: https://vietnix.vn/huong-dan-cau-hinh-nginx-rate-limit/
-
set too open many files nginx
worker_rlimit_nofile 100000; events { worker_connections 5000; # multi_accept on; }
-
max connect php fpm
This happens because the operating system rejects nginx’s attempts to connect to a unix socket. The reason is either the maximum number of socket connections or the maximum number of unhandled socket connections has been exceeded. Checking the limits: sysctl net.core We are interested in the lines: net.core.somaxconn = 128 net.core.netdev_max_backlog = 200 Because of…
-
Too many open files
What Is the Too Many Open Files Error? Amongst its other gazillion jobs, the kernel of a Linux computer is always busy watching who’s using how many of the finite system resources, such as RAM and CPU cycles. A multi-user system requires constant attention to make sure people and processes aren’t using more of any given system resource than is appropriate. It’s…
-
php-fpm
Với CentOS 7 – 8 Lệnh restart PHP-FPM trên CentOS 7 – 8 Sử dụng lệnh sau để restart PHP-FPM: $ sudo systemctl restart php-fpm Bạn cũng cần nắm những lệnh sau để sử dụng trong quá trình làm việc với PHP-FPM trên CentOS 7 & 8: Lệnh start PHP-FPM: $ sudo systemctl start php-fpm…
-
centos ERROR CONNECTION nginx add firewall
sudo firewall-cmd –permanent –zone=public –add-service=http sudo firewall-cmd –permanent –zone=public –add-service=https sudo firewall-cmd –reload
-
create user linux
adduser username passwd username visudo add this: (Có thể tạo 1 nhóm cho group sudo) %admin ALL=(ALL) ALL %sudo ALL=(ALL:ALL) ALL Rồi add user vào nhóm đó: groupadd sudo usermod -a -G sudo username username ALL=(ALL) ALL su – username ssh-keygen touch ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys chmod 700 ~/.ssh delete user: userdel -r username
-
command server
Supervisor sudo systemctl start supervisor supervisorctl Mysql /etc/mysql/conf.d/mysql.cnf /etc/init.d/mysql restart