HomeContact

Install Microsoft SQL on Centos

بواسطة Shady Nagy
نُشر في MS SQL
July 08, 2021
2 دقيقة للقراءة
Install Microsoft SQL on Centos
هذا المحتوى غير متوفر باللغة العربية. يتم عرض النسخة الأصلية.

جدول المحتويات

01
Introduction
02
Prerequisites
03
Installation Steps
04
Conclusion
05
Further Reading
06
Feedback and Questions

Introduction

In this blog post, we will guide you through the process of installing Microsoft SQL Server (MSSQL) on a CentOS 8 Linux machine. By following these steps, you will be able to access your SQL Server from a Windows machine using the MSSQL Management Studio.

Prerequisites

Before starting, ensure your CentOS 8 machine meets the following specifications:

  • Minimum memory of 3 GB
  • CPU processor with a minimum speed of 1.4 GHz (recommended >= 2 GHz)
  • SQL Server requires a minimum of 10 GB of available hard-disk space

Installation Steps

  1. Add the repository: To install MSSQL, we first need to add the repository.
$ sudo curl https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo -o /etc/yum.repos.d/mssql-server-2019.repo
$ sudo curl https://packages.microsoft.com/config/rhel/8/prod.repo -o /etc/yum.repos.d/msprod.repo
  1. Install the latest MSSQL: Use this command to install the latest version of MSSQL Server.
$ sudo dnf -y install mssql-server
  1. Initialize the MS SQL Database Engine: Run the following command to set up the database engine.
$ sudo /opt/mssql/bin/mssql-conf setup
  1. Check the service status: Ensure the MSSQL service is running and enabled.
$ systemctl status mssql-server.service
$ systemctl is-enabled mssql-server.service
  1. Change the default port: Use this command to change the default MSSQL port (1433) to another port, such as 5201.
$ sudo /opt/mssql/bin/mssql-conf set network.tcpport 5201
  1. Restart the MS SQL service: Restart the MSSQL service to apply the changes.
$ sudo systemctl restart mssql-server
  1. Add a firewall rule: Configure the firewall to allow traffic on the new port.
$ sudo firewall-cmd --zone=public --add-port=5201/tcp --permanent
  1. Restart the firewall: Apply the firewall rule by reloading the configuration.
$ sudo firewall-cmd --reload
  1. Connect to your SQL Server: Now you can log in to your SQL Server from the MSSQL Management Studio by entering:
  • Server Name: {server ip}\SQLEXPRESS,5201
  • User Name: sa
  • Password: {password set during setup}

Conclusion

In this tutorial, we have shown you how to install Microsoft SQL Server (MSSQL) on a CentOS 8 Linux machine. With these steps, you should be able to access your SQL Server from a Windows machine using the MSSQL Management Studio. This setup enables you to take advantage of the power and flexibility of SQL Server on a Linux platform.

Further Reading

To learn more about SQL Server on Linux and to explore its features, you can visit the following resources:

  1. Microsoft SQL Server on Linux Documentation: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-overview?view=sql-server-ver15
  2. SQL Server Management Studio (SSMS) Documentation: https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-ssms?view=sql-server-ver15
  3. CentOS 8 Documentation: https://docs.centos.org/en/centos8/

Troubleshooting

If you encounter any issues during the installation or connection process, you can refer to the following resources for help:

  1. Microsoft SQL Server Troubleshooting Guide: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-troubleshooting-guide?view=sql-server-ver15
  2. CentOS 8 Troubleshooting Guide: https://www.centos.org/docs/8-docs/en-US/8.0.1905/rn/Troubleshooting_Guide/index.html

Feedback and Questions

We’d love to hear your feedback on this tutorial! If you have any questions or suggestions for improvement, please don’t hesitate to reach out. You can leave a comment below, or you can contact us through the following channels:

  1. Email: shady@shadynagy.com
  2. Twitter: @ShadyNagy_
  3. LinkedIn: Shady Nagy

We’ll do our best to address any questions or concerns you may have. We look forward to hearing from you and helping you make the most of Microsoft SQL Server on a CentOS 8 Linux machine!


الوسوم

#Microsoft#centos#mssql#sql

مشاركة


Shady Nagy

Shady Nagy

Software Innovation Architect

المواضيع

Angular
AI
GatsbyJS
dotnet
Github
Linux
MS SQL
Oracle

Quick Links

Contact Us

وسائل التواصل الاجتماعي