Created
January 4, 2018 18:19
-
-
Save redbar0n/220dcf53dc0b9b025d1b8c4a83dc567d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Couldn't update the tiny_tds version installed with yum, since the yum repo didn't have the latest tiny_tds version. | |
# So remove tiny_tds installed by yum, to avoid conflicts with the succeeding binary tarball install. | |
# Note: yum installs freetds.conf into /etc/freetds.conf | |
# Answer y to remove dependent libraries. | |
printf 'y' | sudo yum remove freetds | |
# Download FreeTDS latest stable version (as of Jan 4, 2018) from binary tarball. | |
cd /tmp | |
wget http://www.freetds.org/files/stable/freetds-1.00.80.tar.gz | |
tar -xzf freetds-1.00.80.tar.gz | |
cd freetds-1.00.80 | |
# Create Makefile by running the configure script and Makefile.in template. | |
# Note: This will by default install freetds.conf into `/usr/local/etc/freetds.conf` as it should since it is a binary install. But if you need another path like ie. `/etc`, use `--sysconfdir=/etc` as an option. | |
./configure --with-tdsver=7.3 # specifies the configuration for the install, makes config file | |
# Use Makefile to build/compile the software (object files) from the src | |
make # if it should fail, then run `sudo make clean` to delete the object files. | |
# Uninstall potential previous version of v1.00.80, by using the Makefile. | |
# Uninstalls with the same configuration as in the Makefile, to ensure the same paths are referenced and thus everything uninstalled properly. | |
sudo make uninstall # uninstall using the compiled object files | |
# The actual system installation of FreeTDS v1.00.80. Comment out the following lines if you only want to uninstall. | |
# Will also clean up by deleting downloaded installation files (including the contained generated Makefile and object files). | |
sudo make install # install using the compiled object files | |
cd .. | |
sudo rm -rf freetds-1.00.80 | |
sudo rm -rf freetds-1.00.80.tar.gz | |
# Uninstall/reinstall tiny_tds gem: So that it will bind to the FreeTDS version you just installed. The tiny_tds gem will not be reinstalled if you have removed it from the Gemfile. | |
cd ~/mullet | |
# Answer 3 to affirm removing "3. All versions" of the tiny_tds gem, and Y on the question "Remove executables: defncopy, tsql" which are just the tiny_tds binstubs for FreeTDS. | |
printf '3\nY\n' | bundle exec gem uninstall tiny_tds | |
bundle install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment