技术交流QQ群:①185473046   ②190706903   ③203744115   网站地图
登录

下次自动登录
现在位置 >首页 > 环境部署
0℃
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℃
准备篇 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...
阅读全文
0℃
2023年06月09日 Redis ⁄ 被围观 1,951次+
操作系统: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...
阅读全文
0℃
2023年05月25日 openGauss ⁄ 被围观 3,041次+
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/...
阅读全文
0℃
2022年12月27日 openGauss ⁄ 被围观 3,179次+
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作为防火墙...
阅读全文
0℃
2022年09月02日 MySQL ⁄ 被围观 3,086次+
操作系统: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进行升级前...
阅读全文
0℃
2022年08月04日 Redis ⁄ 被围观 3,123次+
准备篇 一、防火墙配置 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...
阅读全文
0℃
2022年08月04日 Redis ⁄ 被围观 2,625次+
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 #删除日...
阅读全文
0℃
2022年08月03日 Nginx ⁄ 被围观 2,996次+
操作系统: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...
阅读全文
0℃
2022年07月26日 Redis ⁄ 被围观 2,281次+
准备篇 一、防火墙配置 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...
阅读全文
0℃
2022年07月25日 Redis ⁄ 被围观 2,615次+
准备篇 一、防火墙配置 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...
阅读全文
0℃
2022年06月28日 PostgreSQL ⁄ 被围观 6,343次+
说明: 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...
阅读全文
0℃
2022年06月26日 PostgreSQL ⁄ 被围观 3,156次+
操作系统: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...
阅读全文
0℃
2022年06月08日 OpenResty ⁄ 被围观 3,956次+
OpenResty® 是一款基于 NGINX 和 LuaJIT 的 Web 平台。 官方网站:https://openresty.org/cn/ 准备篇 一、防火墙配置 CentOS 8.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 #编辑防火墙配置文件 ...
阅读全文
0℃
2022年06月04日 PostgreSQL ⁄ 被围观 2,992次+
PostgreSQL是一个功能非常强大的、源代码开放的关系型数据库,PostgreSQL被业界誉为“最先进的开源数据库”,主要面向企业复杂查询SQL的OLTP业务场景, 支持NoSQL数据类型(hstore/JSON/XML) 一、防火墙配置 CentOS 7.x 8.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防...
阅读全文
0℃
2021年11月09日 MySQL ⁄ 被围观 3,829次+
准备篇 一、防火墙配置 #防火墙请根据个人需求进行选择和设置,下面以iptables防火墙为例 CentOS 8.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...
阅读全文
0℃
2021年10月28日 NFS ⁄ 被围观 4,829次+
一、防火墙配置 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-config-f...
阅读全文


Copyright© 2011-2024 系统运维 All rights reserved
版权声明:本站所有文章均为作者原创内容,如需转载,请注明出处及原文链接
陕ICP备11001040号-3