0℃
2025年03月05日
⁄ Nginx
⁄ 被围观 350次+
需求:把Windows版本的nginx添加为系统服务,并且设置为开机自启动
操作步骤:
1、下载Windows Service Wrapper工具
Winsw (Windows Service Wrapper) 可以将任何可执行文件配置成为能够在Windows系统后台自动启动、停止、重启的服务。
Winsw的工作原理是读取一个XML配置文件(通常命名为winsw.xml),在这个配置文件中定义了服务的名称、可执行文件路径、启动参数、服务描述、日志配置等信息。
通过运行Winsw提供的exe文件(如winsw.exe),根据XML配置来管理对应的应用程序作为服务。
官方网站:https://github...
nginx, Windows阅读全文
0℃
2025年03月05日
⁄ IIS
⁄ 被围观 397次+
遇到的问题:Windows-Server服务器安装.net报错,无法正常安装
解决办法:使用cab文件安装
下载地址:
网盘链接: https://pan.baidu.com/s/1OxfwMzeG0M1Effw6-xNXQw?pwd=qsv5
提取码: qsv5
操作步骤:
1. 复制microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab 文件到C盘根目录
2. 以管理员身份运行命令提示符
3. 输入dism /online /add-package /packagepath:C:\microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab 回车,直到操作成功完成,.net freamwork 3.5...
iis, Windows阅读全文
0℃
2025年03月05日
⁄ IIS
⁄ 被围观 435次+
Hyper-V简介:是Windows自带的虚拟机平台,功能类似VMware Workstation Pro和VirtualBox
1、安装Hyper-V角色
打开服务器管理器-添加角色和功能
勾选Hyper-V
添加功能
下一页
点关闭-重启系统
系统重启中
Hyper-V角色已经安装完成
2、设置Hyper-V
打开服务器管理器-工具-Hyper-V管理器
创建两个虚拟交换机
1、外部虚拟交换机,类似VMware的桥接模式,虚拟机和宿主机在同一网段
2、内部虚拟交换机,类似VMware的NAT模式,虚拟机通过宿主机的网络接口访问网络
选择宿主机网卡-属性-共享-In...
Hyper-V, iis, Windows Server阅读全文
0℃
2024年04月16日
⁄ 数据库
⁄ 被围观 3,120次+
H2是Thomas Mueller提供的一个开源的、纯java实现的关系数据库。
官方网站:https://www.h2database.com/
下载地址:https://www.h2database.com/html/download.html
https://github.com/h2database/h2database/releases/download/version-2.2.224/h2-2023-09-17.zip
上传安装包到/data/soft目录
H2 数据库服务器默认监听 9092 端口用于 TCP 连接,8082 端口用于 Web 连接,可以自定义修改
H2 数据库依赖java,需要先安装java环境
1、安装
unzip /data/soft/h2-2023-09-17.zip -d /data/server/ #解压
mkdir -p /...
h2, 数据库阅读全文
0℃
2023年12月06日
⁄ PostgreSQL
⁄ 被围观 3,499次+
1、在数据量小(1-2GB大小)的情况下可以直接使用pg_dump导出数据,psql导入数据,如下:
#导出数据
nohup /data/server/pgsql/bin/pg_dump -h 127.0.0.1 -U dbuser -p 5432 database --column-inserts | gzip > /tmp/database_back.sql.gz &
#导入数据
nohup gunzip -c /tmp/database_back.sql.gz | psql -h 127.0.0.1 -U dbuser -d database &
如果数据量比较大(10GB以上),导出数据至少需要2个小时以上,导入数据需要15个小时以上。
2、使用多线程并行导出导入数据
#多线程导出数据 -j 16 16可以...
阅读全文
0℃
2023年09月27日
⁄ Nginx
⁄ 被围观 4,548次+
准备篇
CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
systemctl mask firewalld
systemctl stop firewalld
yum remove firewalld
2、安装iptables防火墙
RTMP基于TCP, 默认使用端口1935,再开放81端口
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
# sample configuration for iptables service
# you can edit...
nginx阅读全文
0℃
2023年06月09日
⁄ Redis
⁄ 被围观 4,567次+
操作系统:CentOS-7.x
Redis版本:5.0.14
服务器ip:192.168.21.100、192.168.21.101、192.168.21.128
部署说明:使用3台服务器,每台服务器启动2个redis服务,总共6个节点,3主3从组成redis集群
IP地址 端口 角色
192.168.21.100 6379 redis-master
192.168.21.100 6380 redis-slave
192.168.21.101 6379 redis-master
192.168.21.101 6380 redis-slave
192.168.21.128 6379 redis-master
19...
redis阅读全文
0℃
2023年05月25日
⁄ openGauss
⁄ 被围观 6,745次+
openGauss是由华为开源的一款关系型数据库,基于PostgreSQL数据库开发。
操作系统:openEuler 22.03 LTS SP1
官方网站:https://opengauss.org/zh/
下载地址:https://opengauss.org/zh/download/
注意:需要登录才能下载,要选择好操作系统和数据库对应的版本,这里我们选择openEuler 22.03对应的openGauss_5.0.0 企业版openGauss-5.0.0-openEuler-64bit-all.tar
操作系统安装:
openEuler 22.03 LTS SP1安装配置图解教程
https://www.osyunwei.com/archives/13673.html
准备篇
1、关闭SELINUX
vi /etc/selinux/...
openEuler, openGauss阅读全文
0℃
2022年12月27日
⁄ openGauss
⁄ 被围观 5,366次+
openGauss是由华为开源的一款关系型数据库,基于PostgreSQL数据库开发。
操作系统:CentOS 7.x
官方网站:https://opengauss.org/zh/
下载地址:https://opengauss.obs.cn-south-1.myhuaweicloud.com/3.1.0/x86/openGauss-3.1.0-CentOS-64bit-all.tar.gz
安装前系统设置
1、关闭SELINUX
vi /etc/selinux/config
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
:wq! #保存退出
setenforce 0 #使配置立即生效
2、开启防火墙5432端口
CentOS 7.x默认使用的是firewall作为防火墙...
openGauss阅读全文
0℃
2022年09月02日
⁄ MySQL
⁄ 被围观 5,154次+
操作系统:CentOS 7.x
MySQL二进制版本:5.7.x 小版本升级
现有版本:MySQL 5.7.38
升级后版本:MySQL 5.7.39
下载地址:https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.39-linux-glibc2.12-x86_64.tar.gz
上传mysql-5.7.39-linux-glibc2.12-x86_64.tar.gz到/usr/local/src
升级前先查看MySQL 5.7.x 中添加、弃用或删除的变量和选项
https://dev.mysql.com/doc/refman/5.7/en/added-deprecated-removed.html
############################################
MySQL 8.0.x版本可以使用mysql-shell进行升级前...
linux, mysql阅读全文
0℃
2022年08月04日
⁄ Redis
⁄ 被围观 5,105次+
准备篇
一、防火墙配置
CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
systemctl mask firewalld
systemctl stop firewalld
yum remove firewalld
2、安装iptables防火墙
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
# sample configuration for iptables service
# you can edit this manually or use system-c...
linux, redis阅读全文
0℃
2022年08月04日
⁄ Redis
⁄ 被围观 4,733次+
Redis安装目录:/usr/local/redis-5.0.14/
#创建日志切割脚本
vi /usr/local/redis-5.0.14/cut-redis-log.sh
#!/bin/bash
#获取昨天的日期
file_date=$(date -d"1 day ago" +"%Y%m%d")
#redis日志文件
log_path_redis=/usr/local/redis-5.0.14/log/redis.log
#日志切割后的存放目录
back_base=/usr/local/redis-5.0.14/log/
#设置删除多少天之前的日志文件
days=180
#切割日志
#redis的日志文件可以直接mv,不需要重新加载服务就能生成新的日志文件
mv $log_path_redis $back_base/redis_$file_date.log
#删除日...
linux, redis阅读全文
0℃
2022年08月03日
⁄ Nginx
⁄ 被围观 5,159次+
操作系统:CentOS 7.x
准备篇
一、防火墙配置
CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
systemctl mask firewalld
systemctl stop firewalld
yum remove firewalld
2、安装iptables防火墙
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
# sample configuration for iptables service
# you can edit this man...
CentOS, linux, nginx阅读全文
0℃
2022年07月26日
⁄ Redis
⁄ 被围观 4,249次+
准备篇
一、防火墙配置
CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
systemctl mask firewalld
systemctl stop firewalld
yum remove firewalld
2、安装iptables防火墙
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
# sample configuration for iptables service
# you can edit this manually or use system-c...
redis阅读全文
0℃
2022年07月25日
⁄ Redis
⁄ 被围观 4,682次+
准备篇
一、防火墙配置
CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
systemctl mask firewalld
systemctl stop firewalld
yum remove firewalld
2、安装iptables防火墙
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
# sample configuration for iptables service
# you can edit this manually or use system-c...
redis阅读全文
0℃
2022年06月28日
⁄ PostgreSQL
⁄ 被围观 9,600次+
说明:
1、PostgreSQL 使用 pg_dump 和 pg_dumpall 进行数据库的逻辑备份,使用 psql 和 pg_restore 导入数据;
2、pg_dump 可以选择一个数据库或者部分表进行备份,pg_dumpall是对整个数据库集群进行备份;
3、psql恢复SQL文本格式的数据备份,pg_restore恢复自定义格式的数据备份。
数据库用户:dbuser
数据库:testdb
数据表:new_test,tb_test,testdb
数据库安装路径:/usr/local/pgsql/bin/
mkdir -p /data/backup #创建备份文件存放目录
chown postgres.postgres -R /data/backup
su - postgres
一、Post...
PostgreSQL阅读全文
0℃
2022年06月26日
⁄ PostgreSQL
⁄ 被围观 5,690次+
操作系统:CentOS-7.6
主节点:192.168.21.100
从节点:192.168.21.101
PostgreSQL版本:postgresql-11.13.tar.gz
下载地址:https://ftp.postgresql.org/pub/source/v11.13/postgresql-11.13.tar.gz
PostgreSQL数据库的主从同步是一种高可用解决方案,可以实现读写分离。
一、基础配置
在主从服务器上都进行操作
1、防火墙配置
CentOS 7.x 8.x 默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1.1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.serv...
PostgreSQL, 主从同步阅读全文