Oracle Study之--Oracle 11gR2通過RMAN克隆數據庫

Oracle Study之--Oracle 11gR2通過RMAN克隆數據庫

Purpose of Database Duplication

A duplicate database is useful for a variety of purposes, most of which involve testing. You can perform the following tasks in a duplicate database:

  • Test backup and recovery procedures

  • Test an upgrade to a new release of Oracle Database

  • Test the effect of applications on database performance

  • Create a standby database

  • Generate reports

Techniques for Duplicating a Database

RMAN supports two basic types of duplication: active database duplication and backup-based duplication. RMAN can perform backup-based duplication with or without either of the following connections:

  • Target

  • Recovery catalog

A connection to both is required for active database duplication.

Figure 24-1?shows the decision tree for the two duplication techniques.


Active Database Duplication

In?active database duplication, RMAN connects as?TARGET?to the source database instance and as?AUXILIARY?to the auxiliary instance. RMAN copies the live source database over the network to the auxiliary instance, thereby creating the duplicate database. No backups of the source database are required.?Figure 24-2?illustrates active database duplication.



? ? ?Oracle 11gRMAN duplicate?能夠通過Active database duplicateBackup-based duplicate兩種方法實現。本案例使用的是Active database duplicate,對于Active database duplicate來說,在克隆數據庫時不用對Source備份,這對于大數據特別是T級別的數據庫來說長處很明顯,復制前不須要進行備份,降低了備份和傳送備份的時間,同一時候節省備份空間。



? ? 克隆數據庫通常是在不同的主機上來完畢,本案例是測試環境,所以在一臺主機上完畢。

1、Source 庫信息
[oracle@rh64 ~]$sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 24 16:30:48 2016
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
16:30:48 SYS@ prod>select status from v$instance;
STATUS
------------
OPEN16:31:12 SYS@ prod>select name from v$datafile;
NAME
------------------------------------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/prod/system01.dbf
/u01/app/oracle/oradata/prod/sysaux01.dbf
/u01/app/oracle/oradata/prod/undotbs01.dbf
/u01/app/oracle/oradata/prod/users01.dbf
/u01/app/oracle/oradata/prod/example01.dbf
/u01/app/oracle/oradata/prod/test1.dbf
6 rows selected.16:37:41 SYS@ prod>select member from v$logfile;
MEMBER
------------------------------------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/prod/redo03.log
/u01/app/oracle/oradata/prod/redo02.log
/u01/app/oracle/oradata/prod/redo01.log16:38:43 SYS@ prod>show parameter name
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      prod
db_unique_name                       string      prod
global_names                         boolean     FALSE
instance_name                        string      prod
lock_name_space                      string
log_file_name_convert                string
processor_group_name                 string
service_names                        string      prod
2、構建測試庫:

1)測試庫文件夾環境

[root@rh64 dsk3]# cd test1/
[root@rh64 test1]# ls
oradata ?logs admin

2)生成測試庫pfile
[oracle@rh64 dbs]$ cat inittest1.ora?
*.audit_file_dest='/dsk3/test1/admin/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/dsk3/test1/oradata/control01.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='test1'
*.diagnostic_dest='/u01/app/oracle'
*.memory_target=319430400
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
*.db_file_name_convert=('/u01/app/oracle/oradata/prod/','/dsk3/test1/oradata/')        。假設源庫和目標庫在同一臺主機,須要配置文件存儲路徑轉換參數
*.log_file_name_convert=('/u01/app/oracle/oradata/prod/','/dsk3/test1/logs/')
3)生成口令文件
[oracle@rh64 dbs]$ cp orapwprod orapwtest1

4)啟動Auxiliary Instance到no mount
16:52:01 SYS@ test1>startup nomount;
ORACLE instance started.
Total System Global Area  521936896 bytes
Fixed Size                  2229944 bytes
Variable Size             314575176 bytes
Database Buffers          201326592 bytes
Redo Buffers                3805184 bytes16:52:13 SYS@ test1>show parameter name
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string      /u01/app/oracle/oradata/prod/,/dsk3/test1/oradata/
db_name                                 string      test1
db_unique_name                    string      test1
global_names                         boolean     FALSE
instance_name                        string      test1
lock_name_space                   string
log_file_name_convert            string        /u01/app/oracle/oradata/prod/,/dsk3/test1/logs/
processor_group_name           string
service_names                        string      test1
三、配置網絡Listener 和 tnsname
因為Auxiliary Instance僅僅能啟動到no mount狀態,所以須要在listener里配置Auxiliary Instance為靜態注冊。以便RMAN進行連接。
1)配置監聽器
[oracle@rh64 admin]$ cat listener.ora?
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.LISTENER =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = rh64)(PORT = 1521))(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))))ADR_BASE_LISTENER = /u01/app/oracle
# 靜態注冊Auxiliary Instance:test1
SID_LIST_LISTENER =

? (SID_LIST =
? ? (SID_DESC =
? ? ? (GLOBAL_DBNAME = test1)
? ? ? (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
? ? ? (SID_NAME = test1)
? ? )
? )

2)配置tnsnames
[oracle@rh64 admin]$ cat tnsnames.ora?

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.PROD =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = rh64)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = prod)))TEST1 =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = rh64)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = test1)))
3)查看listener信息
 [oracle@rh64 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-MAR-2016 17:44:04
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rh64)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                24-MAR-2016 17:43:17
Uptime                    0 days 0 hr. 0 min. 46 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rh64/listener/alert/log.xml
Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rh64.cuug.cn)(PORT=1521)))(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "prod" has 1 instance(s).Instance "prod", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).Instance "prod", status READY, has 1 handler(s) for this service...
Service "test1" has 1 instance(s).Instance "test1", status UNKNOWN, has 1 handler(s) for this service...           ;;Auxiliary Instance靜態注冊后,狀態為“UNKNOWN"
The command completed successfully
四、配置RMAN克隆
[oracle@rh64 admin]$ rman target sys/oracle@prod auxiliary sys/oracle@test1
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Mar 24 17:07:38 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. ?All rights reserved.
connected to target database: PROD (DBID=305104131)
connected to auxiliary database: TEST1 (not mounted)

RMAN> duplicate database to test1 from active database nofilenamecheck;
Starting Duplicate Db at 24-MAR-16
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISKcontents of Memory Script:
{sql clone "create spfile from memory";
}
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{shutdown clone immediate;startup clone nomount;
}
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     321507328 bytes
Fixed Size                     2228024 bytes
Variable Size                230686920 bytes
Database Buffers              83886080 bytes
Redo Buffers                   4706304 bytes
contents of Memory Script:
{sql clone "alter system set  db_name = ''PROD'' comment=''Modified by RMAN duplicate'' scope=spfile";sql clone "alter system set  db_unique_name = ''TEST1'' comment=''Modified by RMAN duplicate'' scope=spfile";shutdown clone immediate;startup clone force nomountbackup as copy current controlfile auxiliary format  '/dsk3/test1/oradata/control01.ctl';alter clone database mount;
}
executing Memory Script
sql statement: alter system set  db_name =  ''PROD'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set  db_unique_name =  ''TEST1'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area     321507328 bytes
Fixed Size                     2228024 bytes
Variable Size                230686920 bytes
Database Buffers              83886080 bytes
Redo Buffers                   4706304 bytes
Starting backup at 24-MAR-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 device type=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_prod.f tag=TAG20160324T175437 RECID=3 STAMP=907350882
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 24-MAR-16
database mounted
contents of Memory Script:
{set newname for datafile  1 to "/dsk3/test1/data/system01.dbf";set newname for datafile  2 to "/dsk3/test1/data/sysaux01.dbf";set newname for datafile  3 to "/dsk3/test1/data/undotbs01.dbf";set newname for datafile  4 to "/dsk3/test1/data/users01.dbf";set newname for datafile  5 to "/dsk3/test1/data/example01.dbf";set newname for datafile  6 to "/dsk3/test1/data/test1.dbf";backup as copy reusedatafile  1 auxiliary format "/dsk3/test1/data/system01.dbf"   datafile 2 auxiliary format "/dsk3/test1/data/sysaux01.dbf"   datafile 3 auxiliary format "/dsk3/test1/data/undotbs01.dbf"   datafile 4 auxiliary format "/dsk3/test1/data/users01.dbf"   datafile 5 auxiliary format "/dsk3/test1/data/example01.dbf"   datafile 6 auxiliary format "/dsk3/test1/data/test1.dbf"   ;sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 24-MAR-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle/oradata/prod/system01.dbf
output file name=/dsk3/test1/oradata/system01.dbf tag=TAG20160324T180122
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/app/oracle/oradata/prod/sysaux01.dbf
output file name=/dsk3/test1/oradata/sysaux01.dbf tag=TAG20160324T180122
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/u01/app/oracle/oradata/prod/example01.dbf
output file name=/dsk3/test1/oradata/example01.dbf tag=TAG20160324T180122
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/app/oracle/oradata/prod/undotbs01.dbf
output file name=/dsk3/test1/oradata/undotbs01.dbf tag=TAG20160324T180122
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/u01/app/oracle/oradata/prod/test1.dbf
output file name=/dsk3/test1/oradata/test1.dbf tag=TAG20160324T180122
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/prod/users01.dbf
output file name=/dsk3/test1/oradata/users01.dbf tag=TAG20160324T180122
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 24-MAR-16
sql statement: alter system archive log current
contents of Memory Script:
{backup as copy reusearchivelog like  "/dsk4/arch_prod/arch_1_32_893265808.log" auxiliary format "/u01/app/oracle/product/11.2.0/db_1/dbs/arch1_32_893265808.dbf"   ;catalog clone archivelog  "/u01/app/oracle/product/11.2.0/db_1/dbs/arch1_32_893265808.dbf";switch clone datafile all;
}
executing Memory Script
Starting backup at 24-MAR-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=32 RECID=26 STAMP=907351568
output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/arch1_32_893265808.dbf RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 24-MAR-16
cataloged archived log
archived log file name=/u01/app/oracle/product/11.2.0/db_1/dbs/arch1_32_893265808.dbf RECID=26 STAMP=907351572
datafile 1 switched to datafile copy
input datafile copy RECID=4 STAMP=907351573 file name=/dsk3/test1/oradata/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=5 STAMP=907351573 file name=/dsk3/test1/oradata/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=6 STAMP=907351574 file name=/dsk3/test1/oradata/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=7 STAMP=907351574 file name=/dsk3/test1/oradata/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=8 STAMP=907351574 file name=/dsk3/test1/oradata/example01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=9 STAMP=907351574 file name=/dsk3/test1/oradata/test1.dbf
contents of Memory Script:
{set until scn  1471172;recoverclone databasedelete archivelog;
}
executing Memory Script
executing command: SET until clause
Starting recover at 24-MAR-16
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK
starting media recovery
archived log for thread 1 with sequence 32 is already on disk as file /u01/app/oracle/product/11.2.0/db_1/dbs/arch1_32_893265808.dbf
archived log file name=/u01/app/oracle/product/11.2.0/db_1/dbs/arch1_32_893265808.dbf thread=1 sequence=32
media recovery complete, elapsed time: 00:00:05
Finished recover at 24-MAR-16
Oracle instance started
Total System Global Area     321507328 bytes
Fixed Size                     2228024 bytes
Variable Size                234881224 bytes
Database Buffers              79691776 bytes
Redo Buffers                   4706304 bytes
contents of Memory Script:
{sql clone "alter system set  db_name = ''TEST1'' comment=''Reset to original value by RMAN'' scope=spfile";sql clone "alter system reset  db_unique_name scope=spfile";shutdown clone immediate;startup clone nomount;
}
executing Memory Script
sql statement: alter system set  db_name =  ''TEST1'' comment= ''Reset to original value by RMAN'' scope=spfile
sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     321507328 bytes
Fixed Size                     2228024 bytes
Variable Size                234881224 bytes
Database Buffers              79691776 bytes
Redo Buffers                   4706304 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST1" RESETLOGS ARCHIVELOG MAXLOGFILES     16MAXLOGMEMBERS      3MAXDATAFILES      100MAXINSTANCES     8MAXLOGHISTORY      292LOGFILEGROUP   1 ( '/dsk3/test1/logs/''redo01.log' ) SIZE 50 M  REUSE,GROUP   2 ( '/dsk3/test1/logs/''redo02.log' ) SIZE 50 M  REUSE,GROUP   3 ( '/dsk3/test1/logs/''redo03.log' ) SIZE 50 M  REUSEDATAFILE'/dsk3/test1/oradata/system01.dbf'CHARACTER SET ZHS16GBKcontents of Memory Script:
{set newname for tempfile  1 to "/dsk3/test1/oradata/temp01.dbf";switch clone tempfile all;catalog clone datafilecopy  "/dsk3/test1/oradata/sysaux01.dbf", "/dsk3/test1/oradata/undotbs01.dbf", "/dsk3/test1/oradata/users01.dbf", "/dsk3/test1/oradata/example01.dbf", "/dsk3/test1/oradata/test1.dbf";switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /dsk3/test1/oradata/temp01.dbf in control file
cataloged datafile copy
datafile copy file name=/dsk3/test1/oradata/sysaux01.dbf RECID=1 STAMP=907351727
cataloged datafile copy
datafile copy file name=/dsk3/test1/oradata/undotbs01.dbf RECID=2 STAMP=907351728
cataloged datafile copy
datafile copy file name=/dsk3/test1/oradata/users01.dbf RECID=3 STAMP=907351728
cataloged datafile copy
datafile copy file name=/dsk3/test1/oradata/example01.dbf RECID=4 STAMP=907351728
cataloged datafile copy
datafile copy file name=/dsk3/test1/oradata/test1.dbf RECID=5 STAMP=907351729
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=907351727 file name=/dsk3/test1/oradata/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=907351728 file name=/dsk3/test1/oradata/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=907351728 file name=/dsk3/test1/oradata/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=907351728 file name=/dsk3/test1/oradata/example01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=907351729 file name=/dsk3/test1/oradata/test1.dbf
Reenabling controlfile options for auxiliary database
Executing: alter database enable block change tracking using file '/dsk4/backup/block.trc'
ORACLE error from auxiliary database: ORA-19751: could not create the change tracking file
ORA-19750: change tracking file: '/dsk4/backup/block.trc'
ORA-27038: created file already exists
Additional information: 1
Ignoring error, reattempt command after duplicate finishes
contents of Memory Script:
{Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 24-MAR-16

五、驗證克隆
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options18:28:57 SYS@ test1>select status from v$instance;
STATUS
------------
OPEN18:29:06 SYS@ test1>select name from v$datafile;
NAME
------------------------------------------------------------------------------------------------------------------------
/dsk3/test1/oradata/system01.dbf
/dsk3/test1/oradata/sysaux01.dbf
/dsk3/test1/oradata/undotbs01.dbf
/dsk3/test1/oradata/users01.dbf
/dsk3/test1/oradata/example01.dbf
/dsk3/test1/oradata/test1.dbf
6 rows selected.18:29:13 SYS@ test1>select member from v$logfile;
MEMBER
------------------------------------------------------------------------------------------------------------------------
/dsk3/test1/logs/redo03.log
/dsk3/test1/logs/redo02.log
/dsk3/test1/logs/redo01.log18:30:19 SYS@ test1>show parameter controlNAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      /dsk3/test1/oradata/control01.ctl  <span style="font-family: 宋體, Arial; background-color: rgb(255, 255, 255);">? ? ? ?</span>

-------- 至此。數據庫克隆成功 。 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??

轉載于:https://www.cnblogs.com/lytwajue/p/7123206.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:
http://www.pswp.cn/news/252376.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/252376.shtml
英文地址,請注明出處:http://en.pswp.cn/news/252376.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

ubuntu16.04安裝evo

背景:這已經是我第二次嘗試安裝evo了,最近因為在bundlefusion加入groundtruth的問題搞的很煩躁,我懷疑是不是我給定的groundtruth是不是不正確,所以我就寫python腳本,獲取計算生成的位姿數據,寫入的groundtruth位姿數據.獲取數據后,將數據可視化就成了一個很重要的問題,我還是打…

前端性能優化之gzip

gzip是GNUzip的縮寫&#xff0c;它是一個GNU自由軟件的文件壓縮程序。它最早由Jean-loup Gailly和Mark Adler創建&#xff0c;用于UNⅨ系統的文件壓縮。我們在Linux中經常會用到后綴為.gz的文件&#xff0c;它們就是GZIP格式的。現今已經成為Internet 上使用非常普遍的一種數據…

luogu2770 航空路線問題 網絡流

題目大意&#xff1a; 給定一張航空圖&#xff0c;圖中頂點代表城市&#xff0c;邊代表 2 城市間的直通航線。現要求找出一條滿足下述限制條件的且途經城市最多的旅行路線。(1)從最西端城市出發&#xff0c;單向從西向東途經若干城市到達最東端城市&#xff0c;然后再單向從東向…

手機錄音ogg格式怎么轉換mp3

Ogg這種音頻格式剛出來的時候大家是非常熱愛的&#xff0c;但是隨著時代的發展&#xff0c;這種音頻格式已經已經被取代了&#xff0c;現在呢走在音頻格式前端的是MP3格式&#xff0c;這是大家都比較熟悉的&#xff0c;但是我們還是會經常下載到ogg這種格式的音頻&#xff0c;就…

TP3.2設置URL偽靜態滿足更好的SEO效果

URL偽靜態通常是為了滿足更好的SEO效果&#xff0c;ThinkPHP支持偽靜態URL設置&#xff0c;可以通過設置URL_HTML_SUFFIX參數隨意在URL的最后增加你想要的靜態后綴&#xff0c;而不會影響當前操作的正常執行。 例如&#xff0c;我們設置 URL_HTML_SUFFIX>shtml 的話&#xf…

[機器學習] 推薦系統之協同過濾算法(轉)

[機器學習]推薦系統之協同過濾算法 在現今的推薦技術和算法中&#xff0c;最被大家廣泛認可和采用的就是基于協同過濾的推薦方法。本文將帶你深入了解協同過濾的秘密。下面直接進入正題. 1. 什么是推薦算法 推薦算法最早在1992年就提出來了&#xff0c;但是火起來實際上是最近這…

BundleFusion代碼框架講解

背景&#xff1a;前面用了幾篇文章來記錄和總結了&#xff0c;我在研究bundlefusion過程中遇到的一些問題以及解決方法&#xff0c;本來想實現給bundlefusion輸入先驗軌跡&#xff0c;然后讓其根據給定的軌跡進行重建&#xff0c;這樣即便在環境比較惡劣的情況下&#xff0c;也…

BundlePhobia

1、BundlePhobia用于分析npm package的依賴、bundle后的大小、下載速度預估等等&#xff0c;幫助你在引用一個package之前了解引入該package的代價。 2、也可以將項目的package.json文件上傳&#xff0c;BundlePhobia會幫你評估項目中所有包的大小和加載速度。

VFL演示樣例

VFL演示樣例 上篇文章向大家介紹了VFL的基本的語法點&#xff0c;假設對下面演示樣例不熟的童鞋&#xff0c;能夠前去參考。廢話不多說。我們直接來看演示樣例。演示樣例一 將五個大小同樣、顏色不同的view排成一行&#xff0c;view間的間隔為15px,第一個view的間隔與屏幕的左邊…

evo實用指令指南

下面這篇文章中有比較具體的關于evo的安裝以及使用的介紹&#xff0c;其中一點很重要&#xff0c;就是可以把euroc形式的.csv的軌跡格式轉換為tum格式的軌跡。 https://zhuanlan.zhihu.com/p/88223106#single evo_traj tum orb_slam2_tum.txt --reftum_groundtruth.txt -p --pl…

MailUtils

/***包名:com.thinkgem.jeesite.test*描述:package com.thinkgem.jeesite.test;*/ package com.thinkgem.jeesite.test;import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.regex.Matcher; import java.u…

ES6遍歷對象

遍歷對象 E S 6 一共有 5 種方法可以遍歷對象的屬性 。 for ... in for . . . in 循環遍歷對象自身的和繼承的可枚舉屬性&#xff08;不含 Symbol 屬性&#xff09;。 Object.keys(obj)Object . keys 返回 一個數組&#xff0c;包括對象自身的&#xff08;不含繼承的 &#xff…

SpringMvc中ModelAndView模型的應用

/** * 目標方法的返回值可以是 ModelAndView 類型。 * 其中可以包含視圖和模型信息 * SpringMVC 會把 ModelAndView 的 model 中數據放入到 request 域對象中. * return */ RequestMapping("/testModelAndView") public ModelAndView testModelAndView(){ String v…

ubuntu16.04 + ros-kinetic 配置cartographer

其實一直以來都感覺純視覺SLAM很難落地產品&#xff0c;所以一直在找機會學習激光slam,之前也在深藍學院上買了一個激光salm的課程&#xff0c;慚愧&#xff0c;至今也沒開始學呢&#xff0c;年底之前&#xff0c;我想工作之余研究一下激光slam和ros&#xff0c;我感覺這兩個東…

virtualbox中安裝ubuntu

為什么80%的碼農都做不了架構師&#xff1f;>>> virtualboxubuntu 安裝virtualbox&#xff0c;當前版本是6.0.4下載ubuntu安裝盤&#xff0c;建議lubuntu&#xff0c;鏈接是http://mirrors.ustc.edu.cn/ubuntu-cdimage/lubuntu/releases/18.04.2/release/lubuntu-1…

面向對象重寫(override)與重載(overload)區別

一、重寫&#xff08;override&#xff09; override是重寫&#xff08;覆蓋&#xff09;了一個方法&#xff0c;以實現不同的功能。一般是用于子類在繼承父類時&#xff0c;重寫&#xff08;重新實現&#xff09;父類中的方法。 重寫&#xff08;覆蓋&#xff09;的規則&#…

cartographer學習筆記--如何保存cartagrapher_ros建好的地圖

今天開始跟著網友大佬學習cartographer. 1. 如何保存cartographer的地圖數據 在運行cartographer過程中可以隨時保存建好的地圖&#xff0c;步驟如下&#xff1a; 首先是重新打開一個terminal, 如果你沒有將你的cartographer_ros下的setup.bash文件寫入到.bashrc中&#xff…

Java微信公眾號開發(五)—— SVN版本控制工具

1 作用 兩個疑問&#xff1a; 什么是版本控制&#xff1f;為什么要用版本控制工具&#xff1f;作用&#xff1a; 受保護受約束合作開發中&#xff0c;版本控制工具更重要的作用就是讓開發者更好地協作&#xff0c;每個人的代碼既能互相調用&#xff0c;來共同完成一個較大的功…

Linux之《荒島余生》(二)CPU篇

為什么80%的碼農都做不了架構師&#xff1f;>>> 溫馨提示&#xff0c;動圖已壓縮&#xff0c;流量黨放心查看。CPU方面內容不多&#xff0c;我們順便學點命令。本篇是《荒島余生》系列第二篇&#xff0c;垂直觀測CPU。其余參見&#xff1a; Linux之《荒島余生》&am…

PTA 06-圖2 Saving James Bond - Easy Version (25分)

題目地址 https://pta.patest.cn/pta/test/16/exam/4/question/672 5-10 Saving James Bond - Easy Version (25分) This time let us consider the situation in the movie "Live and Let Die" in which James Bond, the worlds most famous spy, was captured by…