<?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>Aaron Gadberry &#187; Server Management</title>
	<atom:link href="http://www.gadberry.com/aaron/category/computers/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gadberry.com/aaron</link>
	<description>Help - v. helped, helpÂ·ing, helps</description>
	<lastBuildDate>Thu, 02 Sep 2010 13:42:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Hosting Issues</title>
		<link>http://www.gadberry.com/aaron/2007/02/19/hosting-issues/</link>
		<comments>http://www.gadberry.com/aaron/2007/02/19/hosting-issues/#comments</comments>
		<pubDate>Tue, 20 Feb 2007 00:36:17 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2007/02/19/hosting-issues/</guid>
		<description><![CDATA[Sorry to everyone out there. I&#8217;ve had some major downtime issues the past 3-4 days. I really like my host but 3 days downtime is enough that I think I&#8217;m going to switch. Update:I have decided to stay with my host. They have been very good in the areas of support, and that is very [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry to everyone out there.  I&#8217;ve had some major downtime issues the past 3-4 days.  I really like my host but 3 days downtime is enough that I think I&#8217;m going to switch.</p>
<p>Update:I have decided to stay with my host.  They have been very good in the areas of support, and that is very valuable with my customized needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2007/02/19/hosting-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Plesk and vhost.conf</title>
		<link>http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/</link>
		<comments>http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/#comments</comments>
		<pubDate>Thu, 09 Feb 2006 18:04:55 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/</guid>
		<description><![CDATA[Wondering how to create a good vhost.conf? Well you&#8217;ve come to the right place. Plesk automatically updates httpd.include for each domain, making changes to this file only temporary. You don&#8217;t want to use this file if you need to make changes to Apache&#8217;s config on the fly, such as php&#8217;s open_basedir values per domain. Instead [...]]]></description>
			<content:encoded><![CDATA[<p>Wondering how to create a good vhost.conf?  Well you&#8217;ve come to the right place.</p>
<p>Plesk automatically updates httpd.include for each domain, making changes to this file only temporary.  You don&#8217;t want to use this file if you need to make changes to Apache&#8217;s config on the fly, such as php&#8217;s open_basedir values per domain.</p>
<p>Instead you will want to use a vhost.conf file.  This file will be placed inside your domain&#8217;s conf directory, usually found at <span class="code_line"><code>/var/www/vhosts/yourdomain.com/conf</code></span>.  Create a file called vhost.conf in whatever editor you prefer.  I use joe.</p>
<p>You can now put in any Apache configuration options like you would into httpd.include.  In my case I wanted to do three things, give my site access to <span class="code_line"><code>/php/includes</code></span>, add a <span class="code_line"><code>mod_rewrite</code></span> rule, and tell Apache to follow symlinks.</p>
<p><span id="more-92"></span><br />
Here is my resulting vhost.conf file.</p>
<div class="code_box"><code>&lt;Directory /var/www/vhosts/yourdomain.com/httpdocs/&gt;
php_admin_value open_basedir "/var/www/vhosts/yourdomain.com/httpdocs:/php/includes"
&lt;/Directory&gt;

Options +FollowSymLinks
RewriteEngine on
RewriteRule /ministries/(.*)\.php$ /ministries/ministry.php?url=$1
</code></div>
<p>You can see the first three lines take care of the additional base directory for php, the line after the empty one takes care of following symlinks, and the last two lines turn on the rewrite engine and add a rule to it.</p>
<p>Save your file and we&#8217;re almost done.  This is the part that everyone forgets, you need to tell Plesk to update it&#8217;s information.  See your httpd.include file will soon have an include for your vhost.conf, but it doesn&#8217;t yet.  Plesk has to realize it&#8217;s there and then add the include.  The command to reconfigure Plesk for one site is <span class="code_line"><code>/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com</code></span> or the command I use reconfigures all sites, <span class="code_line"><code>/usr/local/psa/admin/bin/websrvmng -a</code></span>.</p>
<p>After running that there is no need to restart Apache or any other service.  Your changes should have taken effect already.</p>
<p>As always, feel free to comment if you have more suggestions or questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>How To: Blacklist an Email Address</title>
		<link>http://www.gadberry.com/aaron/2006/02/07/blacklist_email/</link>
		<comments>http://www.gadberry.com/aaron/2006/02/07/blacklist_email/#comments</comments>
		<pubDate>Wed, 08 Feb 2006 00:36:44 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2006/02/07/blacklist_email/</guid>
		<description><![CDATA[If you run a server with Spamassassin and you have one annoying person you need to block (blacklist) from your entire server, this article is for you. It&#8217;s a fairly simple process, but you will probably need root access to the server to complete the configuration changes. You will need to edit the Spamassassin configuration [...]]]></description>
			<content:encoded><![CDATA[<p>If you run a server with Spamassassin and you have one annoying person you need to block (blacklist) from your entire server, this article is for you.  It&#8217;s a fairly simple process, but you will probably need root access to the server to complete the configuration changes.</p>
<p>You will need to edit the Spamassassin configuration file, typically found in the <span class="code_line"><code>/etc/mail/spamassassin/</code></span> directory.</p>
<p>If you have joe installed you can edit it like so <span class="code_line"><code>joe /etc/mail/spamassassin/local.cf</code></span>.<br />
<span id="more-91"></span><br />
You will need to add a line like <span class="code_line"><code>blacklist_from emailaddress@domain.com</code></span> somewhere in the file.  See below for an example file with the line added.</p>
<p>You will then need to restart Spamassassin using <span class="code_line"><code>/etc/rc.d/init.d/spamassassin restart</code></span> in order to have the changes take effect.</p>
<p>My file looks like this after I added it.</p>
<div class="code_box"><code># These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)

# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.

required_score 7
rewrite_header Subject ****SPAM(_SCORE_)****
report_safe 1

use_bayes 1
use_bayes_rules 1
bayes_auto_learn 0
bayes_auto_learn_threshold_nonspam 0.1
bayes_auto_learn_threshold_nonspam 14.0

#use_razor2 0
#razor_timeout 10

#use_dcc 0
#dcc_path /usr/bin/dccproc
#dcc_timeout 10
#dcc_body_max 999999
#dcc_fuz1_max 999999
#dcc_fuz2_max 999999
#dcc_options -R

use_pyzor 0
#pyzor_path /usr/bin/pyzor
#pyzor_timeout 10
#pyzor_max 5

blacklist_from emailaddress@domain.com

# SQL settings storage
#user_scores_dsn DBI:mysql:atomiclean:localhost
#user_scores_sql_username USER
#user_scores_sql_password PASSWORD
#user_scores_sql_table userpref
#user_scores_sql_field_username username
#user_scores_sql_field_preference preference
#user_scores_sql_field_value value
#
# AWL
#auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
#user_awl_dsn                 DBI:mysql:atomiclean:localhost
#user_awl_sql_username        USER
#user_awl_sql_password        PASSWORD
#user_awl_sql_table           awl

# Bayes
#bayes_store_module                 Mail::SpamAssassin::BayesStore::SQL
#bayes_sql_dsn                      DBI:mysql:atomiclean:localhost
#bayes_sql_username                 USER
#bayes_sql_password                 PASSWORD

#bayes_sql_override_username        someusername
#This directive, if used, will override the username used for storing
#data in the database.  This could be used to group users together to
#share bayesian filter data.
</code></div>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2006/02/07/blacklist_email/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: Have qmail send to an external smtp server</title>
		<link>http://www.gadberry.com/aaron/2006/01/11/how-to-have-qmail-send-to-an-external-smtp-server/</link>
		<comments>http://www.gadberry.com/aaron/2006/01/11/how-to-have-qmail-send-to-an-external-smtp-server/#comments</comments>
		<pubDate>Wed, 11 Jan 2006 23:08:50 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2006/01/11/how-to-have-qmail-send-to-an-external-smtp-server/</guid>
		<description><![CDATA[So you have qmail, but you want it to send your message from your isp&#8217;s smtp server instead of your own. Well it&#8217;s actually pretty simple&#8230; First SSH to your server and create a file called /var/qmail/control/smtproutes. Edit it to look like this /var/qmail/control/smtproutes :smtp.myisp.com Restart qmail for good measure with /etc/rc.d/init.d/qmail reload You&#8217;re done!]]></description>
			<content:encoded><![CDATA[<p>So you have qmail, but you want it to send your message from your isp&#8217;s smtp server instead of your own.  Well it&#8217;s actually pretty simple&#8230;</p>
<p>First SSH to your server and create a file called <span class="code_line"><code>/var/qmail/control/smtproutes</code></span>.</p>
<p>Edit it to look like this</p>
<div class="filename">/var/qmail/control/smtproutes</div>
<div class="code_box"><code>:smtp.myisp.com</code></div>
<p>Restart qmail for good measure with <span class="code_line"><code>/etc/rc.d/init.d/qmail reload</code></span></p>
<p>You&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2006/01/11/how-to-have-qmail-send-to-an-external-smtp-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL Commands</title>
		<link>http://www.gadberry.com/aaron/2006/01/06/mysql-commands/</link>
		<comments>http://www.gadberry.com/aaron/2006/01/06/mysql-commands/#comments</comments>
		<pubDate>Sat, 07 Jan 2006 01:20:02 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2006/01/06/mysql-commands/</guid>
		<description><![CDATA[Here is a list of some of the MySQL commands I have had to either look up or have handy for server admin. Start MySQL &#8211; /etc/rc.d/init.d/mysqld start Stop MySQL &#8211; /etc/rc.d/init.d/mysqld stop Restart MySQL &#8211; /etc/rc.d/init.d/mysqld restart If it won&#8217;t stop successfully, you can always killall mysqld. If you killall it though, you may [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a list of some of the MySQL commands I have had to either look up or have handy for server admin.</p>
<p>Start MySQL &#8211; <span class="code_line"><code>/etc/rc.d/init.d/mysqld start</code></span><br />
Stop MySQL &#8211; <span class="code_line"><code>/etc/rc.d/init.d/mysqld stop</code></span><br />
Restart MySQL &#8211; <span class="code_line"><code>/etc/rc.d/init.d/mysqld restart</code></span></p>
<p>If it won&#8217;t stop successfully, you can always <span class="code_line"><code>killall mysqld</code></span>.<br />
If you killall it though, you may need to remove the lock file to rerun it.<br />
You can do that by running <span class="code_line"><code>rm /var/lock/subsys/mysql</code></span>.</p>
<p>Setup MySQL to run on boot.<br />
First check the runlevels it starts on using <span class="code_line"><code>/sbin/chkconfig --list mysqld</code></span>.<br />
Then, if 3, 4, and 5 are not on, change them with <span class="code_line"><code>/sbin/chkconfig --level 345 mysqld on</code></span>.</p>
<p>To view the last 10 lines of the mysql log file, use <span class="code_line"><code>tail /var/log/mysqld.log</code></span>.<br />
To view the last 500 lines, use <span class="code_line"><code>tail -n 500 /var/log/mysqld.log</code></span></p>
<p>To delete duplicate records in MySQL, use the following code</p>
<div class="code_box"><code>CREATE TEMPORARY TABLE table_name_temp AS SELECT DISTINCT field FROM table_name;
DELETE FROM table_name;
INSERT INTO table_name(field) SELECT field FROM table_name_temp;
</code></div>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2006/01/06/mysql-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Convert audio to another format on a web page</title>
		<link>http://www.gadberry.com/aaron/2005/12/16/how-to-convert-audio-to-another-format-from-a-form-on-a-web-page/</link>
		<comments>http://www.gadberry.com/aaron/2005/12/16/how-to-convert-audio-to-another-format-from-a-form-on-a-web-page/#comments</comments>
		<pubDate>Fri, 16 Dec 2005 18:16:02 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/wp/?p=12</guid>
		<description><![CDATA[This article will go in depth on how to convert audio files automatically on a linux server using ffmpeg and PHP.  I set this up on my server to take ~25 MB MP3s and convert them to flv files for use in a dynamic flv player, however in this article I will just show how to set up the conversion.  This article will also help with those trying to do a video conversion.]]></description>
			<content:encoded><![CDATA[<p>You must have permissions to install software on your server.</p>
<p>First you will need to install and test ffmpeg.  There are several ways of doing this.  The way I accomplished this was using yum.  If you&#8217;ve never used yum before then a different way might be easier.</p>
<p>I edited /etc/yum.conf to include the <a href="http://dag.wieers.com/home-made/apt/">DAG</a> repository by adding the following code</p>
<div class="code_box"><code>[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
</code></div>
<p><span id="more-12"></span></p>
<p>Then you must import DAG&#8217;s GPG key, by running this <span class="code_line"><code>rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt</code></span></p>
<p>After that you can run <span class="code_line"><code>yum install ffmpeg</code></span></p>
<p>Yum should take care of any additional dependencies, which there probably will be. </p>
<p>If you prefer an alternative install method, you could</p>
<ul>
<li>Download <a href="http://ffmpeg.sourceforge.net/">ffmpeg</a> from the main site, make, and makeinstall it.</li>
<li>Download a premade ffmpeg rpm</li>
</ul>
<p>After that install process is over, you will need to test ffmpeg.  The executable should be installed to /usr/bin/ffmpeg.  To test it, just run <span class="code_line"><code>/usr/bin/ffmpeg -version</code></span> and check that the output has no errors.  Then run a simple, short audio file through it.  Upload it via ftp, then run ffmpeg on it.  Look lower for an explanation of args.</p>
<p>Next you will need to create a web form with the ability to upload a file.  This isn&#8217;t particularly difficult, an example is below.</p>
<div class="code_box"><code>&lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt;
	&lt;input type="file" name="audio" size="42"&gt;
	&lt;input type="submit" name="audio_submit" value="Submit"&gt;
&lt;/form&gt;
</code></div>
<p>You will also need an upload.php to receive the file.  This page is quite a bit more complicated, but is mostly copy and paste, so don&#8217;t get too worried.  Here is an example of an upload.php.</p>
<div class="code_box"><code>
&lt;?php
ini_set( "max_execution_time", "3600" ); // sets the maximum execution time of this script to 1 hour.
$fileName = $_FILES['message']['name']; // get client side file name

if( $fileName ) { 
	// Check File Type
	$fileNameParts = explode( ".", $fileName ); // seperate the name from the ext
	$fileExtension = end( $fileNameParts ); // part behind last dot
	$fileExtension = strtolower( $fileExtension ); // reduce to lower case
	if( !$fileExtension == "mp3" ) {
		die( "$fileName is not an mp3 file." );
	}
	// Check File Size
	$fileSize = $_FILES['message']['size']; // size of uploaded file
	if( $fileSize == 0 ) {
		die( "Sorry. The upload of $fileName has failed. The file size is 0." );
	} else if( $fileSize &gt; 10240000 ) { //10 MB
		die( "Sorry. The file $fileName is larger than 10MB. Advice: reduce the file quality and upload again." );
	} else {
		$uploadDir = '/var/www/vhosts/yourdomain.com/httpdocs/audio/audio_to_encode/'; // Where the temp file will go
		$uploadFile = str_replace( " ", "",  $uploadDir . $_FILES['message']['name'] ); // Get rid of spaces in the filename
		$finalDir = '/var/www/vhosts/yourdomain.com/httpdocs/audio/flv_files/'; // Where the final file will go
		$finalFile = str_replace( " ", "",  $finalDir . $fileNameParts[0] . ".flv" ); // Get rid of spaces in the filename
		if ( !move_uploaded_file( $_FILES['message']['tmp_name'], $uploadFile ) ) {
			echo "Possible file upload attack!  Here's some debugging info:\n";
			echo( $_FILES );
		}

		$encode_cmd = "/usr/bin/ffmpeg -i $uploadFile -f flv -acodec mp3 -ab 64 -ac 1 -title \"Clip Title\" -author \"Clip Author\" -copyright \"Clip Copyright\" $finalFile";
		exec( $encode_cmd );
		unlink( $uploadFile );
		chmod( $finalFile, 0644 );
	}
}
?&gt;
</code></div>
<p>There are several areas you will need to edit.  You will need to change the maximum upload file size, the type of files allowed, along with various locations of the temporary and permenant files.</p>
<p>You need to change the permissions on the directories you will be using to allow writing for everyone.  I used my ftp program to accomplish this.</p>
<p>The ffmpeg options are very numerous, so they may require a bit of explanation.  For a complete list go <a href="http://ffmpeg.sourceforge.net/ffmpeg-doc.html#SEC6">here</a>, but I will list the ones I used.<br />
-i is the input file<br />
-f is output format<br />
-acodec is audio codec (I am creating a video file, flv, but with an embeded mp3)<br />
-ab is audio bitrate<br />
-ac is audio channels (I did mono)</p>
<p>You will also probably need to change your php.ini to allow larger file uploads, because the default is set to 2MB.<br />
My configuration file is located at /etc/php.ini<br />
Change the following values in that file.</p>
<div class="code_box"><code>file_uploads = On
post_max_size = 32M
upload_max_filesize = 30M
</code></div>
<p>That should be all you need to get this conversion going.  Mine will convert files regardless of size and time, within the hour time limit of course.  I have converted 25MB stereo MP3s to flv without a problem.</p>
<p>Leave a comment if you have anything to add!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2005/12/16/how-to-convert-audio-to-another-format-from-a-form-on-a-web-page/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>How To: Setup Horde / IMP to use an external SMTP server</title>
		<link>http://www.gadberry.com/aaron/2005/12/16/how-to-setup-horde-imp-to-use-an-external-smtp-server/</link>
		<comments>http://www.gadberry.com/aaron/2005/12/16/how-to-setup-horde-imp-to-use-an-external-smtp-server/#comments</comments>
		<pubDate>Fri, 16 Dec 2005 16:45:47 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/wp/?p=11</guid>
		<description><![CDATA[This is a fairly simple process, so don&#8217;t worry too much before you get started. To complete this you will need permission to edit horde&#8217;s configuration file. First you need to find horde&#8217;s configuration file, I use Plesk 7.5.4 Reloaded on FC3, so mine is located at /etc/psa-horde/horde/conf.php. Next you need to open it in [...]]]></description>
			<content:encoded><![CDATA[<p>This is a fairly simple process, so don&#8217;t worry too much before you get started.  To complete this you will need permission to edit horde&#8217;s configuration file.</p>
<p>First you need to find horde&#8217;s configuration file, I use Plesk 7.5.4 Reloaded on FC3, so mine is located at <code>/etc/psa-horde/horde/conf.php</code>.</p>
<p>Next you need to open it in an editor.  I like <a href="http://sourceforge.net/projects/joe-editor/">joe</a>.  You can open it with joe using <span class="code_line"><code>joe /etc/psa-horde/horde/conf.php</code></span></p>
<p>You will need to change a few lines in this file, depending on Plesk and/or other software, some of these changes may already be made</p>
<div class="code_box"><code>$conf['mailer']['type'] = 'smtp';
$conf['mailer']['params']['host'] = 'your.smtp.server';
</code></div>
<p>And that&#8217;s it.  This change requires no reboots of the system or the software.  Test it would by sending an email using the webmail interface.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2005/12/16/how-to-setup-horde-imp-to-use-an-external-smtp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
