Install SQL Server vNext using RPM packages under Red Hat Enterprise Linux 7.2

Source: Internet
Author: User
Tags lowercase mssql symlink alphanumeric characters

1. Download the installation package

mssql-server:https://packages.microsoft.com/rhel/7/mssql-server/

mssql-tools:https://packages.microsoft.com/rhel/7/prod/

[[email protected] home]# ll
Total usage 150072

-rw-r--r--   1 root         root            4036892 January   23 14:59 msodbcsql-13.1.3.0-1.x86_64.rpm
-rw-r--r--   1 root        Root         148973180 January   14:33 mssql-server-14.0.200.24-2.x86_64.rpm
- rw-r--r--   1 root        root               254352 January   14:58 mssql-tools-14.0.2.0-1.x86_64.rpm

2. Install Mssql-server

[[email protected] home]# RPM-IVH mssql-server-14.0.200.24-2.x86_64.rpm
Warning: mssql-server-14.0.200.24-2.x86_64.rpm: header V4 rsa/sha256 Signature, key ID Be1229cf:nokey
in preparation ...                            ################################# [100%]
Upgrading/installing ...
   1:mssql-server-14.0.200.24-2       ############################## # # [100%]

+-------------------------------------------------------------------+
| Run/opt/mssql/bin/sqlservr-setup to complete the setup of |
|                      Microsoft (r) SQL Server (R). |
+-------------------------------------------------------------------+

3. Set up the database and start

[Email protected] home]#/opt/mssql/bin/sqlservr-setup
Microsoft (r) SQL Server (r) Setup

You can abort setup at anytime by pressing CTRL-C. Start this program
With the--HELP option for information on running it in unattended
Mode.

The license terms for this product can is downloaded from
http://go.microsoft.com/fwlink/?LinkId=746388 and found
In/usr/share/doc/mssql-server/license. Txt.

Does you accept the license terms? If So, please type "yes": Yes

Please enter a password for the system administrator (SA) account:
The specified password does not meet SQL Server password policy requirements
Because it is not complex enough. The password must is at least 8 characters
Long and contain characters from three of the following five Sets:uppercase
Letters, lowercase letters, numbers, non-alphanumeric characters, or Unicode
Characters that is categorized as alphabetic characters, but is not
Uppercase or lowercase.

Please enter a password for the system administrator (SA) account:
Confirm the password for the system administrator (SA) account:

Setting system Administrator (SA) account password ...

Does wish to start the SQL Server service now? [y/n]: Y
Do I wish to enable SQL Server to start on boot? [y/n]: Y
Created symlink From/etc/systemd/system/multi-user.target.wants/mssql-server.service to/usr/lib/systemd/system/ Mssql-server.service.
Created symlink From/etc/systemd/system/multi-user.target.wants/mssql-server-telemetry.service To/usr/lib/systemd /system/mssql-server-telemetry.service.

Setup completed successfully.

4. Check the boot status of the Mssql-server service via Systemctl

[Email protected] home]# systemctl status Mssql-server
Mssql-server.service-microsoft (r) SQL Server (r) Database Engine
Loaded:loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset:disabled)
Active:active (running) since a 2017-01-23 14:44:49 CST; 6min ago
Main pid:9638 (sqlservr)
CGroup:/system.slice/mssql-server.service
├─9638/opt/mssql/bin/sqlservr
└─9648/opt/mssql/bin/sqlservr

January 14:44:57 Fszabbix sqlservr[9638]: 2017-01-23 06:44:57.90 spid20s The Service Broker endpoint is in disabled or s Topped state.
January 14:44:57 Fszabbix sqlservr[9638]: 2017-01-23 06:44:57.90 spid20s The Database mirroring endpoint is in disabled or stopped state.
January 14:44:57 Fszabbix sqlservr[9638]: 2017-01-23 06:44:57.93 spid20s Service Broker Manager has started.
January 14:44:57 Fszabbix sqlservr[9638]: 2017-01-23 06:44:57.98 spid16s A self-generated certificate was successfully l oaded for encryption.
January 14:44:58 Fszabbix sqlservr[9638]: 2017-01-23 06:44:58.01 spid16s Server is listening on [0.0.0.0 <ipv4> 1 433].
January 14:44:58 Fszabbix sqlservr[9638]: 2017-01-23 06:44:58.05 server server is listening on [127.0.0.1 <ipv4> 1434].
January 14:44:58 Fszabbix sqlservr[9638]: 2017-01-23 06:44:58.08 Server Dedicated admin connection support was Establis Hed for listening locally on port 1434.
January 14:44:58 Fszabbix sqlservr[9638]: 2017-01-23 06:44:58.08 spid16s Recovery is complete. This is a informational message only. No user action is required.
January 14:44:58 Fszabbix sqlservr[9638]: 2017-01-23 06:44:58.09 spid16s SQL Server is now ready for client connections. This is an informational message; No user action is required.
January 14:50:00 Fszabbix sqlservr[9638]: 2017-01-23 06:50:00.95 spid51 Using ' dbghelp.dll ' version ' 4.0.5 '

5. Configure the database

With the mssql-conf command to carry out some simple configuration, configurable items are not many, mainly the listening port, the default data file directory, the directory where the log, backup directory, etc.

[Email protected] home]#/opt/mssql/bin/mssql-conf list
Supported settings using the ' Set ' option:
TCPPort
Defaultbackupdir
Defaultdumpdir
Defaultlogdir
Defaultdatadir
For all command line options Use-h or–help

6. Installing Mssql-tool

If you want to log into the database directly from the SQLCMD command line on the server, you will also need to install an additional Mssql-tools RPM package that includes sqlcmd and bcp (Bulk import-export utility)

Installing the Mssql-tool requires installing the Msodbcsql package first

[[email protected] home]# rpm-ivh msodbcsql-13.1.3.0-1.x86_64.rpm
Warning: msodbcsql-13.1.3.0-1.x86_64.rpm: Header V4 rsa/sha256 Signature, key ID Be1229cf:nokey
in preparation ...                           ############## ################### [100%]
The license terms for this product can is downloaded from
Http://go.microsoft.com/fwlin k/? linkid=746838 and found in
/usr/share/doc/msodbcsql/license. Txt. By entering ' YES ',
you indicate the license terms.

Do you accept the license terms? (Enter YES or NO)
Yes
Please enter Yes or NO
does you accept the license terms? (Enter YES or NO)
YES
is upgrading/installing ...
   1:msodbcsql-13.1.3.0-1             ################################# [100%]
[[email protected] home]# RPM-IVH mssql-tools-14.0.2.0-1.x86_64. RPM
Warning: mssql-tools-14.0.2.0-1.x86_64.rpm: header V4 rsa/sha256 Signature, key ID Be1229cf:nokey
in preparation ...   & nbsp;                        ################################# [100%]
The license terms for this product can be Dow Nloaded from
http://go.microsoft.com/fwlink/?LinkId=746949 and found in
/usr/share/doc/mssql-tools/license.txt. By entering ' YES ',
you indicate the license terms.

Does you accept the license terms? (Enter YES or NO)
YES
Upgrading/installing ...
1:mssql-tools-14.0.2.0-1 ################################# [100%]

7. Logging into the database via sqlcmd

Install SQL Server vNext using RPM packages under Red Hat Enterprise Linux 7.2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.