<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MikeDVB.com &#187; mssql extension</title>
	<atom:link href="http://www.mikedvb.com/tag/mssql-extension/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikedvb.com</link>
	<description>Technology, Hosting, Software, and more!</description>
	<lastBuildDate>Wed, 19 Oct 2011 01:35:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Installing Apache + PHP + MySQL + MSSQL Extension on CentOS5</title>
		<link>http://www.mikedvb.com/2010/01/21/installing-apache-php-mysql-mssql-extension-on-centos5/</link>
		<comments>http://www.mikedvb.com/2010/01/21/installing-apache-php-mysql-mssql-extension-on-centos5/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 01:46:56 +0000</pubDate>
		<dc:creator>MikeDVB</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[5.2.11]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[mssql extension]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>

		<guid isPermaLink="false">http://www.mikedvb.com/?p=95</guid>
		<description><![CDATA[This is a short guide that will show you how to install Apache, PHP, MySQL, and MSSQL Extensions on a CentOS5 Server or VPS.  All &#8220;quote&#8221; blocks are to be executed in SSH (shell) as root. Getting the server ready to build applications from source: Check for any RPM installations of the applications. rpm -qa [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short guide that will show you how to install Apache, PHP, MySQL, and MSSQL Extensions on a CentOS5 Server or VPS.  All &#8220;quote&#8221; blocks are to be executed in SSH (shell) as root.</p>
<p>Getting the server ready to build applications from source:</p>
<p>Check for any RPM installations of the applications.</p>
<pre>rpm -qa | grep -i apache
rpm -qa | grep -i httpd
rpm -qa | grep -i php
rpm -qa | grep -i mysql</pre>
<p>Remove any RPM installations found with the &#8220;rpm -e&#8221; command:</p>
<pre>rpm -e application_name_here</pre>
<p>Install some base requirements to compile and install the software.<span id="more-95"></span></p>
<pre>yum -y install gcc gcc-c++ ncurses-devel libxml2-devel libpng-devel</pre>
<p>Download the appropriate sources for Apache, PHP, and MySQL and decompress it.</p>
<pre>cd /usr/src
wget http://us3.php.net/get/php-5.2.11.tar.gz/from/us.php.net/mirror
wget http://apache.inetbridge.net/httpd/httpd-2.2.14.tar.gz
wget http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.87.tar.gz
wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
tar xzf php-5.2.11.tar.gz
tar xzf httpd-2.2.14.tar.gz
tar xzf mysql-5.0.87.tar.gz
tar xzf freetds-stable.tgz</pre>
<p>Build and Install MySQL.</p>
<p>Add the MySQL User and Group</p>
<pre>groupadd mysql
useradd -g mysql -c "MySQL Server" mysql</pre>
<p>Install MySQL.</p>
<pre>cd mysql*
chown -R root.root *
make clean
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--disable-maintainer-mode \
--with-mysqld-user=mysql \
--with-unix-socket-path=/tmp/mysql.sock \
--without-comment \
--without-debug \
--without-bench
make &amp;&amp; make install</pre>
<p>Configure MySQL.</p>
<pre>/usr/local/mysql/bin/mysql_install_db
chown -R root:mysql /usr/local/mysql
chown -R mysql:mysql /usr/local/mysql/data
cp support-files/my-medium.cnf /etc/my.cnf
chown root:sys /etc/my.cnf
chmod 644 /etc/my.cnf</pre>
<p>Set MySQL to start on boot</p>
<pre>echo "/usr/local/mysql/lib/mysql" &gt;&gt; /etc/ld.so.conf
ldconfig
cp ./support-files/mysql.server /etc/rc.d/init.d/mysql
chmod +x /etc/rc.d/init.d/mysql
/sbin/chkconfig --level 3 mysql on
service mysql start</pre>
<p>This sets up symlinks for all MySQL binaries so that they can be run from anywhere.</p>
<pre>cd /usr/local/mysql/bin
for file in *; do ln -s /usr/local/mysql/bin/$file /usr/bin/$file; done</pre>
<p>Set a MySQL Root Password for security (obviously use something other than &#8220;new-password-here&#8221;.</p>
<pre>mysqladmin -u root password new-password-here</pre>
<p>Test the Password:</p>
<pre>mysql -u root -p</pre>
<p>While logged into MySQL delete the test database.</p>
<pre>drop database test;
use mysql;
delete from db;
delete from user where not (host="localhost" and user="root");
flush privileges;</pre>
<p>Building Apache</p>
<pre>cd /usr/src/httpd*
make clean
./configure \
--prefix=/usr/local/apache \
--enable-shared=max \
--enable-module=rewrite \
--enable-module=so
make &amp;&amp; make install</pre>
<p>Build and Install FreeTDS for MSSQL Extension Support.</p>
<pre>cd /usr/src/freetds*
./configure
make &amp;&amp; make install</pre>
<p>Build and Install PHP</p>
<pre>cd /usr/src/php*
./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--disable-debug \
--enable-ftp \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-mbstring \
--enable-mm=shared \
--enable-safe-mode \
--enable-track-vars \
--enable-trans-sid \
--enable-wddx=shared \
--enable-xml \
--with-dom \
--with-gd \
--with-gettext \
--with-mysql=/usr/local/mysql \
--with-regex=system \
--with-xml \
--with-zlib-dir=/usr/lib \
--with-mssql=/usr/local/
make &amp;&amp; make install
cp php.ini-dist /usr/local/lib/php.ini</pre>
<p>I prefer to symlink configuration files to /etc so that they are easy to find and edit.</p>
<pre>ln -s /usr/local/lib/php.ini /etc/php.ini
ln -s /usr/local/apache/conf/httpd.conf /etc/httpd.conf</pre>
<p>Edit the Apache Configuration File &#8211; I prefer nano.</p>
<pre>nano /etc/httpd.conf</pre>
<p>Uncomment the following lines or add them (uncommented) if they do not exist after &#8220;AddType application/x-tar .tgz&#8221;</p>
<pre>#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps</pre>
<p>Find the DirectoryIndex (CTRL+W in Nano) and add index.php to the beginning.</p>
<pre>DirectoryIndex</pre>
<p>Set Apache to start on boot and start it for the first time.</p>
<pre>ln -s /usr/local/apache/bin/apachectl /etc/rc.d/init.d/apache
ln -s /etc/rc.d/init.d/apache /etc/rc.d/rc3.d/S90apache
/etc/rc.d/init.d/apache start</pre>
<p>Then, you must configure FreeTDS to point to your MSSQL DB server. To do so, edit (or create) the /usr/local/etc/freetds.conf file and put in there exclusively these lines:</p>
<pre>[global]
host = xxx.xxx.xxx.xxx (ip of the MSSQL server)
port = 1433
client charset = UTF-8
tds version = 7.0 (or 8.0 if using FreeTDS 0.82 or later)
text size = 20971520</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.mikedvb.com%2F2010%2F01%2F21%2Finstalling-apache-php-mysql-mssql-extension-on-centos5%2F&amp;title=Installing%20Apache%20%2B%20PHP%20%2B%20MySQL%20%2B%20MSSQL%20Extension%20on%20CentOS5" id="wpa2a_2"><img src="http://www.mikedvb.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikedvb.com/2010/01/21/installing-apache-php-mysql-mssql-extension-on-centos5/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

