<?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>semioticpixels scratch pad</title>
	<atom:link href="http://www.semioticpixels.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.semioticpixels.com</link>
	<description></description>
	<lastBuildDate>Fri, 05 Mar 2010 01:13:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress 2.9 Illegal Mix of Collations in Database</title>
		<link>http://www.semioticpixels.com/2010/03/wordpress-2-9-illegal-mix-of-collations-in-database/</link>
		<comments>http://www.semioticpixels.com/2010/03/wordpress-2-9-illegal-mix-of-collations-in-database/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 05:20:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[database administration]]></category>
		<category><![CDATA[linux server administration]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=244</guid>
		<description><![CDATA[I&#8217;ve been slow to adopt the automatic upgrade feature of Wordpress, but I reached my pain threshold with 20+ different plugins across 7 different Wordpress sites and used it for the 2.9.0 -> 2.9.1 upgrade.  And it was great!  I logged into each server, temporarily changed file ownership on all the Wordpress files [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been slow to adopt the automatic upgrade feature of Wordpress, but I reached my pain threshold with 20+ different plugins across 7 different Wordpress sites and used it for the 2.9.0 -> 2.9.1 upgrade.  And it was great!  I logged into each server, temporarily changed file ownership on all the Wordpress files to be owned by my Apache user, ran the upgrades and had a cup of coffee to celebrate.</p>
<p>Unfortunately, less than a week later one of those blog servers crashed under an intense load of runaway Apache processes.  The server was running at 108% cpu capacity and the top 15 processes were apache.  In the course of investigating that, I discovered this collation issue. </p>
<p>In the apache error log, the first error to confront me was this:<br />
<code> WordPress database error Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' for query SELECT comment_ID FROM wp_comments WHERE comment_post_ID = '2933' AND comment_approved != 'trash' AND  .... etc</code></p>
<p>Collation conflict &#8230;. I looked at the database structure, sure enough, there&#8217;s a mix of <code>utf8_general_ci and latin1_swedish_ci</code>.  Most of the default WordPress database tables are Latin1 and it looks like the newer tables and all of my plugins are UTF 8.</p>
<p>Looking at WordPress installs that I haven&#8217;t upgraded yet, all of them are set to UTF 8. <strong><em>But</em></strong> these are newer installs. The Wordpress installation that has this problem has been in place since version 1.* and Wordpress <em>used</em> to default to <code>Latin 1</code> encoding.  The UTF 8 tables are newer.  </p>
<p>So, in other words, if you&#8217;re maintaining a WordPress install that&#8217;s been around for a while, you probably also have this issue in your database.</p>
<p>Now, to get this particular database fixed up &#8230;<br />
One suggestion I came across was to export the schema and data separately then recreate the database with UTF 8 charset and reimport the data. However, that will likely break the existing content because the content has Latin 1 characters which will cause the newly minted UTF tables to choke a little.</p>
<blockquote><p><em> &#8230; When converting the character sets, all TEXT (and similar) fields are converted to UTF-8, but that conversion will BREAK existing TEXT because the conversion expects the data to be in latin1, but WordPress may have stored unicode characters in a latin1 database, and as a result, data could end up as garbage after a conversion!</em> <br /><a href="http://codex.wordpress.org/Converting_Database_Character_Sets">ref</a></p></blockquote>
<p>The better way is to run an ALTER tables query. The steps are: </p>
<ol>
<li>backup everything up</li>
<li>ALTER all TEXT and related fields to their binary counterparts using the SQL statements generated below</li>
<li>alter the character set</li>
<li>change the binary data type fields back to TEXT</li>
<li>Add DB_CHARSET and DB_COLLATE definitions to wp-config.php</li>
</ol>
<p>Using MySQL&#8217;s information_schema to generate the actual ALTER tables statements  needed, I wanted to pipe out the statements to a reusable text document so I could do a test run on a copy of the problem database first.  Generating the ALTER tables statements using information_schema will then include whatever extra tables or rows have been added by plugins.</p>
<p>The following 4 queries are lifted directly from <a href="http://www.haidongji.com/2008/11/11/convert-character-set-to-utf8-in-mysql/">Haidong Ji</a> via the <a href="http://codex.wordpress.org/Converting_Database_Character_Sets">Wordpress Codex</a>. I added the pipe out to text file.  Note that the path to mysql executable is on Ubuntu. Your path might be different, for example, another common location might be /usr/local/mysql/bin.</p>
<p>1. ALTER all TEXT and related string field types to binary field types counterparts using the SQL statements generated below. The list of conversions being made is as follows:</p>
<p>CHAR -> BINARY<br />
VARCHAR -> VARBINARY<br />
TINYTEXT -> TINYBLOB<br />
TEXT -> BLOB<br />
MEDIUMTEXT -> MEDIUMBLOB<br />
LONGTEXT -> LONGBLOB </p>
<ul>
<li><code>echo "SELECT CONCAT('ALTER TABLE ', table_name, ' MODIFY ', column_name, ' ', REPLACE(column_type, 'char', 'binary'),';') FROM columns WHERE table_schema = 'testblog' and data_type LIKE '%char%';" | /usr/bin/mysql -u<em>user</em> -p<em>password</em> information_schema > /home/<em>userdir</em>/char2binary.txt</code></li>
<li><code>echo "SELECT CONCAT('ALTER TABLE ', table_name, ' MODIFY ', column_name, ' ', REPLACE(column_type, 'text', 'blob'),';') FROM columns WHERE table_schema = 'testblog' and data_type LIKE '%text%';" | /usr/bin/mysql -u<em>user</em> -p<em>password</em> information_schema > /home/<em>userdir</em>/text2blob.txt</code></li>
<li><code>echo "SELECT CONCAT('ALTER TABLE ', table_name, ' MODIFY ', column_name, ' ', column_type, 'CHARACTER SET utf8;') FROM columns WHERE table_schema = 'testblog' and data_type LIKE '%char%';" | /usr/bin/mysql -u<em>user</em> -p<em>password</em> information_schema > /home/<em>userdir</em>/char2utf.txt</code></li>
<li><code>echo "SELECT CONCAT('ALTER TABLE ', table_name, ' MODIFY ', column_name, ' ', column_type, 'CHARACTER SET utf8;') FROM columns WHERE table_schema = 'testblog' and data_type LIKE '%text%';" | /usr/bin/mysql -u<em>user</em> -p<em>password</em> information_schema > /home/<em>userdir</em>/text2utf.txt</code></li>
</ul>
<p>2. Change the default character set of the database from Latin 1 to UTF 8.  This will ensure all <em>new</em> tables created are UTF 8, but doesn&#8217;t affect existing tables (which is fine since we&#8217;ve already changed those above, right?).<br />
This can be done either using phpmyadmin (select database -> click the Operations tab -> select UTF 8 from dropdown menu at bottom) or in your shell <code>ALTER DATABASE MyDb CHARACTER SET utf8;</code></p>
<p>3. change the binary data type fields back to TEXT<br /> This can get sticky if your original structure had datatypes that &#8230; were <em>supposed</em> to be binary or blobs. I looked through my database before altering it and did not find any blobs or binaries. But this could vary depending upon plugins used, etc.  Changing the binaries back to TEXT essentially involves running the above sql scripts in reverse. </p>
<ul>
<li><code><br />
echo "SELECT CONCAT('ALTER TABLE ', table_name, ' MODIFY ', column_name, ' ', REPLACE(column_type, 'binary', 'char'), ';') FROM columns WHERE table_schema = 'testblog' and data_type LIKE '%binary%';" | /usr/bin/mysql -u<em>user</em> -p<em>password</em> information_schema > /home/<em>userdir</em>/rev-binary2char.txt<br />
</code></li>
<li><code>echo "SELECT CONCAT('ALTER TABLE ', table_name, ' MODIFY ', column_name, ' ', REPLACE(column_type, 'blob', 'text'), ';') FROM columns WHERE table_schema = 'testblog' and data_type LIKE '%blob%';" | /usr/bin/mysql -u<em>user</em> -p<em>password</em> information_schema > /home/<em>userdir</em>/rev-blob2text.txt</code></li>
</ul>
<p>4. Add DB_CHARSET and DB_COLLATE definitions to wp-config.php</p>
<h3>references</h3>
<p><a href="http://codex.wordpress.org/Converting_Database_Character_Sets">wordpress article on changing collation</a><br />
<a href="http://alexking.org/blog/2008/03/06/mysql-latin1-utf8-conversion">article by alex king</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2010/03/wordpress-2-9-illegal-mix-of-collations-in-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plone 2 -&gt; Plone 3 Migration: Setting up</title>
		<link>http://www.semioticpixels.com/2010/03/plone-2-plone-3-migration-setting-up/</link>
		<comments>http://www.semioticpixels.com/2010/03/plone-2-plone-3-migration-setting-up/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 01:22:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[crib notes]]></category>
		<category><![CDATA[linux server administration]]></category>
		<category><![CDATA[plone]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=270</guid>
		<description><![CDATA[I have 2 old Plone 2.0 websites running on a single Zope instance that I need to:

migrate from it&#8217;s ancient host to a more modern server
upgrade to Plone 3

I&#8217;m migrating away from a 32 bit Red Hat 7(!) server to a 64 bit Ubuntu Hardy Virtual Machine.  The reasons should be obvious from that [...]]]></description>
			<content:encoded><![CDATA[<p>I have 2 old Plone 2.0 websites running on a single Zope instance that I need to:</p>
<ol>
<li>migrate from it&#8217;s ancient host to a more modern server</li>
<li>upgrade to Plone 3</li>
</ol>
<p>I&#8217;m migrating away from a 32 bit Red Hat 7(!) server to a 64 bit Ubuntu Hardy Virtual Machine.  The reasons should be obvious from that statement alone, but in short:  Red Hat 7 reached its end-of-life years ago.  It&#8217;s stable (so far) but all system maintenance has to be done manually with no package or dependency management.  There are many benefits to running within a virtualized environment, namely that I can clone it as many times as I like to develop and test other websites without having to set up a whole new server, and it simplifies our redundancy and backup process. </p>
<p>Anyway, this article is both a cheatsheet and an historical commentary for when I or someone else is trying to solve a problem and has a WTF moment regarding how and why things are set up the way they are. </p>
<p>The server environment I&#8217;m migrating away from is:<br />
- Server: Zope/(Zope 2.7.3-0, python 2.3.3)<br />
- ZServer/1.1<br />
- Plone/2.0.3</p>
<p>I&#8217;ll also be upgrading from Apache 1.3 to Apache 2 and switching from Squid to Varnish for caching </p>
<h3> Getting started: Migrating from Red Hat 7.3 to a Ubuntu 8 VM</h3>
<p>Zope is an &#8220;in-place&#8221; installation, which means it runs from the directory that you put it in.  This is nice and simple, makes it easier to run different versions of Zope on the same server with associated different versions of Python and Plone and, theoretically it should be easy to move to another system altogether.</p>
<p>So, my first pass, I rsynced the Zope directory over from the old server to the new one and tried to compile Python and Zope to see what would happen.  Unfortunately, when I compiled Python, I got a bunch of errors that indicated my version of  Python was optimized for a 32 bit system and &#8230; the new VM is 64 bit. E.g. </p>
<p><code>`Parser/tokenizer_pgen.o' is incompatible with i386:x86-64 output</code></p>
<p>Python  2.3.7 was the oldest version that I could get running on the new VM that didn&#8217;t throw 32 bit errors.  I briefly considered re-compiling Python 2.3.3 with -m32 option to GCC and I could have spent quite a lot of time researching and very likely could have gotten 2.3.3 running on the VM but 2.3.7 was a bugfix release and the most stable of the 2.3 releases and should work fine so I chose to save time by going with it.  We&#8217;ll see if I regret that later.  I was also reminded in the course of this process to clean up my mess with </p>
<p><code>$ sudo make clean</code></p>
<p>When I compiled Python, the following error occurred: <code> Can't locate Tcl/Tk libs and/or headers</code>, so I had to install the tcl/tk libraries (added to setup below)</p>
<p>Plone/2.0.3 is no longer available for download, although I was able to locate a copy of Plone/2.0.5.  I don&#8217;t have a development server to upgrade the website to 2.0.5 so if I have to use it, I  may have to keep my fingers crossed. Since Plone is installed as a Zope Product and doesn&#8217;t require compilation, I will first try to copy over the Products directory of the website and see if it&#8217;ll just work.</p>
<p>I will also need to install PIL and PyXML</p>
<p>When I compiled Zope the first time, I got error messages that zlib was missing. It turns out that Ubuntu ships with zlib, but not zlib-dev installed.  Also, when researching that error, I came across a comment that I would need to install system support (libjpeg62) for PIL so those 2 lines have been added to the VM setup below.</p>
<h3>Initial VM setup</h3>
<h4>update and install basics</h4>
<p><code><br />
$ sudo apt-get install update<br />
$sudo apt-get upgrade<br />
make sure gcc is up to date<br />
$sudo apt-get install build-essential<br />
$sudo apt-get install zlib1g zlib1g-dev libjpeg62 libjpeg62-dev tcl tcl-dev tk tk-dev vim-full lynx<br />
</code></p>
<p>update the locate db so you can find stuff </p>
<p><code>$sudo updatedb</code></p>
<p>change root password<br />
<code>$sudo passwd</code></p>
<p>create a user with sudo privileges:<br />
<code>$ useradd -m -c "real name" -s /bin/bash chris</code></p>
<p>The flags create a home directory with skel profile defaults and this account is linked to the defaults for bash shell, which is important if you like syntax coloring and tab completion.<br />
<code>$passwd chris<br />
$sudo visudo<br />
</code></p>
<p>Find the line that says #User Privilege specification and add<br />
<code><br />
chris ALL=(ALL) ALL<br />
shift ZZ to save and exit<br />
</code><br />
create zope user<br />
$useradd -m -c &#8220;zope&#8221; -s /bin/bash zope<br />
$passwd zope</p>
<p>Do not add zope user to the sudoers list.</p>
<p>Disable root login<br />
<code>$sudo vi /etc/ssh/sshd_config</code></p>
<p>Change &#8220;PermitRootLogin yes&#8221; to &#8220;PermitRootLogin no&#8221;<br />
Reload ssh<br />
<code>$sudo /etc/init.d/ssh reload</code></p>
<h3>create directory structure</h3>
<p>The Library directory in the below structure may look a little over-organized at first pass. However, my next project after completing this migration will be to upgrade from Plone 2.0.3 to Plone 3 which will require several interim upgrades.  This version of the website is running on Zope 2.7.3. Each interim upgrade will be installed to it&#8217;s respective directory within Library/Software keeping everything well organized and easy to roll back to if necessary.</p>
<p>in /usr/local</p>
<p>/usr/local/Zope<br />
&#8230;./Downloads: where downloads will be stored<br />
&#8230;./src: where software will be unarchived<br />
&#8230;./Library: where compiled software will be compiled to<br />
&#8230;&#8230;&#8230;./Software<br />
&#8230;&#8230;&#8230;&#8230;&#8230;/Zope273<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;../Python<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;./Zope<br />
&#8230;/Sites: where each website to be hosted lives<br />
&#8230;&#8230;&#8230;/instancename1<br />
&#8230;&#8230;../instancename2</p>
<p><code><br />
# cd /usr/local/Zope/Downloads<br />
# wget http://www.python.org/ftp/python/2.3.7/Python-2.3.7.tgz<br />
# wget http://www.zope.org/Products/Zope/2.7.0/Zope-2.7.0.tgz<br />
# wget http://internap.dl.sourceforge.net/sourceforge/plone/Plone-2.0.5.tar.gz<br />
# wget http://sourceforge.net/projects/pyxml/files/pyxml/0.8.4/PyXML-0.8.4.tar.gz<br />
# wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz</p>
<p>#cp * /usr/local/Zope/src/<br />
</code></p>
<h3>Install Python 2.3.7</h3>
<p>Build Python 2.3 from source with the following steps:<br />
<code><br />
cd /usr/local/Zope/src/<br />
tar -xvzf Python-2.3.7.tgz<br />
cd Python-2.3.7<br />
./configure --prefix=/usr/local/Zope/Library/Software/Zope273/Python<br />
make<br />
make install<br />
</code></p>
<h3> Install PIL</h3>
<p><a href=" http://www.pythonware.com/products/pil/">More info</a></p>
<p>At the time of this writing, PIL 1.1.6 is compatible with Python 1.5.2 and up and fixes some 64 bit compatibility errors in Python 2.5 (which we&#8217;re not using yet for this Zope installation)</p>
<p>On Ubuntu Hardy, you have to edit setup.py before installing PIL<br />
<code>#sudo vi /usr/local/Zope/src/Imaging-1.1.6/setup.py</code></p>
<p>find the line<br />
<code>#TCL_ROOT = None</code></p>
<p>and replace it with<br />
<code>TCL_ROOT = "/usr/include/tk"</code><br />
<code><br />
#/usr/local/Zope/Library/Software/Zope273/Python/bin/python2.3 setup.py build<br />
#/usr/local/Zope/Library/Software/Zope273/Python/bin/python2.3 setup.py install<br />
</code></p>
<h3>Install PyXML</h3>
<p><code>cd /usr/local/Zope/src/PyXML-0.8.4/</p>
<p>#/usr/local/Zope/Library/Software/Zope273/Python/bin/python2.3 setup.py build<br />
#/usr/local/Zope/Library/Software/Zope273/Python/bin/python2.3 setup.py install<br />
</code></p>
<h4> Other recommended packages </h4>
<p>elementree has been recommended, but it&#8217;s not installed on the old system so I&#8217;m not going to worry about it atm.</p>
<p>Also, the http://plone.org/documentation/kb/setup-from-source plone article recommends installing DocFinder as an invaluable development tool, but again, I don&#8217;t need this to get the website running so I&#8217;m going to come back to it.</p>
<h3>install zope 2.7.3</h3>
<p>Build Zope 2.7 from source with the following steps:<br />
<code><br />
cd /usr/local/Zope/src<br />
tar -xvzf Zope-2.7.3.tgz<br />
cd Zope-2.7.3<br />
./configure --with-python=/usr/local/Zope/Library/Software/Zope273/Python/bin/python2.3 --prefix=/usr/local/Zope/Library/Software/Zope273/Zope<br />
make<br />
make install<br />
</code></p>
<h4>create zope instance(s)</h4>
<p>The zope user must have write access to create the directory. After the instance is created, edit #&#8221;effective-user zope&#8221; into the etc/zope.conf file, so if you start it as root later it should #su itself to the non-root user. Again: make install should be run as root, #mkzopeinstance.py should not.</p>
<p>Initially, when I tried to create an instance, it failed with the error:<br />
<code># /usr/local/Zope/Library/Software/Zope273/Zope/bin/mkzopeinstance.py: /usr/local/Zope/bin/python: bad interpreter: No such file or directory<br />
</code></p>
<p>I think this was a result of not cleaning up a bad compilation. To fix this edit the first line in  mkzopeinstance.py from<br />
<code>#!/usr/local/Zope/bin/python</code><br />
To<br />
<code>#!/usr/local/Zope/LIbrary/Software/Zope273/Zope/bin/python</code></p>
<p>When Zope is compiled, one of the last things it does is create a symbolic link from where you told Zope the python interpreter you wanted it to use lives to Zope/bin/python. mkzopeinstance.py is looking for that symbolic link, and not looking for python itself.  This provides further separation so that we could theoretically upgrade python without touching Zope and then that symbolic link would only need to be changed.</p>
<p>The instance needs to be created with the zope user, NOT root<br />
<code><br />
# su zope<br />
# /usr/local/Zope/Library/Software/Zope273/Zope/bin/mkzopeinstance.py<br />
# when prompted for the path to your instance, use:<br />
# /usr/local/Zope/Sites/instance1  .... and so forth for each site.<br />
</code></p>
<h4>test Zope</h4>
<p>For the first instance, you can test by running /usr/local/Zope/Sites/instance1/bin/runzope. OR running /usr/local/Zope/Sites/instance1/bin/zopectl start</p>
<p>Once loaded, this will make Zope accessible on http://localhost:8080 (unless you changed the port), with the Zope Management Interface available on http://localhost:8080/manage (obviously if you&#8217;re accessing a remote server, then localhost might not work and you need to use the IP address)</p>
<p>shut down zone by either hitting ctrl+c if runzope was used or by running /usr/local/Zope/Sites/instance1/bin/zopectl stop if zopectl was used to start zone.</p>
<h3>Install the website</h3>
<p><code><br />
cp originalSite/Products/* /usr/local/Zope/Sites/instance1/Products/<br />
cp originalSite/var/Data.fs /usr/local/Zope/Sites/instance1/var/</p>
<p>/usr/local/Zope/Sites/instance1/bin/zopectl start<br />
</code><br />
navigate to the ZMI localhost:8080/manage<br />
(Note that the admin login credentials will match the credentials of the site migrated, not the credentials you compiled Zope with)<br />
The website I migrated over, even though I physically placed the files in the instance1 directory within /usr/local/Zope/Sites/instance1 are in the ZMI under &#8220;Plone&#8221;</p>
<p>click the Root Folder of the ZMI<br />
check the box beside &#8220;Plone&#8221;<br />
click the &#8220;rename&#8221; button and rename it to your instance1 site<br />
(at this point I discovered a dependency on lynx which I&#8217;ve added to the apt-get list above)</p>
<p>navigate to localhost:8080/instance1 to view the website</p>
<p>On first pass, everything worked!</p>
<h4>users</h4>
<p>make sure that all the Zope files belong to the zope user<br />
cd /usr/local<br />
chown zope -R Zope<br />
chgrp zope -R Zope<br />
//////</p>
<h4>start Zope</h4>
<p>Start Zope with the following command:<br />
su zope<br />
/usr/local/Zope/Sites/dev/bin/zopectl start</p>
<h3>check it out</h3>
<p>Go to the http://mydomain.com:8080/manage, log in, create a new Plone site object. </p>
<h3>resources/references</h3>
<ul>
<li><a href="http://plone.org/documentation/kb/setup-from-source">setup from source</a></li>
<li><a href="http://plone.org/documentation/kb/robust-installation">plone installation</a></li>
<p><a href="http://www.python-forum.org/pythonforum/viewtopic.php?f=1&#038;t=10977">resolving tcl/tk error when installing PIL on Ubuntu Hardy</a></li>
</ul>
<p>Next up:</p>
<ul>
<li>VirtualHostMonster and Apache with mod_rewrite &amp; mod_proxy</li>
<li>caching: Cachefu, Pound, Squid, Varnish</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2010/03/plone-2-plone-3-migration-setting-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bash settings on Mac Snow Leopard</title>
		<link>http://www.semioticpixels.com/2010/01/bash-settings-on-mac-snow-leopard/</link>
		<comments>http://www.semioticpixels.com/2010/01/bash-settings-on-mac-snow-leopard/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 09:51:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[crib notes]]></category>
		<category><![CDATA[linux server administration]]></category>
		<category><![CDATA[development environment]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=193</guid>
		<description><![CDATA[I&#8217;ve been slowly migrating from my desktop to my laptop so I&#8217;ve been setting it up piecemeal.
Bash (Terminal) File and Directory Colors
I do a lot of work within Terminal and not having directory and file coloring drives me nuts after a while.  To add colors
cd ~/
vi .bash_profile

add

export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad

reload it by typing (in Terminal)
 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been slowly migrating from my desktop to my laptop so I&#8217;ve been setting it up piecemeal.</p>
<h3>Bash (Terminal) File and Directory Colors</h3>
<p>I do a lot of work within Terminal and not having directory and file coloring drives me nuts after a while.  To add colors</p>
<pre>cd ~/
vi .bash_profile
</pre>
<p>add<br />
<code><br />
export CLICOLOR=1<br />
export LSCOLORS=ExFxCxDxBxegedabagacad<br />
</code></p>
<p>reload it by typing (in Terminal)<br />
<code> source ~/.bash_profile</code></p>
<p>close out Terminal then start a new Terminal session. Do an <code>ls</code> and directories and files should now have color.  A more in-depth explanation is listed below in &#8220;references&#8221;</p>
<h3>References</h3>
<p><a href="http://www.geekology.co.za/blog/2009/04/enabling-bash-terminal-directory-file-color-highlighting-mac-os-x/">adding file and directory colors to Terminal</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2010/01/bash-settings-on-mac-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>$PATH settings on Mac Snow Leopard</title>
		<link>http://www.semioticpixels.com/2010/01/path-settings-on-mac-snow-leopard/</link>
		<comments>http://www.semioticpixels.com/2010/01/path-settings-on-mac-snow-leopard/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 09:47:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[crib notes]]></category>
		<category><![CDATA[linux server administration]]></category>
		<category><![CDATA[development environment]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=205</guid>
		<description><![CDATA[Managing Paths
The problem with setting up an environment piecemeal is when you sit down to do something, you have to figure out what rabbit hole you&#8217;d gone down when you left off.  In this case, I remembered installing mysql, but usually the last thing I do when I install mysql is install phpmyadmin because [...]]]></description>
			<content:encoded><![CDATA[
<h3>Managing Paths</h3>
<p>The problem with setting up an environment piecemeal is when you sit down to do something, you have to figure out what rabbit hole you&#8217;d gone down when you left off.  In this case, I remembered installing mysql, but usually the last thing I do when I install mysql is install phpmyadmin because it&#8217;s such a handy productivity tool.  Well, there was no phpmyadmin on my system, but that could be because Snow Leopard came with PHP 5.3 out of the box which is incompatible with most of the popular PHP web applications out there.  </p>
<p>Anyhoo &#8230; so I started by checking my $PATH variable and was surprised by the output.</p>
<p><code>echo $PATH</code> gave me duplicates of /usr/local and /opt/local et. al. and had stuff in it that wasn&#8217;t in my ~/.profile </p>
<p>my ~/.profile had the following in it:<br />
<code><br />
export PATH=/usr/local/sbin:/usr/local/mysql/bin:$PATH<br />
##<br />
# Your previous /Users/username/.profile file was backed up as /Users/username/.profile.macports-saved_2009-12-29_at_11:21:58<br />
##<br />
# MacPorts Installer addition on 2009-12-29_at_11:21:58: adding an appropriate PATH variable for use with MacPorts.<br />
export PATH=/opt/local/bin:/opt/local/sbin:$PATH<br />
# Finished adapting your PATH environment variable for use with MacPorts.<br />
</code></p>
<p>and the second entry made by MacPorts was overriding the first entry.</p>
<p>Pretty funky. </p>
<h3>TheTao of Path Variables</h3>
<ol>
<li>/etc/profile is the default startup script for Bash, which is what I&#8217;m using. (If you&#8217;re using a different shell, then you may have a different startup script).  /etc/profile calls /usr/libexec/path_helper</li>
<li>path_helper first calls /etc/path and /etc/manpath which contain the initial path environment variables. /etc/path contains system-wide defaults:<br />
<code>/usr/bin<br />
/bin<br />
/usr/sbin<br />
/sbin<br />
/usr/local/bin<br />
</code></p>
<li>path_helper then looks for files in the directories: /etc/paths.d and  /etc/manpaths.d and appends the paths found there. On my system, /etc/paths.d and /etc/manpaths.d contain a file named X11 which simply contains the paths for X11.</li>
<li>After /etc/profile has called path_helper, it then looks for /etc/.bashrc.  I have a bashrc (no &#8220;.&#8221;), but my bashrc only has stuff in it specifying the bash shell prompt (<code>name-of-my-computer:directory username$</code>) </li>
<li>Bash next looks for ~/.bash_profile.  This is the file where you&#8217;ll <a href="http://www.semioticpixels.com/2010/01/bash-settings-…c-snow-leopard/">set file and directory colors</a> and could also be where you place your Path environment variables. Obviously, ~/ represents your user directory, so your settings will only be valid for your user.</li>
<li>Next, bash looks for ~/.bash_login. I don&#8217;t have this on my system so it&#8217;s ignored in my case</li>
<li>next, bash looks for ~/.profile which I <em>did</em> have on my system and is the file that XCode wrote to.  </li>
</ol>
<p>Another file that can contain path variables is ~/.MacOSX/environment.plist. This sets environment variables, including paths, for gui applications.  I&#8217;m not using it on my system so don&#8217;t have anything to say about it. </p>
<h3>Recap</h3>
<p>So, what that all means is that instead of exporting PATH environment variables to a .profile or .bash_profile in a user account directory, you (or your application) can, instead, make PATHs global by adding text files to the /etc/paths.d and /etc/manpaths.d directories.  </p>
<p>If you need to control the order of a path, then try this:<br />
 Add a line PATH=&#8221;" before the call to path_helper like this in /etc/profile:<br />
<code><br />
if [ -x /usr/libexec/path_helper ]; then<br />
        PATH=""<br />
        eval `/usr/libexec/path_helper -s`<br />
fi<br />
</code></p>
<p>All that said and done &#8230; I&#8217;ll continue using ~/.bash_profile because it&#8217;s got that warm fuzzy familiarity.  Personal preference, as always.</p>
<h3>References</h3>
<p><a href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man8/path_helper.8.html">man page for path_helper</a><br />
<a href="http://www.opensource.apple.com/source/shell_cmds/shell_cmds-149/path_helper/path_helper.8>description of path_helper </a><br />
<a href="http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/">making use of paths.d</a><br />
<a href="http://www.softec.st/en/OpenSource/DevelopersCorner/MasteringThePathHelper.html">mastering the path_helper</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2010/01/path-settings-on-mac-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rsync over ssh</title>
		<link>http://www.semioticpixels.com/2010/01/rsync-over-ssh/</link>
		<comments>http://www.semioticpixels.com/2010/01/rsync-over-ssh/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 19:29:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[crib notes]]></category>
		<category><![CDATA[data security]]></category>
		<category><![CDATA[linux server administration]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=174</guid>
		<description><![CDATA[Rysnc from 1 linux box to another and keep the file structure identical
Delete files from the target directory that have been deleted in the source directory
rsync -avz -e ssh --delete  remoteuser@remotehost:/remote/dir/ /this/dir/
Note: the ending {/} is important if you don&#8217;t want to hose a directory.  
Backup a website on a linux box to [...]]]></description>
			<content:encoded><![CDATA[<h3>Rysnc from 1 linux box to another and keep the file structure identical</h3>
<p>Delete files from the target directory that have been deleted in the source directory<br />
<code>rsync -avz -e ssh --delete  remoteuser@remotehost:/remote/dir/ /this/dir/</code></p>
<p><em>Note:</em> the ending {/} is important if you don&#8217;t want to hose a directory.  </p>
<h3>Backup a website on a linux box to your windows machine</h3>
<p>rsync reads &#8220;:&#8221; in a filepath as a remote directory, so if you&#8217;re trying to rsync to &#8220;c://&#8221; rsync will be confused.  Instead of using windows syntax for filepaths, use the cygwin directory structure.</p>
<ol>
<li><a href="http://www.cygwin.com/cygwin-ug-net/setup-net.html">Install cygwin</a> to windows</li>
<li>test rsync and ssh are installed by typing from within the cygwin terminal:<br />
<code>rsync --version</code><br />
<code>ssh -l username somedomain</code>
</li>
<li>create a directory in c://cygwin named backups or whatever you want to call it.</li>
<li><code>rsync -avz -e ssh --delete  remoteuser@remotehost:/remote/dir/ /cygdrive/c/directoryname</code> Change the directory drive to whatever it should be</li>
</ol>
<h3>references</h3>
<p><a href="http://troy.jdmz.net/rsync/index.html">rsync over ssh</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2010/01/rsync-over-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>open ssl upgrade from ssl 2 -&gt; ssl 3</title>
		<link>http://www.semioticpixels.com/2009/10/open-ssl-upgrade-from-ssl-2-ssl-3/</link>
		<comments>http://www.semioticpixels.com/2009/10/open-ssl-upgrade-from-ssl-2-ssl-3/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 17:18:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PCI compliance]]></category>
		<category><![CDATA[linux server administration]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=74</guid>
		<description><![CDATA[I inherited a number of web servers that had been installed and configured by different contractors and am now in the process of evaluating what needs to happen to bring them all up to snuff as well as figuring out ways to streamline regular updates.   Some of those web servers are still on [...]]]></description>
			<content:encoded><![CDATA[<p>I inherited a number of web servers that had been installed and configured by different contractors and am now in the process of evaluating what needs to happen to bring them all up to snuff as well as figuring out ways to streamline regular updates.   Some of those web servers are still on Red 7.3 (!), the last free open source version of Red Hat.  They&#8217;re quite old in server years.  Additionally I have a few other servers I set up a year ago that are more up-to-date running Ubuntu 8 LTS, but the Apache version is 2.2.11 and 2.2.8.  Our security scanning service notifies me regularly that SSL v 2 must be upgraded to SSL v3, which requires an upgrade to Apache 2.2.13</p>
<h3>Environment:</h3>
<p>Apache 1.3.29</p>
<h3>References:</h3>
<p><a href="http://apachehacker.com/kabir/security/disabling-weak-ssl-v2-support-in-apache-server.html">How to Disable SSL v 2 support in Apache</a></p>
<p>On Aug 10, 2009, Apache released an upgrade that addresses a DOS vulnerability.</p>
<p>server:</p>
<pre>/usr/local/apache2/bin/httpd -v
# Server version: Apache/2.2.11 (Unix)
# Server built:   Jan 15 2009 13:39:20</pre>
<p>dev server:</p>
<pre>/usr/sbin/apache2 -v</pre>
<h3>Issues</h3>
<ol>
<li>caused 401 error for all http requests (worked correctly for https connections) <a href="http://forums.cpanel.net/f5/apache-2-2-13-upgrade-breaks-site-127817.html">source</a></li>
<li>Seem to be some issues with mac version &#8211; It&#8217;s unclear whether this is an issue with a pre-compiled mac version or a generic self-compiled (which should be identical to the linux version) <a href="http://diymacserver.com/">source</a></li>
</ol>
<h3>Dev Server Tests</h3>
<p>Ran apt-get update and apt-get upgrade on dev server</p>
<p>ran apt-get upgrade apache2 and message returned says that 2.2.8 is the current version.  Which means my dev and my production servers are out of sync. I was surprised to learn that the last contractor from whom I took over server management had installed from source, removing Apache from package management. Not a big deal really, but it was undocumented.</p>
<p>In any case, there doesn&#8217;t appear to be a package release for Apache 2.2.13 yet in Ubuntu.  Only one of the 4 bugfixes has a security bulletin attached, so I&#8217;ve decided to wait a few weeks to see if anything new transpires in the security bulletins.  In general, I prefer to wait on updating production servers until a new release has been out long enough for bugfixes to be released.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2009/10/open-ssl-upgrade-from-ssl-2-ssl-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>top 35 iphone apps to date</title>
		<link>http://www.semioticpixels.com/2009/10/top-35-iphone-apps-to-date/</link>
		<comments>http://www.semioticpixels.com/2009/10/top-35-iphone-apps-to-date/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 17:02:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile web]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=71</guid>
		<description><![CDATA[http://www.techcrunch.com/2009/08/15/the-35-best-iphone-apps-of-the-year-so-far/
]]></description>
			<content:encoded><![CDATA[<p>http://www.techcrunch.com/2009/08/15/the-35-best-iphone-apps-of-the-year-so-far/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2009/10/top-35-iphone-apps-to-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>recover mysql root password</title>
		<link>http://www.semioticpixels.com/2009/10/recover-mysql-root-password/</link>
		<comments>http://www.semioticpixels.com/2009/10/recover-mysql-root-password/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 17:00:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[crib notes]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=67</guid>
		<description><![CDATA[You can recover MySQL database server password with following five steps.
Step # 1: Stop the MySQL server process.
Step # 2: Start the MySQL (mysqld) server/daemon process with the &#8211;skip-grant-tables option so that it will not prompt for password
Step # 3: Connect to mysql server as the root user
Step # 4: Setup new root password
Step # [...]]]></description>
			<content:encoded><![CDATA[<p>You can recover MySQL database server password with following five steps.</p>
<p>Step # 1: Stop the MySQL server process.</p>
<p>Step # 2: Start the MySQL (mysqld) server/daemon process with the &#8211;skip-grant-tables option so that it will not prompt for password</p>
<p>Step # 3: Connect to mysql server as the root user</p>
<p>Step # 4: Setup new root password</p>
<p>Step # 5:  Exit and restart MySQL server</p>
<p>Here are commands you need to type for each step (login as the root user):</p>
<h3>Step # 1 : <a href="http://www.cyberciti.biz/faq/mysql-startup-script-under-bsdlinux/">Stop mysql service</a></h3>
<p><code># /etc/init.d/mysql stop</code><br />
Output:</p>
<pre>Stopping MySQL database server: mysqld.</pre>
<h3>Step # 2: Start  MySQL server w/o password:</h3>
<p><code># mysqld_safe --skip-grant-tables &amp;</code><br />
Output:</p>
<pre>[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started</pre>
<h3>Step # 3: Connect to mysql server using mysql client:</h3>
<p><code># mysql -u root</code><br />
Output:</p>
<pre>Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql&gt;</pre>
<h3>Step # 4: <a href="http://www.cyberciti.biz/faq/mysql-change-root-password/">Setup new MySQL root user password</a></h3>
<p><code>mysql&gt; use mysql;<br />
mysql&gt; update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';<br />
mysql&gt; flush privileges;<br />
mysql&gt; quit</code></p>
<h3>Step # 5: Stop MySQL Server:</h3>
<p><code># /etc/init.d/mysql stop</code><br />
Output:</p>
<pre>Stopping MySQL database server: mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6186]: ended

[1]+  Done                    mysqld_safe --skip-grant-tables</pre>
<h3>Step # 6: <a href="http://www.cyberciti.biz/faq/how-do-i-access-mysql-server-from-the-shell-prompt-command-line/">Start MySQL server and test it</a></h3>
<p><code># /etc/init.d/mysql start<br />
# mysql -u root -p</code></p>
<p><a href="http://www.cyberciti.biz/tips/recover-mysql-root-password.html">reference</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2009/10/recover-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>managing plone logs</title>
		<link>http://www.semioticpixels.com/2009/09/managing-plone-logs/</link>
		<comments>http://www.semioticpixels.com/2009/09/managing-plone-logs/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 01:32:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[crib notes]]></category>
		<category><![CDATA[linux server administration]]></category>
		<category><![CDATA[plone]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=47</guid>
		<description><![CDATA[1. Add rotation script to logrotate
sudo vi /etc/logrotate.conf
add
# system-specific logs may be also be configured here.
/usr/local/Zope/Sites/SiteName/log/Z2.log {
        rotate 5
        weekly
        compress
        size=100k
      [...]]]></description>
			<content:encoded><![CDATA[<h3>1. Add rotation script to logrotate</h3>
<p>sudo vi /etc/logrotate.conf</p>
<p>add</p>
<p># system-specific logs may be also be configured here.<br />
/usr/local/Zope/Sites/SiteName/log/Z2.log {<br />
        rotate 5<br />
        weekly<br />
        compress<br />
        size=100k<br />
        sharedscripts<br />
        postrotate<br />
#close and re-open all Zope log files (z2.log, event.log) The common idiom after rotating Zope log files<br />
               /bin/kill -s SIGUSR2 `cat /usr/local/Zope/Sites/SiteName/var/Z2.pid`<br />
        endscript<br />
}</p>
<p>/usr/local/Zope/Sites/SiteName/log/event.log {<br />
        rotate 5<br />
        weekly<br />
        compress<br />
        size=100k</p>
<p>}</p>
<h3>2. Test log rotation</h3>
<p>Do a test run of the rotation without actually rotating anything:</p>
<p><code>/usr/sbin/logrotate -d /etc/logrotate.conf</code></p>
<p>if the test run completes without any erros, force a rotation:<br />
<code>/usr/sbin/logrotate -f /etc/logrotate.conf</code></p>
<h3>3. Automate with crontab</h3>
<p>On RedHat, crontab may be set up with runparts e.g.<br />
<code><br />
# run-parts<br />
01 * * * * root run-parts /etc/cron.hourly<br />
02 4 * * * root run-parts /etc/cron.daily<br />
22 4 * * 0 root run-parts /etc/cron.weekly<br />
42 4 1 * * root run-parts /etc/cron.monthly<br />
</code></p>
<p>In this case, place a script in the directory where it should run regularly.  I&#8217;m going to rotate weekly for now, so I&#8217;m placing a script in /etc/cron.weekly and naming it zope.cron (you can name it whatever you want. Any script in this directory will run weekely</p>
<p><code><br />
sudo vi /etc/cron.weekly/zope.cron</p>
<p>#rotate Z2.log and event.log in SiteName</p>
<p>0 01 * * * root /usr/sbin/logrotate /etc/logrotate.conf > /dev/null2>&#038;1</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2009/09/managing-plone-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>installing plone on ubuntu/slicehost</title>
		<link>http://www.semioticpixels.com/2009/09/installing-plone-on-slicehost/</link>
		<comments>http://www.semioticpixels.com/2009/09/installing-plone-on-slicehost/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 02:00:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[crib notes]]></category>
		<category><![CDATA[linux server administration]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.semioticpixels.com/?p=36</guid>
		<description><![CDATA[Setting up the Slicehost Account
Update everything
sudo apt-get update
sudo apt-get upgrade
install vim full so you can edit files
apt-get install vim-full
update the &#8220;locate&#8221; db
sudo updatedb
Change the root password
sudo passwd
Set up Users
useradd zope (I like useradd because there&#8217;s no reason to have a home directory. If you want your user to have a home directory then use adduser [...]]]></description>
			<content:encoded><![CDATA[<h3>Setting up the Slicehost Account</h3>
<p><strong>Update everything</strong><br />
<code>sudo apt-get update</code><br />
<code>sudo apt-get upgrade</code></p>
<p><strong>install vim full so you can edit files</strong><br />
<code>apt-get install vim-full</code></p>
<p><strong>update the &#8220;locate&#8221; db</strong><br />
<code>sudo updatedb</code></p>
<p><strong>Change the root password</strong><br />
<code>sudo passwd</code></p>
<p><strong>Set up Users</strong><br />
<code>useradd zope</code> (I like useradd because there&#8217;s no reason to have a home directory. If you want your user to have a home directory then use <code>adduser</code> or <code>useradd -D zope</code> to create ~/home/zope)<br />
<code>passwd zope</code><br />
<code>useradd -m  -c "real name" -s /bin/bash auserwithsudoers</code> The flags create a home directory with skel profile defaults and this account is linked to the defaults for bash shell, which is important if you like syntax coloring and tab completion.<br />
<code>passwd auserwithsudoers</code><br />
<code>sudo visudo </code><br />
Find the line that says #User Privilege specification and add<br />
<code>auserwithsudoers ALL=(ALL) ALL</code><br />
<code>shift ZZ </code> to save and exit</p>
<p>Now log out as root and login as your new admin user and test sudo<br />
<code>su auserwithsudoers</code><br />
<code>sudo bash</code></p>
<p><strong> Disable root login</strong><br />
<code>su root</code><br />
<code>sudo vim /etc/ssh/sshd_config</code><br />
Change &#8220;PermitRootLogin yes&#8221; to &#8220;PermitRootLogin no&#8221;</p>
<p><strong>Reload the ssh config</strong><br />
<code>sudo /etc/init.d/ssh reload</code></p>
<h3>Ok! Now we&#8217;re ready to think about plone</h3>
<ol>
<li>Follow the plone install instructions <a href="http://www.semioticpixels.com/2007/12/install-plone-3-on-ubuntu-7-10/">here</a></li>
<li>install some products (<a href="http://plone.org/documentation/tutorial/third-party-products/installing">see plone documentation </a>on using buildout).  Here&#8217;s what I did to install a Press Release product
<ol>
<li>download the product. If there&#8217;s a choice of files, choose the one with the naming convention Products.package.tar.gz.  This is a python egg.</li>
<li><code>su zope<br />
vi /usr/local/Plone/zeocluster/buildout.cfg</code><br />
add the following:<br />
<code>[buildout]<br />
...<br />
eggs =<br />
Products.PressRelease<br />
</code><br />
and save (<code>ctrl + ZZ</code>)</li>
<li><code>sudo /usr/local/Plone/zeocluster/bin/buildout</code></li>
<li><code>sudo /usr/local/Plone/zeocluster/bin/plonectl restart</code></li>
<li>In each Plone site where you want to install the Product, go Site Setup&gt;Add/Remove Products and install the Product.</li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.semioticpixels.com/2009/09/installing-plone-on-slicehost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
