<?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>blacknode &#187; Plesk</title>
	<atom:link href="http://blog.blacknode.net/category/sysadmin/plesk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.blacknode.net</link>
	<description>NO CARRIER</description>
	<lastBuildDate>Mon, 13 Jun 2011 07:12:29 +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>Transfer domain to new client in plesk</title>
		<link>http://blog.blacknode.net/2009/08/transfer-domain-to-new-client-in-plesk/</link>
		<comments>http://blog.blacknode.net/2009/08/transfer-domain-to-new-client-in-plesk/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 18:14:29 +0000</pubDate>
		<dc:creator>jrod</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://blog.blacknode.net/?p=261</guid>
		<description><![CDATA[Like many things that should be easy in plesk, this requires manually updating the plesk database. Before making changes to the psa database, it is always a good idea to make a backup: mysqldump &#8211;opt -Q psa > psa.sql First, we need some database normalization information: mysql> use psa mysql> SELECT id,pname from clients order ]]></description>
			<content:encoded><![CDATA[<p>Like many things that should be easy in plesk, this requires manually updating the plesk database. </p>
<p>Before making changes to the psa database, it is always a good idea to make a backup:</p>
<blockquote><p>
mysqldump &#8211;opt -Q psa > psa.sql
</p></blockquote>
<p>First, we need some database normalization information:</p>
<blockquote><p>
mysql> use psa</p>
<p>mysql> SELECT id,pname from clients order by id;<br />
+&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| id | pname            |<br />
+&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
|  1 | My Domains       |<br />
|  2 | Desmond Willy     |<br />
|  4 | Beacon   |<br />
|  5 | Ham         |<br />
|  6 | Lefty     |<br />
|  7 | Simon Cowle |<br />
|  8 | Scottyl |<br />
|  9 | SomeRandom Guy |<br />
+&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
8 rows in set (0.00 sec)</p>
<p>mysql> select id,displayname,cl_id  from domains where displayname=&#8217;transferme.com&#8217;<br />
    -> ;<br />
+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| id  | displayname     | cl_id |<br />
+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| 101 | transferme.com |     1 |<br />
+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
1 row in set (0.00 sec)
</p></blockquote>
<p>So we can see that transferme.com is part of the My Domains client, but we want it to be part of the &#8216;SomeRandom Guy&#8217; client. To do this we simply need to update the cl_id for the domain:</p>
<blockquote><p>
mysql> UPDATE domains SET cl_id=9 WHERE id=101;</p>
<p>mysql> select id,displayname,cl_id  from domains where displayname=&#8217;transferme.com&#8217;;<br />
+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| id  | displayname     | cl_id |<br />
+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| 101 |  transferme.com  |     9 |<br />
+&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
1 row in set (0.00 sec)
</p></blockquote>
<p>Now that is done. One last thing that is important not to forget, you must ensure that the client you are transfering the domain to has the ip that transferme.com is hosted on in its ip pool. If not, plesk will choke on itself. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blacknode.net/2009/08/transfer-domain-to-new-client-in-plesk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop the plesk adminstrator from recieving dr.web license failures</title>
		<link>http://blog.blacknode.net/2009/03/stop-the-plesk-adminstrator-from-recieving-drweb-license-failures/</link>
		<comments>http://blog.blacknode.net/2009/03/stop-the-plesk-adminstrator-from-recieving-drweb-license-failures/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 02:33:31 +0000</pubDate>
		<dc:creator>jrod</dc:creator>
				<category><![CDATA[pets]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://blog.blacknode.net/?p=148</guid>
		<description><![CDATA[&#8230; And other things that might annoy him/her There was a request that went around for months from a plesk administrator griping about the various messages that appear in his mailbox, such as the dr.web license notification. By default, messages to the root and postmaster accounts are sent to the plesk administrator. This is accomplished ]]></description>
			<content:encoded><![CDATA[<p>&#8230; And other things that might annoy him/her</p>
<p>There was a request that went around for months from a plesk administrator griping about the various messages that appear in his mailbox, such as the dr.web license notification.  By default, messages to the root and postmaster accounts are sent to the plesk administrator. This is accomplished via qmail aliases.</p>
<p># cd /var/qmail/alias/<br />
# ls -al<br />
total 28<br />
drwxr-sr-x   2 alias qmail 4096 Mar  9 01:59 .<br />
drwxr-xr-x  11 root  qmail 4096 Sep 29 21:14 ..<br />
-rw-r&#8211;r&#8211;   1 root  qmail   26 Dec 10  2007 .qmail-mailer-daemon<br />
-rw-r&#8211;r&#8211;   1 root  qmail   16 Mar  9 01:57 .qmail-postmaster<br />
-rw-r&#8211;r&#8211;   1 root  qmail   16 Mar  9 01:57 .qmail-root</p>
<p>Typically these look something link this:<br />
# cat .qmail-postmaster<br />
&#038;plesk_admin_address@foo.bar.com</p>
<p>To keep the customer happy, I made a slight amendment to the alias:</p>
<p># cat .qmail-postmaster<br />
|cat >/dev/null<br />
# cat .qmail-root<br />
|cat >/dev/null</p>
<p>Removing the aliases will cause all kinds of noise in the logs and actually break the server&#8217;s already fragile rfc compliance (rfc2821:4.5.1) . This allows the messages to be &#8216;handled&#8217; silently. Since most plesk &#8216;administrators&#8217; don&#8217;t  care to know how many failed ssh attempts there were in a month, or how much disk space they are using, it is usually a working solution when you can&#8217;t get dr.web to stfu.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blacknode.net/2009/03/stop-the-plesk-adminstrator-from-recieving-drweb-license-failures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tomcat + mod_jk + rhel5</title>
		<link>http://blog.blacknode.net/2008/11/tomcat-mod_jk-rhel5/</link>
		<comments>http://blog.blacknode.net/2008/11/tomcat-mod_jk-rhel5/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 08:24:38 +0000</pubDate>
		<dc:creator>jrod</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[tomcat redhat rhel5 mod_jk linux]]></category>

		<guid isPermaLink="false">http://blog.blacknode.net/?p=64</guid>
		<description><![CDATA[[Warning: This guide needs to be updated. 09.08.2009] v0.5 Because I&#8217;m tired of my peers thinking that the process is difficult, I decided to write a quick guide detailing the process of installing tomcat on rhel5 and configuring mod_jk with apache. RHEL5 provides tomcat5 via RHN, unless you have access to another secure and maintained ]]></description>
			<content:encoded><![CDATA[<p>[<span style="color: #ff0000;">Warning</span>: <strong>This guide needs to be updated. 09.08.2009</strong>]</p>
<p>v0.5</p>
<p>Because I&#8217;m tired of my peers thinking that the process is difficult, I decided to write a quick guide detailing the process of installing tomcat on rhel5 and configuring mod_jk with apache.</p>
<p>RHEL5 provides tomcat5 via RHN, unless you have access to another secure and maintained repository that provides tomcat, I recommend using RedHat&#8217;s package.</p>
<p>To install tomcat:</p>
<blockquote><p><code>yum install tomcat5</code><br />
<code>/etc/init.d/tomcat5 start</code><br />
<code>chkconfig --levels 345 tomcat5 on</code></p></blockquote>
<p>This will install and start the tomcat5 web server on port 8080. The redhat tomcat rpms are nearly identical in implementation to the jpackage rpms. $CATALINA_HOME is still /usr/share/tomcat5. That directory contains symlinks to other places.  So /usr/share/tomcat5/conf  is a link to /etc/tomcat5.</p>
<p>To test the installation, I use the tomcats sample webapp which can be acquired and deployed like so:</p>
<blockquote><p><code>wget http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war</code><br />
<code>mv sample.war /usr/share/tomcat5/webapps</code></p></blockquote>
<p>The cool thing about .war files is the way tomcat interacts with them.  Simply moving the sample.war to $CATALINA_HOME/wabapps will deploy the web base application. Tomcat will automatically extract, or explode sample.war to $CATALINA_HOME/wabapps/sample.</p>
<p>You can access the newly deployed application via the tomcat web server.</p>
<blockquote><p><code>http://foo.bar:8080/sample/</code></p></blockquote>
<p>If you have  installed the tomcat5-webapps package, you will notice some other directories populating the webapps directory. There is a special webapp directory called <em>ROOT</em> which represents the root of the tomcat server, which can always be accessed by going to the root of the server.</p>
<blockquote><p><code>http://foo.bar:8080/</code></p></blockquote>
<p>Unless you plan on running tomcat on port 80, you are going to want apache to hand off, or connect, requests to the tomcat server. This is where mod_jk comes into the picture. mod_jk is an apache module known as a <a href="http://tomcat.apache.org/connectors-doc/">connector</a>.</p>
<p>First, download the correct binary for your architecture and install it:</p>
<blockquote><p><code>wget http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.23/mod_jk-1.2.23-apache-2.2.x-linux-i686.so</code></p>
<p>***<br />
For x86_64 change to:</p>
<p>wget http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.23/mod_jk-1.2.23-apache-2.2.x-linux-x86_64.so<br />
***</p>
<p>chmod +x mod_jk-1.2.23-apache-2.2.x-linux-i686.so<br />
cp -av mod_jk-1.2.23-apache-2.2.x-linux-i686.so /etc/httpd/modules/mod_jk.so</p></blockquote>
<p><code>vim /etc/httpd/conf.d/mod_jk.conf</code></p>
<blockquote><p>LoadModule jk_module modules/mod_jk.so</p>
<p>JkWorkersFile /etc/httpd/conf/workers.properties<br />
JkShmFile /var/log/httpd/mod_jk.shm<br />
JkLogFile /var/log/httpd/mod_jk.log<br />
JkLogLevel info</p></blockquote>
<p><code><br />
vim /etc/httpd/conf/workers.properties<br />
</code></p>
<blockquote><p>workers.tomcat_home=/usr/share/tomcat5</p>
<p>workers.java_home=/usr/lib/jvm/java</p>
<p>worker.list=jkworker</p>
<p>worker.jkworker.port=8009<br />
worker.jkworker.host=localhost<br />
worker.jkworker.type=ajp13</p></blockquote>
<p>Now restart apache:</p>
<blockquote><p><code>/etc/init.d/httpd configtest<br />
/etc/init.d/httpd restart<br />
</code></p></blockquote>
<p>At this point you have everything you need to run jsp pages and servlets with tomcat, while still hanging on to familiar httpd virtual hosting and configuration.  If you have not read the tomcat documentation on connectors, then you should at this point.</p>
<p>In order to use mod_jk to <em>connect</em> to a tomcat webapp, we need to mount it via the apache configuration. The JkMount directive takes care of this for us. To demonstrate this run the following:</p>
<blockquote><p><code>mkdir /usr/share/tomcat5/webapps/test/</code></p></blockquote>
<p>vim /usr/share/tomcat5/webapps/test/index.jsp</p>
<blockquote><p>Hello, I am a jsp script!</p>
<p>&lt;%<br />
// get client locale<br />
java.util.Locale locale = request.getLocale();</p>
<p>// get Dateformat for client&#8217;s locale<br />
java.text.DateFormat dateFormat =<br />
java.text.DateFormat.getDateTimeInstance(<br />
java.text.DateFormat.LONG,<br />
java.text.DateFormat.LONG, locale);</p>
<p>%&gt;</p>
<p>The time is:<br />
&lt;%=dateFormat.format( new java.util.Date() ) %&gt;</p></blockquote>
<p>Now add the following somewhere in the apache configuration:</p>
<blockquote><p>JkMount /test/* jkworker</p></blockquote>
<p>JkMount works similar to the apache alias directive. It can be used in the main configuration or virtualhost context. For testing purposes, you can append the mount line to your mod_jk.conf file.</p>
<p>Restart apache and hit the following:</p>
<blockquote><p>http://localhost/test/</p></blockquote>
<p>Tomcat ships with a web based administration webapp and also a manager webapp that can be used to deploy other webapps. To use these features, you need to install them from rhn if they have not already been installaed:</p>
<blockquote><p>yum install tomcat5-admin-webapps</p></blockquote>
<p>In order to access these webapps, you need to first authenticate.  In tomcat, you can define users and user roles. Users and roles are defined in $CATALINA_HOME/conf/tomcat-users.xml (/etc/tomat5/tomcat-users.xml). The admin webapps require authenticated users to have certain roles before they are granted access. For the admin webapp, a user who has the role &#8216;admin&#8217; is granted access. For the manager webapp, the user will need the &#8216;manager&#8217; role.</p>
<p>By default, the admin and manager roles are not created so you must define them and assign a user to them. I typically create an &#8216;admin&#8217; user and give that user both the admin and manager roles. Open up /etc/tomat5/tomcat-users.xml and edit it to look like this:</p>
<blockquote><p>&lt;?xml version=&#8217;1.0&#8242; encoding=&#8217;utf-8&#8242;?&gt;<br />
&lt;tomcat-users&gt;<br />
&lt;role rolename=&#8221;admin&#8221;/&gt;<br />
&lt;role rolename=&#8221;tomcat&#8221;/&gt;<br />
&lt;role rolename=&#8221;manager&#8221;/&gt;<br />
&lt;role rolename=&#8221;role1&#8243;/&gt;<br />
&lt;user username=&#8221;admin&#8221; password=&#8221;SuperSecretPassword&#8221; roles=&#8221;admin,tomcat,manager&#8221;/&gt;<br />
&lt;user username=&#8221;tomcat&#8221; password=&#8221;tomcat&#8221; roles=&#8221;tomcat&#8221;/&gt;<br />
&lt;user username=&#8221;both&#8221; password=&#8221;tomcat&#8221; roles=&#8221;tomcat,role1&#8243;/&gt;<br />
&lt;user username=&#8221;role1&#8243; password=&#8221;tomcat&#8221; roles=&#8221;role1&#8243;/&gt;<br />
&lt;/tomcat-users&gt;</p></blockquote>
<p>Now you can access both the manager and the admin panel with the admin user. Try this out:</p>
<blockquote><p>httpd://yourdomain.net:8080/admin<br />
httpd://yourdomain.net:8080/manager</p></blockquote>
<p>If you don&#8217;t want to type the port, you can mount the apps with JkMount /admin/* jkworker or JkMount /manager/* jkworker.</p>
<p>At present, this <em>guide</em> is far from complete.  However, I think something like this would have helped me the first time I had to install tomcat on a shared server. Please feel free to post comments and flames.</p>
<p>jrod@blacknode.net</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blacknode.net/2008/11/tomcat-mod_jk-rhel5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Useful mysql queries for plesk</title>
		<link>http://blog.blacknode.net/2008/03/useful-mysql-queries-for-plesk/</link>
		<comments>http://blog.blacknode.net/2008/03/useful-mysql-queries-for-plesk/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 20:21:03 +0000</pubDate>
		<dc:creator>jrod</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.blacknode.net/?p=5</guid>
		<description><![CDATA[Plesk FTP passwords use psa; SELECT domains.displayName, sys_users.login, accounts.password FROM hosting, domains, sys_users, accounts WHERE hosting.dom_id = domains.id AND hosting.sys_user_id = sys_users.id AND sys_users.account_id = accounts.id ORDER BY domains.displayName ; #get plesk email user's username, pw, and redirect. use psa; select domains.displayname,mail.mail_name,accounts.password,mail.redir_addr from domains,mail,accounts where domains.id=mail.dom_id and accounts.id=mail.account_id; Catchalls: select d.name as domain, p.value as ]]></description>
			<content:encoded><![CDATA[<p>Plesk FTP passwords</p>
<p><code>use psa;<br />
SELECT<br />
domains.displayName,<br />
sys_users.login,<br />
accounts.password<br />
FROM<br />
hosting,<br />
domains,<br />
sys_users,<br />
accounts<br />
WHERE<br />
hosting.dom_id = domains.id<br />
AND<br />
hosting.sys_user_id = sys_users.id<br />
AND<br />
sys_users.account_id = accounts.id<br />
ORDER BY<br />
domains.displayName<br />
;</code></p>
<p><code><br />
#get plesk email user's username, pw, and redirect.<br />
use psa; select domains.displayname,mail.mail_name,accounts.password,mail.redir_addr from domains,mail,accounts where domains.id=mail.dom_id and accounts.id=mail.account_id;<br />
</code></p>
<p><code><br />
Catchalls:</code><br />
<code><br />
select d.name as<br />
domain, p.value as catchall_address from Parameters p,<br />
DomainServices ds, domains d where d.id = ds.dom_id and<br />
ds.parameters_id = p.id and p.parameter = 'catch_addr' order by d.name<br />
</code><br />
<code><br />
select count(distinct(domains.name)) from domains,DomainServices,Parameters where domains.id=DomainServices.dom_id and DomainServices.parameters_id=Parameters.id and Parameters.value&lt;&gt;"reject";<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blacknode.net/2008/03/useful-mysql-queries-for-plesk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

