<?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 &#187; linux</title> <atom:link href="http://www.semioticpixels.com/tag/linux/feed/" rel="self" type="application/rss+xml" /><link>http://www.semioticpixels.com</link> <description></description> <lastBuildDate>Thu, 12 Jan 2012 08:43:04 +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>setting up Ubuntu Lucid 10.04 for web development Part 1</title><link>http://www.semioticpixels.com/linux-server-administration/setting-up-ubuntu-lucid-10-04-for-web-development-part-1/</link> <comments>http://www.semioticpixels.com/linux-server-administration/setting-up-ubuntu-lucid-10-04-for-web-development-part-1/#comments</comments> <pubDate>Sun, 23 May 2010 20:07:32 +0000</pubDate> <dc:creator>chris</dc:creator> <category><![CDATA[linux server administration]]></category> <category><![CDATA[lamp stack]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[web server]]></category><guid isPermaLink="false">http://www.semioticpixels.com/?p=310</guid> <description><![CDATA[Ubuntu Lucid 10.04 is the most recent LTR released about a week ago, so naturally I wanted to take a look. I upgraded my test server which is where I run demo installs of various content management systems and where &#8230; <a href="http://www.semioticpixels.com/linux-server-administration/setting-up-ubuntu-lucid-10-04-for-web-development-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p> Ubuntu Lucid 10.04 is the most recent LTR released about a week ago, so naturally I wanted to take a look.  I upgraded my test server which is where I run demo installs of various content management systems and where I store works-in-progress.  This requires that the server must serve up a number of applications written in php, django, plone, and ruby on rails.<span id="more-310"></span></p><p>Lucid ships with php 5.3, the newest version of php.  Unfortunately a number of popular open source content management systems do not yet run on 5.3.  This was also an issue when I upgraded my mac to Snow Leopard.  In both cases, php 5.3 must be downgraded to 5.2.10 (you could choose to run both versions too, but I&#8217;m not going to address that here).</p><h3>Setting up a Lucid server on SliceHost</h3><p>on Slicehost, if you&#8217;re willing to wipe out everything, you can rebuild a clean slice for Lucid, which is what I chose.</p><ol><li>upgrade your kernel to 2.6.32-16.25</li><li>rebuild slice with Lucid</li></ol><p>As soon as the build is complete, you need to ssh in, and</p><ol><li>change the root password<pre class="brush: bash; light: true; title: ; notranslate">passwd</pre></li><li>create a sudoers group and create and add a user to it<pre class="brush: bash; title: ; notranslate">groupadd sudoers
visudo</pre><p>add</p><pre class="brush: bash; title: ; notranslate">%sudoers ALL=(ALL) ALL</pre><p>create user with sudo privileges</p><pre class="brush: bash; title: ; notranslate">useradd yourUserName
usermod -a -G sudoers yourUserName</pre></li><li>edit ssh configuration to disallow root login<pre class="brush: bash; title: ; notranslate"> vi /etc/ssh/sshd_config </pre><p>find</p><pre class="brush: bash; title: ; notranslate"> PermitRootLogin yes</pre><p> and set it to</p><pre class="brush: bash; title: ; notranslate">PermitRootLogin no</pre><p>add</p><pre class="brush: bash; title: ; notranslate">AllowUsers yourusername</pre></li><li>setup IPtables<br /> I used http://articles.slicehost.com/2010/4/30/ubuntu-lucid-setup-part-1</li><li>reload ssh<pre class="brush: bash; title: ; notranslate">/etc/init.d/ssh reload</pre></li><li>Add additional sources to sources.list. See <a href="http://repogen.simplylinux.ch/">sources list generator</a> for more sources lists.<pre class="brush: bash; title: ; notranslate">vi /etc/apt/sources.list</pre></li><li>Set to use bash<pre class="brush: bash; title: ; notranslate">dpkg-reconfigure dash</pre><p>select &#8220;no&#8221;</li><li>synchronize date<pre class="brush: bash; title: ; notranslate">apt-get install ntp ntpdate</pre></li><li>Install tools for compiling<pre class="brush: bash; title: ; notranslate">apt-get install build-essential</pre></li><li>if you&#8217;re a vi user, install vim-nox (hint: I used to install vim-full, but that&#8217;s now deprecated in Lucid)<pre class="brush: bash; title: ; notranslate">apt-get install vim-nox</pre></li></ol><h3>Set up LAMP server</h3><ol><li>If you don&#8217;t need to compile from source, you can use one of Ubuntu&#8217;s 1-liners for installing a LAMP server.<pre class="brush: bash; title: ; notranslate">tasksel1
or
1apt-get install lamp-server^</pre><p>I used the latter. This will return the following:</p><pre class="brush: bash; title: ; notranslate">apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libdbd-mysql-perl libdbi-perl libexpat1 libhtml-template-perl libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-client-core-5.1 mysql-common mysql-server mysql-server-5.1 mysql-server-core-5.1 php5-common php5-mysql psmisc
Suggested packages:
www-browser apache2-doc apache2-suexec apache2-suexec-custom ufw php-pear zbishell  libipc-sharedcache-perl tinyca mailx php5-suhosin
The following NEW packages will be installed:
apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libdbd-mysql-perl libdbi-perl libexpat1 libhtml-template-perl libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-client-core-5.1 mysql-common mysql-server mysql-server-5.1 mysql-server-core-5.1 php5-common php5-mysql psmisc</pre></li><li>test apache <br />http://www.domainname.com/<br />should return &#8220;It Works!&#8221;</li><li>test php<pre class="brush: bash; title: ; notranslate">vi /var/www/test.php
&amp;lt;php phpinfo(); ?&amp;gt;</pre></li><li>reload apache<pre class="brush: bash; title: ; notranslate">/etc/init.d/apache2 restart</pre><p>navigate in browser to http://www.domainname.com/test.php</code></code></li><li>check that mysql is bound to localhost<pre class="brush: bash; title: ; notranslate">cat /etc/mysql/my.cnf | grep bind-address</pre><p>should return</p><pre class="brush: bash; title: ; notranslate">bind-address	=127.0.0.1</pre><p>If it doesn't, edit /etc/mysql/my.cnf with correct address</li></ol><p>Ok! everything works as planned. Two small tasks remaining:  We need to downgrade php from 5.3 to 5.2.10 and install more php libraries.</p><h4>Downgrading Lucid from PHP 5.3 to 5.2</h4><p>There are several methods floating around out there, which all use the same idea.</p><ul><li><a href="http://mrkandy.wordpress.com/2010/04/16/install-php-5-2-x-in-ubuntu-10-04-lucid/">MrKandy</a> wrote a good script</li><li><a href="http://www.nickveenhof.be/blog/reverting-or-downgrading-php-53-52-ubuntu-lucid-lynx-1004">Nck Veenhof</a></li><li><a href="http://thejibe.com/blog/10/5/php-5210-debs-ubuntu-104-lucid">the jibe blog</a>.  I used the bash script provided in the comments on this blog post because it was the most succinct.</li></ul><p>For future use, I created <a href="http://www.semioticpixels.com/wp-content/uploads/2010/05/lucidDowngradePHP.txt">this bash script</a></p><p>You can either execute that script as a bash script or execute it within the shell. I initially executed it within the shell, then later decided to save it as an executable script for future use.<br /> To execute as a script</p><ol><li>create a directory somewhere you'd like to store scripts. It could be ~/home/username/scripts.  Copy the bash script above to your scripts directory, name it someName.sh, and make it executable<pre class="brush: bash; title: ; notranslate">chmod ugo+x</pre></li><li>execute the script<pre class="brush: bash; title: ; notranslate">sudo ./someName.sh</pre></li><li><pre class="brush: bash; title: ; notranslate">sudo apt-get update</pre></li><li><pre class="brush: bash; title: ; notranslate">sudo apt-get install $php_packages</pre></li></ol><p>Essentially, the way it works is it finds all the php 5.3 packages and removes them, then uses sed to replace "lucid" with "karmic" in the sources list and saves that in /etc/apt/sources/preferences.d which is iterated over first during update.  It then pins the karmic sources for php packages so that the php version isn't inadvertently updated during update/upgrade.</p><p>Next step for me was to install some more php packages since the initial install was so minimal and I wiped it out anyway.</p><pre class="brush: bash; title: ; notranslate">apt-get install php5-cli php5-curl php5-imagick php-pear php5-sqlite php5-xmlrpc php5-xsl</pre><p>and finally, I like to use phpmyadmin for managing multiple databases:</p><pre class="brush: bash; title: ; notranslate">apt-get install libapache2-mod-auth-mysql phpmyadmin</pre><p>select [*] apache 2 by hitting the space bar<br /> If this is a fresh install, select yes when asked to configure dbconfig-common</p><p>enter the mysql root password created earlier<br /> enter a password for the phpmyadmin admin account</p><p>navigate in a browser to http://www.domainname/phpmyadmin</p><p>Why didn't I just not install 5.3 and build 5.2 in?  Because I think it's actually faster this way.  For me at least.  I install defaults, test that apache and mysql work as expected, downgrade to 5.2, install remaining php packages.  Fairly straight-forward.  If only it had been so easy on  my mac.</p><p>Will I do this on my production servers?  Probably not for php applications.  Ubuntu 8.04 is supported for another year and 9.04 is supported for 2 years.  There's no hurry.   I <em>will</em>, however, probably go ahead and use 10.04 for Rails, Django, and Plone installations.</p><h3>Update: Rolling Back</h3><p>3/17/2011<br /> To roll this back,  do the following:</p><ol><li>list out the php modules installed to compare<pre class="brush: bash; title: ; notranslate">dpkg -l | grep php</pre></li><li>archive outside of sources directory or comment out /etc/apt/sources.list.d/karmic.list</li><li>archive /etc/apt/preferences.d/php outside of the sources directory</li><li><pre class="brush: bash; title: ; notranslate">apt-get update
apt-get upgrade</pre></li><li>I manually reinstalled php5 and modules even though apt-get should update should update them:<pre class="brush: bash; title: ; notranslate">apt-get install libapache2-mod-php5  php5-common php5-mysql php-pear php5-suhosin libapache2-mod-php5 php5-curl php5-imagick php-pear php5-sqlite php5-xmlrpc php5-xsl</pre></li><li>I had to remove the "#" mark from imagick.conf and cli.conf - apparently that's been deprecated as a comment symbol</li><li>if you're running WordPress, don't forget to edit php.ini with the date/time zone.  Initially I got an internal server error after restoring php5.  Fixing the date/time seemed to do the trick.</li></ol><h3>Why?</h3><p>I was installing an application for a friend and needed to install ffmpeg packages. Unfortunately, when I ran apt-get update, I received the below error:</p><pre class="brush: bash; title: ; notranslate">
APT::Cache limit ...
.... Dynamic MMap out of room! ...
Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_dapper_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.
</pre><p>The default Apt Cache limit was too low for all the sources (Lucid and Karmic). I stepped through the <a href="https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure">troubleshooting procedure for packages</a>, upping my apt cache to 200000000 which is quite high and the error disappeared.  In the end I decided to just keep it tidy and rollback. All of the php applications I'm running work fine on 5.3.</p> ]]></content:encoded> <wfw:commentRss>http://www.semioticpixels.com/linux-server-administration/setting-up-ubuntu-lucid-10-04-for-web-development-part-1/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>rsync over ssh</title><link>http://www.semioticpixels.com/linux-server-administration/rsync-over-ssh/</link> <comments>http://www.semioticpixels.com/linux-server-administration/rsync-over-ssh/#comments</comments> <pubDate>Tue, 19 Jan 2010 19:29:30 +0000</pubDate> <dc:creator>chris</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 &#8230; <a href="http://www.semioticpixels.com/linux-server-administration/rsync-over-ssh/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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><span id="more-174"></span></p><p><em>Note:</em> the ending {/} is important if you don&#8217;t want to hose a directory.</p><h3>Rsync with a custom ssh port</h3><p>place the ssh command in quotes; for example:<br /> <code>rsync -avz 'ssh -p1234'</p><h3>Backup a website on a linux box to your windows machine</h3><p>rsync reads ":" in a filepath as a remote directory, so if you're trying to rsync to "c://" 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/linux-server-administration/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/linux-server-administration/open-ssl-upgrade-from-ssl-2-ssl-3/</link> <comments>http://www.semioticpixels.com/linux-server-administration/open-ssl-upgrade-from-ssl-2-ssl-3/#comments</comments> <pubDate>Mon, 05 Oct 2009 17:18:32 +0000</pubDate> <dc:creator>chris</dc:creator> <category><![CDATA[linux server administration]]></category> <category><![CDATA[PCI compliance]]></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 &#8230; <a href="http://www.semioticpixels.com/linux-server-administration/open-ssl-upgrade-from-ssl-2-ssl-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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<span id="more-74"></span></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/linux-server-administration/open-ssl-upgrade-from-ssl-2-ssl-3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>installing plone on ubuntu/slicehost</title><link>http://www.semioticpixels.com/linux-server-administration/installing-plone-on-slicehost/</link> <comments>http://www.semioticpixels.com/linux-server-administration/installing-plone-on-slicehost/#comments</comments> <pubDate>Wed, 02 Sep 2009 02:00:19 +0000</pubDate> <dc:creator>chris</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 &#8230; <a href="http://www.semioticpixels.com/linux-server-administration/installing-plone-on-slicehost/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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><span id="more-36"></span></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:</p><pre><code>[buildout]
...
eggs =
Products.PressRelease</code></pre><p>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/linux-server-administration/installing-plone-on-slicehost/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Ubuntu Gutsy Gibbon development server setup</title><link>http://www.semioticpixels.com/linux-server-administration/ubuntu-gutsy-gibbon-development-server-setup/</link> <comments>http://www.semioticpixels.com/linux-server-administration/ubuntu-gutsy-gibbon-development-server-setup/#comments</comments> <pubDate>Mon, 21 Jan 2008 17:36:48 +0000</pubDate> <dc:creator>chris</dc:creator> <category><![CDATA[crib notes]]></category> <category><![CDATA[linux server administration]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[ubuntu]]></category><guid isPermaLink="false">http://www.semioticpixels.com/?p=15</guid> <description><![CDATA[I know there are plenty of articles and posts for setting up a development server. Yet I still find the need to write up the exact commands and process for my later self to refer to, especially since I haven&#8217;t &#8230; <a href="http://www.semioticpixels.com/linux-server-administration/ubuntu-gutsy-gibbon-development-server-setup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I know there are plenty of articles and posts for setting up a development server. Yet I still find the need to write up the exact commands and process for my later self to refer to, especially since I haven&#8217;t found a clone function in VMware Fusion like the linux version has.  A pet &#8220;when-I-have-time&#8221; project would be to turn these steps into a bash script.<span id="more-15"></span></p><p>Again, the environment is <a href="http://releases.ubuntu.com/7.10/">Ubuntu Gutsy Gibbon</a></p><h2>Setting up a new LAMP server</h2><h3>File Permissions</h3><p>If you&#8217;re going to access your web directory from another computer, you&#8217;ll need to change the file permissions on the web directory so you can put files. For example, my development server is a Ubuntu virtual machine but I do some development in a Windows vm and some development on my mac. In both cases, I connect with my development server over an sftp client that&#8217;s integrated into my editor environment.</p><p><code>sudo chown yourusername /var/www</code><br /> alternatively,  you might create a new user like &#8220;web&#8221; or &#8220;www&#8221;. If  you&#8217;ll occasionally make your server public, you might want to create a user that does not have sudo access for an extra layer of security.<sup><a href="http://www.semioticpixels.com/linux-server-administration/ubuntu-gutsy-gibbon-development-server-setup/#footnote_0_15" id="identifier_0_15" class="footnote-link footnote-identifier-link" title="for more on managing user accounts see this O&amp;#8217;Reilly article or for an in-depth treatise that addresses best practices &amp;#8211; check out my favorite reference book &amp;#8220;Essential System Administration&amp;#8221;.">1</a></sup></p><h3>install Apache 2</h3><p><code>sudo apt-get install apache2</code><br /> <code>sudo /etc/init.d/apache2 start</code><br /> test apache by navigating in browser to <a href="http://localhost">localhost</a>.<br /> place an index.html page into /var/www to test that&#8217;s all set up.</p><p>I like to stop apache while installing other things, but you can always restart it so it doesn&#8217;t really matter<br /> <code>sudo /etc/init.d/apache2 stop (or restart)</code></p><h3>Install php 5</h3><p><code>sudo apt-get install php5 libapache2-mod-php5</code><br /> restart apache so it registers with php<br /> <code>sudo /etc/init.d/apache2 restart</code><br /> test that it worked by placing a phpinfo file into /var/www<br /> create the file<br /> <code>vi /var/www/phpinfo.php</code><br /> then type<br /> <code>&lt;?php phpinfo(); &gt;</code></p><p>Navigate in browser to <a href="http://localhost/phpinfo.php">localhost/phpinfo.php</a> to see that it&#8217;s working</p><h3>install mysql server</h3><p><code>sudo apt-get install mysql-server</code><br /> <code>sudo apt-get install libapache2-mod-auth-mysql php5-mysql mysql-client</code></p><p>Before you start configuring files,  you need to install the full version of vi.  By default, ubuntu only comes with vim-tiny. You&#8217;ll know it&#8217;s vim-tiny when you try to edit a file with vi and the console reads out characters like ^B.  So,<br /> <code>sudo apt-get install vim-full</code></p><p>Now, tell php about mysql<br /> <code>sudo vi /etc/php5/apache2/php.ini</code></p><p>It doesn&#8217;t matter where you put it, but I like to put it under the line that says &#8220;Directory in which the loadable extensions (modules) reside&#8221;.<br /> <code> extension=mysql.so</code><br /> restart apache again.<br /> <code>sudo /etc/init.d/apache2 restart</code></p><h3>Install phpmyadmin</h3><p>This can be done the Ubuntu way or it can be done manually by installing phpmyadmin to /var/www like any other web application.</p><h4>The Ubuntu way</h4><p>the benefit to doing it this way is that phpmyadmin is installed as a managed package which means it will be updated by our lovely package manager, apt-get which saves us a little time. Since I use phpmyadmin on multiple virtual machines, this makes a cumulative difference.</p><p><code>sudo apt-get install phpmyadmin</code></p><p>tell apache where phpmyadmin actually lives (which is in /etc/phpmyadmin)<br /> <code>sudo vi /etc/apache2/apache2.conf</code><br /> You can place the following directive anywhere, but I prefer to place it under the line:<br /> <code># Include all the user configurations</code><br /> add the line<br /> <code>Include /etc/phpmyadmin/apache.conf</code></p><p>If you didn&#8217;t want to edit your apache.conf, you could always use a symlink instead.</p><p>navigate to <a href="http://localhost/phpmyadmin">localhost/phpmyadmin</a> to check that it&#8217;s working</p><h4>Some cleanup/maintenance/utility stuff</h4><p>If this is a fresh install, you probably need to run the locate database updater so you can use it.<br /> <code>sudo updatedb</code></p><p>Done with the LAMP setup! Next up &#8230; subversion and trac</p><h2>Footnotes</h2><ol class="footnotes"><li id="footnote_0_15" class="footnote">for more on managing user accounts see this <a href="http://www.reallylinux.com/docs/usersubuntu.shtml">O&#8217;Reilly article</a> or for an in-depth treatise that addresses best practices &#8211; check out my favorite reference book <a href="http://www.amazon.com/Essential-System-Administration-Third-Frisch/dp/0596003439/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1201113196&amp;sr=8-1">&#8220;Essential System Administration&#8221;</a>.</li></ol>]]></content:encoded> <wfw:commentRss>http://www.semioticpixels.com/linux-server-administration/ubuntu-gutsy-gibbon-development-server-setup/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Don&#8217;t Make Me Think: Infrastructure for Web Development</title><link>http://www.semioticpixels.com/linux-server-administration/dont-make-me-think-infrastructure-for-web-development/</link> <comments>http://www.semioticpixels.com/linux-server-administration/dont-make-me-think-infrastructure-for-web-development/#comments</comments> <pubDate>Thu, 13 Dec 2007 17:24:03 +0000</pubDate> <dc:creator>chris</dc:creator> <category><![CDATA[linux server administration]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[virtual machines]]></category> <category><![CDATA[vms]]></category><guid isPermaLink="false">http://www.semioticpixels.com/?p=5</guid> <description><![CDATA[When I was in college, my fellow classmates and I whined to each other about the gyrations it took to just get our development environments configured so we could do our homework &#8230; building a development environment was not the &#8230; <a href="http://www.semioticpixels.com/linux-server-administration/dont-make-me-think-infrastructure-for-web-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>When I was in college, my fellow classmates and I whined to each other about the gyrations it took to just get our development environments configured so we could do our homework  &#8230; building a development environment was not the assignment.<span id="more-5"></span></p><p>Working as a web developer or web designer isn&#8217;t much different. Setting up an infrastructure and development environment is not billable time but sometimes it seems I spend an inordinate amount of effort creating an infrastructure that supports getting my work done with less distraction.</p><p>The past couple years, infrastructure has gotten easier and more cost effective  using <a href="http://en.wikipedia.org/wiki/Virtual_machine">virtual machine</a> environments combined with free Linux distributions such as Ubuntu that strive to be more user friendly. So now seemed like a good time re-evaluate how I&#8217;m doing things and how I might do things differently to both increase productivity and reduce the environmental impact of my office.</p><h2>My General Infrastructure Requirements:</h2><ol><li>A Linux development and test server for programming projects.</li><li>A Windows webserver for .NET development</li><li>Windows workstations for IE browser testing <sup><a href="http://www.semioticpixels.com/linux-server-administration/dont-make-me-think-infrastructure-for-web-development/#footnote_0_5" id="identifier_0_5" class="footnote-link footnote-identifier-link" title="you can use various hacks for running multiple versions of IE on one machine &amp;#8230; but the risks are:they may not behave the same way as an installed version a Microsoft update will break them they don&amp;#8217;t work consistently across Windows 2000, XP or Vista when testing javascript behavior, I need to trust any errors are the javascript, not the browser install.">1</a></sup></li><li>A design station: Apple computers have superior system-level image rendering and have long been the standard for design stations.</li><li>A workhorse: this can double as ymy design station. If you need to run the many Windows-only business applications, this might be a Windows PC.</li><li>A server for internal applications &#8211; this should be more stable than the development/test server.</li><li>A router, preferably that combines wireless and print networking.</li><li>And last, but certainly not least, I want to become more productive while reducing environmental impact of my office &#8230; which is a whole different topic I&#8217;ll cover another time.</li></ol><p>my starting point was</p><ol><li>A year ago, my computer was desperately old but I was too busy with work to really think through what my ideal infrastructure should be. So I quickly built 2 computers from scavenged parts with the intent of using them for a year. Now that year is up</li><li>1 Ubuntu machine which was my workhorse, running  VMware with multiple installs of Windows and Linux for testing. I had built this a year ago reusing a cpu from a Dell</li><li>1 Windows server for .NET development. I had built this machine a year ago reusing another old cpu from a Dell.</li><li>1 linux server (a 5 year old Dell sc600) chugging noisily away in the closet. This was my development server</li><li>1 power pc used as a design station.</li></ol><p>Functionally, what I needed was a multi-core computer that would let me run multiple virtual machines simultaneously for testing and development. I&#8217;ve subscribed to <a href="http://www.browsercam.com">browsercam</a> for years to test websites which is expensive.  I need to be able to test websites on Windows, Mac and Linux and in multiple versions.  When Apple switched over to the Intel processor, I decided to get an Intel-based Mac as soon as VMware released a mac version.  So, the end result is:</p><ul><li>I kept my PowerPC design station with Adobe Creative Suite, professional fonts and font manager, and various other design and multimedia tools.</li><li>I purchased an Intel Apple and migrated from my Ubuntu workstation to the Apple. This is experimental for me and is what prompted me to write this. I have to admit that I really miss my Ubuntu desktop but I&#8217;ll give the mac a fair try. I installed VMware Fusion on my mac, and created a number of VMs:<ul><li>A standard LAMP+RoR+Plone installation (replacing my ancient Dell sc600)</li><li>A Windows workhorse install for mostly business applications such as QuickBooks, Microsoft Office, etc</li><li>Multiple installs of Windows for website testing in different versions of Internet Explorer</li><li>multiple installs of Ubuntu for various client projects that require different versions and packages installed on the server.<sup><a href="http://www.semioticpixels.com/linux-server-administration/dont-make-me-think-infrastructure-for-web-development/#footnote_1_5" id="identifier_1_5" class="footnote-link footnote-identifier-link" title="Although in most cases multiple versions of software can be run side by side in Linux, I find that it&amp;#8217;s less time consuming and less fraught with weird errors that must be resolved to just run a separate VM for those special cases rather than running 4 different versions of Python, for example, on the same machine&amp;#8230;">2</a></sup></li></ul></li><li>Most of my internal knowledge management and productivity tools are php, java and ruby on rails web applications. I spent more time than I thought was reasonable setting up hosting on my mac (Leopard), so I ended up creating a separate Ubuntu VM which took about 15 minutes to setup. This is fine since with a quad core, I can comfortably run multiple VMs and all my internal knowledge management is browser based anyway so the vm just has to be on and have an IP address.</li><li>Anyhoo &#8230; right before I switched over to the Intel Apple my old Linksys router went belly up. I&#8217;ve been pretty loyal to the Cisco-owned Linksys over the years despite the Windows-only admin interface. But I didn&#8217;t want to waste money on obsolete technology like G-band so I bought the wireless N Linksys router &#8230;.. and promptly returned it.<br /> I did more research and discovered that with the Apple Airport Extreme, I&#8217;d get not only a wireless-N router that I could administrate from my macs, but also a built-in print server which was something else I&#8217;d never been satisfied with in my infrastructure (well, dissatisfied isn&#8217;t really accurate. I was never able to get my old linksys print server to work nicely with my mac).<br /> So, the upshot is I got the Apple Airport Extreme and it works great &#8211; absolutely no complaints. Both macs can print, I can print from my linux and Windows VMs and, most importantly, I don&#8217;t have to think about it.</li></ul><p>The end result?  pretty good! I replaced 3 older, noisy, energy consuming computers with 1 for a grand total of 2 computers in my office. Which is nice since there are only 2 of us who work in this particular office. This should save me some maintenance time, means I&#8217;m consuming less energy and the office is quieter  now. I put away my KVM switch and cleared my desk of cables. I put the router and printer in the closet<sup><a href="http://www.semioticpixels.com/linux-server-administration/dont-make-me-think-infrastructure-for-web-development/#footnote_2_5" id="identifier_2_5" class="footnote-link footnote-identifier-link" title="laser printers release some nasty particulates when printing largish documents. So it&amp;#8217;s a good idea to place them in another room or enclosure. See &amp;#8220;SF Gate article&amp;#8221; Here&amp;#8217;s a link to the Particle Emission Characteristics of Office Printers">3</a></sup> and rarely have to power cycle the router.</p><p>VMware Fusion isn&#8217;t perfect yet &#8211; I&#8217;ll write about the trade offs in a separate post</p><h3>Update</h3><p>The above article was written in 2007.  It&#8217;s now 2011 and I&#8217;ve replaced all computers with a Mac Book Pro and some external harddrives to host VMs.  Easy!</p><ol class="footnotes"><li id="footnote_0_5" class="footnote">you can use various hacks for running multiple versions of IE on one machine &#8230; but the risks are:<ul><li>they may not behave the same way as an installed version</li><li>a Microsoft update will break them</li><li> they don&#8217;t work consistently across Windows 2000, XP or Vista</li><li>when testing javascript behavior, I need to trust any errors are the javascript, not the browser install.</li></ul><p></li><li id="footnote_1_5" class="footnote">Although in most cases multiple versions of software can be run side by side in Linux, I find that it&#8217;s less time consuming and less fraught with weird errors that must be resolved to just run a separate VM for those special cases rather than running 4 different versions of Python, for example, on the same machine&#8230;</li><li id="footnote_2_5" class="footnote">laser printers release some nasty particulates when printing largish documents. So it&#8217;s a good idea to place them in another room or enclosure. See <a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2007/08/01/PRINTERS.TMP&amp;tsp=1">&#8220;SF Gate article&#8221;</a> Here&#8217;s a link to the <a href="http://pubs.acs.org/cgi-bin/abstract.cgi/esthag/2007/41/i17/abs/es063049z.html">Particle Emission Characteristics of Office Printers</a></li></ol>]]></content:encoded> <wfw:commentRss>http://www.semioticpixels.com/linux-server-administration/dont-make-me-think-infrastructure-for-web-development/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>install plone 3 on ubuntu 7.10</title><link>http://www.semioticpixels.com/linux-server-administration/install-plone-3-on-ubuntu-7-10/</link> <comments>http://www.semioticpixels.com/linux-server-administration/install-plone-3-on-ubuntu-7-10/#comments</comments> <pubDate>Wed, 12 Dec 2007 17:19:46 +0000</pubDate> <dc:creator>chris</dc:creator> <category><![CDATA[crib notes]]></category> <category><![CDATA[linux server administration]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[plone]]></category> <category><![CDATA[ubuntu]]></category><guid isPermaLink="false">http://www.semioticpixels.com/?p=3</guid> <description><![CDATA[This is on a freshly installed Ubuntu 7.10 (Gutsy Gibbon). Modify version numbers as needed install g++ sudo apt-get install linux-headers-`uname -r` build-essential xinetd download plone unified installer or in your terminal type: wget https://launchpad.net/plone/3.0/3.0.4/+download/Plone-3.0.4-UnifiedInstaller.tar.gz --no-check-certificate tar -xvzf Plone-3.0.4-Unifiedinstaller-Rev3.tar.gz cd &#8230; <a href="http://www.semioticpixels.com/linux-server-administration/install-plone-3-on-ubuntu-7-10/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>This is on a freshly installed Ubuntu 7.10 (Gutsy Gibbon). Modify version numbers as needed</p><ol><li>install g++<br /> <code>sudo apt-get install linux-headers-`uname -r` build-essential xinetd</code></li><p><span id="more-3"></span></p><li>download <a href="http://plone.org/products/plone">plone unified installer</a> or in your terminal  type:<br /> <code>wget https://launchpad.net/plone/3.0/3.0.4/+download/Plone-3.0.4-UnifiedInstaller.tar.gz --no-check-certificate</code></li><li><code>tar -xvzf Plone-3.0.4-Unifiedinstaller-Rev3.tar.gz</code><br /> <code>cd Plone-3.0.4-Unifiedinstaller</code><br /> If you need to change the install path for Plone, edit the PLONE_HOME variable in install.sh. I changed mine to /usr/local/Plone304</li><li><code>sudo ./install.sh zeo</code></li><li> <code>cd /usr/local/Plone304/zeocluster</code><br /> and<br /> <code>sudo vi adminPassword.txt</code><br /> to view admin password</li><li> start Plone (first time will take a few minutes):<br /> <code> sudo /usr/local/Plone304/zeocluster/bin/startcluster.sh</code></li><li> navigate to localhost:8080 to check that zope is working</li><li> in localhost:8080/manage go to Root Folder, click on acl_users=&gt;users=&gt;admin and change admin password to something you&#8217;ll remember</li><li> from dropdown menu select Plone Site to create a new site</li><li> navigate to plone site: localhost:8080/ploneSiteName</li><li>navigate to zmi by: localhost:8080/ploneSiteName/manage</li></ol> ]]></content:encoded> <wfw:commentRss>http://www.semioticpixels.com/linux-server-administration/install-plone-3-on-ubuntu-7-10/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/56 queries in 0.022 seconds using disk: basic
Object Caching 724/809 objects using disk: basic

Served from: www.semioticpixels.com @ 2012-02-04 23:06:16 -->
