weblogic命令行操作

启动和停止子节点:

[root@oud bin]# cd /sotware/oracle_ldap/Middleware/user_projects/domains/base_domain/bin/
[root@oud bin]# ./startManagedWebLogic.sh Server-0 http://192.168.63.129:7001 -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic123 -Dweblogic.system.StoreBootIdentity=true
.
.
JAVA Memory arguments: -Xms256m -Xmx512m  -XX:MaxPermSize=512m
.
WLS Start Mode=Production
.
CLASSPATH=/sotware/oracle_ldap/Middleware/oracle_common/modules/oracle.jdbc_11.1.1/ojdbc6dms.jar:/sotware/oracle_ldap/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/sotware/oracle_ldap/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/java/jdk1.7.0_76/lib/tools.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/weblogic.jar:/sotware/oracle_ldap/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/webservices.jar:/sotware/oracle_ldap/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/sotware/oracle_ldap/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/sotware/oracle_ldap/Middleware/oracle_common/modules/oracle.jrf_11.1.1/jrf.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/xqrl.jar:.:/usr/java/jdk1.7.0_76/lib/dt.jar:/usr/java/jdk1.7.0_76/lib/tools.jar
.
PATH=/sotware/oracle_ldap/Middleware/wlserver_10.3/server/bin:/sotware/oracle_ldap/Middleware/modules/org.apache.ant_1.7.1/bin:/usr/java/jdk1.7.0_76/jre/bin:/usr/java/jdk1.7.0_76/bin:/usr/lib64/qt-3.3/bin:/root/perl5/bin:/usr/local/sbin:/usr/java/jdk1.7.0_76/bin:/usr/bin:/bin:/usr/sbin:/sbin:[root@oud bin]# ./stopManagedWebLogic.sh Server-0  t3://192.168.63.129:7001
Stopping Weblogic Server...Initializing WebLogic Scripting Tool (WLST) ...Welcome to WebLogic Server Administration Scripting ShellType help() for help on available commandsConnecting to t3://192.168.63.129:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.Warning: An insecure protocol was used to connect to the 
server. To ensure on-the-wire security, the SSL port or 
Admin port should be used instead.Shutting down the server Server-0 with force=false while connected to AdminServer ...Exiting WebLogic Scripting Tool.Done
Stopping Derby Server...

第一次时会在节点下的security里会生成个boot.properties文件,会保存账户密码,可以通过下面命令找到这个文件

- Dweblogic.system.BootIdentityFile=/weblogic/user_projects/domains/test_domain/servers/AdminServer/security/boot.properties  

weblogic.Deployer命令
基于weblogic.Deployer可以进行应用部署相关操作。

java [ SSL参数 ] weblogic.Deployer [ 连接参数 ] [ 用户凭据参数 ] COMMAND-NAME  命令选项  [ Common Arguments ]

SSL参数
java [-Dweblogic.security.TrustKeyStore = DemoTrust] 
     [-Dweblogic.security.JavaStandardTrustKeyStorePassPhrase = password] 
     [-Dweblogic.security.CustomTrustKeyStoreFileName = filename 
       -Dweblogic.security.TrustKeystoreType = jks 
       [-Dweblogic.security.CustomTrustKeyStorePassPhrase = password] 
     ] 
     [ -Dweblogic.security.SSL.hostnameVerifier = classname] 
     [-Dweblogic.security.SSL.ignoreHostnameVerification = true] 
weblogic.Deployer 
     [ 用户凭据参数 ] 
      COMMAND-NAME  命令参数 
 

-Dweblogic.security.TrustKeyStore = DemoTrust

导致weblogic.Deployer证明信任密钥库(WL_HOME\server\lib\DemoTrust.jks)中的CA证书信任。

如果要连接的服务器实例正在使用演示身份和证书,则此参数是必需的。

默认情况下,weblogic.Deployer仅信任Java标准信任密钥库(SDK_HOME\jre\lib\security\cacerts)中的CA证书。
 

-Dweblogic.security.JavaStandardTrustKeyStorePassPhrase = 密码

用于保护Java Standard Trust密钥库的密码。

如果Java Standard Trust密钥库受密码保护,并且如果要信任其CA证书,则必须使用此参数。

默认情况下,Java Standard Trust密钥库不受密码保护。

-Dweblogic.security.CustomTrustKeyStoreFileName = filename  
-Dweblogic.security.TrustKeystoreType = jks
导致weblogic.Deployer在位于文件名的自定义密钥库中信任CA证书。您必须使用这两个参数来信任自定义密钥库。该文件名完全匹配,必须ServerMBean.CustomTrustKeyStoreFileName在坚持价值config.xml; 如果属性中指定的值CustomTrustKeyStoreFileName是相对路径名,则还必须在此参数中指定相同的相对路径名
-Dweblogic.security.CustomTrustKeyStorePassPhrase = 密码

用于保护自定义密钥库的密码。

只有在自定义密钥库受密码保护的情况下,才必须使用此参数

-Dweblogic.security.SSL.hostnameVerifier = classname
自定义主机名验证者类的名称。该类必须实现该weblogic.security.SSL.HostnameVerifier接口。
-Dweblogic.security.SSL.ignoreHostnameVerification =真
禁用主机名验证。

连接参数

java [ SSL参数 ] weblogic.Deployer 
     [-adminurl protocol:// listen_address:port_number ] 
     [ 用户凭据参数 ] COMMAND-NAME  命令选项 [ Common Arguments ]
大多数weblogic.Deployer命令要求您指定-adminurl中所描述的参数连接到管理服务器实例

-adminurl [ protocol://] Admin-Server-listen-address:listen-port 

监听管理服务器的地址和监听端口。

要使用不受SSL保护的端口,格式为-adminurl [protocol]Admin-Server-listen-address:port其中t3,http,iiop,和iiops有效的协议。

为了使用具有HTTP协议的管理员,必须在WebLogic Server管理控制台中启用HTTP隧道选项。有关详细信息,请参阅在Oracle WebLogic Server的管理服务器环境中设置WebLogic Server进行HTTP隧道。有关启用在WebLogic Server管理控制台HTTP隧道的说明,请参阅配置HTTP协议中的Oracle WebLogic Server管理控制台联机帮助。

要使用由SSL保护的端口,格式是-adminurl secure-protocol://Admin-Server-listen-address:port哪里t3s并且https是有效的安全协议。

要通过配置的管理通道连接到管理服务器,您必须指定有效的管理端口号: -adminurl secure-protocol://Admin-Server-listen-address:domain-wide-admin-port

此参数没有默认值。

用户证书参数
java [ SSL参数 ] weblogic.Deployer [ 连接参数 ] 
     [{-username username [-password password ]} | 
     [-userconfigfile config-file [-userkeyfile admin-key ]]]
      COMMAND-NAME  command-options [ Common Arguments ]
大多数weblogic.Deployer命令要求您提供WebLogic Server管理员的用户凭据。

-username 用户名 
管理员用户名。如果您提供该-username选项但不提供相应的-password选项,则weblogic.Deployer提示您输入密码。
-password 密码 

管理员用户的密码。

为了避免在脚本或进程实用程序中显示纯文本密码,例如ps首先使用WebLogic Sc​​ripting Tool(WLST)storeUserConfig命令在配置文件中存储用户名和加密密码,如WLST“WebLogic Server命令参考”中所述。省略-username和-password选项以weblogic.Deployer使用存储在默认配置文件中的值。

如果要使用特定的配置文件和密钥文件,而不是默认文件,请使用-userconfigfile和-userkeyfile选项weblogic.Deployer。

-userconfigfile 配置文件 
用于管理用户名和密码的用户配置文件的位置。使用此选项,而不是-user和-password选项,在自动化脚本或者在你不希望有密码屏幕上或进程级实用工具,如所示的情况ps。在指定-userconfigfile属性之前,必须首先使用WebLogic脚本工具(WLST)storeUserConfig命令生成文件,如WLST“WebLogic Server命令参考”中所述。
-userkeyfile admin-key 
指定用户密钥文件用于加密和解密用户配置文件(-userconfigfile选项)中存储的用户名和密码信息的位置。在指定-userkeyfile属性之前,必须首先使用WebLogic脚本工具(WLST)storeUserConfig命令生成文件,如WLST“WebLogic Server命令参考”中所述。


 

帮助及示例命令
#查看weblogic.Deployer帮助
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -help

#查看weblogic.Deployer更多参数

[root@oud bin]# java -cp /sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/weblogic.jar weblogic.Deployer -advanced
Usage: java weblogic.Deployer [options] [action] [Deployment units(s)]where options include:-help             Print the standard usage message.            -version          Print version information.                   -adminurl <<protocol>://<server>:<port>> [option] Administration     server URL: default t3://localhost:7001      -username <username> [option] user name                           -password <password> [option] password for the user               -userconfigfile <userconfigfile> [option] The user config file       contains the user security credentials; it   is administered by the weblogic.Admin tool   -userkeyfile <keyConfigFile> [option] The users key file; it is      administered by the weblogic.Admin tool.     -distribute       [action] Distribute application to the       targets.                                     -start            [action] Makes an already distributed        application available on a target.           -stop             [action] Makes an application unavailable on targets.                                     -redeploy         [action] Replace a running application       partially or entirely.                       -undeploy         [action] Take an application out of service. -deploy           [action] Make an application available for   service.                                     -update           [action] Update an application configuration in place.                                    -cancel           [action] Attempts to cancel the task <id> if it is has not yet completed.                 -list             [action] Lists the target status of each     task <id>.                                   -listtask         [action] Lists the target status of each     task <id>.                                   -listapps         [action] Lists all the deployed applications in the domain.                               -purgetasks       Flush out deployment tasks that are retired  java weblogic.Deployer -adminurl url         -username username -password password        -purgetasks                                  -examples         [option] Displays example usage of this tool.-name <application name> [option] Defaults to the basename of the    deployment file or directory.                -targets <<target(s)>> [option] A comma separated list of targets   for the current operation. If not specified, all configured targets are used. For a new   application, the default target is the       administration server.                       -plan <Deployment plan path> [option] Specifies location of          deployment plan                              -library          [option] Indicates that the unit being       deployed is a library. This option is        required when the application is a library.  -verbose          Displays additional status during the        deployment process, 
including notifications when the application is prepared and activated on each target.                    -output <raw>     [deprecated option] raw|formatted            -debug            [option] Displays debug level messages to    the standard output.                         -upload           [option] Causes the specified source file(s) to be transferred to the administration      server. This is used when the Deployer tools is not being used on the same machine as the administration server or the user does not   otherwise have access to place the targeted  files on the administration server.          -delete_files     [option] Causes the server to remove the     files that are specified in the file list    and leave the application activated. This    option is valid only for unarchived Web      applications.                                -remote           [option] Indicates that the tool is not      running on the same machine as the admin     server and the "-source" path is the actual  path on the server. By default, this tool    assumes any "-source" path to be valid on    the local machine. In that case, the         "-upload" option must be used if the tool    needs to copy the application over to the    admin server.                                -nostage          [option] This application will not be staged and deployed from the source location. When  specified, the application must be available at the location provided in the "-source"    option on all target servers. Default:       "nostage" for admin server and "stage" for   managed server targets.                      -external_stage   [option] Indicates that the user wants to    copy the application in the server staging   area externally or using a third-party tool. When specified, WebLogic Server looks for    the application under "StagingDirectoryName  (of target server)/applicationName".         -stage            [option] Indicates that the application      needs to be copied into the target server    staging area before deployment. Default:     "nostage" for admin server and "stage" for   managed server targets.                      -nowait           [option] Once the action is initiated, the   tool prints the task ID and exits. This is   used to initiate multiple tasks and then     monitor them later using the -list action.   -timeout <seconds> [option] The maximum time in seconds to wait for the completion of the deployment task.   When the time expires, the current status is printed and the program exits.               -deploymentorder <deployment order> [option] The deployment order    for the application.                         -source <archive file or directory> [option] Location of the file    source.                                      -altappdd <File Path> [option] Location of the alternate           application deployment descriptor on the     admin server.                                -altwlsappdd <File Path> [option] Location of the alternate WebLogic application deployment descriptor on the     admin server.                                -appversion <application version> [option] The version identifier of the application. If not specified, the       currently active version of the application  is assumed.                                  -planversion <deployment plan version> [option] The version          identifier of the deployment plan. If not    specified, the currently active version of   the applications deployment plan is assumed. -noversion        Notifies the deployment system that this     application has no version associated with   it, and thus the version checks on the       source of the application are no performed.  -retiretimeout <The retirement timeout in seconds> [option] The      retirement timeout in seconds for timeout    retirement policy. If not specified,         graceful retirement policy is assumed.       -id <task identifier> [option] Optional client supplied unique     identifier for the deployment task.          -adminmode        [option] The administration mode. If not     specified, production mode is assumed.       -graceful         [option] Graceful shutdown. If not           specified, force shutdown is assumed.        -ignoresessions   [option] Ignore pending HTTP sessions during graceful shutdown. Can be used with          -graceful option only. Default is false.     -rmigraceperiod <The RMI grace period in seconds> [option] Grace     period for RMI requests during graceful      shutdown. Can be used with -graceful option  only. Default is no grace period.            -allversions      [option] Force undeploy all application      versions irrespective of in-flight work. Can be used with -allversions option only.       Default is false.                            -submoduletargets <submod@mod-jms.xml@target | submoduleName@target> [option] SubModule level targets for JMS Modules.-securityModel <DDOnly|CustomRoles|CustomRolesAndPolicies|Advanced> [option] Security model to be used for this deployment.-enableSecurityValidation [option] Enables validation of security    data.                                        -libspecver <library specification version> [option] Specifies the   specification version of the library, if it  is not present in the manifest. Requires the -library option.                             -libimplver <library implementation version> [option] Specifies the  implementation version of the library, if it is not present in the manifest. Requires the -library option.                             -usenonexclusivelock [option] Used to indicate the deployment     operation will utilize an existing lock on   the domain already acquired by the same      user. This is useful when the user is        employing multiple deployment tools          simultaneously and one of them has acquired  a lock on the domain configuration.          -advanced         Print advanced usage options.                The optional trailing arguments are deployment units and may 
represent the archive being deployed, the name of a previously 
deployed application or a list of files for a partial redeploy operation.

#查看weblogic.Deployer使用例子
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -examples
 web应用操作命令
查看部署web应用命令
#查看部署的web应用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678  -listtask
 启动web应用命令  停止web应用命令
#停止web应用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-11 -stop -adminmode

默认情况下,WebLogic Server立即停止应用程序,而不考虑挂起的HTTP会话或进程内工作。如果要等待待处理的HTTP会话来完成工作,然后停止应用程序到客户端请求并将其置于管理模式下,请添加以下 -graceful 选项
#停止web应用前处理完请求
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-11 -stop -adminmode  -graceful

如果没有使用该 -appversion 选项显式指定应用程序版本,则该 -stop 命令将仅停止应用程序的活动版本。如果还有其他版本的应用程序,您也想停止(或者你想停止代替或活动版本),您必须使用该 -appversion 选项指定它们。
要重新启动先前已停止的应用程序,使其可用于外部客户端,请使用该-start命令并指定部署名称。您不需要重新部署已停止的应用程序来使其普遍可用:
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-11 -start

 war包操作命令
 部署war包命令
#部署war包并启动web应用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-12 -deploy ${war_path} -targets Server-1
 重新部署war命令
#重新部署war包并启动web应用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-12 -redeploy
 更新部署war包命令
#更新部署war包并启动web应用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-12 -redeploy -source ${war_one_path}
 更新部署war服务器命令
#更新部署war的服务器(多个服务用英文逗号分隔),此旧服务器服务不会停
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-12 -redeploy -targets Server-2

将新应用程序或独立模块部署到域中的服务器后,部署名称将与您选择的部署文件保持关联。即使在所有服务器上停止部署后,仍可使用WebLogic Server管理控制台或weblogic.Deployer实用程序重新部署文件。

如果要从域中删除部署名称及其关联的部署文件,则必须明确取消部署应用程序或独立模块。要从域中取消部署部署单位weblogic.Deployer,请指定以下-undeploy命令:

java weblogic.Deployer -adminurl http:// localhost:7001 -user weblogic
   -password weblogic -name mymodule -undeploy

使用 -undeploy 不带 -targets 和 -submoduletargets 标志的命令可以完全从所有WebLogic Server实例中删除应用程序或独立模块,并对所有JMS子模块资源进行目标定位。

取消部署部署单元不会删除用于部署的原始源文件。它仅从域中删除部署的配置,以及WebLogic Server在部署期间创建的任何部署文件(例如,使用阶段部署模式复制的文件和上传到管理服务器的文件

cd /app/war/;mv console.war /app/war/warbak/console/console.war`date +"%Y%m%d-%H%M%S"`;cd /app/war/remote/;mv console.war /app/war/;chown -R weblogic:weblogic /app/war/*;source /etc/profile;java -Djava.security.egd=file:/dev/./urandom -Xms512M -Xmx1024M  -cp /app/weblogic/oralce_home/wlserver/server/lib/weblogic.jar  weblogic.Deployer -adminurl t3://10.246.152.133:7001 -username weblogic -password TestSiam#20210419 -deploy -name console -targets console -source /app/war/console.warsource /etc/profile;java -Djava.security.egd=file:/dev/./urandom -Xms512M -Xmx1024M  -cp /app/weblogic/oracle_home/wlserver/server/lib/weblogic.jar  weblogic.Deployer -adminurl t3://10.246.152.110:7001 -username weblogic -password TestSiam#20210419 -undeploy -name console -targets console;kill -9 `ps -ef |grep /app/weblogic/oracle_home |grep -v grep`
WLS_HOME='*'
username='*'
password='*'
#shengli
#password='*'RESULT=$(/app/jdk1.7.0_76/bin/java -cp ${WLS_HOME}/lib/weblogic.jar weblogic.Admin -adminurl ${url} -username ${username}  -password ${password} GET -pretty -type ServerRuntime -property OverallHealthState |grep -i OverallHealthState |grep HEALTH_WARN |wc -l

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/535356.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Ansible系列--Copy模块

copy模块 copy模块在ansible里的角色就是把ansible执行机器上的文件拷贝到远程节点上。 与fetch模块相反的操作 常用参数 参数名是否必须默认值选项说明srcno 用于定位ansible执行的机器上的文件&#xff0c;需要绝对路径。如果拷贝的是文件夹&#xff0c;那么文件夹会整体…

ANSIBLE--handlers的概念

handlers可以理解成另一种tasks&#xff0c;handlers是另一种’任务列表’&#xff0c;handlers中的任务会被tasks中的任务进行”调用”&#xff0c;但是&#xff0c;被”调用”并不意味着一定会执行&#xff0c;只有当tasks中的任务”真正执行”以后&#xff08;真正的进行实际…

ansible--- tags

tags可以帮助我们对任务进行’打标签’的操作&#xff0c;当任务存在标签以后&#xff0c;我们就可以在执行playbook时&#xff0c;借助标签&#xff0c;指定执行哪些任务&#xff0c;或者指定不执行哪些任务。在实际的使用中&#xff0c;我们应该让tags的值能够见名知义。 当…

ANSIBLE---变量

注册变量 ansible的模块在运行之后&#xff0c;其实都会返回一些”返回值”&#xff0c;只是默认情况下&#xff0c;这些”返回值”并不会显示而已&#xff0c;我们可以把这些返回值写入到某个变量中&#xff0c;这样我们就能够通过引用对应的变量从而获取到这些返回值了&…

inux中限制用户进程CPU和内存占用率

#!/bin/sh PIDStop -bn 1 | grep "^ *[1-9]" | awk { if($9 > 50 || $10 > 25 && id -u $2 > 500) print $1} echo $PIDS for PID in $PIDS dorenice 10 $PIDecho "renice 10 $PID" done

按月拆分数据库表--oracle

生产有一张日志表&#xff0c;数据量很大&#xff0c;需要按月进行存储&#xff0c;存储过程如下&#xff1a; CREATE OR REPLACE PROCEDURE NEWLOG4_SUB_TABLE IStable_name1 VARCHAR2(50);create_table_sql VARCHAR2(4000);insert_data_sql VARC…

plsql定时器

Oralce中的任务有2种&#xff1a;Job和Dbms_job&#xff0c;两者的区别有&#xff1a; 1&#xff0e; jobs是oracle数据库的对象&#xff0c; dbms_jobs只是jobs对象的一个实例&#xff0c; 就像对于tables&#xff0c; emp和dept都是表的实例。 2&#xff0e; 创建方式也有…

PL/SQL批处理语句:BULK COLLECT 和 FORALL

PL/SQL程序中运行SQL语句是存在开销的&#xff0c;因为SQL语句是要提交给SQL引擎处理&#xff0c;这种在PL/SQL引擎和SQL引擎之间的控制转移叫做上下文却换&#xff0c;每次却换时&#xff0c;都有额外的开销 请看下图&#xff1a; 但是&#xff0c;FORALL和BULK COLLEC…

oracle 中DATETIME与TIMESTAMP区别

1.DATETIME的日期范围是1001——9999年&#xff0c;TIMESTAMP的时间范围是1970——2038年。 2.DATETIME存储时间与时区无关&#xff0c;TIMESTAMP存储时间与时区有关&#xff0c;显示的值也依赖于时区。在mysql服务器&#xff0c;操作系统以及客户端连接都有时区的设置。 3.DAT…

PARALLEL(并行)

在Oracle中&#xff0c;PARALLEL&#xff08;并行&#xff09;方式最大化调用计算机资源来成倍提高数据分析效率。 1&#xff0e; 用途 强行启用并行度来执行当前SQL。这个在Oracle 9i之后的版本可以使用&#xff0c;之前的版本现在没有环境进行测试。也就是说&#xff0c;加…

Oracle数据库查询优化

1.对查询进行优化&#xff0c;应尽量避免全表扫描&#xff0c;首先应考虑在 where 及 order by 涉及的列上建立索引。 2.应尽量避免在 where 子句中对字段进行 null 值判断&#xff0c;否则将导致引擎放弃使用索引而进行全表扫描&#xff0c;如&#xff1a; select id from t w…

redis-full-check

https://github.com/alibaba/RedisFullCheck/releases redis-full-check是阿里云Redis&MongoDB团队开源的用于校验2个redis数据是否一致的工具。   redis-full-check通过全量对比源端和目的端的redis中的数据的方式来进行数据校验&#xff0c;其比较方式通过多轮次比较&a…

2021-06-22

服务器信息 [rootiZs7z01dz0z12dyttz9zn5Z cluster]# /app/redis/redis-3.2.1/src/redis-cli -c -h 10.252.120.9 -p 8003 10.252.120.9:8003> cluster nodes b1f543d646c5c97a70b0635439a44a72f8a143b1 10.252.120.10:8004 master - 0 1624349601417 7 connected 0-5460 1…

Docker目录挂载

Docker容器启动的时候&#xff0c;如果要挂载宿主机的一个目录&#xff0c;可以用-v参数指定。 譬如我要启动一个centos容器&#xff0c;宿主机的/test目录挂载到容器的/soft目录&#xff0c;可通过以下方式指定&#xff1a; # docker run -it -v /test:/soft centos /bin/ba…

Redis主从复制原理学习

Redis主从复制原理学习总结 - 运维笔记 和Mysql主从复制的原因一样&#xff0c;Redis虽然读取写入的速度都特别快&#xff0c;但是也会产生读压力特别大的情况。为了分担读压力&#xff0c;Redis支持主从复制&#xff0c;Redis的主从结构可以采用一主多从或者级联结构&#xff…

redis数据恢复

公司线上一个项目数据存储采用MySQL&#xff0c;共分为10个库&#xff0c;分布在4台机器上&#xff0c;每个库数据量约为10G&#xff0c;各机器均采用RAID5加速磁盘访问&#xff1b; 当同时在线人数达高峰期&#xff08;10w&#xff09;&#xff0c;DB磁盘IO压力巨大&#xff0…

Redis哨兵模式(sentinel)学习总结及部署记录(主从复制、读写分离、主从切换)

Redis的集群方案大致有三种&#xff1a;1&#xff09;redis cluster集群方案&#xff1b;2&#xff09;master/slave主从方案&#xff1b;3&#xff09;哨兵模式来进行主从替换以及故障恢复。 一、sentinel哨兵模式介绍 Sentinel(哨兵)是用于监控redis集群中Master状态的工具&…

Redis之Redis内存模型

Redis是目前最火爆的内存数据库之一&#xff0c;通过在内存中读写数据&#xff0c;大大提高了读写速度&#xff0c;可以说Redis是实现网站高并发不可或缺的一部分。 我们使用Redis时&#xff0c;会接触Redis的5种对象类型&#xff08;字符串、哈希、列表、集合、有序集合&…

MySQL 数据库误删除后的数据恢复操作说明

在日常运维工作中&#xff0c;对mysql数据库的备份是万分重要的&#xff0c;以防在数据库表丢失或损坏情况出现&#xff0c;可以及时恢复数据。 线上数据库备份场景&#xff1a; 每周日执行一次全量备份&#xff0c;然后每天下午1点执行MySQLdump增量备份. 下面对这种备份方案…

MySQL 之binlog日志说明及利用binlog日志恢复数据操作记录

众所周知&#xff0c;binlog日志对于mysql数据库来说是十分重要的。在数据丢失的紧急情况下&#xff0c;我们往往会想到用binlog日志功能进行数据恢复&#xff08;定时全备份binlog日志恢复增量数据部分&#xff09;&#xff0c;化险为夷&#xff01; 一、简单了解binlog MySQ…