Bobcares

How to install SQL Tools on Redhat Linux without Internet – Offline Installation

by | Oct 18, 2020

Are you looking for steps to install SQL tools on Redhat offline? Take a peek at this blog.

Here at Bobcares, we have seen several such SQL related queries as part of our Server Management Services for web hosts and online service providers.

Today we’ll take a look at how to install SQL tools on Redhat without the internet.

 

Know more about SQL tools

SQL Tools is a development tool pack that provides many essential features for any Microsoft SQL Server developer.

We can easily install the SQL tools with internet access. However, it is a bit complex task to install it offline.

The mssql-tools package contains two utilities i.e. sqlcmd and bcp which we will be installing now.

 

How to install SQL tools on Redhat without internet/offline

Here are the steps our Support Engineers follow to install the SQL tools without an internet connection.

 

1. Download & Copy SQL Tools Packages to Linux Server

First, we check whether the SQL server is installed or not on the machine. For that, we run the below command.

$ systemctl status mssql-server

As a result, it must display that the SQL server is running on the machine.

Now, it’s time to check if the SQL tools are installed on the machine or not. For that, we run the below command.

$ sqlcmd

If the above command shows a result of ‘No such file or directory’ then it means that the SQL tools are not yet installed.

So now let’s start with downloading the rpm packages for SQL tools. You can download these packages on a machine that is connected to the internet. Here is the list of rpm packages that you would need to download.

msodbcsql-13.1.9.0-1.x86_64.rpm
mssql-tools-14.0.5.0-1.x86_64.rpm

First, we need to install msodbcsql as the SQL Tools package depends on it. Installing it will avoid any dependency issue. After downloading the package to your local PC, copy the downloaded packages to the RedHat Linux server that will be running without an internet connection.

You can use any tool, application, or method to copy this file from localhost to Linux server. Here, we used the WinSCP tool to copy this file from the local machine to the Linux server.

Now we launch the WinSCP tool and make a connection to the Red Hat Linux server. Enter the login details and establish a connection.

There will be two panes in the WinSCP window. The files in the left side pane are your local system and the right side pane is your target Linux server.

Now we need to drag the downloaded rpm packages from the left side pane and drop it to the right side pane. Now the files are copied and we can see the files in both side panes.

We have copied the rpm packages to location \home\techyaz\Packages\.

 

2. Installing SQL Tools on Redhat

Now, we shall install the packages. For that, run the below command.

sudo yum localinstall msodbcsql-13.1.9.0-1.x86_64.rpm

Sometimes, it may fail due to the dependency unixODBC package. So make sure you install it.

For that, download the unixODBC package on the localhost and copy it to the Linux server using WinSCP. Run the below command to check if the file is copied on the server.

ls -lrt

Then you can run the command to install the package.

sudo yum localinstall unixODBC-2.3.2-6.fc22.x86_64.rpm

Once the installation will start, it will check dependencies and ask you to type y to proceed with the installation.

We have now installed the required package for msodbc package. So go ahead and install this package again. Run the below command to execute the installation.

sudo yum localinstall unixODBC-2.3.2-6.fc22.x86_64.rpm

The setup will ask for confirmation. So press Y and hit Enter to continue the installation process.

Then you will be asked to accept the license terms. Type YES to accept the license terms and press enter to proceed.

Next, install the mssql-tools package. For that, run the below command.

sudo yum localinstall mssql-tools-14.0.5.0-1.x86_64.rpm

Your confirmation is required to complete the installation. So press Y and press Enter.

Then you will be asked to accept the license terms. Type YES to accept the license terms and press enter to proceed.

Now, you must be able to see that the SQL Server Tools have been installed on this server. Then you can go ahead and run the below command to confirm the installation.

sqlcmd

In case, if you receive the error ‘command not found’ then it means that the RHEL is not able to recognize the SQL tools. So now we shall add /opt/mssql-tools/bin/ to your PATH environment variable in a bash shell. For that, run the below commands.

Here is the command to make sqlcmd/bcp accessible from the bash shell for login sessions, and modify your PATH in the ~/.bash_profile file.

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile

Then to make sqlcmd/bcp accessible from the bash shell for interactive/non-login sessions, and modify the PATH in the ~/.bashrc file

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc

 

3. Validate the SQL tools Installation

Finally, it’s time to validate the installation. So run the below command.

sqlcmd

Now you must see that Linux is able to recognize the utility.

[Need any assistance in fixing SQL queries? – We’ll help you]

 

Conclusion

In short, Today, we saw how our Support Engineers install SQL tools on Redhat offline.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF