Centos7使用systemd管理nginx进程

vi /lib/systemd/system/nginx.service[Unit]Description=nginxAfter=network.target[Service]Type=forkingExecStart=/opt/nginx/sbin/nginxExecReload=/opt/ngi
Nginx Centos 2023年07月06日 90次浏览

RedHat7配置本地源

1. 上传iso到系统/tmprhel-server-7.9-x86_64-dvd.iso2. 挂载镜像mkdir /mnt/cdrommount -t iso9660 -o loop /tmp/rhel-server-7.9-x86_64-dvd.iso /mnt/cdrom3. 配置源cd /e
Centos 2023年07月03日 98次浏览

Cenots7使用rpm包安装redis

安装包jemalloc-3.6.0-1.el7.x86_64.rpmredis-3.2.12-2.el7.x86_64.rpm或者redis-5.0.14-1.el7.remi.x86_64.rpm安装yum localinstall -y jemalloc-3.6.0-1.el7.x86_64.r
Redis 2023年06月30日 169次浏览

使用mysqlbinlog命令恢复数据

恢复方案1. 全部恢复新机器将mysql数据目录中的binlog复制到新机器执行/usr/bin/mysqlbinlog bin-log.xxx | /usr/bin/mysql2. 固定备份+binlog时间段恢复mysqldump导出的备份数据,恢复到数据库备份始点以后使用binlog恢复/us
MySQL 2023年06月30日 99次浏览

ProxySQL+Replication-manager搭建MySQL高可用集群(失败)

一、说明二、集群规划三、部署步骤
2023年06月14日 116次浏览

nginx禁止使用ip访问

IP+端口访问:直接返回404,只允许使用域名访问,防止被端口扫描后恶意访问#user nobody;worker_processes 3;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs
Nginx 2023年05月29日 178次浏览

Linux图形化管理:cockpit

说明官网:https://cockpit-project.org/安装
2023年05月29日 115次浏览

hutools实现定时缓存

hutools几个类型的缓存CacheUtil类是一个可以创建各种类型缓存的工厂类,默认提供了下面6种缓存的创建:1. FIFOCache: 先进先出缓存• 元素不停的加入缓存直到缓存满为止,当缓存满时,清理过期缓存对象,清理后依旧满则删除先入的缓存(链表首部对象)• 优点:简单快速• 缺点:不灵活
2023年05月29日 109次浏览

Centos用ssh登录连接慢

vi /etc/ssh/sshd_configsystemctl restart sshd
2023年05月23日 152次浏览

Redisson实现Redis分布式锁

说明使用依赖重入锁
2023年05月22日 135次浏览