标签:安装 Server rpm SQL SQLSERVER2019 server root mssql CentOS8
1. 获取rpm包直接从微软官方网站即可
-rw-r--r-- 1 root root 820984 Apr 5 22:23 msodbcsql17-17.5.2.1-1.x86_64.rpm -rw-r--r-- 1 root root 219635192 Apr 5 22:23 mssql-server-15.0.4033.1-2.x86_64.rpm -rw-r--r-- 1 root root 228664 Apr 5 22:23 mssql-tools-17.5.2.1-1.x86_64.rpm -rw-r--r-- 1 root root 56064 Apr 5 22:23 unixODBC-devel-2.3.1-14.el7.i686.rpm -rw-r--r-- 1 root root 43504 Apr 5 22:23 unixODBC-devel-2.3.7-1.rh.x86_64.rpm
2. 安装完rpm包之后根据提示信息进行创建
+--------------------------------------------------------------+ Please run 'sudo /opt/mssql/bin/mssql-conf setup' to complete the setup of Microsoft SQL Server +--------------------------------------------------------------+
创建过程为:
[root@CentOS8 sql2019rpm]# /opt/mssql/bin/mssql-conf setup usermod: no changes Choose an edition of SQL Server: 1) Evaluation (free, no production use rights, 180-day limit) 2) Developer (free, no production use rights) 3) Express (free) 4) Web (PAID) 5) Standard (PAID) 6) Enterprise (PAID) - CPU Core utilization restricted to 20 physical/40 hyperthreaded 7) Enterprise Core (PAID) - CPU Core utilization up to Operating System Maximum 8) I bought a license through a retail sales channel and have a product key to enter. Details about editions can be found at https://go.microsoft.com/fwlink/?LinkId=2109348&clcid=0x409 Use of PAID editions of this software requires separate licensing through a Microsoft Volume Licensing program. By choosing a PAID edition, you are verifying that you have the appropriate number of licenses in place to install and run this software. Enter your edition(1-8): 7 The license terms for this product can be found in /usr/share/doc/mssql-server or downloaded from: https://go.microsoft.com/fwlink/?LinkId=2104294&clcid=0x409 The privacy statement can be viewed at: https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409 Do you accept the license terms? [Yes/No]:YES Enter the SQL Server system administrator password: The specified password contains an invalid character. Valid characters include uppercase letters, lowercase letters, numbers, symbols, punctuation marks, and unicode characters that are categorized as alphabetic but are not uppercase or lowercase. Enter the SQL Server system administrator password: Confirm the SQL Server system administrator password: Configuring SQL Server... ^[ORThe licensing PID was successfully processed. The new edition is [Enterprise Edition: Core-based Licensing]. ForceFlush is enabled for this instance. ForceFlush feature is enabled for log durability. Created symlink /etc/systemd/system/multi-user.target.wants/mssql-server.service → /usr/lib/systemd/system/mssql-server.service. Setup has completed successfully. SQL Server is now starting.
3. 设置字符集
1. 首先关掉服务
systemctl stop mssql-server
2. 执行命令
/opt/mssql/bin/mssql-conf set-collation 3. 然后设置常用字符集即可 chinese_prc_ci_as
4. 重启服务
systemctl restart mssql-server
4. 增加环境变量
vim /etc/profile.d/db.sh export PATH=$PATH:/opt/mssql-tools/bin source 使之生效
5. 进行了解测试
[root@CentOS8 opt]# sqlcmd -H 127.0.0.1 -U sa Password: 1> select @@version 2> go ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Microsoft SQL Server 2019 (RTM-CU4) (KB4548597) - 15.0.4033.1 (X64) Mar 14 2020 16:10:35 Copyright (C) 2019 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Linux (CentOS Linux 8 (Core)) <X64> (1 rows affected) 1>
标签:安装,Server,rpm,SQL,SQLSERVER2019,server,root,mssql,CentOS8 来源: https://www.cnblogs.com/jinanxiaolaohu/p/12639678.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。