oracle 12.1 rac to rac adg(maa)搭建保姆级教程

目录

资源配置

一、主库集群操作

1.主库增加standbylog

2.主库开启force logging及归档

3.主库配置参数

4.生成参数文件并将参数文件、密码文件拷贝至备库

4.1参数文件处理

4.2密码文件处理

二、备库操作

1.备库修改参数文件

1.1创建adump目录并在参数文件修改(两节点均创建)

1.2增加dg相关参数

1.3备库asm创建目录结构

1.4备库将主库asm传过来的密码文件放到dbs目录下

三、配置监听

四、恢复库

主库进行全库备份

将主库备份传至备库

备库恢复主库备份

开库


资源配置

主备角色主机名IP实例名
主库racstd1192.168.213.109std11
racstd2192.168.213.110std12
备库primary1192.168.213.101stdg11
primary2192.168.213.102stdg12

一、主库集群操作

1.1.主库增加standbylog

SQL> select group#,thread#,sequence#,bytes/1024/1024,members,status from v$log;

    GROUP#    THREAD#  SEQUENCE# BYTES/1024/1024    MEMBERS STATUS

---------- ---------- ---------- --------------- ---------- ----------------

         1          1         27              50          2 CURRENT

         2          1         26              50          2 INACTIVE

         3          2          9              50          2 CURRENT

         4          2          8              50          2 INACTIVE

增加日志

alter database add standby logfile thread 1 group 5 ('+DATA') size 50M,group 6 ('+DATA') size 50M,group 7 ('+DATA') size 50M;

alter database add standby logfile thread 2 group 8 ('+DATA') size 50M,group 9 ('+DATA') size 50M,group 10 ('+DATA') size 50M;

select group#,member from v$logfile;

注意:standbylog 要比原日志组至少多一组,日志大小建议与当前数据库配置保持一致。

1.2.主库开启force logging及归档

开启强记日志

SQL> select force_logging from v$database;

FORCE_LOGGING

---------------------------------------

NO

SQL> ALTER DATABASE FORCE LOGGING;

Database altered.

SQL> select force_logging from v$database;

FORCE_LOGGING

---------------------------------------

YES

SQL>  archive log list

Database log mode              No Archive Mode

Automatic archival             Disabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     26

Current log sequence           27

SQL>

##开归档

[oracle@racstd1 ~]$ srvctl stop database -d standby

[oracle@racstd1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Jun 6 15:01:19 2024

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount

ORACLE instance started.

Total System Global Area 7532969984 bytes

Fixed Size                  2941920 bytes

Variable Size            1426066464 bytes

Database Buffers         6090129408 bytes

Redo Buffers               13832192 bytes

Database mounted.

##归档开启(如归档已开启请忽略这一步)

SQL> alter database archivelog;

Database altered.

SQL> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     26

Next log sequence to archive   27

Current log sequence           27

SQL>

1.3.主库配置参数

alter system set log_archive_config='dg_config=(standby,primary)'   scope=spfile sid='*';

alter system set log_archive_dest_1='location=+ARCH valid_for=(all_logfiles,all_roles) db_unique_name=standby'  scope=spfile sid='*';

alter system set log_archive_dest_2='service=primary valid_for=(online_logfiles,primary_role) db_unique_name=primary'   scope=spfile sid='*';

alter system set standby_file_management='auto'   scope=spfile sid='*';

alter system set fal_server='primary'   scope=spfile sid='*';

alter system set fal_client='standby'   scope=spfile sid='*';

alter system set db_file_name_convert='+DATA/PRIMARY/DATAFILE/','+DATA/STANDBY/DATAFILE/','+DATA/PRIMARY/DATAFILE/','+DATA/STANDBY/TEMPFILE/' scope=spfile sid='*';

alter system set log_file_name_convert='+DATA/PRIMARY/ONLINELOG','+DATA/STANDBY/ONLINELOG' scope=spfile sid='*';

##重启生效

[oracle@racstd1 tmp]$ srvctl stop database -d standby

[oracle@racstd1 tmp]$ srvctl start database -d standby

[oracle@racstd1 tmp]$ srvctl status database -d standby

Instance std11 is running on node racstd1

Instance std12 is running on node racstd2

1.4.生成参数文件并将参数文件、密码文件拷贝至备库

1.4.1参数文件处理

[oracle@racstd1 ~]$ sqlplus / as sysdba

SQL> create pfile='/tmp/initstd.ora' from spfile;

File created.

##将参数文件传到备库

[oracle@racstd1 tmp]$ scp initstd.ora oracle@192.168.213.101:/u01/app/oracle/product/12.1.0/dbhome_1/dbs

The authenticity of host '192.168.213.101 (192.168.213.101)' can't be established.

RSA key fingerprint is de:d5:a9:a1:b1:84:63:49:84:02:4b:d2:ff:30:e5:de.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.213.101' (RSA) to the list of known hosts.

oracle@192.168.213.101's password:

initstd.ora                                                                                                                  100% 1500     1.5KB/s   00:00

1.4.2密码文件处理

主库密码文件到备库,最开始放在$ORACLE_HOME/dbs目录下,后续配置完成后,需要将密码文件存放在ASM磁盘组中并进行改名。

[root@racstd1 ~]# su - grid

[grid@racstd1 ~]$ asmcmd          

ASMCMD> pwd

+DATA/STANDBY/PASSWORD

ASMCMD> ls

pwdstandby.256.1170868583

ASMCMD> pwcopy +DATA/STANDBY/PASSWORD/pwdstandby.256.1170868583 /tmp

注意:需要拷贝到tmp目录其他目录会报权限错误

[root@racstd1 tmp]# scp pwdstandby.256.1170868583 192.168.213.101:/tmp

The authenticity of host '192.168.213.101 (192.168.213.101)' can't be established.

RSA key fingerprint is de:d5:a9:a1:b1:84:63:49:84:02:4b:d2:ff:30:e5:de.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.213.101' (RSA) to the list of known hosts.

root@192.168.213.101's password:

pwdstandby.256.1170868583                                                                                                    100% 7680     7.5KB/s   00:00

二、备库操作

2.1.备库修改参数文件

cd $ORACLE_HOME/dbs

vi initstd.ora

先把涉及到实例名的参数改成一致主库是std*备库我们改成stdg*跟主库区别开

2.1.1创建adump目录并在参数文件修改(两节点均创建)

cd /u01/app/oracle/admin/

mkdir -p stdg/adump

参数文件中修改

2.1.2增加dg相关参数

##确认主库的数据文件、临时文件、日志文件目录

ASMCMD> cd DATAFILE

ASMCMD> pwd

+DATA/STANDBY/DATAFILE

ASMCMD> cd ..

ASMCMD> cd TEMPFILE/

ASMCMD> pwd

+DATA/STANDBY/TEMPFILE

ASMCMD> cd ..

ASMCMD> cd ONLINELOG/

ASMCMD> pwd

+DATA/STANDBY/ONLINELOG

*.db_file_name_convert='+DATA/STANDBY/DATAFILE/','+DATA/PRIMARY/DATAFILE/','+DATA/STANDBY/TEMPFILE/','+DATA/PRIMARY/TEMPFILE/'

*.db_unique_name='primary'

*.log_archive_config='DG_CONFIG=(standby,primary)'

*.log_archive_dest_1='LOCATION=+ARCH VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primary'

*.log_archive_dest_2='SERVICE=standby ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby'

*.log_file_name_convert='+DATA/STANDBY/ONLINELOG','+DATA/PRIMARY/ONLINELOG'

*.fal_server='standby'

*.fal_client='primary'

参数文件:

stdg11.__data_transfer_cache_size=0

stdg12.__data_transfer_cache_size=0

stdg11.__db_cache_size=5821693952

stdg12.__db_cache_size=5821693952

stdg11.__java_pool_size=16777216

stdg12.__java_pool_size=16777216

stdg11.__large_pool_size=33554432

stdg12.__large_pool_size=33554432

stdg11.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

stdg12.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

stdg11.__pga_aggregate_target=2516582400

stdg12.__pga_aggregate_target=2516582400

stdg11.__sga_target=7532969984

stdg12.__sga_target=7532969984

stdg11.__shared_io_pool_size=385875968

stdg12.__shared_io_pool_size=385875968

stdg11.__shared_pool_size=1258291200

stdg12.__shared_pool_size=1258291200

stdg11.__streams_pool_size=0

stdg12.__streams_pool_size=0

*.audit_file_dest='/u01/app/oracle/admin/stdg/adump'

*.audit_trail='db'

#*.cluster_database=TRUE

*.compatible='12.1.0.2.0'

*.control_files='+DATA/PRIMARY/CONTROLFILE/controlfile01.ctl','+ARCH/PRIMARY/CONTROLFILE/controlfile02.ctl'

*.db_block_size=8192

*.db_create_file_dest='+DATA'

*.db_domain=''

*.db_name='standby'  --注意数据库名要与主库一致否则会报错 

*.db_recovery_file_dest='+ARCH'

*.db_recovery_file_dest_size=4785m

*.diagnostic_dest='/u01/app/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=stdg1XDB)'

stdg11.instance_number=1

stdg12.instance_number=2

*.open_cursors=300

*.pga_aggregate_target=2392m

*.processes=300

*.remote_login_passwordfile='exclusive'

*.sga_target=7176m

stdg12.thread=2

stdg11.thread=1

stdg11.undo_tablespace='UNDOTBS1'

stdg12.undo_tablespace='UNDOTBS2'

*.db_file_name_convert='+DATA/STANDBY/DATAFILE/','+DATA/PRIMARY/DATAFILE/','+DATA/STANDBY/TEMPFILE/','+DATA/PRIMARY/TEMPFILE/'

*.db_unique_name='primary'

*.log_archive_config='DG_CONFIG=(standby,primary)'

*.log_archive_dest_1='LOCATION=+ARCH VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primary'

*.log_archive_dest_2='SERVICE=BMACDB1 ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby'

*.log_file_name_convert='+DATA/STANDBY/ONLINELOG','+DATA/PRIMARY/ONLINELOG'

*.fal_server='standby'

*.fal_client='primary'

注意:集群参数暂时屏蔽

2.1.3备库asm创建目录结构

ASMCMD> mkdir PRIMARY

ASMCMD> cd PRIMARY

ASMCMD> mkdir ONLINELOG

ASMCMD> mkdir TEMPFILE

ASMCMD> mkdir DATAFILE

ASMCMD> mkdir CONTROLFILE

ASMCMD> ls

CONTROLFILE/

DATAFILE/

ONLINELOG/

TEMPFILE/

ASMCMD> pwd

+DATA/PRIMARY

2.1.4备库将主库asm传过来的密码文件放到dbs目录下

cd $ORACLE_HOME/dbs

cp /tmp/pwdstandby.256.1170868583 orapwstdg11

三、配置监听

##主备库都改

cd /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/

vi tnsnames.ora

standby=

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.213.109)(PORT = 1521))

   (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.213.110)(PORT = 1521))

   (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME =standby)

    )

  )

primary=

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.213.101)(PORT = 1521))

   (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.213.102)(PORT = 1521))

   (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME =primary)

    )

  )

测试

四、恢复库

4.1主库进行全库备份

[root@racstd1 ~]# mkdir -p /backup

[root@racstd1 ~]# chown -R oracle:oinstall /backup/

[root@racstd1 ~]#

su - oracle

[oracle@racstd1 ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jun 7 09:21:11 2024

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: STANDBY (DBID=1982604216)

RMAN>

run{

allocate channel c1 type disk;

allocate channel c2 type disk;

backup database format '/backup/data_%d_%T_%s_%p' tag 'data';

sql 'alter system archive log current';

backup archivelog all format='/backup/arch_%d_%T_%s_%p' tag 'arc';

backup current controlfile for standby format='/backup/ctl_%d_%T_%s_%p' tag 'cur';

release channel c1;

release channel c2;

}

4.2将主库备份传至备库

[oracle@racstd1 ~]$ cd /backup/

[oracle@racstd1 backup]$ ls

arch_STANDBY_20240607_5_1  arch_STANDBY_20240607_7_1  data_STANDBY_20240607_1_1  data_STANDBY_20240607_3_1

arch_STANDBY_20240607_6_1  ctl_STANDBY_20240607_8_1   data_STANDBY_20240607_2_1  data_STANDBY_20240607_4_1

[oracle@racstd1 backup]$ du -s *

55272   arch_STANDBY_20240607_5_1

47648   arch_STANDBY_20240607_6_1

12      arch_STANDBY_20240607_7_1

18848   ctl_STANDBY_20240607_8_1

877900  data_STANDBY_20240607_1_1

702140  data_STANDBY_20240607_2_1

18848   data_STANDBY_20240607_3_1

96      data_STANDBY_20240607_4_1

##目标端创建目录

[root@primary1 ~]# mkdir -p /backup

[root@primary1 ~]# chown -R oracle:oinstall /backup/

##传送备份到备库

[oracle@racstd1 backup]$ scp * oracle@192.168.213.101:/backup/

4.3备库恢复主库备份

[root@primary1 ~]# cd /backup/

[root@primary1 backup]# ls

arch_STANDBY_20240607_5_1  arch_STANDBY_20240607_7_1  data_STANDBY_20240607_1_1  data_STANDBY_20240607_3_1

arch_STANDBY_20240607_6_1  ctl_STANDBY_20240607_8_1   data_STANDBY_20240607_2_1  data_STANDBY_20240607_4_1

[root@primary1 ~]# su - oracle

[oracle@primary1 ~]$ export ORACLE_SID=stdg11

[oracle@primary1 ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jun 7 09:38:49 2024

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> startup nomount

Oracle instance started

Total System Global Area    7532969984 bytes

Fixed Size                     2941920 bytes

Variable Size               1358957600 bytes

Database Buffers            6157238272 bytes

Redo Buffers                  13832192 bytes

RMAN>

restore standby controlfile from '/backup/ctl_STANDBY_20240607_8_1';

alter database mount;

catalog start with "/backup";

Run{

allocate channel c1 type disk;

allocate channel c2 type disk;

restore database;

switch datafile all;

switch tempfile all;

recover database;

release channel c1;

release channel c2;

}

开库

[oracle@primary1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 7 10:09:52 2024

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Advanced Analytics and Real Application Testing options

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE

--------- --------------------

STANDBY   MOUNTED

SQL> alter database open;

Database altered.

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE

--------- --------------------

STANDBY   READ ONLY

1.1创建spfile标准化

SQL> create pfile='/tmp/initstdg11.ora' from spfile;

File created.

SQL>  create spfile='+DATA/PRIMARY/PARAMETERFILE/spfilestdg.ora' from pfile='/tmp/initstdg11.ora';

File created.

##asmcmd查看

[oracle@primary1 dbs]$ rm -f spfilestdg11.ora

[oracle@primary1 dbs]$ rm -f /tmp/initstdg11.ora

1.1.1修改一二节点pfile内容

[oracle@primary1 dbs]$ vi initstdg11.ora

spfile='+DATA/PRIMARY/PARAMETERFILE/spfilestdg.ora

[oracle@primary1 dbs]$ scp initstdg11.ora oracle@primary2:/u01/app/oracle/product/12.1.0/dbhome_1/dbs/initstdg12.ora

initstdg11.ora                                                                                                                     100%   52     0.1KB/s   00:00

[root@primary2 ~]# su - oracle

[oracle@primary2 ~]$ cd $ORACLE_HOME/dbs

[oracle@primary2 dbs]$ ls

hc_racpm2.dat  id_racpm2.dat  init.ora  initstdg12.ora

[oracle@primary2 dbs]$ cat initstdg12.ora

spfile='+DATA/PRIMARY/PARAMETERFILE/spfilestdg.ora'

1.2拷贝密码文件到asm

[root@primary1 tmp]# chmod 777 pwdstandby.256.1170868583

[root@primary1 tmp]# ls -ld pwdstandby.256.1170868583

-rwxrwxrwx 1 grid oinstall 7680 Jun  6 15:30 pwdstandby.256.1170868583

[root@primary1 tmp]#

ASMCMD> cp /tmp/pwdstandby.256.1170868583 orapwdprimary

copying /tmp/pwdstandby.256.1170868583 -> +data/primary/password/orapwdprimary

[root@primary1 tmp]# su - oracle

[oracle@primary1 ~]$ cd $ORACLE_HOME/dbs

[oracle@primary1 dbs]$ ls

hc_racpm1.dat  hc_stdg11.dat  id_racpm1.dat  init.ora  initstdg11.ora  initstd.ora  orapwstdg11  snapcf_stdg11.f

[oracle@primary1 dbs]$ rm -f orapwstdg11

五、注册服务

5.1环境变量配置

[oracle@primary1 ~]$ vi .bash_profile

export ORACLE_SID=stdg11

[oracle@primary1 ~]$ . .bash_profile

5.2改参数

[oracle@primary1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 7 10:41:01 2024

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Advanced Analytics and Real Application Testing options

SQL> shu immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

Total System Global Area 7532969984 bytes

Fixed Size                  2941920 bytes

Variable Size            1358957600 bytes

Database Buffers         6157238272 bytes

Redo Buffers               13832192 bytes

Database mounted.

SQL> show parameter cluster;

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

cluster_database                     boolean     FALSE

cluster_database_instances           integer     1

cluster_interconnects                string

alter system set cluster_database=true scope=spfile;

alter system set cluster_database_instances=2 scope=spfile;

SQL> shu immediate

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

5.3增加服务

srvctl add database -db primary -dbname standby -oraclehome /u01/app/oracle/product/12.1.0/dbhome_1 -dbtype RAC -role PHYSICAL_STANDBY

srvctl add instance -db primary -instance stdg11 -node primary1 

srvctl add instance -db primary -instance stdg12 -node primary2 

srvctl modify database -db primary -spfile '+DATA/PRIMARY/PARAMETERFILE/spfilestdg.ora' -pwfile '+DATA/PRIMARY/PASSWORD/orapwdprimary'

srvctl modify database -db primary -diskgroup ARCH,DATA

srvctl config database -d primary

srvctl start database -db primary -startoption open

六、备库应用日志

6.1查看主备库状态

select DBID,NAME,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,DATAGUARD_BROKER,DB_UNIQUE_NAME from v$database;

select INST_ID,INSTANCE_NUMBER,INSTANCE_NAME,STATUS,DATABASE_STATUS,INSTANCE_ROLE from gv$instance;

主库是读写

开启flashback

SQL> select open_mode,flashback_on from v$database;

OPEN_MODE            FLASHBACK_ON

-------------------- ------------------

READ ONLY            NO

SQL> alter database flashback on;

Database altered.

SQL> select open_mode,flashback_on from v$database;

OPEN_MODE            FLASHBACK_ON

-------------------- ------------------

READ ONLY            YES

SQL> select process,status,sequence#,THREAD# from v$managed_standby where PROCESS='MRP0';

no rows selected

6.2开启日志应用

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> select process,status,sequence#,THREAD# from v$managed_standby where PROCESS='MRP0';

PROCESS   STATUS        SEQUENCE#    THREAD#

--------- ------------ ---------- ----------

MRP0      WAIT_FOR_LOG         28          2

SQL> select process,status,sequence#,THREAD# from v$managed_standby where PROCESS='MRP0';

##最大性能模式半同步状态正常

PROCESS   STATUS        SEQUENCE#    THREAD#

--------- ------------ ---------- ----------

MRP0      WAIT_FOR_LOG         28          2

6.2验证同步状态

主库切日志

SQL> alter system switch logfile;

System altered.

备库观察日志

备库可以马上应用到日志说明同步无问题

主库查看sequence

SQL> select sequence#,applied from v$archived_log order by sequence# asc;

备库查看sequence

主备库sequence一致 同步正常

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

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

相关文章

02-JAVA面向对象编程

一、面向对象编程 1、面向过程编程思想(Process Oritented Programming) 将实现一个功能的一组指令组合在一起,成为一个函数。这个函数就能实现这一个功能,是对功能实现的一种抽象。通过这种抽象方式,将代码实现复用。…

代码随想录算法训练营第三十一天| 455.分发饼干,376. 摆动序列 ,53. 最大子序和

455. 分发饼干 - 力扣&#xff08;LeetCode&#xff09; class Solution {public int findContentChildren(int[] g, int[] s) {Arrays.sort(g); //递增Arrays.sort(s); int result 0;//遍历&#xff0c;先满足小的int i0,j0;for(;i<g.length && j<s.length;i){…

视觉大模型(VLLM)学习笔记

视觉多模态大模型&#xff08;VLLM&#xff09; InternVL 1.5 近日&#xff0c;上海人工智能实验室 OpenGVLab 团队、清华大学、商汤科技合作推出了开源多模态大语言模型项目InternVL 1.5&#xff0c;它不仅挑战了商业模型巨头例如 GPT-4V 的霸主地位&#xff0c;还让我们不禁…

golang基础

Go安装及配置环境 下载最新的 zip 文件: go#.#.#.windows-amd64.zip &#xff0c;这里的 #.#.# 是 Go 的最新版本号。 解压缩 go#.#.#.windows-amd64.zip 文件到你选择的位置。比如D:\Go 在系统中设置两个环境变量&#xff1a;GOROOT和GOPATH GOPATH 指向的是你的工作目录。…

树莓派4B 零起点(三) 树莓派 VNC 远程桌面配置(2) 配置X11模式

目录 一、配置 VNC Server为X11 1、关闭已启动的VNC Server (如之前未开启&#xff0c;此步可以忽略) 2、切换 VNC Server的模式为 X11 二、开启 X11 VncServer 三、修改树莓派VNC Server的连接模式 1、切换到 root 账号 2、修改VNC Server X11的配置 3、设置VNC密码…

引人入胜的教育视频

对于一家专注于数字自动化和能源管理的跨国公司&#xff0c;我们制作了引人入胜的教育视频&#xff0c;帮助房主选择适合他们需求的电气产品。我们的团队审查并定稿文本&#xff0c;录制并编辑配音&#xff0c;选择背景音乐&#xff0c;设计图形&#xff0c;并制作了演示如何安…

MYSQL基础_02_MySQL环境搭建

第02章_MySQL环境搭建 1. MySQL的卸载 步骤1&#xff1a;停止MySQL服务 在卸载之前&#xff0c;先停止MySQL8.0的服务。按键盘上的“Ctrl Alt Delete”组合键&#xff0c;打开“任务管理器”对话框&#xff0c;可以在“服务”列表找到“MySQL8.0”的服务&#xff0c;如果现…

Springboot校园美食推荐系统的开发-计算机毕业设计源码44555

摘要 随着人们生活水平的提高&#xff0c;人们对美食的要求也越来越高&#xff0c;对各类美食信息需求越来越大。因此&#xff0c;结合计算机快速发展、普及&#xff0c;在此基础上制作一个页面简单、美观,功能实用的校园美食推荐系统势在必行&#xff0c;满足用户分享美食的需…

前端nvm的安装和使用nodejs多版本管理2024

nvm的安装和使用 1、简介 nvm是一个管理nodejs版本的工具。在实际的开发中&#xff0c;项目的开发依赖需要的nodejs版本运行环境不同&#xff0c;此时我们就需要使用nvm来进行不同nodejs版本的切换。其实就是一个方便的node版本管理工具。 注意&#xff1a;如果有安装过node&a…

nw.js 如何调用activeX控件 (控件是C++编写的dll文件)

&#x1f3c6;本文收录于「Bug调优」专栏&#xff0c;主要记录项目实战过程中的Bug之前因后果及提供真实有效的解决方案&#xff0c;希望能够助你一臂之力&#xff0c;帮你早日登顶实现财富自由&#x1f680;&#xff1b;同时&#xff0c;欢迎大家关注&&收藏&&…

第1章Hello world 4/5:对比Rust/Java/C++创建和运行Hello world全过程:运行第一个程序

讲动人的故事,写懂人的代码 1.7 对比Rust/Java/C++创建和运行Hello world全过程 有了会听懂人类的讲话,还能做记录的编程助理艾极思,他们三人的讨论内容,都可以变成一份详细的会议纪要啦。 接下来,我们一起看看艾极思是如何记录下赵可菲创建和运行Java程序Hello world,…

本地搭建支持语音和文本的中英文翻译服务-含全部源代码

实现目标 1、支持文本中英文互译&#xff1b; 2、支持中文语音输入&#xff1b; 3、支持英文语言输入&#xff1b; 进阶&#xff08;未实现&#xff09; 4、优化web界面&#xff1b; 5、优化语音输入js实现逻辑&#xff1b; 6、增加语音输入自纠错模型&#xff0c;纠正语音识别…

代码随想录算法训练营第三十二天| 122.买卖股票的最佳时机II,55. 跳跃游戏 ,45.跳跃游戏II

122. 买卖股票的最佳时机 II - 力扣&#xff08;LeetCode&#xff09; class Solution {public int maxProfit(int[] prices) {if(prices.length 0){return 0;}int min prices[0];int result 0;for(int i1;i<prices.length;i){if(prices[i] > min){result (prices[i]…

“双一流名校”苏州大学计算机专业好考吗?苏州大学计算机考研考情分析

苏州大学&#xff08;Soochow University&#xff09;&#xff0c;简称“苏大”&#xff0c;坐落于历史文化名城苏州&#xff0c;国家“211工程”重点建设高校&#xff0c;国家国防科技工业局和江苏省人民政府共建高校&#xff0c;国家“双一流”世界一流学科建设高校&#xff…

wooyun_2015_110216-Elasticsearch-vulfocus

1.原理 ElasticSearch具有备份数据的功能&#xff0c;用户可以传入一个路径&#xff0c;让其将数据备份到该路径下&#xff0c;且文件名和后缀都可控。 所以&#xff0c;如果同文件系统下还跑着其他服务&#xff0c;如Tomcat、PHP等&#xff0c;我们可以利用ElasticSearch的备…

从零开始,手把手教你文旅产业策划全攻略

如果你想深入了解文旅策划的世界&#xff0c;那么有很多途径可以获取知识和灵感。 首先&#xff0c;阅读一些专业书籍也是一个不错的选择。书店或图书馆里有许多关于文旅策划的书籍&#xff0c;它们通常涵盖了策划的基本理论、方法和实践案例。通过阅读这些书籍&#xff0c;你…

集成学习模型对比优化—银行业务

1.Data Understanding 2.Data Exploration 3.Data Preparation 4.Training Models 5.Optimization Model 集成学习模型对比优化—银行业务 1.Data Understanding import pandas as pd from matplotlib import pyplot as plt import seaborn as sns df pd.read_csv(&quo…

LeetCode136只出现一次的数字

题目描述 给你一个 非空 整数数组 nums &#xff0c;除了某个元素只出现一次以外&#xff0c;其余每个元素均出现两次。找出那个只出现了一次的元素。你必须设计并实现线性时间复杂度的算法来解决此问题&#xff0c;且该算法只使用常量额外空间。 解析 需要想到异或运算&#…

堆排序经典问题【TopK】

前言 在上文我们讲了堆排序的实现&#xff08;点此调整&#xff09;&#xff0c;我们先简单回顾一下。 在进行堆排序之前&#xff0c;需要建一个堆&#xff0c;由于排序是将堆顶数据与堆底交换&#xff0c;所以排升序建大堆&#xff0c;降序建小堆。 堆排序的代码 //向下调整…