<?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>laneolson.ca &#187; linux</title>
	<atom:link href="http://www.laneolson.ca/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.laneolson.ca</link>
	<description></description>
	<lastBuildDate>Tue, 08 Jun 2010 20:25:03 +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>Compiling PHP 5.3 on Ubuntu 9.10</title>
		<link>http://www.laneolson.ca/2010/02/19/compiling-php-5-3-on-ubuntu-9-10/</link>
		<comments>http://www.laneolson.ca/2010/02/19/compiling-php-5-3-on-ubuntu-9-10/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 21:11:03 +0000</pubDate>
		<dc:creator>Lane</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.laneolson.ca/?p=177</guid>
		<description><![CDATA[<p>This guide will outline how to compile PHP 5.3 from source for use with Apache.  The instructions in this guide have been tested with Ubuntu 9.10 and should work on other debian based distros.  This guide is a slight modification of the <a href="http://vimeo.com/8005503" target="_blank">video guide on setting up Apache, PHP 5.3 with xdebug, MongoDB, and Lithium</a> created by Jon Adams. Before proceeding with the instructions below you will need Apache installed on your computer.  If you do not yet have apache you can follow my <a href="http://www.laneolson.ca/2010/02/11/installing-and-configuring-apache-for-multiple-sites-on-ubuntu/">guide for setting up Apache on Ubuntu 9.10</a>.</p>
<p>The first step for installing PHP 5.3 is to get the prerequisites.  For this guide you will need the following libraries in order to compile php with the options that I use.  If you have some custom libraries/extensions that you want included in your build of PHP, now is the time to install them if you haven&#8217;t already.</p>
<p>The following command will install the libraries that I will need:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libmcrypt-dev libxml2 libxml2-dev libbz2-dev libcurl4-gnutls-dev libjpeg62-dbg libpng12-dev libxslt1-dev libbz2-dev</pre></div></div>

<p>Once our required libraries have been installed we can go to http://www.php.net/downloads.php and choose to download the latest 5.3.x build in tar.gz format.  I chose to copy the download link and use wget to download it to the tmp directory, but you can do whatever you like.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp

<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ca2.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>php-5.3.1.tar.gz<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>this<span style="color: #000000; font-weight: bold;">/</span>mirror</pre></div></div>

<p>now untar the file and go into the directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> php-5.3.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> php-5.3.1</pre></div></div>

<p>Now comes the fun part.  Here we will run the configure script that says what kind of extensions we want php built with...</p>]]></description>
			<content:encoded><![CDATA[<p>This guide will outline how to compile PHP 5.3 from source for use with Apache.  The instructions in this guide have been tested with Ubuntu 9.10 and should work on other debian based distros.  This guide is a slight modification of the <a href="http://vimeo.com/8005503" target="_blank">video guide on setting up Apache, PHP 5.3 with xdebug, MongoDB, and Lithium</a> created by Jon Adams. Before proceeding with the instructions below you will need Apache installed on your computer.  If you do not yet have apache you can follow my <a href="http://www.laneolson.ca/2010/02/11/installing-and-configuring-apache-for-multiple-sites-on-ubuntu/">guide for setting up Apache on Ubuntu 9.10</a>.</p>
<p>The first step for installing PHP 5.3 is to get the prerequisites.  For this guide you will need the following libraries in order to compile php with the options that I use.  If you have some custom libraries/extensions that you want included in your build of PHP, now is the time to install them if you haven&#8217;t already.</p>
<p>The following command will install the libraries that I will need:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libmcrypt-dev libxml2 libxml2-dev libbz2-dev libcurl4-gnutls-dev libjpeg62-dbg libpng12-dev libxslt1-dev libbz2-dev</pre></div></div>

<p>Once our required libraries have been installed we can go to http://www.php.net/downloads.php and choose to download the latest 5.3.x build in tar.gz format.  I chose to copy the download link and use wget to download it to the tmp directory, but you can do whatever you like.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ca2.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>php-5.3.1.tar.gz<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>this<span style="color: #000000; font-weight: bold;">/</span>mirror</pre></div></div>

<p>now untar the file and go into the directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> php-5.3.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> php-5.3.1</pre></div></div>

<p>Now comes the fun part.  Here we will run the configure script that says what kind of extensions we want php built with.  At the beginning of the tutorial we installed a bunch of libraries (for example libbz2) and because of that we are able to build PHP with support for these libraries by specifying the &#8211;with-%library% flag.  To see the options available for configuring php type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--help</span></pre></div></div>

<p>You should be fine using what I used below, but feel free to make adjustments as you see fit:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-config-file-path</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--with-config-file-scan-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--with-apxs2</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>apxs2 <span style="color: #660033;">--with-bz2</span> <span style="color: #660033;">--with-curl</span> <span style="color: #660033;">--with-gd</span> <span style="color: #660033;">--with-iconv</span> <span style="color: #660033;">--with-mcrypt</span> <span style="color: #660033;">--with-mysql</span> <span style="color: #660033;">--with-mysqli</span> <span style="color: #660033;">--with-openssl</span> <span style="color: #660033;">--with-pcre-regex</span> <span style="color: #660033;">--with-pdo-mysql</span> <span style="color: #660033;">--with-pear</span> <span style="color: #660033;">--with-xmlrpc</span> <span style="color: #660033;">--with-xsl</span> <span style="color: #660033;">--with-zlib</span> <span style="color: #660033;">--enable-ftp</span> <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--enable-soap</span> <span style="color: #660033;">--enable-sockets</span></pre></div></div>

<p>If all goes well with the configure script you can continue to run the make file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-i</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Once the make script is finished running we have to manually create the modules for Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-available
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> php5.load</pre></div></div>

<p>The contents of this file should be:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LoadModule php5_module <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>libphp5.so</pre></div></div>

<p>Now create the configuration file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> php5.conf</pre></div></div>

<p>with the contents: </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_php5.c<span style="color: #000000; font-weight: bold;">&gt;</span>
	AddType application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php .php .phtml .php3
	AddType application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php-source .phps
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Once those two files have been created we can enable the php5 module for Apache, then restart Apache for the new module to load.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod php5
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>Now go into your web directory (if you followed my apache guide earlier go to ~/www/sandbox.loc/httpdocs) and create a file called test.php</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.loc<span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/</span>test.php</pre></div></div>

<p>with the following contents:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">phpinfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Now point your web browser to the new file you created.  Which should be at http://sandbox.loc/test.php, you should get a phpinfo page if all went according to plan.</p>
<p>You have now successfully installed php 5.3.  On the phpinfo page if you scroll down to the date section you will probably see an error saying you have to set your timezone.  You can do this with the php.ini file.  To ceate the php in file first create the /etc/php5 directory and copy the php.ini-production file included in the php-5.3.1 tar file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>php-5.3.1<span style="color: #000000; font-weight: bold;">/</span>php.ini-production <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini</pre></div></div>

<p>Now edit the php.ini file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini</pre></div></div>

<p>and find the line beginning with &#8220;;date.timezone&#8221;, remove the semi-colon and set the value to your desired time zone.  There is a <a href="http://ca.php.net/manual/en/timezones.php">list of supported timezones</a> in the PHP manual.  For example, I changed mine to:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">date.timezone = <span style="color: #ff0000;">&quot;America/Edmonton&quot;</span></pre></div></div>

<p>You should now be set to start using PHP 5.3 with Apache!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laneolson.ca/2010/02/19/compiling-php-5-3-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and Configuring Apache for Multiple Sites on Ubuntu</title>
		<link>http://www.laneolson.ca/2010/02/11/installing-and-configuring-apache-for-multiple-sites-on-ubuntu/</link>
		<comments>http://www.laneolson.ca/2010/02/11/installing-and-configuring-apache-for-multiple-sites-on-ubuntu/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 21:21:27 +0000</pubDate>
		<dc:creator>Lane</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.laneolson.ca/?p=162</guid>
		<description><![CDATA[<p>I like to run a local version of <a href="http://apache.org/">Apache</a> on my laptop for various projects so I can bring them wherever I go and not have to worry about them being live or screwing anything up.  Ubuntu makes it extremely easy to setup a LAMP server.  All you have to do is run:</p>

<div class="wp_syntax"><div class="code"><pre style="font-family: monospace;" class="bash"><span style="color: rgb(194, 12, 185); font-weight: bold;">sudo</span> tasksel</pre></div></div>

<p>Then follow the onscreen instructions and choose “LAMP Server” when prompted to be up and running with Apache, MySQL, and PHP in mere minutes.</p><p>This is great for a user that just wants the standard versions of PHP or MySQL.  However, I’m working on a project that requires PHP 5.3, and installing a LAMP server using tasksel installs PHP 5.2.  I decided that I would just install Apache and PHP manually so that I could use PHP 5.3.  This guide starts with my ideal Apache setup.  This is kind of a personal preference of how I like Apache setup, others may prefer a different method.  If you follow this guide directly you will end up with your web directory in your home folder, with two sites (http://sandbox.local/ and http://production.local/).  Lets get started.</p>
<h3>Installing Apache</h3>
<p>Installing Apache is the easy part, simply use apt:</p>

<div class="wp_syntax"><div class="code"><pre style="font-family: monospace;" class="bash"><span style="color: rgb(194, 12, 185); font-weight: bold;">sudo</span> <span style="color: rgb(194, 12, 185); font-weight: bold;">apt-get</span> <span style="color: rgb(194, 12, 185); font-weight: bold;">install</span> apache2 apache2-prefork-dev apache2-mpm-prefork</pre></div></div>

<p>Let it do its thing and in a few minutes you should have Apache up and running.  Once it is done you can test if it is working by opening a web browser and entering http://localhost/ in the address bar.  You should get Apache’s default message that says “It works!”.  Now that Apache is installed we can configure it to fit our needs...</p>]]></description>
			<content:encoded><![CDATA[<p>I like to run a local version of <a href="http://apache.org/">Apache</a> on my laptop for various projects so I can bring them wherever I go and not have to worry about them being live or screwing anything up.  Ubuntu makes it extremely easy to setup a LAMP server.  All you have to do is run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> tasksel</pre></div></div>

<p>Then follow the onscreen instructions and choose &#8220;LAMP Server&#8221; when prompted to be up and running with Apache, MySQL, and PHP in mere minutes.  This is great for a user that just wants the standard versions of PHP or MySQL.  However, I&#8217;m working on a project that requires PHP 5.3, and installing a LAMP server using tasksel installs PHP 5.2.  I decided that I would just install Apache and PHP manually so that I could use PHP 5.3.  This guide starts with my ideal Apache setup.  This is kind of a personal preference of how I like Apache setup, others may prefer a different method.  If you follow this guide directly you will end up with your web directory in your home folder, with two sites (http://sandbox.local/ and http://production.local/).  Lets get started.</p>
<h3>Installing Apache</h3>
<p>Installing Apache is the easy part, simply use apt:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2 apache2-prefork-dev apache2-mpm-prefork</pre></div></div>

<p>Let it do its thing and in a few minutes you should have Apache up and running.  Once it is done you can test if it is working by opening a web browser and entering http://localhost/ in the address bar.  You should get Apache&#8217;s default message that says &#8220;It works!&#8221;.  Now that Apache is installed we can configure it to fit our needs.</p>
<h3>Configuring Apache</h3>
<p>The first thing we are going to do is edit our hosts file to include our two &#8220;domain names&#8221; we&#8217;ll be using for the site, sandbox.local and production.local.  Open up the /etc/hosts file with nano (or your editor of choice):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts</pre></div></div>

<p>And add the following lines below the line that begins with 127.0.1.1:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.1.2 sandbox.local www.sandbox.local
127.0.1.3 production.local www.production.local</pre></div></div>

<p>For those not familiar with the hosts file, what this is doing is assigning an IP Address to the host names.  127.0.1.2 and 127.0.1.3 are IP addresses that point to the local machine.  The values following the IP Address are the host name, and host alias respectively.  If you want to additional host names that point to the local machine then add them here.  You can call your host names whatever you like instead of sandbox.local and production.local, just be sure to substitute your own names in place of these for the rest of the tutorial.</p>
<p>Now that we have our host names pointing to our local machine we can create directories to hold the content for our two websites.  I created my base web directory inside of my home directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>www</pre></div></div>

</pre>
<p>Now I want a directory for each site inside of the www directory.  The following will make a directory for each site with sub directories for the type of content (httpdocs for the web files, logs for the logs).  The last line just creates an index.html file in the httpdocs directory so we can test that our websites are working later.</p>
<p>For the sandbox.local website:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.local
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.local<span style="color: #000000; font-weight: bold;">/</span>httpdocs
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.local<span style="color: #000000; font-weight: bold;">/</span>logs
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&lt;h1&gt;sandbox.local&lt;/h1&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.local<span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/</span>index.html</pre></div></div>

<p>For the production.local website:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>production.local
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>production.local<span style="color: #000000; font-weight: bold;">/</span>httpdocs
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>production.local<span style="color: #000000; font-weight: bold;">/</span>logs
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&lt;h1&gt;production.local&lt;/h1&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>production.local<span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/</span>index.html</pre></div></div>

<p>Now we have our host names setup, and directories setup that contain our website.  The next step is to create configuration files to tell Apache what our host name (domain name) is and where on the computer it is located.  The configuration files for each site should be created in "/etc/apache2/sites-available".</p>
<p>First lets create the configuration file for sandbox.local</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> sandbox.local</pre></div></div>

<p>The file sandbox.local should contain the following.  You will have to change the "ServerAdmin" value and all the instances of "/home/lane" to your home directory depending on your username.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	ServerAdmin username<span style="color: #000000; font-weight: bold;">@</span>sandbox.local
	ServerName sandbox.local
	ServerAlias www.sandbox.local
&nbsp;
	DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>lane<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.local<span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>lane<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.local<span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/&gt;</span>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	<span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	ErrorLog <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>lane<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.local<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span>error.log
	LogLevel warn
	CustomLog <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>lane<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>sandbox.local<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span>access.log combined
<span style="color: #000000; font-weight: bold;">&lt;/</span>VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Now do the same for production.local.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> production.local</pre></div></div>

<p>With contents:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	ServerAdmin username<span style="color: #000000; font-weight: bold;">@</span>production.local
	ServerName production.local
	ServerAlias www.production.local
&nbsp;
	DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>lane<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>production.local<span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>lane<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>production.local<span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/&gt;</span>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	<span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	ErrorLog <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>lane<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>production.local<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span>error.log
	LogLevel warn
	CustomLog <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>lane<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>production.local<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span>access.log combined
<span style="color: #000000; font-weight: bold;">&lt;/</span>VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>As you can see the two configuration files are pretty straight forward XML files.  The <a href="http://httpd.apache.org/docs/1.3/mod/core.html#servername">ServerName</a> and <a href="http://httpd.apache.org/docs/1.3/mod/core.html#serveralias">ServerAlias</a> values tell Apache what host name the following configuration is meant for.  The <a href="http://httpd.apache.org/docs/1.3/mod/core.html#documentroot">DocumentRoot</a> value tells Apache where to find the files for this website.  The <a href="http://httpd.apache.org/docs/1.3/mod/core.html#directory">Directory directive</a> allows you to specify specific options for the given directory.  Lastly the <a href="http://httpd.apache.org/docs/1.3/mod/core.html#errorlog">ErrorLog</a> and <a href="http://httpd.apache.org/docs/1.3/mod/mod_log_config.html#customlog">CustomLog</a> tells Apache where to store the log files for this domain.</p>
<p>Once the configuration files have been created we want to enable them so that Apache knows they are there.  I also chose to disable the default config, this is up to you.  The default config will load whatever is in "/var/www" when you point your browser to "localhost" (which is why we recieved the "It works!" message earlier.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2ensite sandbox.local
<span style="color: #c20cb9; font-weight: bold;">sudo</span> a2ensite production.local
<span style="color: #c20cb9; font-weight: bold;">sudo</span> a2dissite default</pre></div></div>

<p>Finally the last step is to restart Apache.  This can be done with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>If all went well we should be able to bring up our two new local websites.  Here is where everything we've done comes together.  Open up your web browser and type in "http://sandbox.local/".  When you type in sandbox.local in your web browser, the host name is looked up (and found in /etc/hosts) which points to the localhost (127.0.1.2).  Apache is listening on port 80 (the default http port) and picks up the request for "sandbox.local".  It looks in the enabled sites for one with a ServerName of "sandbox.local" then points to the requested file (index.html by default) in "DocumentRoot".  The web browser then displays this page and should say "sandbox.local" in big letters.</p>
<p>Now point your web browser to http://production.local/ and you should receive a similar page that says "production.local" in big letters.</p>
<p>You can now put whatever web content you want in ~/www/sandbox.local/httpdocs/ or ~/www/production.local/httpdocs/ and they will load up when you type their host name into your web browser.</p>
<p>This isn't really all that useful yet because all you can load up are html pages, which you could do anyways just by double clicking on an html file.  In my next blog post I will show you how to install PHP for use with your Apache web server so you can use it as a testing ground for various projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laneolson.ca/2010/02/11/installing-and-configuring-apache-for-multiple-sites-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing OpenVAS 3 on Ubuntu 9.10</title>
		<link>http://www.laneolson.ca/2010/02/04/installing-openvas-3-on-ubuntu-9-10/</link>
		<comments>http://www.laneolson.ca/2010/02/04/installing-openvas-3-on-ubuntu-9-10/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 18:01:18 +0000</pubDate>
		<dc:creator>Lane</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OpenVAS]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.laneolson.ca/?p=137</guid>
		<description><![CDATA[<img src="http://www.laneolson.ca/wp-content/uploads/2010/02/OpenVAS.png" alt="OpenVAS 3 on Ubuntu 9.10" />
<p>This is a minor update to my previous post on <a href="http://www.laneolson.ca/2009/05/26/how-to-install-openvas-vulnerability-scanner-on-ubuntu-904/">how to install OpenVAS 2 on Ubuntu 9.04</a>.  Since that post there have been some changes.  A new release of Ubuntu and a new version of OpenVAS.  If you still prefer to use OpenVAS 2 then my previous instructions should work fine with Ubuntu 9.10.  Those who would like to take advantage of OpenVAS 3 can expect the following new features:</p>
<ul>
<li>A new internal architecture of the modules
</li><li>NVT Meta Information that is free of arbitrary size limits
</li><li>IPv6 support
</li><li>WMI clients support
</li><li>Supports upcoming optional extensions:
<ul>
   <li>OpenVAS Manager for storing and organizing scans on a central server in a
       SQL database
   </li><li>OpenVAS Administrator for User-, Feed- and Settings-Management
   </li><li>Greenbone Security Assistent for a web-based Vulnerability Management
</li></ul>
</li></ul>
<p>You can read more about it on the <a href="http://www.openvas.org" target="_blank">official OpenVAS website</a>.  Now, lets get to the good stuff.  The instructions below should get you up and running with OpenVAS 3 on Ubuntu 9.10...</p>]]></description>
			<content:encoded><![CDATA[<p>This is a minor update to my previous post on <a href="http://www.laneolson.ca/2009/05/26/how-to-install-openvas-vulnerability-scanner-on-ubuntu-904/">how to install OpenVAS 2 on Ubuntu 9.04</a>.  Since that post there have been some changes.  A new release of Ubuntu and a new version of OpenVAS.  If you still prefer to use OpenVAS 2 then my previous instructions should work fine with Ubuntu 9.10.  Those who would like to take advantage of OpenVAS 3 can expect the following new features:</p>
<ul>
<li>A new internal architecture of the modules
</li>
<li>NVT Meta Information that is free of arbitrary size limits
</li>
<li>IPv6 support
</li>
<li>WMI clients support
</li>
<li>Supports upcoming optional extensions:
<ul>
<li>OpenVAS Manager for storing and organizing scans on a central server in a<br />
       SQL database
   </li>
<li>OpenVAS Administrator for User-, Feed- and Settings-Management
   </li>
<li>Greenbone Security Assistent for a web-based Vulnerability Management
</li>
</ul>
</li>
</ul>
<p>You can read more about it on the <a href="http://www.openvas.org" target="_blank">official OpenVAS website</a>.  Now, lets get to the good stuff.  The instructions below should get you up and running with OpenVAS 3 on Ubuntu 9.10:</p>
<h3>Prerequisites</h3>
<p>First we need to install all of the dependent packages:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential libgnutls-dev libpcap0.8-dev <span style="color: #c20cb9; font-weight: bold;">bison</span> 
libglib2.0-dev libgpgme11-dev libssl-dev cmake</pre></div></div>

<h3>Getting the Files</h3>
<p>Once those packages have installed we need to download the files required for OpenVAS.  The links below may be outdated, make sure you obtain the latest version.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>wald.intevation.org<span style="color: #000000; font-weight: bold;">/</span>frs<span style="color: #000000; font-weight: bold;">/</span>download.php<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">706</span><span style="color: #000000; font-weight: bold;">/</span>openvas-libraries-3.0.3.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>wald.intevation.org<span style="color: #000000; font-weight: bold;">/</span>frs<span style="color: #000000; font-weight: bold;">/</span>download.php<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">696</span><span style="color: #000000; font-weight: bold;">/</span>openvas-scanner-3.0.1.tar.gz</pre></div></div>

<p>Now that we have downloaded the required files we must compile and install the packages in the following order:</p>
<ol>
<li>openvas-libraries</li>
<li>openvas-scanner</li>
</ol>
<h3>Install OpenVAS Libraries</h3>
<p>
Start by untarring the openvas-libraries and compiling/installing it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> openvas-libraries-3.0.3.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> openvas-libraries-3.0.3<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>If all goes well here then you should get a message saying that the openvas-libraries have been installed.  If for some reason you get a message saying that gpgme is not installed, then try this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libgpgme11-dev</pre></div></div>

<h3>Install OpenVAS Scanner</h3>
<p>Next untar the openvas-scanner and compile/install it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> openvas-scanner-3.0.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> openvas-scanner-3.0.1<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>The OpenVAS libraries, and scanner should now be installed.  We now have to make sure that /usr/local/bin and /usr/local/sbin are in our PATH.  We can do that by typing in:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${PATH}</span></pre></div></div>

<p>In the output from the above command you should see /usr/local/bin and /usr/local/sbin somewhere.  If you don&#8217;t you will have to add those entries to the <a href="https://help.ubuntu.com/community/EnvironmentVariables#Persistent%20environment%20variables">PATH environmental variable</a> manually.  If your PATH environmental variable is all good you can build the links to the new libraries:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> ldconfig</pre></div></div>

<h3>Generate a Certificate</h3>
<p>We are now ready to <a href="http://www.openvas.org/compendium/generating-a-server-certificate.html" target="blank">generate a certificate</a> for our OpenVAS Server, make sure to enter values relevant to your location.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> openvas-mkcert</pre></div></div>

<p>Follow the onscreen prompts and enter the appropriate information when asked.</p>
<h3>Create a User</h3>
<p>Now we need to <a href="http://www.openvas.org/compendium/adding-new-users.html" target="blank">add a user</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> openvas-adduser</pre></div></div>

<p>Enter a username and choose your authentication method (choose &#8220;pass&#8221; to authenticate with a password).  Hit ctrl-d when you are prompted for rules if you don&#8217;t want any scanning restrictions.</p>
<p>Now everything that we need is setup for the OpenVAS scanner.  The next step is to sync the server with the NVT feed.  The NVT (Network Vulnerability Test) feed is a list of files that will be downloaded to your server.  I would recommend that you run the openvas-nvt-sync on regular intervals to ensure that your NVT files are up to date.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> openvas-nvt-sync</pre></div></div>

<p><em>Note: The first time you run this command it may take a while to download all the NVT&#8217;s.  Grab a coffee and a sandwich, some water and a piece of fruit, some beer and some pretzels&#8230; or whatever it is you eat/drink.</em></p>
<p>Once it&#8217;s done its thing you can start up the OpenVAS server daemon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> openvassd</pre></div></div>

<p><em>Note: It might take a few minutes to load all the plug-ins.  A great opportunity to get some exercise and burn off the beer and pretzels from earlier.</em></p>
<p>If all went according to plan, you now have a running version of OpenVAS server.  The next step in the process is to setup a client to connect to the OpenVAS server.  You may opt to do this on a different computer, but you can just as easily install it on the same computer.</p>
<h3>Install the OpenVAS Client</h3>
<p>First we need to install the dependent packages for the client:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libgtk2.0-dev htmldoc</pre></div></div>

<p>Now we can proceed to install the client:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>wald.intevation.org<span style="color: #000000; font-weight: bold;">/</span>frs<span style="color: #000000; font-weight: bold;">/</span>download.php<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">685</span><span style="color: #000000; font-weight: bold;">/</span>openvas-client-3.0.0.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> openvas-client-3.0.0.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> openvas-client-3.0.0<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>If the above works for you, great!  However if you&#8217;re running a 64 bit OS like me, you might get an error when you run &#8220;sudo make&#8221;.  The error I received was:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ld</span>: cannot <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #660033;">-lcrypto</span>
collect2: <span style="color: #c20cb9; font-weight: bold;">ld</span> returned <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">exit</span> status
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>OpenVAS-Client<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span>
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>openvas-client-3.0.0<span style="color: #000000; font-weight: bold;">/</span>openvas<span style="color: #ff0000;">'
make: *** [client] Error 2</span></pre></div></div>

<p>I ran the following command to see what the problem was:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">laneolson<span style="color: #000000; font-weight: bold;">@</span>system:<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>openvas-client-3.0.0$ ldconfig <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> crypto
	libcrypto.so.0.9.8 <span style="color: #7a0874; font-weight: bold;">&#40;</span>libc6,x86-<span style="color: #000000;">64</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libcrypto.so.0.9.8
	libcrypto.so.0.9.8 <span style="color: #7a0874; font-weight: bold;">&#40;</span>libc6,x86-<span style="color: #000000;">64</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libcrypto.so.0.9.8
	libcrypto.so.0.9.8 <span style="color: #7a0874; font-weight: bold;">&#40;</span>libc6, hwcap: 0x0008000000008000<span style="color: #7a0874; font-weight: bold;">&#41;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>i686<span style="color: #000000; font-weight: bold;">/</span>cmov<span style="color: #000000; font-weight: bold;">/</span>libcrypto.so.0.9.8
	libcrypto.so.0.9.8 <span style="color: #7a0874; font-weight: bold;">&#40;</span>libc6, hwcap: 0x0004000000000000<span style="color: #7a0874; font-weight: bold;">&#41;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>i586<span style="color: #000000; font-weight: bold;">/</span>libcrypto.so.0.9.8
	libcrypto.so.0.9.8 <span style="color: #7a0874; font-weight: bold;">&#40;</span>libc6, hwcap: 0x0002000000000000<span style="color: #7a0874; font-weight: bold;">&#41;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>i486<span style="color: #000000; font-weight: bold;">/</span>libcrypto.so.0.9.8</pre></div></div>

<p>Creating a link in /usr/lib/ solved the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libcrypto.so.0.9.8 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libcrypto.so</pre></div></div>

<p>If you had to make the symbolic link make sure you do the following afterwards to complete the setup:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> ldconfig
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> clean
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>You should have a message saying that the Client was installed successfully.  You can run the client with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> OpenVAS-Client</pre></div></div>

<p>The client can be installed on any computer that has access to the server.  Once it is installed you just have to connect, setup a scan and you&#8217;re done!  If you run into any hiccups along the way feel free to post in the comments and I will see if I can lend a hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laneolson.ca/2010/02/04/installing-openvas-3-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Mouse issues running an Ubuntu guest in VMware</title>
		<link>http://www.laneolson.ca/2009/10/08/mouse-issues-running-an-ubuntu-guest-in-vmware/</link>
		<comments>http://www.laneolson.ca/2009/10/08/mouse-issues-running-an-ubuntu-guest-in-vmware/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:56:10 +0000</pubDate>
		<dc:creator>Lane</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.laneolson.ca/?p=128</guid>
		<description><![CDATA[      <p>I guess this isn&#8217;t exaclty an Ubuntu specific problem because I&#8217;m having issues with my mouse in Windows guest using VMware server as well.  Anyways, I have found a fix to the problem I was having in Ubuntu.  I have a few different VM&#8217;s that I use for testing and ever since I set them up I&#8217;ve been having the following mouse issues (even with VMware Tools installed):</p>

<ul>
<li>I often get a &#8220;shadow&#8221; mouse where I can see the Windows cursor and the Ubuntu cursor at the same time.  This would make it difficult for me to know what I was clicking on.</li>
<li>I usually have my Ubuntu VM at fullscreen on one monitor and Windows running in the other.  In order to release the mouse from the VM I would have to hit Ctrl+Alt, which makes it tough to use the VM and Windows side-by-side.  Also hitting Ctrl+Alt would exit the VM from fullscreen mode.</li>
<li>The cursor would often flash in a seizure inducing way.</li>
</ul>
<p>All of these issues can be easily fixed by installing the vmmouse driver.  Which can be done with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> xserver-xorg-input-vmmouse</pre></div></div>

<p>After it is installed you can reboot or simply restart gdm with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>gdm restart</pre></div></div>

<p>You can now run the VM in fullscreen and seamlessly move the mouse in and out of the VM without having to press ctrl+alt all the time.  It also fixes the other issues mentioned above.</p>
]]></description>
			<content:encoded><![CDATA[<p>I guess this isn&#8217;t exaclty an Ubuntu specific problem because I&#8217;m having issues with my mouse in Windows guest using VMware server as well.  Anyways, I have found a fix to the problem I was having in Ubuntu.  I have a few different VM&#8217;s that I use for testing and ever since I set them up I&#8217;ve been having the following mouse issues (even with VMware Tools installed):</p>
<ul>
<li>I often get a &#8220;shadow&#8221; mouse where I can see the Windows cursor and the Ubuntu cursor at the same time.  This would make it difficult for me to know what I was clicking on.</li>
<li>I usually have my Ubuntu VM at fullscreen on one monitor and Windows running in the other.  In order to release the mouse from the VM I would have to hit Ctrl+Alt, which makes it tough to use the VM and Windows side-by-side.  Also hitting Ctrl+Alt would exit the VM from fullscreen mode.</li>
<li>The cursor would often flash in a seizure inducing way.</li>
</ul>
<p>All of these issues can be easily fixed by installing the vmmouse driver.  Which can be done with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> xserver-xorg-input-vmmouse</pre></div></div>

<p>After it is installed you can reboot or simply restart gdm with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>gdm restart</pre></div></div>

<p>You can now run the VM in fullscreen and seamlessly move the mouse in and out of the VM without having to press ctrl+alt all the time.  It also fixes the other issues mentioned above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laneolson.ca/2009/10/08/mouse-issues-running-an-ubuntu-guest-in-vmware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
