Last login: Wed Jul 10 14:23:45 2024 from 192.168.1.50
[root@web-server-01 ~]# ls -la
total 68
dr-xr-x---. 3 root root 213 Jul 10 14:20 .
dr-xr-xr-x. 18 root root 256 Jul 5 09:12 ..
-rw-------. 1 root root 1523 Jul 10 14:20 .bash_history
-rw-r--r--. 1 root root 18 Nov 24 2023 .bash_logout
-rw-r--r--. 1 root root 176 Nov 24 2023 .bash_profile
-rw-r--r--. 1 root root 276 Jul 8 10:15 .bashrc
drwxr-xr-x. 2 root root 42 Jul 5 09:30 scripts
-rw-r--r--. 1 root root 129 Jul 9 16:42 server-check.sh
[root@web-server-01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 40G 28G 12G 70% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 33M 1.8G 2% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
[root@web-server-01 ~]# free -h
total used free shared buff/cache available
Mem: 3.7Gi 1.2Gi 1.8Gi 24Mi 756Mi 2.2Gi
Swap: 2.0Gi 0B 2.0Gi
[root@web-server-01 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a1b2c3d4e5f6 nginx:latest "/docker-entrypoint.…" 2 weeks ago Up 2 weeks 0.0.0.0:80->80/tcp, 443/tcp web-nginx
f6e5d4c3b2a1 redis:7 "docker-entrypoint.s…" 3 weeks ago Up 3 weeks 6379/tcp web-redis
123456789abc node:18-alpine "docker-entrypoint.s…" 5 days ago Up 5 days 3000/tcp web-app
[root@web-server-01 ~]# systemctl status nginx
● nginx.service - nginx - high performance web server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2024-07-10 09:15:23 CST; 5h 10min ago
Docs: http://nginx.org/en/docs/
Process: 12345 ExecReload=/usr/sbin/nginx -s reload (code=exited, status=0/SUCCESS)
Main PID: 9876 (nginx)
CGroup: /system.slice/nginx.service
├─9876 nginx: master process /usr/sbin/nginx
└─9877 nginx: worker process
[root@web-server-01 ~]# ps -ef | grep java
root 19286 1 0 Jun23 ? 00:09:06 java -Xms128m -Xmx128m -Xmn64m -Xss1m -XX:+UseSerialGC -XX:MaxDirectMemorySize=64m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/project/chip-reading-img/dump.hprof -jar /opt/project/chip-reading-img/app.jar --server.port=10001
root 19345 1 0 Jun23 ? 00:08:32 java -Xms128m -Xmx128m -Xmn64m -Xss1m -XX:+UseSerialGC -XX:MaxDirectMemorySize=64m -jar /opt/project/chip-reading-img/app2.jar --server.port=10002
root 24563 1 0 Jun20 ? 00:23:15 java -Xms256m -Xmx512m -jar /opt/elasticsearch/lib/elasticsearch.jar
[root@web-server-01 ~]# docker ps -a --format "table {{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Image}}"
CONTAINER ID NAMES STATUS IMAGE
38f3cd9c5cf7 hbbs Up 27 hours rustdesk/rustdesk-server:latest
dd1661e0d652 hbbr Up 8 days rustdesk/rustdesk-server:latest
2464a26d587b es Up 11 days elasticsearch:7.6.2
f254034c3fda redis-stack Up 2 weeks redis/redis-stack:latest
e04ab4db4d5b mysql840 Up 11 days mysql:8.4.0
[root@web-server-01 ~]# docker stats mysql840 --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}"
NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
mysql840 0.21% 461MiB / 3.56GiB 12.65% 56.2MB / 55.5MB 2.63GB / 19.5MB 45
[root@web-server-01 ~]# docker inspect mysql840 --format "..."
镜像: mysql:8.4.0
启动时间: 2026-06-30T02:52:58.626119732Z
重启策略: always
端口映射: 3306/tcp -> :3306
数据卷: /opt/mysql840/data -> /var/lib/mysql (bind)
[root@web-server-01 ~]# systemctl status fail2ban --no-pager -l
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2026-06-23 14:11:17 CST; 2 weeks 4 days ago
Main PID: 21070 (fail2ban-server)
Tasks: 5
Memory: 11.3M
[root@web-server-01 ~]# fail2ban-client status sshd
Status for the jail: sshd
|- Filter
| |- Currently failed: 0
| |- Total failed: 246
| `- Journal matches: _SYSTEMD_UNIT=sshd.service + _COMM=sshd
`- Actions
|- Currently banned: 5
|- Total banned: 32
`- Banned IP list: 123.139.118.178 8.138.108.179 172.245.59.149 47.83.207.150 183.224.237.233
[root@web-server-01 ~]# journalctl -u sshd --since "2026-07-01" --no-pager | grep -i "failed\|invalid user" | tail -20
Jul 09 15:27:46 sshd: Invalid user admin2 from 39.104.64.139 port 59584
Jul 09 16:17:56 sshd: Failed password for invalid user admin from 47.84.49.122 port 38291
Jul 10 02:33:12 sshd: Invalid user test from 8.138.108.179 port 22910
Jul 10 08:45:33 sshd: Failed password for root from 172.245.59.149 port 40182
Jul 10 14:22:08 sshd: Invalid user oracle from 47.83.207.150 port 51003
Jul 11 01:15:44 sshd: Failed password for invalid user postgres from 183.224.237.233 port 33556
Jul 11 09:30:21 sshd: Invalid user admin from 123.139.118.178 port 48972
[root@web-server-01 ~]# free -h
total used free shared buff/cache available
Mem: 3.6Gi 2.1Gi 342Mi 45Mi 1.2Gi 1.1Gi
Swap: 2.0Gi 256Mi 1.8Gi
[root@web-server-01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 40G 28G 10G 74% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.8G 0 1.8G 0% /dev/shm
[root@web-server-01 ~]# top -bn1 | head -15
top - 15:43:51 up 23 days, 4:12, 1 user, load average: 0.08, 0.04, 0.05
Tasks: 128 total, 1 running, 127 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.3 us, 0.2 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3580.0 total, 342.0 free, 2156.0 used, 1082.0 buff/cache
MiB Swap: 2048.0 total, 1792.0 free, 256.0 used. 1120.0 avail Mem
[root@web-server-01 ~]# ss -tlnp
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* sshd
LISTEN 0 128 0.0.0.0:80 0.0.0.0:* nginx
LISTEN 0 128 0.0.0.0:443 0.0.0.0:* nginx
LISTEN 0 128 127.0.0.1:3306 0.0.0.0:* mysqld
LISTEN 0 128 0.0.0.0:6379 0.0.0.0:* redis-server
LISTEN 0 128 0.0.0.0:10001 0.0.0.0:* java
LISTEN 0 128 0.0.0.0:10002 0.0.0.0:* java
LISTEN 0 128 127.0.0.1:9200 0.0.0.0:* java
[root@web-server-01 ~]# cat /etc/ssh/sshd_config | grep -iE '(^PermitRootLogin|^PasswordAuthentication|^Port )'
Port 22
PermitRootLogin yes
PasswordAuthentication yes
[root@web-server-01 ~]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: ssh dhcpv6-client http https
ports: 3306/tcp 6379/tcp 10001/tcp 10002/tcp
protocols:
forward: no
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@web-server-01 ~]# lastb -a -i | head -15
admin2 ssh:notty 39.104.64.139 Mon Jul 11 09:30 - 09:30 (00:00)
root ssh:notty 8.138.108.179 Mon Jul 11 08:15 - 08:15 (00:00)
admin ssh:notty 47.84.49.122 Sun Jul 10 14:22 - 14:22 (00:00)
test ssh:notty 172.245.59.149 Sun Jul 10 02:33 - 02:33 (00:00)
oracle ssh:notty 47.83.207.150 Sat Jul 9 16:17 - 16:17 (00:00)
postgres ssh:notty 183.224.237.233 Sat Jul 9 15:27 - 15:27 (00:00)
mysql ssh:notty 123.139.118.178 Fri Jul 8 22:05 - 22:05 (00:00)
guest ssh:notty 39.104.64.139 Fri Jul 8 20:14 - 20:14 (00:00)
user ssh:notty 47.84.49.122 Fri Jul 8 18:33 - 18:33 (00:00)
[root@web-server-01 ~]# systemctl list-units --type=service --state=failed
0 loaded units listed.
[root@web-server-01 ~]# last -n 10
root pts/0 192.168.1.50 Mon Jul 11 15:43 still logged in
root pts/1 192.168.1.50 Mon Jul 11 14:22 - 14:55 (00:33)
root pts/0 192.168.1.100 Mon Jul 11 09:30 - 09:35 (00:05)
admin pts/2 10.0.0.20 Sun Jul 10 18:00 - 18:45 (00:45)
root pts/0 192.168.1.50 Sun Jul 10 14:00 - 17:30 (03:30)
[root@web-server-01 ~]# netstat -an | grep ESTABLISHED | wc -l
42
[root@web-server-01 ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
[root@web-server-01 ~]# uptime
15:43:51 up 23 days, 4:12, 1 user, load average: 0.08, 0.04, 0.05
[root@web-server-01 ~]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@web-server-01 ~]# redis-cli ping
PONG
[root@web-server-01 ~]# mysql -u root -p -e "SELECT VERSION();"
+-----------+
| VERSION() |
+-----------+
| 8.4.0 |
+-----------+
[root@web-server-01 ~]# tail -20 /var/log/nginx/error.log
2026/07/11 14:22:01 [error] 12345#0: *6789 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.50, server: api.example.com, request: "GET /api/users HTTP/1.1", upstream: "http://127.0.0.1:10001/api/users", host: "api.example.com"
2026/07/11 14:23:15 [error] 12345#0: *6790 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.50, server: api.example.com, request: "GET /api/health HTTP/1.1", upstream: "http://127.0.0.1:10001/api/health", host: "api.example.com"
2026/07/11 14:25:00 [warn] 12345#0: *6791 a client request body is buffered to a temporary file, client: 10.0.0.20, server: api.example.com, request: "POST /api/upload HTTP/1.1"
[root@web-server-01 ~]# docker logs mysql840 --tail 10
2026-07-11T07:43:51.625139Z 0 [System] [MY-013602] [InnoDB] Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2026-07-11T07:43:51.730152Z 0 [System] [MY-010910] [Server] InnoDB: Buffer pool(s) load completed at 250711 7:43:51
2026-07-11T07:43:51.835120Z 0 [System] [MY-013577] [Server] InnoDB: Initializing buffer pool, total size = 128 MB
2026-07-11T07:44:00.123456Z 0 [Note] [MY-010123] [Server] Event Scheduler: Loaded 0 events
2026-07-11T07:44:00.234567Z 0 [Note] [MY-010123] [Server] Event Scheduler: scheduler thread started with id 15
[root@web-server-01 ~]# curl -s -o /dev/null -w "%{http_code}" http://localhost:10001/api/health
200
[root@web-server-01 ~]# crontab -l
0 2 * * * /opt/backup/mysql_backup.sh
0 3 * * 0 /opt/backup/full_backup.sh
*/5 * * * * /opt/scripts/health_check.sh
0 6 * * * /opt/scripts/clean_logs.sh
30 1 * * * /opt/scripts/cert_renew.sh
[root@web-server-01 ~]#
AGENT
SFTP - 192.168.1.100
☰
↑
↓
↻
✕