Appearance
常用运维命令
启动/重启服务
数据库
bash
systemctl restart postgresql-13.service
缓存存储
bash
systemctl restart redis.service
文件存储
bash
systemctl restart minio.service
消息队列
bash
systemctl restart rabbitmq-server.service
文件预览
bash
systemctl restart supervisord.service
搜索引擎
bash
systemctl restart elasticsearch.service
Nginx
bash
systemctl restart nginx.service
织信服务
新版本安装器,由于account/biz安装了服务,可以直接通过服务进行管理:
bash
systemctl restart informat-account
systemctl restart informat-biz
旧版本安装器:
bash
cd {informat-next}
ls instance
ps -ef|grep {instanceName}
./informat restart informat-account
./informat restart informat-biz
TIP
{informat-next}: 织信Next目录
{instanceName}: ls instance返回的节点名称
检查服务状态
数据库
bash
systemctl status postgresql-13.service
缓存存储
bash
systemctl status redis.service
文件存储
bash
systemctl status minio.service
消息队列
bash
systemctl status rabbitmq-server.service
文件预览
bash
systemctl status supervisord.service
搜索引擎
bash
systemctl status elasticsearch.service
Nginx
bash
systemctl status nginx.service
织信服务
新版本安装器,由于account/biz安装了服务,可以直接通过服务进行管理:
bash
systemctl status informat-account
systemctl status informat-biz
旧版本安装器:
bash
ps -ef|grep informat-*
备份
数据库备份
以下是一个数据库服务器在本机,数据库用户为postgres
的数据库备份的参考脚本
bash
#!/bin/bash
current=`date "+%Y%m%d%H%M%S"`
# 保存的文件路径
bake=backup_db/$current
# 数据库密码
PGPASSWORD=xxxxx
mkdir -p $bake
echo '备份Account数据库...'
pg_dump -h 127.0.0.1 -O -p 5432 -U postgres -d db_informat2_account_prd > $bake/db_informat2_account_prd.sql
echo '备份Biz数据库...'
pg_dump -h 127.0.0.1 -O -p 5432 -U postgres -d db_informat2_biz_prd_0 > $bake/db_informat2_biz_prd_0.sql