[转帖]安装HANA数据库

爱⌒轻易说出口 提交于 2020-03-30 06:51:03

安装数据库

https://support.huawei.com/enterprise/zh/doc/EDOC1100082491/bc8e25fe

 

  1. 以root用户名登录服务器,打开“Terminal”窗口。
  2. 执行cd命令切换目录到SAP HANA数据库软件拷贝所在的目录下面,本例是“cd /hana/shared/hana2.0”。
  3. 执行chmod +x *命令,增加可执行权限。

     

    hw00001:/hana/shared/hana2.0 # chmod +x *

     

  4. 执行./SAPCAR_816-80000935.EXE -manifest SIGNATURE.SMF -xvf IMDB_SERVER20_020_0-80002031.SAR命令解压数据库文件(SAPCAR和IMDB_SERVER的具体版本根据实际需求安装),得到一个 SAP_HANA_DATABASE目录以及“SIGNATURE.SMF”文件夹。

     

    hw00001:/hana/shared/hana2.0 # ./SAPCAR_816-80000935.EXE -manifest SIGNATURE.SMF -xvf IMDB_SERVER20_020_0-80002031.SAR 

     

  5. 执行命令cp SIGNATURE.SMF SAP_HANA_DATABASE/把解压生成的校验文件 “SIGNATURE.SMF”复制到SAP_HANA_DATABASE目录下面。

     

     

  6. 安装SAP HANA数据库。

     

    1. 执行cd SAP_HANA_DATABASE/命令进入SAP_HANA_DATABASE目录,再执行chmod +x -R *命令增加可执行权限,再执行./hdblcm命令。
    2. 配置如下说明信息。

      说明:
      • 安装路径:保持默认路径/hana/shared。
      • SAP HANA System ID:输入SystemID,如S00 (根据客户需求定义SID)。
      • 输入HANA的数据存放目录和日志存放目录:使用默认路径/hana/data/;/hana/log/。
      • 输入数据库的“User(SYSTEM) Password”,按“Enter”,再次输入密码后按“Enter”(密码复杂度要求包括大写字母、小写字母、数字与特殊字符的组合)。
      • Restrict maximum memory allocation?”项,修改为“n”
      • “Restart instance after machine reboot?”项,修改为“n”。

      以下是SAP_HANA_DATABASE1.0数据库配置界面提示。

      [root@hw00001 05012GAN]# ./hdblcm
      
      
      SAP HANA Lifecycle Management - SAP HANA 1.00.122.11.1499758750
      ***************************************************************
      
      
      Scanning Software Locations...
      Detected components:
          SAP HANA Database (1.00.122.11.1499758750) in /home/05012GAN/server
      
      
      
      Choose installation
      
        Index | System             | Database Properties
        ------------------------------------------------
        1     | Install new system |
              |                    |
        2     | Extract components |
        3     | Exit (do nothing)  |
      
      Enter selected system index [3]: 1//选择“1”安装新系统
      
      Enter Installation Path [/hana/shared]://输入安装路径,本例中保持默认
      Enter Local Host Name [hw00001]://输入主机名,本例保持一致。
      Do you want to add additional hosts to the system? (y/n) [n]: n//是否增加其他主机名,本例为单机场景选择“n”
      Enter SAP HANA System ID: S01//输入数据库系统ID,本例为S01。
      Enter Instance Number [00]://输入数据库实例号,本例为00.
      
        Index | Database Mode       | Description
        -----------------------------------------------------------------------------------------------
        1     | single_container    | The system contains one database
        2     | multiple_containers | The system contains one system database and 1..n tenant databases
      
      Select Database Mode / Enter Index [1]://本例为单租户
      
        Index | System Usage | Description
        -------------------------------------------------------------------------------
        1     | production   | System is used in a production environment
        2     | test         | System is used for testing, not production
        3     | development  | System is used for development, not production
        4     | custom       | System usage is neither production, test nor development
      
      Select System Usage / Enter Index [4]: 1//输入数据库用途,本例中为生产环境输入“1”
      Enter Location of Data Volumes [/hana/data/S01]://输入HANA的数据存放路径,本例中保持默认
      Enter Location of Log Volumes [/hana/log/S01]://输入HANA的日志存放路径,本例中保持默认
      Restrict maximum memory allocation? [n]://是否限制HANA内存大小,本例中为单实例选择“n”
      Enter Certificate Host Name For Host 'hw00001' [hw00001]://保持默认
      Enter SAP Host Agent User (sapadm) Password: //输入sap代理主机的账号密码
      Confirm SAP Host Agent User (sapadm) Password: //确认sap代理主机的账号密码
      Enter System Administrator (s01adm) Password: //输入<sid>adm数据库管理账号密码
      Confirm System Administrator (s01adm) Password: //确认<sid>adm数据库管理账号密码
      Enter System Administrator Home Directory [/usr/sap/S01/home]://保持默认
      Enter System Administrator Login Shell [/bin/sh]://保持默认
      Enter System Administrator User ID [1001]://保持默认
      Enter ID of User Group (sapsys) [79]://保持默认
      Enter Database User (SYSTEM) Password://输入数据库管理SYSTEM账号密码,可以设置和<sid>adm一致
      Confirm Database User (SYSTEM) Password://确认数据库管理SYSTEM账号密码,可以设置和<sid>adm一致
      Restart system after machine reboot? [n]: //保持默认
      
      Summary before execution:
      =========================
      
      SAP HANA Components Installation
         Installation Parameters
            Remote Execution: ssh
            Installation Path: /hana/shared
            Local Host Name: hw00001
            SAP HANA System ID: S01
            Instance Number: 00
            Database Mode: single_container
            System Usage: production
            Location of Data Volumes: /hana/data/S01
            Location of Log Volumes: /hana/log/S01
            Certificate Host Names: hw00001 -> hw00001
            System Administrator Home Directory: /usr/sap/S01/home
            System Administrator Login Shell: /bin/sh
            System Administrator User ID: 1001
            ID of User Group (sapsys): 79
         Software Components
            SAP HANA Database
               Install version 1.00.122.11.1499758750
               Location: /home/05012GAN/server
      
      Do you want to continue? (y/n): y //确认信息后继续安装
      Installing components...
      Installing SAP HANA Database...
      ? Preparing package 'Saphostagent Setup'...
      ? Preparing package 'Python Support'...
      ? Preparing package 'Python Runtime'...
      ? Preparing package 'Product Manifest'...
      ? Preparing package 'Binaries'...
      ? Preparing package 'Data Quality'...
      ? Preparing package 'Krb5 Runtime'...
      ? Preparing package 'Installer'...
      ? Preparing package 'Ini Files'...
      ? Preparing package 'HWCCT'...
      ? Preparing package 'Emergency Support Package'...
      ? Preparing package 'EPM'...
      ? Preparing package 'Documentation'...
      ? Preparing package 'Delivery Units'...
      ? Preparing package 'DAT Languages'...
      ? Preparing package 'DAT Configfiles'...
      ? Creating System...
      ? Extracting software...
      ? Installing package 'Saphostagent Setup'...
      ? Installing package 'Python Support'...
      ? Installing package 'Python Runtime'...
      ? Installing package 'Product Manifest'...
      ? Installing package 'Binaries'...
      ? Installing package 'Data Quality'...
      ? Installing package 'Krb5 Runtime'...
      ? Installing package 'Installer'...
      ? Installing package 'Ini Files'...
      ? Installing package 'HWCCT'...
      ? Installing package 'Emergency Support Package'...
      ? Installing package 'EPM'...
      ? Installing package 'Documentation'...
      ? Installing package 'Delivery Units'...
      ? Installing package 'DAT Languages'...
      ? Installing package 'DAT Configfiles'...
      ? Creating instance...
      ? Starting SAP HANA Database system...
      ? Starting 1 process on host 'hw00001' (worker):
      ????? Starting on 'hw00001': hdbdaemon
      ? Starting 7 processes on host 'hw00001' (worker):
      ????? Starting on 'hw00001': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
      ????? Starting on 'hw00001': hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
      ????? Starting on 'hw00001': hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine
      ????? Starting on 'hw00001': hdbdaemon, hdbwebdispatcher, hdbxsengine
      ????? Starting on 'hw00001': hdbdaemon, hdbwebdispatcher
      ??? All server processes started on host 'hw00001' (worker).
      ? Importing delivery units...
      ? Importing delivery unit HCO_INA_SERVICE
      ? Importing delivery unit HANA_DT_BASE
      ? Importing delivery unit HANA_IDE_CORE
      ? Importing delivery unit HANA_TA_CONFIG
      ? Importing delivery unit HANA_UI_INTEGRATION_SVC
      ? Importing delivery unit HANA_UI_INTEGRATION_CONTENT
      ? Importing delivery unit HANA_XS_BASE
      ? Importing delivery unit HANA_XS_DBUTILS
      ? Importing delivery unit HANA_XS_EDITOR
      ? Importing delivery unit HANA_XS_IDE
      ? Importing delivery unit HANA_XS_LM
      ? Importing delivery unit HDC_ADMIN
      ? Importing delivery unit HDC_BACKUP
      ? Importing delivery unit HDC_IDE_CORE
      ? Importing delivery unit HDC_SEC_CP
      ? Importing delivery unit HDC_XS_BASE
      ? Importing delivery unit HDC_XS_LM
      ? Importing delivery unit SAPUI5_1
      ? Importing delivery unit SAP_WATT
      ? Importing delivery unit HANA_BACKUP
      ? Importing delivery unit HANA_HDBLCM
      ? Importing delivery unit HANA_SEC_BASE
      ? Importing delivery unit HANA_SEC_CP
      ? Importing delivery unit HANA_ADMIN
      ? Importing delivery unit HANA_WKLD_ANLZ
      Installing Resident hdblcm...
      Updating SAP HANA Instance Integration on Local Host...
      ? Deploying SAP Host Agent configurations...
      Creating Component List...
      SAP HANA system installed
      You can send feedback to SAP with this form: https://hw00001:1129/lmsl/HDBLCM/S02/feedback/feedback.html
      Log file written to '/var/tmp/hdb_S02_hdblcm_install_2018-03-07_17.45.36/hdblcm.log' on host 'hw00001'.

       

      以下为SAP_HANA_DATABASE2.0数据库配置界面提示。

      hw00001:/hana/shared/hana2.0/SAP_HANA_DATABASE # ./hdblcm
      SAP HANA Lifecycle Management - SAP HANA Database 2.00.020.00.1500920972
      ************************************************************************
      Scanning software locations...
      Detected components:
          SAP HANA Database (2.00.020.00.1500920972) in /hana/shared/hana2.0/SAP_HANA_DATABASE/server
      
      Choose an action
      
        Index | Action             | Description
        -----------------------------------------------
        1     | install            | Install new system
        2     | extract_components | Extract components
        3     | Exit (do nothing)  | 
      
      Enter selected action index [3]: 1    //选择“1”安装新系统
      Enter Installation Path [/hana/shared]:   //输入安装路径,本例中保持默认
      Enter Local Host Name [hw00001]:      //输入主机名,本例中保持默认
      Do you want to add hosts to the system? (y/n) [n]: //是否增加其他主机名,本例中为单机场景输入“n”
      Enter SAP HANA System ID: S00     //输入数据库系统ID,本例中为“S00”
      Enter Instance Number [00]:    //输入数据库实例号,本例中为“00”
      Enter Local Host Worker Group [default]:   //输入本机工作组,本例中保持默认
      
        Index | System Usage | Description
        -------------------------------------------------------------------------------
        1     | production   | System is used in a production environment
        2     | test         | System is used for testing, not production
        3     | development  | System is used for development, not production
        4     | custom       | System usage is neither production, test nor development
      
      Select System Usage / Enter Index [4]: 1  //输入数据库用途,本例中为生产环境输入“1”
      Enter Location of Data Volumes [/hana/data/S00]:  //输入HANA的数据存放路径,本例中保持默认
      Enter Location of Log Volumes [/hana/log/S00]:  //输入HANA的日志存放路径,本例中保持默认
      Restrict maximum memory allocation? [n]:  //是否限制HANA内存大小,本例中为单实例选择“n”
      Enter Certificate Host Name For Host 'hw00001' [hw00001]:  //保持默认
      Enter System Administrator (s00adm) Password:   //输入<sid>adm数据库管理账号密码
      Confirm System Administrator (s00adm) Password:  //确认<sid>adm数据库管理账号密码
      Enter System Administrator Home Directory [/usr/sap/S00/home]:  //保持默认          
      Enter System Administrator Login Shell [/bin/sh]:   //保持默认
      Enter System Administrator User ID [1001]:  //保持默认
      Enter System Database User (SYSTEM) Password: //输入数据库管理SYSTEM账号密码,可以设置和<sid>adm一致
      Confirm System Database User (SYSTEM) Password: //确认数据库管理SYSTEM账号密码,可以设置和<sid>adm一致
      Restart system after machine reboot? [n]:  //保持默认
      
      Summary before execution:
      =========================
      
      SAP HANA Database System Installation
         Installation Parameters
            Remote Execution: ssh
            Database Isolation: low
            Installation Path: /hana/shared
            Local Host Name: hw00001
            SAP HANA System ID: S00
            Instance Number: 00
            Local Host Worker Group: default
            System Usage: production
            Location of Data Volumes: /hana/data/S00
            Location of Log Volumes: /hana/log/S00
            Certificate Host Names: hw00001 -> hw00001
            System Administrator Home Directory: /usr/sap/S00/home
            System Administrator Login Shell: /bin/sh
            System Administrator User ID: 1001
            ID of User Group (sapsys): 79
         Software Components
            SAP HANA Database
               Install version 2.00.020.00.1500920972
               Location: /hana/shared/hana2.0/SAP_HANA_DATABASE/server
      
      Do you want to continue? (y/n): Y   //确认信息后继续安装
      
      Installing components...
      Installing SAP HANA Database...
        Preparing package 'Saphostagent Setup'...
        Preparing package 'Python Support'...
        Preparing package 'Python Runtime'...
        Preparing package 'Product Manifest'...
        Preparing package 'Binaries'...
        Preparing package 'Data Quality'...
        Preparing package 'Krb5 Runtime'...
        Preparing package 'Installer'...
        Preparing package 'Ini Files'...
        Preparing package 'HWCCT'...
        Preparing package 'Documentation'...
        Preparing package 'Delivery Units'...
        Preparing package 'Offline Cockpit'...
        Preparing package 'DAT Languages (EN, DE)'...
        Preparing package 'DAT Languages (other)'...
        Preparing package 'DAT Configfiles (EN, DE)'...
        Preparing package 'DAT Configfiles (other)'...
        Creating System...
        Extracting software...
        Installing package 'Saphostagent Setup'...
        Installing package 'Python Support'...
        Installing package 'Python Runtime'...
        Installing package 'Product Manifest'...
        Installing package 'Binaries'...
        Installing package 'Data Quality'...
        Installing package 'Krb5 Runtime'...
        Installing package 'Installer'...
        Installing package 'Ini Files'...
        Installing package 'HWCCT'...
        Installing package 'Documentation'...
        Installing package 'Delivery Units'...
        Installing package 'Offline Cockpit'...
        Installing package 'DAT Languages (EN, DE)'...
        Installing package 'DAT Languages (other)'...
        Installing package 'DAT Configfiles (EN, DE)'...
        Installing package 'DAT Configfiles (other)'...
        Creating instance...
        Starting SAP HANA Database system...
        Starting 4 processes on host 'hw00001' (worker):
            Starting on 'HW00001': hdbcompileserver, hdbdaemon, hdbnameserver, hdbpreprocessor
        Starting 7 processes on host 'hw00001' (worker):
            Starting on 'HW00001': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
            Starting on 'HW00001': hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
            Starting on 'HW00001': hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine
            Starting on 'HW00001': hdbdaemon, hdbwebdispatcher, hdbxsengine
            Starting on 'HW00001': hdbdaemon, hdbwebdispatcher
          All server processes started on host 'hw00001' (worker).
        Importing delivery units...
        Importing delivery unit HCO_INA_SERVICE
        Importing delivery unit HANA_DT_BASE
        Importing delivery unit HANA_IDE_CORE
        Importing delivery unit HANA_TA_CONFIG
        Importing delivery unit HANA_UI_INTEGRATION_SVC
        Importing delivery unit HANA_UI_INTEGRATION_CONTENT
        Importing delivery unit HANA_XS_BASE
        Importing delivery unit HANA_XS_DBUTILS
        Importing delivery unit HANA_XS_EDITOR
        Importing delivery unit HANA_XS_IDE
        Importing delivery unit HANA_XS_LM
        Importing delivery unit HDC_ADMIN
        Importing delivery unit HDC_BACKUP
        Importing delivery unit HDC_IDE_CORE
        Importing delivery unit HDC_SEC_CP
        Importing delivery unit HDC_SYS_ADMIN
        Importing delivery unit HDC_XS_BASE
        Importing delivery unit HDC_XS_LM
        Importing delivery unit SAPUI5_1
        Importing delivery unit SAP_WATT
        Importing delivery unit HANA_SEC_CP
        Importing delivery unit HANA_BACKUP
        Importing delivery unit HANA_HDBLCM
        Importing delivery unit HANA_SEC_BASE
        Importing delivery unit HANA_SYS_ADMIN
        Importing delivery unit HANA_ADMIN
        Importing delivery unit HANA_WKLD_ANLZ
      Installing Resident hdblcm...
      Updating SAP HANA Database Instance Integration on Local Host...
        Deploying SAP Host Agent configurations...
      Creating Component List...
      SAP HANA Database System installed
      You can send feedback to SAP with this form: https://hw00001:1129/lmsl/HDBLCM/S00/feedback/feedback.html
      Log file written to '/var/tmp/hdb_S00_hdblcm_install_2017-09-23_00.02.44/hdblcm.log' on host 'HW00001'.

    说明:

    如果数据库安装失败,请先卸载安装失败的数据库(卸载步骤请参考卸载数据库,然后再重新安装。

     

  7. 验证数据库安装是否成功。

     

    1. 执行以下命令切换到数据库系统管理员用户:
      • HANA1.0数据库,执行su - s01adm命令切换到数据库系统管理员用户。
      • HANA2.0数据库,执行su - s00adm命令切换到数据库系统管理员用户。

      “s01adm”和“s00adm”是上述数据库安装过程中配置的数据库系统管理员用户名,命名规则为 <sid>adm。比如SID是S00,则用户名是s00adm。

    2. 执行HDB -version命令查询数据库版本信息,若能查询到版本信息说明数据库安装成功。
    3. 执行exit命令退回到操作系统用户模式。

    查询版本信息:

    hw00001:/hana/shared/hana2.0/SAP_HANA_DATABASE # su - s00adm
    s00adm@HW00001:/usr/sap/S00/HDB00> HDB -version
    HDB version info:
      version:             2.00.020.00.1500920972
      branch:              fa/hana2sp02
      git hash:            7f63b0aa11dca2ea54d450aa302319302c2eeaca
      git merge time:      2017-07-24 20:29:32
      weekstone:           0000.00.0
      compile date:        2017-07-24 20:35:12
      compile host:        ld4551
      compile type:        rel
    1. 执行ps -le |grep hdb命令查看数据库主要进程是否正常运行。
    s00adm@hw00001:/usr/sap/S00/HDB00> ps -le |grep hdb
    0 S  1001 439505 439497  0  80   0 - 79296 -      ?        00:00:00 hdb.sapS00_HDB0
    0 S  1001 439521 439505 66  80   0 - 9889652 -    ?        00:05:25 hdbnameserver
    0 S  1001 439704 439505  2  80   0 - 2915642 -    ?        00:00:13 hdbcompileserve
    0 S  1001 439706 439505 99  80   0 - 14534411 -   ?        00:54:56 hdbpreprocessor
    0 S  1001 439746 439505 81  80   0 - 11347338 -   ?        00:06:15 hdbindexserver
    0 S  1001 439748 439505  3  80   0 - 5819535 -    ?        00:00:15 hdbxsengine
    0 S  1001 440986 439505  2  80   0 - 2757016 -    ?        00:00:10 hdbwebdispatche
    1. 执行以下命令启动和关闭数据库。
    hw00001:/hana/shared/hana2.0/SAP_HANA_DATABASE # su - s00adm
    s00adm@HW00001:/usr/sap/S00/HDB00> HDB start   //启动SAP HANA数据库
    s00adm@HW00001:/usr/sap/S00/HDB00>HDB stop   //关闭SAP HANA数据库。注意在关闭操作系统前请先使用该命令关闭SAP HANA数据库
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!