Today: 10/10/2008
 

Installing MS SQL Server Client Library on Linux/Unix

 

Problem: Installing SQL Server client library on Debian/Ubuntu Linux.

If you want to install PHP on a Linux machine and want to use Sql Server as your database then you have to install FreeTDS library on your server machine so that you could make your PHP/Apache server machine talk to your SQL Server 2000 Database. Let's go through the installation steps.

I have used the instructions on Debian/Ubuntu server machines. Make sure you have GNU compilation tools and libraries.

In Debian/Ubuntu, try the following:

gcc -v
make -v

If you see the version numbers of the above two software that means gcc and make are installed on your computer. If you dont have these software installed then you have to first install them.

In Ubuntu, do the following

sudo apt-get install build-essential

This will install the necessary software on your computer. I'd recommend using wget FTP client to download the software on Linux/Unix machines.

wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz

The above command will download the software. Now, unzip and untar the downloaded gzipped tar file by executing the command below.

tar –xvzf freetds-stable.tgz

Enter the folder where you untarred the downloaded file.

cd freetds-0.64

Replace 0.64 with your version number. Configure and compile the software as follows (make sure you execute 'make install' command below as root):

./configure --prefix=/usr/local/freetds --enable-msdblib
make
# make install
cd ..

FreeTDS has been installed in the folder /usr/local/freetds. Now, if you want to install PHP then you have to configure PHP (while installing) using the switch as follows:

--with-mssql=/usr/local/freetds

I hope this will be a greate help for you. Please let me know if you want me to write on something else.

=======================================================================================

Support Techs Worldwide:

Link to us:

You can support us by putting a link to our website on your blog or website (code is below).

<a href="http://www.techsww.com">
Techs Worldwide - Tutorials about Software Installation,
Configuration, Administration, Monitoring, Tools, Tips &
Tricks
</a>

OR a simple one.

<a href="http://www.techsww.com">
Techs Worldwide - IT related Tutorials
</a>

Feedbacks:

We appreciate feedbacks and suggestions about our tutorials and Techs Worldwide from readers. Please contact us using the form here and let us know what you think about the tutorial and the website in general.

Bookmark Us:

We are working on new features for the website, please keep visiting or bookmark us using your favourite bookmarking service.

Subscribe to RSS:

You can subscribe to our RSS feed here.

 
 
Creative Commons License   Valid XHTML 1.0 Transitional Valid CSS