Mount Data Disk
#vgdispaly的Total PE
Installing the SQL Server service side
1. Download the SQL Server Red Hat repository configuration file:
Curl-o/etc/yum.repos.d/mssql-server.repo Https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
2. Installing an instance of SQL Server
Yum Install-y mssql-server
3. Run mssql-conf Setup Follow the prompts to configure, select the version, set the SA password.
/opt/mssql/bin/mssql-conf Setup
4. Verify that the service is working correctly:
Systemctl Status Mssql-server
5. Disable FIREWALLD
Systemctl Status Firewalldsystemctl Stop firewalldsystemctl disable FIREWALLD
6. Disable SELinux
Getenforcesetenforce 0vi/etc/sysconfig/selinux
Modify the SELinux value to Disabled
Installing SQL Server command-line tools
To create a database, you need to use a tool that can be used to connect Transact SQL statements that run on SQL Server. The following are the SQL Server command-line tools: Sqlcmd and bcp.
1. Download the red Hat repo configuration file.
Curl-o/etc/yum.repos.d/msprod.repo Https://packages.microsoft.com/config/rhel/7/prod.repo
2. Uninstall the old version of the UNIXODBC package.
Yum Remove Unixodbc-utf16 Unixodbc-utf16-devel
3. Install the command-line tool
Yum install-y mssql-tools Unixodbc-devel
4. Add/opt/mssql-tools/bin/to the PATH environment variable.
echo ' Export path= ' $PATH:/opt/mssql-tools/bin "' >> ~/.bash_profileecho ' export path=" $PATH:/opt/mssql-tools/ Bin "' >> ~/.bashrcsource ~/.BASHRC
Local Connection
Install SQL Server 2017 online via official repo on Oracle Linux 7