<?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>asingh &#187; Guides</title>
	<atom:link href="http://asingh.com.np/category/tags/guides/feed/" rel="self" type="application/rss+xml" />
	<link>http://asingh.com.np</link>
	<description>A fusion of Art &#38; Technology</description>
	<lastBuildDate>Tue, 20 Mar 2012 05:39:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to enable gnote status icon?</title>
		<link>http://asingh.com.np/blog/how-to-enable-gnote-status-icon/</link>
		<comments>http://asingh.com.np/blog/how-to-enable-gnote-status-icon/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 08:26:12 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Gnote]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=546</guid>
		<description><![CDATA[Gnote is a free and open-source desktop notetaking application written for Linux, cloned from Tomboy by Hubert Figuiere. It uses a Wiki-like linking system to connect notes together. Gnote is part of the GNOME desktop environment, often filling the need for personal information management. With emerge of Gnome Shell (3.x series), there have been some [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Gnote Website" href="http://live.gnome.org/Gnote">Gnote</a> is a free and open-source desktop notetaking application written for Linux, cloned from Tomboy by Hubert Figuiere. It uses a Wiki-like linking system to connect notes together. Gnote is part of the GNOME desktop environment, often filling the need for personal information management.</p>
<p>With emerge of Gnome Shell (3.x series), there have been some changes with gnote, and which are inconvenience to old gnote users. These changes are below:</p>
<ol>
<li><strong>Gnote status icon not visible:</strong> It is because the gnome shell does not have any panel where you can add any applet/icons.</li>
<li><strong>Lack of Gnote default menu interface:</strong> In previous versions, when you access gnote through the applet icon, you would have seen a list of your old notes and menu items to create new note or search existing notes. This is no more the case with default gnote installation. If you launch gnote, you&#8217;ll see the <em>&#8220;Search all Notes&#8221;</em> window.</li>
<li><strong>Gnote not triggered up on startup:</strong> The previous versions of Fedora and/or other GNU/Linux distributions used to fire-up gnote applet program on startup, but this does not happens now. So every time you need gnote (and assuming that you&#8217;ve closed previous gnote windows), you&#8217;ll have to open gnote from the applications menu (or from command).</li>
</ol>
<p>The solution to these problems are easy enough, and are available on Gnote Help documentation under the FAQ section. To solve all these aforementioned problems, follow these steps:</p>
<ul>
<li>Open Terminal, and enter into root account.</li>
<li>Enable the gnote icon through gsettings:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
: gsettings set org.gnome.gnote use-status-icon true .</pre>
<ul>
<li>This command will now persistently display gnote icon in the bottom right panel of gnome shell if gnote is fire up, and will not vanish even if you close any open gnote window.</li>
<li>Now you need to set gnote to fire at start-up. In previous versions, you could have done through Startup Application preferences. But this item is not directly available under applications nor under System Settings. So you&#8217;ll have to use terminal to fire-up this application:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
gnome-session-properties</pre>
<ul>
<li>A Start-up preference dialog box will open up. Click on the <strong>Add</strong> button.</li>
<li>Put &#8220;Gnote&#8221; as the name, &#8220;/usr/bin/gnote&#8221; as the command, and &#8220;Gnote &#8211; Gnome&#8217;s note taking application&#8221; as the comment. (Note: You can put anything in the name and comment section).</li>
</ul>
<div id="attachment_547" class="wp-caption aligncenter" style="width: 369px"><a href="http://asingh.com.np/wp-content/uploads/2011/12/gsp-add-gnote.png"><img class="size-full wp-image-547" title="Add Startup Programs Dialog Box" src="http://asingh.com.np/wp-content/uploads/2011/12/gsp-add-gnote.png" alt="Add Startup Programs Dialog Box" width="359" height="199" /></a><p class="wp-caption-text">Add Gnote to Startup</p></div>
<ul>
<li>Click on Add button.</li>
<li>This will add gnote to startup. So from the next time you open up your linux box and log in, you&#8217;ll see gnote status icon visible in the bottom right panel.</li>
</ul>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/how-to-enable-gnote-status-icon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable desired gnome shell theme?</title>
		<link>http://asingh.com.np/blog/how-to-enable-desired-gnome-shell-theme/</link>
		<comments>http://asingh.com.np/blog/how-to-enable-desired-gnome-shell-theme/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 07:45:17 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Gnome Shell]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=536</guid>
		<description><![CDATA[Gnome Shell is the user interface that you see while using Gnome 3.x on various GNU/Linux distributions. Gnome Shell is highly themable, and a wide variety of themes are available on the Internet (see http://gnome-shell.deviantart.com/ for a list of good themes). Fedora 16 comes with Adwaita as the default theme, which many of you would [...]]]></description>
			<content:encoded><![CDATA[<p>Gnome Shell is the user interface that you see while using Gnome 3.x on various GNU/Linux distributions. Gnome Shell is highly themable, and a wide variety of themes are available on the Internet (see http://gnome-shell.deviantart.com/ for a list of good themes). Fedora 16 comes with <strong>Adwaita</strong> as the default theme, which many of you would like to replace with other good looking themes. Discussed here is how to replace Adwaita with a different gnome-shell theme using <strong>Gnome Tweak Tool</strong>, the problem in its current version and its temporary workaround.</p>
<h2>Installing and using new gnome-shell theme</h2>
<ul>
<li>Create a <strong>.themes</strong> directory in your home.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
mkdir ~/.themes/</pre>
<ul>
<li>Download the desired theme, extract it, and put the resulting directory into ~/.themes/. Note that you can put any number of theme sub-directories into the ~/.themes directory.</li>
<li>Install <strong>User Theme</strong> gnome shell extension.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
sudo yum -y install gnome-shell-extension-user-theme</pre>
<ul>
<li>Now install <strong>Gnome Tweak Tool</strong>.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
sudo yum -y install gnome-tweak-tool</pre>
<ul>
<li>Open Gnome Tweak Tool, and click on the <strong>Shell Extensions</strong> item in the left pane. On the right pane click on the toggle button next to <strong>User Themes Extension</strong> to enable the extension. Close the window.</li>
<li>Reload Gnome Shell. Press [Alt]+[F2], type <strong>r</strong>, and press [Enter].</li>
<li>Open Gnome Tweak Tool again, and click on the <strong>Theme</strong> item in the left pane. On the right page, you&#8217;ll see a list of available gnome-shell themes in a drop down box. Select the theme that you want to activate.</li>
<li>Enjoy the theme that you applied.</li>
</ul>
<h2>The problem with the current version</h2>
<div class="woo-sc-box info   ">
<h4>System Overview</h4>
<p>OS: Fedora 16 (Kernel 3.1.6-1.fc16.x86_64)<br />
Gnome Shell 3.2.1-2<br />
Gnome Tweak Tool 3.2.1-1<br />
User Theme Extension 3.2.3-1</div>
<p>With the current setup, gnome tweak tool will report <strong>&#8220;Shell user-theme extension not enabled.&#8221;</strong> This might be due to version mismatch between gnome shell (3.2.1) and user theme extension (3.2.3). See the screenshot below (you need to hover on the orange notification icon to see that message).</p>
<div id="attachment_542" class="wp-caption aligncenter" style="width: 652px"><a href="http://asingh.com.np/wp-content/uploads/2011/12/gtt-theme-prob.png"><img class="size-full wp-image-542" title="Gnome Tweak Tool Theme Problem" src="http://asingh.com.np/wp-content/uploads/2011/12/gtt-theme-prob.png" alt="Gnome Tweak Tool Theme Problem" width="642" height="514" /></a><p class="wp-caption-text">Gnome Tweak Tool Theme Problem</p></div>
<h2>Temporary Fix</h2>
<p>To fix this problem, you&#8217;ll have to change the dconf settings manually. This requires you to know the name of the theme folder in advance. As of example, if you want to set <strong>Faience</strong> as your default gnome shell theme, and there is a directory named Faience in ~/.themes/ (e.g. ~/.themes/faince), then you need to remeber the name <strong>faince</strong> (remember that you need to remember the name of the directory and it&#8217;s case sensitive).</p>
<ul>
<li>Install DConf Editor.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
sudo yum -y install dconf-editor</pre>
<ul>
<li>Open DConf Editor. You&#8217;ll see a list of hierarchical controls (in a tree-view) in the left pane, and relevant settings of the selected node on the right pane.</li>
<li>Expand to <strong>org &gt; gnome &gt; shell &gt; extensions &gt; user-theme</strong> on the left pane. On the right pane you&#8217;ll see a key-value pair field with the key named <strong>&#8220;name&#8221;</strong>. Double click on the value field for that key, and type the name of the theme directory (e.g. faience in this case).</li>
<li>After you set the value, close the editor. You&#8217;ll now see the required gnome shell theme.</li>
</ul>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/how-to-enable-desired-gnome-shell-theme/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to use Procmail with ZCS</title>
		<link>http://asingh.com.np/blog/how-to-use-procmail-with-zcs/</link>
		<comments>http://asingh.com.np/blog/how-to-use-procmail-with-zcs/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 09:08:06 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Planet Fedora]]></category>
		<category><![CDATA[Procmail]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=461</guid>
		<description><![CDATA[This article will guide you through setting up Procmail along with Zimbra Collaboration Server (ZCS). For those who do not know about procmail, it is a mail delivery agent (MDA) capable of sorting incoming mail into various directories and filtering out spam messages. The important feature of procmail is its ability to filter out incoming/outgoing [...]]]></description>
			<content:encoded><![CDATA[<p>This article will guide you through setting up <a title="Procmail Home" href="http://www.procmail.org/" target="_blank">Procmail</a> along with Zimbra Collaboration Server (ZCS). For those who do not know about procmail, it is a mail delivery agent (MDA) capable of sorting incoming mail into various directories and filtering out spam messages. The important feature of procmail is its ability to filter out incoming/outgoing mails based on regular expression, and take action upon the sorted out mail (e.g. move to a different folder, mark as spam, forward it to another address, or discard/delete it).</p>
<p>ZCS does not natively support Procmail, and hence there are 3 ways to use procmail with ZCS:</p>
<ol>
<li>Use ZCS with a MTA set to a server/installation with procmail configured (e.g. ZCS has a MTA set to another machine which has postfix with procmail configured and all the filtering is done by that server)</li>
<li>Use ZCS as normal, and run procmail on your mailbox (through the procmailrc file), to do the sorting/filtering.</li>
<li>Use ZCS with procmail as a pipe for mail delivery. (This guide will discuss this way of using procmail.)</li>
</ol>
<p>Let&#8217;s assume:</p>
<ul>
<li>The mail server with ZCS has already been installed and configured. If not, check my <a href="http://asingh.com.np/blog/installing-zimbra-collaboration-server-zcs-on-centos/">ZCS installation guide</a> and install ZCS.</li>
<li>We want to use procmail to filter all emails.</li>
<li>We want to discard emails with attachments that are destined for outside of our domain (i.e. test-example.com), but allow email with attachments for inside our domain.</li>
<li>We are using a CentOS 6 machine (works on Fedora, RHEL as well).</li>
<li>sudo is configured for the user or we are executing commands as root user.</li>
</ul>
<h2>Install Procmail</h2>
<pre class="brush: bash; title: ; notranslate">
sudo yum -y install procmail</pre>
<h2>Set ZCS Transport Map</h2>
<ul>
<li>Login as <strong>zimbra</strong> user.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
su - zimbra</pre>
<ul>
<li>Check the currently configured transport map for postfix:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cat /opt/zimbra/postfix/conf/main.cf | grep transport_maps</pre>
<p>The output should look like:</p>
<pre class="brush: plain; title: ; notranslate">
transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf</pre>
<ul>
<li>Add the transport file to the zimbra configuration.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
zmlocalconfig -e postfix_transport_maps=' hash:/opt/zimbra/postfix/conf/transport,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf'</pre>
<div class="woo-sc-box info   ">Note that the second part of the value of the postfix_transport_maps key (i.e. proxy:ldap:/opt/zimbra/conf/ldap-transport.cf) is the same as the output of the previous step/command.</div>
<ul>
<li>Add procmail pipe to the transport file (requires to edit the file as root user).</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
su -
vim /opt/zimbra/postfix/conf/transport</pre>
<p>Add the following content to the file:</p>
<pre class="brush: plain; title: ; notranslate">
*    procmail-pipe</pre>
<div class="woo-sc-box info   ">The above configuration means to configure the pipe of every mail (hence *). For other configuration sets, please see <a href="http://www.postfix.org/transport.5.html">Postfix Manual</a>for details.</div>
<ul>
<li>Create the db file for the transport map.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
su - zimbra
postmap /opt/zimbra/postfix/conf/transport</pre>
<ul>
<li>For the pipe to work, a corresponding set of configuration needs to be done in the postfix&#8217;s master.cf file. In this case master.cf.<strong>in</strong> file.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
vim /opt/zimbra/postfix/conf/master.cf.in</pre>
<p>Add the following text at the end of the file:</p>
<pre class="brush: plain; title: ; notranslate">
procmail-pipe    unix    -    n    n    -    -    pipe
flags=    user=zimbra    argv=/usr/bin/procmail /opt/zimbra/procmail/procmailrc</pre>
<div class="woo-sc-box info   ">Note that the first line does not start with white space, the second line should be just below the first line and should start with a whitespace.</div>
<h2>Create the Procmail Recipe</h2>
<ul>
<li>Create the Procmail recipe file (i.e. /opt/zimbra/procmail/procmailrc file that we have configured in the previous step).</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
mkdir /opt/zimbra/procmail/
cd /opt/zimbra/procmail/
touch procmailrc
chown -R zimbra:zimbra .
vim procmailrc</pre>
<p>Add the following content to the file:</p>
<pre class="brush: plain; title: ; notranslate">
SHELL = /bin/sh
PATH=$HOME/bin:/usr/bin:/bin:.
MAILDIR=/opt/zimbra/procmail/ # You better make sure it exists
DEFAULT=$MAILDIR
LOGFILE=.procmaillog
LOCKFILE=.procmaillock
VERBOSE=yes

:0
* !To:.*test-example\.com.*
* ! ^Content-Type:.*text/plain.*
{
:0B
* ^(Content-(Type|Disposition):.*|[ ]*(file)?)name=(&quot;[^&quot;]*|[^]*)\..*
/dev/null
}</pre>
<div class="woo-sc-box info   ">You can add your own procmail recipe in the procmailrc file depending upon what you want procmail to do. In this case we are discarding outgoing mail with attachment destined for users outside our domain.</div>
<ul>
<li>Restart Postfix.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
zmmtactl stop
zmmtactl start</pre>
<p>Thanks to the <a href="http://www.zimbra.com/forums/administrators/47711-zimbra-procmail.html" target="_blank">Zimbra forum entry</a> and Zimbra Wiki on <a href="http://wiki.zimbra.com/index.php?title=Configuring_Postfix_to_work_with_piped_scripts" target="_blank">Configuring Postfix to work with piped scripts</a> from where I adapted my installation and hence wrote this guide.</p>
<h2>Further Reading</h2><ul><li><a href="http://linuxnet.ca/postfix/dedicated_transport.html" title="Postfix Dedicated Transport Howto" rel="nofollow">Postfix Dedicated Transport Howto</a> <img src="http://asingh.com.np/wp-content/plugins/netblog/images/external-link-ltr-icon.png" /></li><li><a href="http://wiki.zimbra.com/index.php?title=Configuring_Postfix_to_work_with_piped_scripts" title="Configuring Postfix to work with piped scripts - Zimbra :: Wiki" rel="nofollow">Configuring Postfix to work with piped scripts - Zimbra :: Wiki</a> <img src="http://asingh.com.np/wp-content/plugins/netblog/images/external-link-ltr-icon.png" /></li><li><a href="http://www.postfix.org/transport.5.html" title="Postfix manual - transport(5)" rel="nofollow">Postfix manual - transport(5)</a> <img src="http://asingh.com.np/wp-content/plugins/netblog/images/external-link-ltr-icon.png" /></li><li><a href="http://www.zimbra.com/forums/administrators/47711-zimbra-procmail.html" title="Zimbra and procmail - Zimbra :: Forums" rel="nofollow">Zimbra and procmail - Zimbra :: Forums</a> <img src="http://asingh.com.np/wp-content/plugins/netblog/images/external-link-ltr-icon.png" /></li></ul>]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/how-to-use-procmail-with-zcs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Zimbra Collaboration Server (ZCS) on CentOS</title>
		<link>http://asingh.com.np/blog/installing-zimbra-collaboration-server-zcs-on-centos/</link>
		<comments>http://asingh.com.np/blog/installing-zimbra-collaboration-server-zcs-on-centos/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 08:02:12 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Planet Fedora]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=438</guid>
		<description><![CDATA[This guide will take you through installing Zimbra Collaboration Server (ZCS) which is an integrated bundle of Mail Server, web-documents, and other collaboration services enriched with easy web-administration interfaces. This makes ZCS a good choice for those who do not want to install and configure all the tools and service needed to support the features [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box note   ">This guide has been tested on the following settings:</p>
<p>CentOS Version: <strong>6.0 x86_64</strong><br />
ZCS Version:<strong> 7.1.3 GA 3664 for RHEL 6 x86_64</strong> <strong>Open Source</strong> (Release 7.1.3_GA_3346.RHEL6_64_20110928134428)</div>
<p>This guide will take you through installing <a title="Zimbra Collaboration Server" href="http://www.zimbra.com/products/zimbra-open-source.html" target="_blank">Zimbra Collaboration Server</a> (ZCS) which is an integrated bundle of Mail Server, web-documents, and other collaboration services enriched with easy web-administration interfaces. This makes ZCS a good choice for those who do not want to install and configure all the tools and service needed to support the features required for email, and web administration + web-mail interface is quite a time and effort saving feature of ZCS.</p>
<p>This guide makes a few assumptions about the prerequisites that have already been made/configured/handled:</p>
<ul>
<li>The server will handle email for the domain <strong>test-example.com</strong>.</li>
<li>The server will be hosted on a machine named <strong>mail.test-example.com</strong>.</li>
<li>The DNS is properly set up for resolving the names, and as well as for the MX record for test-example.com.</li>
<li>The machine for mail server has access to the DNS server and can resolve names.</li>
<li>The installer for ZCS (RHEL 6) has been downloaded.</li>
<li>The mail server has access to the Internet (for installing/updating packages, as well as to contact external relay MTA)</li>
<li>sudo is configured for the user, or the commands are used as root user.</li>
</ul>
<h2>Pre-Installation Tweaks</h2>
<ul>
<li>Disable system installed postfix/sendmail as ZCS runs its own postfix. System-wide installed postfix/sendmail interferes with ZCS&#8217;s postfix.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
sudo service postfix stop
sudo chkconfig postfix off
sudo service sendmail stop
sudo chkconfig sendmail off</pre>
<ul>
<li>Install nc package</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
sudo yum -y install nc</pre>
<ul>
<li>Disable SELinux (I&#8217;ve not yet found a way to use ZCS with SELinux on).</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
vim /etc/sysconfig/selinux</pre>
<p>In the file, set:</p>
<pre class="brush: plain; title: ; notranslate">
SELINUX=disabled</pre>
<pre class="brush: bash; title: ; notranslate">
sudo setenforce 0</pre>
<ul>
<li>Allow a few ports for Zimbra beforehand (not required before installation, but makes no harm in pre-setting it)</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
sudo iptables -I INPUT -p tcp --dport 443 -j ACCEPT #HTTPS
sudo iptables -I INPUT -p tcp --dport 3930 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 110 -j ACCEPT #POP3
sudo iptables -I INPUT -p tcp --dport 143 -j ACCEPT #IMAP
sudo iptables -I INPUT -p tcp --dport 993 -j ACCEPT #IMAPS
sudo iptables -I INPUT -p tcp --dport 389 -j ACCEPT #LDAP
sudo iptables -I INPUT -p tcp --dport 995 -j ACCEPT #POP3S
sudo iptables -I INPUT -p tcp --dport 7025 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 5800 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 5900 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 7071 -j ACCEPT #Port for ZCS Web Administration
sudo iptables -I INPUT -p tcp --dport 3894 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 3895 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT #HTTP (for webmail) </pre>
<ul>
<li>Fix the hosts file.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
vim /etc/hosts</pre>
<p>Put the name of the machine (i.e. mail.test-example.com) in the hosts file (assuming that the IP of the machine is 10.0.0.253):</p>
<pre class="brush: plain; title: ; notranslate">
10.0.0.253    mail.test-example.com mail</pre>
<p>The hosts file should look like this:</p>
<pre class="brush: plain; title: ; notranslate">
127.0.0.1    localhost localhost.localdomain localhost4 localhost4.localdomain4
::1          localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.0.253   mail.test-example.com mail</pre>
<h2>Install ZCS</h2>
<ul>
<li>Deflate the installation archive (in this case zcs-7.1.3_GA_3346.RHEL6_64.20110928134428.tgz file).</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
tar -zxvf zcs-7.1.3_GA_3346.RHEL6_64.20110928134428.tgz</pre>
<ul>
<li>Start the installation:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cd zcs-7.1.3_GA_3346.RHEL6_64.20110928134428
./install.sh --platform-override</pre>
<div class="woo-sc-box info   "><strong>&#8211;platform-override</strong> parameter is applied here because the base system configuration for the installer (i.e. RHEL6_x86_64) does not match with the target system (CentOS6 x86_64).</div>
<ul>
<li>You&#8217;ll be asked various questions during the installation, use the default or obvious answers.</li>
<li>Before completing the installation and writing configuration parameters to the configuration file, you&#8217;ll be prompted to review the settings or to fix some unset configuration. At this step, make sure you set the password for the admin user. It has a menu based approach. After reviewing/setting configuration, get out of the screen and save the configuration.</li>
<li>Let the installer do the rest of the configuration, at the end of which you will be notified of the completion of the installation.</li>
</ul>
<h2>Access Zimbra Collaboration Server</h2>
<p>The default location of ZCS installation is <strong>/opt/zimbra/</strong>, and the installer configures a init.d/service script through which you can stop, start, restart and check the status of ZCS. All zimbra components and daemons run as user <strong>zimbra</strong>. ZCS Administrative web-interface is available at 7071 port and the webmail runs at the default http port (i.e. port 80) of the machine. For this instance, the administrative interface would be available at <strong>http://mail.test-example.com:7071</strong> and the webmail would be available at <strong>http://mail.test-example.com</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/installing-zimbra-collaboration-server-zcs-on-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fez Installation and Configuration Guide</title>
		<link>http://asingh.com.np/blog/fez-installation-and-configuration-guide/</link>
		<comments>http://asingh.com.np/blog/fez-installation-and-configuration-guide/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 06:30:00 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=55</guid>
		<description><![CDATA[Disclaimer This guide is geared towards helping novice users setup Fez which is a front-end to Fedora commons. This guide contains easy steps which helps users go through various steps without much hassle. The guide makes assumption that the user is running either Fedora Linux or a compatible GNU/Linux distribution (e.g. RHEL, CentOS). Even though, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Disclaimer</strong><br />
This guide is geared towards helping novice users setup Fez which is a front-end to Fedora commons. This guide contains easy steps which helps users go through various steps without much hassle. The guide makes assumption that the user is running either Fedora Linux or a compatible GNU/Linux distribution (e.g. RHEL, CentOS). Even though, with a few changes, the installation can be performed under other Linux distributions. <strong>All the commands should be run as an authenticated user, either as &#8220;root&#8221; or with &#8220;sudo&#8221;</strong>.</p>
<p><strong>Conventions</strong></p>
<ul>
<li><em>[Square braces]</em> are used to denote keystrokes.</li>
<li><em>&#8220;Quotes&#8221;</em> are used to denote values and keywords.</li>
</ul>
<h1><strong>Introduction</strong></h1>
<p>Fez is an open source project to produce and maintain a highly flexible web interface to FEDORA for any Library or Institution to configure and publish or archive documents of any type sustainably. Fez is a PHP / MySQL front end to the Fedora repository software. It is developed by the University of Queensland Library as an open source project hosted on SourceForge.</p>
<h1><strong>Install Prerequisites</strong></h1>
<h2>Apache Web Server</h2>
<pre class="brush: bash; title: ; notranslate">
yum install httpd</pre>
<h2>PHP</h2>
<pre class="brush: bash; title: ; notranslate">
yum install php php-devel php-gd php-mysql php-pgsql php-xml</pre>
<h2>MySQL Database Server</h2>
<pre class="brush: bash; title: ; notranslate">
yum install mysql mysql-server libdbi-dbd-mysql mysql-connector-odbc mysql-devel</pre>
<h2>Other image manipulation tools</h2>
<pre class="brush: bash; title: ; notranslate">
yum install ImageMagick poppler poppler-utils libpng-devel</pre>
<h2>Additional Libraries (php-tidy &amp; libtidy)</h2>
<pre class="brush: bash; title: ; notranslate">
yum install libtidy php-tidy</pre>
<h2>Graphviz</h2>
<pre class="brush: bash; title: ; notranslate">
yum install graphviz</pre>
<p>To correctly run graphviz, execute:</p>
<pre class="brush: bash; title: ; notranslate">
dot -c</pre>
<h2>ExifTool</h2>
<pre class="brush: bash; title: ; notranslate">
yum install perl-Image-ExifTool</pre>
<h2>Fedora Commons</h2>
<p>See the <a href="http://asingh.com.np/blog/fedora-commons-installation-and-configuration-guide/">installation instructions</a>.</p>
<h2>JHOVE</h2>
<p>JHOVE (JSTOR/Harvard Object Validation Environment) &#8211; pronounced &#8220;jove&#8221; &#8211; is a joint project of JSTOR and the Harvard University Library to develop an extensible framework for format validation. JHOVE is a format-specific digital object validation API written in Java.</p>
<h3>Obtaining JHOVE</h3>
<p>Download JHOVE&#8217;s recent distribution from <a href="http://sourceforge.net/project/showfiles.php?group_id=221311">http://sourceforge.net/project/showfiles.php?group_id=221311</a>. At the time of writing this guide, the recent distribution is version 1.4 and the direct download link is <a href="http://sourceforge.net/projects/jhove/files/jhove/JHOVE%201.4/jhove-1_4.tar.gz/download">http://sourceforge.net/projects/jhove/files/jhove/JHOVE%201.4/jhove-1_4.tar.gz/download</a>.<br />
To download JHOVE v1.4, execute:</p>
<pre class="brush: bash; title: ; notranslate">
wget http://sourceforge.net/projects/jhove/files/jhove/JHOVE%201.4/jhove-1_4.tar.gz/download</pre>
<h3>Installing JHOVE</h3>
<ul>
<li>Extract JHOVE tarball (jhove-*.tar.gz).
<pre class="brush: bash; title: ; notranslate">
tar -zxvf jhove-*.tar.gz</pre>
<p>This should extract the jhove tarball and create a directory called &#8220;jhove&#8221; at the current location.</li>
<li>JHOVE installation base directory (the jhove directory that we have just created by extracting in the previous step), should be copied to <strong>&#8220;/usr/local/src/&#8221;</strong>.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cp -av jhove/ /usr/local/src/</pre>
<h3>Configuring JHOVE</h3>
<ul>
<li>Download <strong>&#8220;jhoveConfig.xsd&#8221;</strong> file and place it to your apache&#8217;s DocumentRoot directory (i.e. /var/www/html/).</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
wget hul.harvard.edu/ois/xml/xsd/jhove/jhoveConfig.xsd
mv jhoveConfig.xsd /var/www/html/
chmod 755 /var/www/html/jhoveConfig.xsd
chown apache:apache /var/www/html/jhoveConfig.xsd
chcon --reference=/var/www/html/ /var/www/html/jhoveConfig.xsd
</pre>
<ul>
<li>Change your directory to JHOVE&#8217;s installation directory.
<pre class="brush: bash; title: ; notranslate">
cd /usr/local/src/jhove/</pre>
</li>
<li>Edit the JHOVE&#8217;s configuration file. Open the file <strong><em>&#8220;conf/jhove.conf&#8221;</em></strong> in a file editor.
<pre class="brush: bash; title: ; notranslate">
vim conf/jhove.conf</pre>
</li>
<li>Replace the line <span style="color: #0000cd;"><em>&#8220;&lt;jhoveHome&gt;/users/stephen/projects/jhove&lt;/jhoveHome&gt;&#8221;</em></span> with <span style="color: #006400;"><em>&#8220;&lt;jhoveHome&gt;/usr/local/src/jhove/&lt;/jhoveHome&gt;&#8221;</em></span>.</li>
<li>Replace the line <span style="color: #0000cd;"><em>&#8220;&lt;tempDirectory&gt;/var/tmp&lt;/tempDirectory&gt;&#8221;</em></span> with <span style="color: #006400;"><em>&#8220;&lt;tempDirectory&gt;/tmp&lt;/tempDirectory&gt;&#8221;</em></span>.</li>
<li>Replace the line <span style="color: #0000cd;"><em>xsi:schemaLocation=&#8221;http://hul.harvard.edu/ois/xml/ns/jhove/jhoveConfig<br />
http://hul.harvard.edu/ois/xml/xsd/jhove/1.4/jhoveConfig.xsd&#8221;&gt;</em></span> with <span style="color: #006400;"><em>xsi:schemaLocation=&#8221;http://hul.harvard.edu/ois/xml/ns/jhove/jhoveConfig http://localhost/jhoveConfig.xsd&#8221;&gt;</em></span></li>
<li>Save the file and exit the editor.</li>
<li>Edit the JHOVE&#8217;s shell script. Open the file <strong><em>&#8220;jhove&#8221;</em></strong> in a file editor.
<pre class="brush: bash; title: ; notranslate">
vim jhove</pre>
</li>
<li>Replace the line <span style="color: #0000cd;"><em>&#8220;JHOVE_HOME=[fill in path to jhove directory]&#8220;</em></span> with <span style="color: #006400;"><em>&#8220;JHOVE_HOME=/usr/local/src/jhove/&#8221;</em></span>.</li>
<li>Replace the line <span style="color: #0000cd;"><em>&#8220;JAVA_HOME=/usr/java&#8221;</em></span> with <span style="color: #006400;"><em>&#8220;JAVA_HOME=/opt/jdk1.6.0_17/&#8221;</em></span>. Note, we are assuming that we have installed Sun JDK at /opt/jdk1.6.0_17/. If you have a different location for Sun JDK installation, use the path of that directory in this step.</li>
<li>Replace the line <span style="color: #0000cd;"><em>&#8220;${JAVA} -classpath $CP Jhove $ARGS&#8221;</em></span> with <span style="color: #006400;"><em>&#8220;${JAVA} -classpath $CP Jhove -c ${JHOVE_HOME}/conf/jhove.conf $ARGS&#8221;</em></span>.</li>
<li>Save the file and exit the editor.</li>
<li>Set proper file permissions.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
chmod -R 755 /usr/local/src/jhove/</pre>
<ul>
<li>Change your directory to <strong>/usr/local/</strong>.
<pre class="brush: bash; title: ; notranslate">
cd /usr/local/</pre>
</li>
<li>Make a symbolic link to the jhove installation directory here.
<pre class="brush: bash; title: ; notranslate">
ln -s /usr/local/src/jhove/</pre>
</li>
</ul>
<h1><strong>Prepare Environment Variables</strong></h1>
<ul>
<li><strong>JHOVE_HOME:</strong> This variable should point out to the jhove installation base directory.</li>
<li><strong>PATH:</strong> This variable should include the path to the jhove installation base directory so that the jhove script could be run without pointing out the absolute path.</li>
</ul>
<p>To prepare these variables we would add the instruction in the file /etc/profile.d/fedora-profile.sh. Remember that we have used the same file while installing and configuring fedora.</p>
<ul>
<li>Edit the file <strong>/etc/profile.d/fedora-profile.sh</strong>. Open the file in an editor.
<pre class="brush: bash; title: ; notranslate">
vim /etc/profile.d/fedora-profile.sh</pre>
</li>
<li>Add/Edit these lines:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
JHOVE_HOME=/usr/local/src/jhove
PATH=&quot;$PATH:$FEDORA_HOME/server/bin:$FEDORA_HOME/client/bin:/usr/local/src/jhove&quot;
export JHOVE_HOME PATH</pre>
<p><span style="color: #800080;">Remember not to delete other lines in the file. Also the last statement should include other variables like CLASSPATH JAVA_HOME etc.</span></p>
<ul>
<li>Save the file and exit the editor.</li>
</ul>
<h1><strong>Configure MySQL</strong></h1>
<ul>
<li>Edit <em>/etc/my.cnf</em> and add the following in the [mysqld] section:</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
# Fez customization
ft_min_word_len=2</pre>
<ul>
<li>Check is MySQl service is running:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
service mysqld status</pre>
<ul>
<li>If it is not running, start it:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
service mysqld start</pre>
<ul>
<li>If MySQL service is already running, you need to restart the service:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
service mysqld restart</pre>
<ul>
<li>To make mysql run at every startup:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
chkconfig mysqld on</pre>
<ul>
<li>Login to MySQL.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
mysql -u root -p</pre>
<p>Type the password for the MySQL root user and press [Enter].</p>
<ul>
<li>Create a database for fez. At the mysql prompt, execute:</li>
</ul>
<pre class="brush: sql; title: ; notranslate">
CREATE DATABASE fez default charset utf8;</pre>
<ul>
<li>Create a user for fez and assign all privileges to the user on the fez database.</li>
</ul>
<pre class="brush: sql; title: ; notranslate">
GRANT ALL ON fez.* TO fezuser@localhost IDENTIFIED BY 'userfez';
FLUSH privileges;</pre>
<p><span style="color: #800080;">Note: Use your own password instead of <strong>&#8220;userfez&#8221;</strong>. </span></p>
<ul>
<li>Exit MySQL prompt.</li>
</ul>
<h1><strong>Obtaining Fez</strong></h1>
<p>You can download the installation bundle of Fez at Fez&#8217;s page at Sourceforge &#8211; <a href="http://sourceforge.net/projects/fez">http://sourceforge.net/projects/fez/</a>. The recent bundle at the time of writing this guide is version 2.1RC3. The direct link to the download of version 2.1RC3 is <a href="http://sourceforge.net/projects/fez/files/Fez/Fez%202.1%20RC3/fez-2.1_rc3.tar.gz/download">http://sourceforge.net/projects/fez/files/Fez/Fez%202.1%20RC3/fez-2.1_rc3.tar.gz/download</a>.<br />
To download the 2.1RC3 bundle, execute:</p>
<pre class="brush: bash; title: ; notranslate">
wget http://sourceforge.net/projects/fez/files/Fez/Fez%202.1%20RC3/fez-2.1_rc3.tar.gz/download</pre>
<h1><strong>Installing Fez</strong></h1>
<ul>
<li>Extract the Fez installation tarball (fez-*.tar.gz).</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
tar -zxvf fez-*.tar.gz</pre>
<p>This should create a directory call fez-2.1_rc3 (if you are using version 2.1RC3).</p>
<ul>
<li>Move the Fez directory to Apache&#8217;s DocumentRoot (i.e. /var/www/html/).</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
mv fez-2.1_rc3/ /var/www/html/fez/</pre>
<p>Note: Here we are renaming the directory to &#8220;fez&#8221; while moving.</p>
<ul>
<li>Create a file called <strong>error_handler.log</strong> inside the fez installation directory.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
touch /var/www/html/fez/error_handler.log</pre>
<ul>
<li>Create an <strong>&#8220;incoming&#8221;</strong> directory inside fez installation directory.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
mkdir -p /var/www/html/fez/incoming/</pre>
<ul>
<li>Create an <strong>&#8220;duplicates_reports&#8221;</strong> directory inside fez installation directory.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
mkdir -p /var/www/html/fez/duplicates_reports/</pre>
<ul>
<li>Change permissions on the directory.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
chmod -R 755 /var/www/html/fez/
chown -R apache:apache /var/www/html/fez/
chcon -R --reference=/var/www/html /var/www/html/fez/</pre>
<ul>
<li>Start/Restart Apache service.</li>
</ul>
<p><span style="color: #ff0000;"><strong>Note:</strong> Ensure that proper SELinux settings are made or SELinux is set into permissive mode, else the page would not be displayed, and you will get a Apache&#8217;s permission error page.</span></p>
<ul>
<li>Open a browser and point at <a href="../../../fez">http://localhost/fez/</a>. This should open the fez installation page. Click on the <span style="color: #006400;"><strong>&#8220;Proceed to the first step&#8221;</strong></span> button.</li>
<li>The next page would ask you about <span style="color: #800000;"><strong><em>&#8220;Core Settings&#8221;</em></strong></span>.</li>
<li>Keep the <strong><span style="color: #800000;">&#8220;Application path&#8221;</span></strong> at <span style="color: #006400;"><strong>&#8220;/var/www/html/fez/&#8221;</strong></span> which is also the default option.</li>
<li>Set the <strong><span style="color: #800000;">&#8220;Relative path&#8221;</span></strong> to <span style="color: #006400;"><strong><em>&#8220;/fez/&#8221;</em></strong></span>.</li>
<li>Choose <span style="color: #800000;"><strong>&#8220;Database type&#8221;</strong></span> as <span style="color: #006400;"><strong>&#8220;MySQL&#8221;</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Database host&#8221;</strong></span> to <span style="color: #006400;"><strong>&#8220;localhost&#8221;</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Database name&#8221;</strong></span> to <span style="color: #006400;"><strong>&#8220;fez&#8221;</strong></span>. Remember to use a different name if you have created a different database for fez in the section <strong>&#8220;Configuring MySQL&#8221;</strong>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Database username&#8221;</strong></span> to <span style="color: #006400;"><strong>&#8220;fezuser&#8221;</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Database password&#8221;</strong></span> to <span style="color: #006400;"><strong>&#8220;userfez&#8221;</strong></span>.</li>
<li>Click on &#8220;<span style="color: #006400;"><strong>Proceed to next step&#8221;</strong></span> button.</li>
<li>At this step you shall see an alert box saying <span style="color: #0000cd;">&#8220;Please allow a couple of minutes for the next step to be performed. Do not refresh the next page during this time.&#8221;</span>. Click on the <span style="color: #006400;"><strong>&#8220;OK&#8221;</strong></span> button.</li>
<li>The next stage/page will show you if your installation was successful or not. Typically, the first line on the page should say <span style="color: #0000cd;">&#8220;Success!&#8221;</span>. If the installation was successful, you need to delete the setup directory.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
rm -Rf /var/www/html/fez/setup/</pre>
<h1><strong>Configuring Apache for Fez</strong></h1>
<ul>
<li>Create a apache configuration file for fez.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
touch /etc/httpd/conf.d/fez.conf</pre>
<ul>
<li>Edit the configuration file.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
vim /etc/httpd/conf.d/fez.conf</pre>
<ul>
<li>Add the following lines to the file:</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
Alias /fez /var/www/html/fez/

&lt;Directory &quot;/var/www/html/fez/&quot;&gt;
	Options Indexes FollowSymLinks
	AllowOverride All
	Order Allow,Deny
	Allow from All
&lt;/Directory&gt;</pre>
<ul>
<li>Save the file and exit the editor.</li>
<li>Open <strong>php.ini</strong> to tweak a few settings.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
vim /etc/php.ini</pre>
<ul>
<li>Set <strong>upload_max_filesize</strong> to 10MB. This sets the limit of the maximum file size for upload to be 10 MB rather than the default 2MB.</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
upload_max_filesize = 10M</pre>
<ul>
<li>Set <strong>post_max_filesize</strong> to 10MB.</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
post_max_size = 10M</pre>
<ul>
<li>Save file and exit the editor.</li>
<li>Restart Apache (httpd service).</li>
</ul>
<h1><strong>Configuring Fez</strong></h1>
<ul>
<li>Ensure Fedora service is running.</li>
<li>Point your browser to <a href="../../../fez">http://localhost/fez/</a>. If your browser shows you a lot of warnings related to PHP saying <span style="color: #0000cd;">&#8220;Warning: Call-time pass-by-reference has been deprecated &#8230;&#8221;</span>, this means that the version of PHP you are running on your machine has deprecated one of the feature called &#8220;Call-time pass-by-reference&#8221; and you need to make some changes to stop the warning from being displayed. You need to set the &#8220;error_reporting&#8221; to &#8220;E_ERROR&#8221;. To change the error reporting level:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
sed -i -e 's/E_ALL ^ E_NOTICE/E_ERROR/' /var/www/html/fez/config.inc.php</pre>
<p>Now refresh the fez startup page, it should not show you that error again.</p>
<ul>
<li>Click on the login link to open the login page. Use these credentials (the default username and password) to log in:</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
username: admin
password: admin</pre>
<ul>
<li>After successfully logging in, you should see the <strong>&#8220;Administration&#8221;</strong> link in the top left corner of the page. Click on the link.</li>
<li>Now you are directed to the Configuration page where you can see a lot of configuration options. On the left pane, click on the <strong>&#8220;Site Configuration&#8221;</strong> link. This should open the site configuration settings on the right pane.</li>
<li>Click on the <strong>&#8220;General Settings&#8221;</strong> link.</li>
<li>Set the <span style="color: #800000;"><strong>&#8220;Application Name&#8221;</strong></span> to an appropriate name like <strong><span style="color: #006400;">&#8220;Pustakalaya&#8221;</span></strong>.</li>
<li>Set the <span style="color: #800000;"><strong>&#8220;Admin Email&#8221;</strong></span> to a valid email address.</li>
<li>Set the <span style="color: #800000;"><strong>&#8220;Organization Name&#8221;</strong></span> to an appropriate name.</li>
<li>Set the <span style="color: #800000;"><strong>&#8220;Short org. Name&#8221;</strong></span> to the short form of the organization&#8217;s name.</li>
<li>Set the <span style="color: #800000;"><strong>&#8220;Hostname&#8221;</strong></span> to <span style="color: #006400;"><strong>&#8220;localhost&#8221;</strong></span> if you are testing fez, else set it to an appropriate DNS resolvable hostname, or the IP address.</li>
<li>Set the <strong><span style="color: #800000;">&#8220;SMTP Server&#8221;</span></strong> to an appropriate SMTP server&#8217;s address(name or IP) which the application should use while sending emails.</li>
<li>Set the <span style="color: #800000;"><strong>&#8220;System email from address&#8221;</strong></span> to an appropriate and valid email address. Fez will use that address as a value for the field <strong>&#8220;FROM&#8221;</strong> email address while sending mails.</li>
<li>Set other options as per your choice.</li>
<li>Click on the <span style="color: #006400;"><strong>&#8220;Save Changes&#8221;</strong></span> button.</li>
<li>Next, click on the <strong><span style="color: #800000;">&#8220;Fedora Settings&#8221;</span></strong> link. Remember, much of the settings come from the previous stage where we installed Fedora Commons. Refer to those settings.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Version&#8221;</strong></span> to <span style="color: #006400;"><strong>2.2</strong></span> or 2.2.1, which is also the default option.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Location&#8221;</strong></span> to <span style="color: #006400;"><strong>localhost:8080/fedora</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Server Setup&#8221;</strong></span> to <span style="color: #006400;"><strong>no-ssl-authenticate-all</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;PID namespace&#8221;</strong></span> to <span style="color: #006400;"><strong>Pustakalaya</strong></span> or the PID Namespace that you have used which configuring Fedora.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Username&#8221;</strong></span> to the Fedora Commons username (i.e. <span style="color: #006400;"><strong>fedoraAdmin</strong></span>).</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Password&#8221;</strong></span> to Fedora Commons Password (i.e. <span style="color: #006400;"><strong>adminFedora</strong></span>).</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Database Name&#8221;</strong></span> to <span style="color: #006400;"><strong>fedora22</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Database Username&#8221;</strong></span> to <span style="color: #006400;"><strong>adminFedora</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Database password&#8221;</strong></span> to <span style="color: #006400;"><strong>adminFedora</strong></span>.</li>
<li>Click on the <span style="color: #006400;"><strong>&#8220;Save Changes&#8221;</strong></span> button.</li>
<li>Next, click on the <span style="color: #800000;"><strong>&#8220;Programs and Paths&#8221;</strong></span> link.</li>
<li>Set the <span style="color: #800000;"><strong>&#8220;SAN import directory&#8221;</strong></span> to <span style="color: #006400;"><strong>/var/www/html/fez/incoming/</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Duplicate reports directory&#8221;</strong></span> to <span style="color: #006400;"><strong>/var/www/html/fez/duplicates_reports/</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;Graphviz DOT executable location&#8221;</strong></span> to <span style="color: #006400;"><strong>/usr/bin/dot</strong></span>.</li>
<li>Set <span style="color: #800000;"><strong>&#8220;PHP executable location&#8221;</strong></span> to <span style="color: #006400;"><strong>/usr/bin/php</strong></span>.</li>
<li>Click on the <span style="color: #006400;"><strong>&#8220;Save Changes&#8221;</strong></span> button.</li>
</ul>
<p>You can choose to configure other options as well. In this example installation we would not change other stuffs. After you are done with the configuration and saved them, Click on the <strong>&#8220;Sanity Checks&#8221;</strong> link. This shall open a new tab/window. It will check fez installation and report if there are any problems.<br />
If the sanity test reports error like:</p>
<pre class="brush: plain; title: ; notranslate">
Failed:  ConnectHTTP  APP_BASE_FEDORA_APIM_DOMAIN   = 'http://fedoraAdmin:adminFedora@localhost:8080/fedora'  HTTP Result 401 code.</pre>
<p>then you have to edit a file at <strong>/var/www/html/fez/includes/class.sanity_checks.php</strong></p>
<ul>
<li>Open that file in a text editor.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
vim /var/www/html/fez/includes/class.sanity_checks.php</pre>
<ul>
<li>Replace <span style="color: #0000cd;"><em>SanityChecks::checkHTTPConnect(&#8216;APP_BASE_FEDORA_APIM_DOMAIN&#8217;,APP_BASE_FEDORA_APIM_DOMAIN));</em></span> with <span style="color: #006400;"><em>SanityChecks::checkHTTPConnect(&#8216;APP_BASE_FEDORA_APIM_DOMAIN&#8217;,APP_BASE_FEDORA_APIM_DOMAIN.&#8217;/'));</em></span>.</li>
<li>Exit the editor.</li>
</ul>
<p>All the errors are self explanatory, read them carefully to find out problems with your installation and finally fix them.</p>
<p>Now you are ready to use a full fledged repository based online Library.</p>
]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/fez-installation-and-configuration-guide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fedora Commons Installation and Configuration Guide</title>
		<link>http://asingh.com.np/blog/fedora-commons-installation-and-configuration-guide/</link>
		<comments>http://asingh.com.np/blog/fedora-commons-installation-and-configuration-guide/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 05:57:27 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=42</guid>
		<description><![CDATA[Disclaimer This guide is geared towards helping novice users setup Fedora Commons repository. This guide contains easy steps which helps users go through various steps without much hassle. The guide makes assumption that the user is running either Fedora Linux or a compatible GNU/Linux distribution (e.g. RHEL, CentOS). Even though, with a few changes, the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Disclaimer</strong></p>
<p>This guide is geared towards helping novice users setup Fedora Commons repository. This guide contains easy steps which helps users go through various steps without much hassle. The guide makes assumption that the user is running either Fedora Linux or a compatible GNU/Linux distribution (e.g. RHEL, CentOS). Even though, with a few changes, the installation can be performed under other Linux distributions. <strong>All the commands should be run as an authenticated user, either as &#8220;root&#8221; or with &#8220;sudo&#8221;.</strong></p>
<p><strong>Conventions</strong></p>
<ul>
<li><em>[Square braces]</em> are used to denote keystrokes.</li>
<li><em>&#8220;Quotes&#8221;</em> are used to denote values and keywords.</li>
</ul>
<h1><strong>Introdution</strong></h1>
<p>Fedora (or Flexible Extensible Digital Object Repository Architecture) (not to be confused with the Linux distribution named Fedora) is a modular architecture built on the principle that interoperability and extensibility is best achieved by the integration of data, interfaces, and mechanisms (i.e., executable programs) as clearly defined modules. Fedora is a digital asset management (DAM) architecture, upon which many types of digital library, institutional repositories, digital archives, and digital libraries systems might be built. Fedora is the underlying architecture for a digital repository, and is not a complete management, indexing, discovery, and delivery application. (Source <a href="http://en.wikipedia.org/wiki/Fedora_Commons">Wikipedia</a>)</p>
<h1><strong>Install Prerequisites</strong></h1>
<h2>Sun Java Development Kit (JDK)</h2>
<ol>
<li>Go to <a title="http://java.sun.com/javase/downloads/index.jsp" href="http://java.sun.com/javase/downloads/index.jsp">http://java.sun.com/javase/downloads/index.jsp</a> and download the JDK (the current, at the time of writing, is JDK 1.6 update 17). Choose the *.bin version to download.</li>
<li>After downloading, as a root user execute:
<pre class="brush: bash; title: ; notranslate">
		sh jdk*.bin</pre>
</li>
<li>It will display the End User License Agreement (EULA), which you have to scroll down (<span style="color: #008000;">press [SPACE] key to scroll</span>). At the end, it will ask you if you accept or deny the license, type <span style="color: #006400;"><strong>yes</strong></span> at the prompt and press <span style="color: #006400;"><strong>[Enter]</strong></span>. It will take a while it generates files and installs the JDK on your machine. After a few minutes, the installation shall open a browser window, close that window, and the installation will be complete.</li>
<li>This shall create a directory in the current location in the format jdk1.6.0.7_17. Copy the whole directory to /opt and set 755 permission on it.
<pre class="brush: bash; title: ; notranslate">
cp -a jdk1.6.0.7_17/ /opt/
chmod -R 755 /opt/jdk1.6.0.7_17/</pre>
</li>
<li>Next, you need to set Sun JDK as the default Java handler for your system. To install Sun&#8217;s JDK as the default, execute:
<pre class="brush: bash; title: ; notranslate">
alternatives --install /usr/bin/java java /opt/jdk1.6.0.7_17/bin/java 20000</pre>
</li>
<li>You need to first check the list and verify if Sun JDK is listed as an option for java handler. To see the list, execute:
<pre class="brush: bash; title: ; notranslate">
alternatives --config java</pre>
<p>This shall display a list of all the programs that can handle Java. Additionally it also displays a prompt where you can select the program that you want to be default Java handler. Each program in the list is given a number, and at the selection prompt, you just have to type the respective number. Look for something like <span style="color: #006400;"><strong>&#8220;/opt/jdk1.6.0_17/bin/java&#8221;</strong></span> in the list and type its corresponding number at the prompt and press <strong>[Enter]</strong>.To check if Sun Java is the default handler, execute:</p>
<pre class="brush: bash; title: ; notranslate">
java -version</pre>
<p>It shall display information like:</p>
<pre class="brush: plain; title: ; notranslate">
java version &quot;1.6.0_17&quot;
Java(TM) SE Runtime Environment (build 1.6.0_17-b08)
Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)</pre>
<p>This means that Sun Java is installed and being used as default Java handler</li>
</ol>
<h2>MySQL Database Server</h2>
<p>To install MySQL database server, we will use the yum tool. Execute at the terminal as a root user:</p>
<pre class="brush: bash; title: ; notranslate">
yum -y install mysql mysql-server mysql-connector-java mysql-connector-odbc mysql-libs</pre>
<h2>Install Servlet Container (Apache Tomcat Server)</h2>
<p>Since we will be using the tomcat server included with fedora installation, <span style="color: #b22222;"><em><strong>we will NOT INSTALL a separate server</strong></em></span>. If you intend to use a separate server, execute the following command as root user at the terminal to install tomcat server:</p>
<pre class="brush: bash; title: ; notranslate">
yum -y install tomcat5 tomcat5-webapps tomcat5-admin-webapps</pre>
<h2>Obtain Fedora Commons Installer</h2>
<p>Download Fedora commons installer from the sourceforge.net project page at <a href="http://downloads.sourceforge.net/fedora-commons">http://downloads.sourceforge.net/fedora-commons/</a>. If you are planning to integrate fedora with <em>Fez</em> (which is a front-end to Fedora Commons), you need to choose to download version 2.2.1. The direct link to download of version 2.2.1 is <a href="http://sourceforge.net/projects/fedora-commons/files/fedora/2.2.1/fedora-2.2.1-installer.jar/download">http://sourceforge.net/projects/fedora-commons/files/fedora/2.2.1/fedora-2.2.1-installer.jar/download</a>.</p>
<h1><strong>Prepare Environment Variables</strong></h1>
<p>Although the environment variables are not strictly required during the time of installation, but they are required at the time of starting the fedora server. So it is always a safe point to set the environment variables before starting the installation. You need to set the following environment variables:</p>
<h2>JAVA_HOME</h2>
<p>This variable should point at the the base directory of Sun JDK installation. For this example it should be <span style="color: #006400;"><strong>/opt/jdk1.6.0_17/</strong></span>.</p>
<h2>FEDORA_HOME</h2>
<p>This variable should point at the base directory of Fedora commons installation. For this example, we will use <span style="color: #006400;"><strong>/var/opt/fedora/</strong></span> for the installation base.</p>
<h2>CATALINA_HOME</h2>
<p>This variable should point at the base directory of the tomcat installation that is to be used with fedora commons. For this example we will use the bundled tomcat, so we will set this variable to <span style="color: #006400;"><strong>&#8220;$FEDORA_HOME/tomcat&#8221;</strong></span> which means that that the tomcat base directory resides under the fedora installation directory. If you intend to use an existing tomcat, set this variable to the base directory of tomcat (e.g. &#8220;/usr/share/tomcat5&#8243;).</p>
<h2>JAVA_OPTS</h2>
<p>This variable should include additional arguments to be included to make fedora run efficiently. We set the following arguments:<br />
* Djavax.net.ssl.trustStore: The truststore location for SSL sessions (if SSL is enabled)<br />
* Djavax.net.ssl.trustStorePassword: The truststore password<br />
* Xmx: Allocated memory</p>
<h2>PATH</h2>
<p>This variable should include the absolute path to the java and fedora bin directories. So we shall add/append <span style="color: #006400;"><strong>/var/opt/fedora/client/bin</strong></span> and <span style="color: #006400;"><strong>/opt/jdk1.6.0_17/bin</strong></span> to this variable.</p>
<h2>CLASSPATH</h2>
<p>This variable should point to the Java lib directory. So we shall set this variable to <span style="color: #006400;"><strong>/opt/jdk1.6.0_17/jre/lib</strong></span>.</p>
<p>Now we shall create a shell script that sets these variables. The intention behind using a shell script is that it can be called any time (preferably during every fedora service start-up), so as to ensure that the environment variables are always set and point to right values. To create the script, follow these steps as a root user at the terminal:</p>
<pre class="brush: bash; title: ; notranslate">
cd /etc/profile.d/
touch fedora-profile.sh</pre>
<p>Edit the file &#8220;fedora-profile.sh&#8221;. To edit use the vim command:</p>
<pre class="brush: bash; title: ; notranslate">
vim fedora-profile.sh</pre>
<p>Add the following lines to the file:</p>
<pre class="brush: bash; title: ; notranslate">
FEDORA_HOME=/var/opt/fedora
JAVA_HOME=/opt/jdk1.6.0_17/
CLASSPATH=$JAVA_HOME/jre/lib
CATALINA_HOME=/var/opt/fedora/tomcat/
JAVA_OPTS=&quot;$JAVA_OPTS -Djavax.net.ssl.trustStore=$FEDORA_HOME/server/truststore&quot;
JAVA_OPTS=&quot;$JAVA_OPTS -Djavax.net.ssl.trustStorePassword=tomcat&quot;
JAVA_OPTS=&quot;$JAVA_OPTS -Xmx512m&quot;
PATH=&quot;$PATH:$FEDORA_HOME/server/bin:$FEDORA_HOME/client/bin&quot;
export JAVA_HOME CLASSPATH CATALINA_HOME JAVA_OPTS FEDORA_HOME PATH</pre>
<p>Save the file and exit from the vim editor. Also set executable permission to the file:</p>
<pre class="brush: bash; title: ; notranslate">
chmod 755 fedora-profile.sh</pre>
<p>Run the script to set the environment variables. Execute:</p>
<pre class="brush: bash; title: ; notranslate">
sh fedora-profile.sh
source /etc/profile.d/fedora-profile.sh</pre>
<h1><strong>Prepare Database for Fedora Commons</strong></h1>
<h2>Start MySQL server</h2>
<p>Check if mysqld database server is running. Execute:</p>
<pre class="brush: bash; title: ; notranslate">
service mysqld status</pre>
<p>If the database server is not started, start the service by executing:</p>
<pre class="brush: bash; title: ; notranslate">
service mysqld start</pre>
<p>To make the mysqld service start at every startup, execute:</p>
<pre class="brush: bash; title: ; notranslate">
chkconfig mysqld on</pre>
<h2>Login to MySQL</h2>
<p>To login to mysql as root user, execute:</p>
<pre class="brush: bash; title: ; notranslate">
mysql -u root -p</pre>
<p>Provide the mysql&#8217;s root password, and press [Enter].</p>
<h2>Create a database for Fedora Commons</h2>
<p>Fedora 2.2 installation by default uses a database named <strong>&#8220;fedora22&#8243;</strong>. So we require to create that database. Execute, at the mysql prompt:</p>
<pre class="brush: sql; title: ; notranslate">
CREATE DATABASE fedora22 default charset utf8;</pre>
<h2>Add the database user and grant permissions on the database</h2>
<p>In this example we create a user named <strong>&#8220;adminFedora&#8221;</strong> and the password <strong>&#8220;adminFedora&#8221;</strong> and give all permissions to the user on the fedora database (i.e. fedora22).</p>
<pre class="brush: sql; title: ; notranslate">
GRANT ALL ON fedora22.* TO adminFedora@localhost IDENTIFIED BY 'adminFedora';
FLUSH PRIVILEGES;</pre>
<p>Quit from the mysql prompt.</p>
<h1><strong>Install Fedora Commons</strong></h1>
<ul>
<li>Move to the directory where you have downloaded the installation jar file (e.g. fedora-2.2.1-installer.jar).</li>
<li>To start installation, execute:
<pre class="brush: bash; title: ; notranslate">
java -jar fedora-2.2.1-installer.jar</pre>
</li>
<li>This will start the installation, during which you shall be asked several questions. For the context of this example, we shall use the predefined values as answers, which can be changed as per your requirement/choice.</li>
<li>The first question would be a choice between three different <strong><span style="color: #800000;">modes of installation</span></strong> (viz. <span style="color: #000080;">quick, custom, client</span>). In this example, since we are trying to install a fedora commons server having custom configurations, we will choose the &#8220;custom&#8221; mode. Type <span style="color: #006400;"><strong>custom</strong></span> at the prompt and press [Enter].</li>
<li>The next question you get is the location/path of the <span style="color: #800000;"><strong>base directory of fedora installation</strong></span>. If you&#8217;ve already set the <em><strong>FEDORA_HOME</strong></em> environment variable, the installer will display you the default value. If the default value is displayed, and you want to choose the default value, press [Enter] without typing anything; else type the full absolute path of the installation directory (e.g, /var/opt/fedora) and press [Enter].</li>
<li>The next question you encounter is the <span style="color: #800000;"><strong>password required to administer the fedora installation</strong></span>. It is the password of the fedora Administrative user called &#8220;fedoraAdmin&#8221;. In this example we shall use the password &#8220;adminFedora&#8221;. Hence type <span style="color: #006400;"><strong>adminFedora</strong></span> and press [Enter].</li>
<li>The next question is the <span style="color: #800000;"><strong>hostname</strong></span> of the fedora server. The default is &#8220;localhost&#8221;. In this example, we shall use the default value, and hence press [Enter] without typing any value at the prompt.</li>
<li>Then you shall be asked about the <span style="color: #800000;"><strong>Authentication requirement for API-A</strong></span>, for which we shall use the default value which is &#8220;false&#8221; and hence press [Enter].</li>
<li>Next you shall be asked about <strong><span style="color: #800000;">SSL Availability</span></strong>. For this example, we will disable SSL support, hence we will type <span style="color: #006400;"><strong>false</strong></span> at the prompt and press [Enter].</li>
<li>The next step will ask you about how to setup the <span style="color: #800000;"><strong>servlet engine</strong></span>. The available options are <span style="color: #000080;">&#8220;included&#8221;, &#8220;existingTomcat&#8221;, &#8220;other&#8221;</span>. The &#8220;included&#8221; option shall install the bundled tomcat into the $FEDORA_HOME directory, &#8220;existingTomcat&#8221; to use the tomcat installation that has previously been installed, &#8220;other&#8221; to use other servelet engines like &#8220;jetty&#8221;. For this example, we will choose the <span style="color: #006400;"><strong>&#8220;included&#8221;</strong></span> tomcat which is the default option, and hence press [Enter] at the prompt.</li>
<li>Next you shall be asked about the path for <span style="color: #800000;"><strong>tomcat installation base directory</strong></span>. The default option is $FEDORA_HOME/tomcat (i.e. in our example /var/opt/fedora/tomcat), if you have chosen to install the &#8220;included&#8221; tomcat bundle. We shall choose the default option, and hence press [Enter] at the prompt. If the default installation base is not displayed, you&#8217;ll need to type the path manually and press [Enter].</li>
<li>Next you shall be asked the <span style="color: #800000;"><strong>Tomcat HTTP Port</strong></span> that is the default NON-SSL port for fedora (the port on which tomcat will listen to). The default option is port <strong><span style="color: #006400;">8080</span></strong>. We shall choose the default option and hence press [Enter] at the prompt.</li>
<li>Next you shall be asked the <span style="color: #800000;"><strong>Tomcat Shutdown Port</strong></span>. The default option is <span style="color: #006400;"><strong>8005</strong></span>. We shall choose the default option, and hence press [Enter] at the prompt.</li>
<li>Next you shall be asked about if the <span style="color: #800000;"><strong>XACML policy</strong></span> should be enforced or not. The default option is &#8220;true&#8221;. We shall choose the default option, and hence press [Enter] at the prompt.</li>
</ul>
<p class="rteindent1"><span style="background-color: #ffff00;"><strong>The next steps will take you to the database configuration.</strong></span></p>
<ul>
<li>At this step, you shall be asked about the <span style="color: #800000;"><strong>database provider</strong></span> to use. The available options are <span style="color: #000080;">&#8220;mckoi&#8221;, &#8220;mysql&#8221;, &#8220;oracle&#8221;, &#8220;postgresql&#8221; </span>and<span style="color: #000080;"> &#8220;included&#8221;</span>. For this example we shall be using Fedora Commons with MySQL database, hence we will type <span style="color: #006400;"><strong>mysql</strong></span> at the prompt and press [Enter].</li>
<li>Next you shall be asked about the <span style="color: #800000;"><strong>database driver</strong></span> (JDBC driver, since we are using java). You are required to type the full absolute path of the driver. Since we shall be using the <span style="color: #006400;"><strong>&#8220;included&#8221;</strong></span> JDBC driver which is also the default option, and hence we press [Enter] at the prompt.</li>
<li>Next you shall be asked about the <span style="color: #800000;"><strong>database username</strong></span> that would be used to connect to the database. In the previous section entitled <em><strong>&#8220;Prepare Database for Fedora Commons&#8221;</strong></em> we had setup a user name with the credentials: <span style="color: #000080;">Username &#8211; &#8220;adminFedora&#8221;, and Password &#8211; &#8220;adminFedora&#8221;</span>. Hence we shall use the same credentials. If you have used a different username, you can supply it here. Type <span style="color: #006400;"><strong>adminFedora</strong></span> at the prompt and press [Enter].</li>
<li>Next you shall be asked about the <span style="color: #800000;"><strong>database password</strong></span> to be used to acess the fedora database. The password should correspond to the user that we have entered in the previous step (in the example, the password of the &#8220;adminFedora&#8221; mysql user). In the example, the password is <span style="color: #0000cd;">&#8220;adminFedora&#8221;</span>. Type <span style="color: #006400;"><strong>adminFedora</strong></span> at the prompt and press [Enter].</li>
<li>Next you shall be asked about the <span style="color: #800000;"><strong>jdbc url</strong></span> that would be used to connect to the database. The default option is <span style="color: #0000cd;">&#8220;jdbc:mysql://localhost/fedora22?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&#8221;</span>. You should replace &#8220;fedora22&#8243; in the url with a appropriate database name, if in the previous section you have chosen to create a database (for fedora) with a different name rather than &#8220;fedora22&#8243;. We shall use the default option, and hence press [Enter] at the prompt.</li>
<li>Next you shall be asked about the <span style="color: #800000;"><strong>JDBC driver class</strong></span>. We shall use the default option and hence press [Enter] at the prompt.<br />
If the installer succeeds to connect to the database using the configuration values as supplied to it in the previous step, it will take you to the next configuration steps, else it will repeat the database configuration section.</li>
<li>After succeeding to connect to the database, it will ask you if you want to <span style="color: #800000;"><strong>deploy local services and demo</strong></span>. The demo objects are good for testing fedora installation. The default option is &#8220;true&#8221;. We shall use the default option, and hence press [Enter].<br />
It will take a while for the installer while it prepares the fedora base directory will all the essential files and directory structure, plus configuring the servlet engine and deploying local and demo applications. After performing these steps, the installer will quit giving you an clear notice that fedora have been installed and you must configure the required environment variables in order to run fedora.</li>
</ul>
<h1><strong>Configure Fedora Server</strong></h1>
<p>Fedora Commons server comes with configuration file that can be changed to tweak its behaviour. The configuration file is located at <strong>&#8220;$FEDORA_HOME/server/config/fedora.fcfg&#8221;</strong> (i.e. &#8220;/var/opt/fedora/server/config/fedora.fcfg&#8221; in our example. In the example installation we shall only change a few configuration to make our task easier.</p>
<ul>
<li>Open the fedora.fcfg file in editor. Execute:
<pre class="brush: bash; title: ; notranslate">
vim $FEDORA_HOME/server/config/fedora.fcfg</pre>
</li>
<li>Edit the line <span style="color: #000080;"><em>&lt;param name=&#8221;adminEmailList&#8221; value=&#8221;bob@example.org sally@example.org&#8221;&gt;</em></span>, in the value part type the email address(es) of the Fedora Commons administrator. If you want to keep more than one email address, separate the entries with a space.</li>
<li>Edit the line <span style="color: #000080;"><em>&lt;param name=&#8221;ENFORCE-MODE&#8221; value=&#8221;enforce-policies&#8221;/&gt;</em></span> and in the value part replace &#8220;enforce-policies&#8221; with <span style="color: #006400;">&#8220;permit-all-requests&#8221;</span>.</li>
<li>Edit the line <span style="color: #000080;"><em>&lt;param name=&#8221;pidNamespace&#8221; value=&#8221;changeme&#8221;&gt;</em></span>, in the value part, replace &#8220;changeme&#8221; with the required pidNamespace. In this example, we shall use the pidNamespace as <span style="color: #006400;">&#8220;Pustakalaya&#8221;</span>.</li>
<li>Edit the line <span style="color: #000080;"><em>&lt;param name=&#8221;retainPIDs&#8221; value=&#8221;demo test changeme fedora-bdef fedora-bmech tutorial&#8221;&gt;</em></span> and replace &#8220;changeme&#8221; with the pidNamespace that we have chosen in the previous step. In the example, we shall replace &#8220;changeme&#8221; with <span style="color: #006400;">&#8220;Pustakalaya&#8221;</span>.</li>
<li>Save the file and exit the editor.</li>
</ul>
<h1><strong>Configure the Tomcat Servlet Engine</strong></h1>
<p>The configuration of the tomcat servlet engine is located in a file at <span style="color: #000080;">$CATALINA_HOME/conf/server.xml</span> (i.e. /var/opt/fedora/tomcat/conf/server.xml in our example installation). The default configuration is well appropriate to run, but we will change a few settings to make our work easier.</p>
<ul>
<li>Open the server.xml file in a editor. Execute:
<pre class="brush: bash; title: ; notranslate">
vim $CATALINA_HOME/conf/server.xml</pre>
</li>
<li>Edit the line <span style="color: #000080;"><em>&lt;Connector port=&#8221;8080&#8243; maxThreads=&#8221;150&#8243; minSpareThreads=&#8221;25&#8243; maxSpareThreads=&#8221;75&#8243; enableLookups=&#8221;true&#8221; redirectPort=&#8221;8443&#8243; acceptCount=&#8221;100&#8243; debug=&#8221;0&#8243; connectionTimeout=&#8221;20000&#8243; disableUploadTimeout=&#8221;true&#8221;/&gt;</em></span> and replace enableLookups=&#8221;true&#8221; with <span style="color: #006400;">enableLookups=&#8221;false&#8221;</span>.</li>
<li>Save the file and exit the editor.</li>
</ul>
<h1><strong>Set Fedora Commons as a service</strong></h1>
<p>This setup is optional, but is recommended since it shall make things easier. In this step we will create a shell script that will interact with the standard &#8220;service&#8221; command, and helps us to start, stop, check status, reload fedora commons server. To create the script, follow these steps:</p>
<ul>
<li>Create the service script. Execute:
<pre class="brush: bash; title: ; notranslate">
touch /etc/init.d/fedora</pre>
</li>
<li>Edit the file in the editor. Execute:
<pre class="brush: bash; title: ; notranslate">
vim /etc/init.d/fedora</pre>
</li>
<li>Add these lines in the file:
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
#
# fedora commons database
#
# chkconfig:   - 20 80
# description: Fedora commons content library

### BEGIN INIT INFO
# Provides: fedora
# Required-Start: mysqld
# Required-Stop: mysqld
# Short-Description: Fedora commons content library
# Description: Fedora commons content library
### END INIT INFO

. /etc/rc.d/init.d/functions
. /etc/profile.d/fedora-profile.sh

export CATALINA_PID=/tmp/fedora-catalina.pid

# determines if Fedora is running by examining the command line of a certain
# pid.
# args: &lt;suspected pid of Fedora&gt;
fedora_alive()
{
#echo $1
[ -d /proc/&quot;$1&quot; ] || return 1
cmd=$(ps -p &quot;$1&quot; -o command=)
[ $? == 0 ] || return 1
[[ &quot;${cmd}&quot; =~ &quot;.*java.*fedora.*tomcat.* start$&quot; ]]
echo $?
}

status()
{
[ -e &quot;$CATALINA_PID&quot; ] || return 3
local pid=$(&lt;$CATALINA_PID)
#fedora_alive $pid || return 3
#echo &quot;Fedora running at pid $pid&quot;
fedora_alive $pid &amp;&amp; rt=0 || rt=3
if [ $rt -eq 0 ]
then
echo &quot;Fedora Commons service is running at pid $pid&quot;
else
echo &quot;Fedora Commons service is stopped.&quot;
fi
return $rt
}

start()
{
local pid=&quot;&quot;
[ -e $CATALINA_PID ] &amp;&amp; pid=$(&lt;$CATALINA_PID)
if [ -n &quot;$pid&quot; ] &amp;&amp; fedora_alive $pid; then
echo &quot;Fedora Commons service already running as pid $pid&quot;
return 1
fi

# reset working directory, because the java process takes a handle on
# the directory from where this init script was ran
cd /

/var/opt/fedora/tomcat/bin/startup.sh &gt; /dev/null
if [ $? -eq 0 ]
then
action &quot;Starting Fedora Commons Service: &quot; /bin/true
else
action &quot;Starting Fedora Commons Service: &quot; /bin/false
fi
}

stop()
{
local pid=$(&lt;$CATALINA_PID)
/var/opt/fedora/tomcat/bin/shutdown.sh &gt; /dev/null 2&gt;&amp;1
retval=$?
if [ $retval -eq 0 ]
then
action &quot;Stopping Fedora Commons Service: &quot; /bin/true
else
action &quot;Stopping Fedora Commons Service: &quot; /bin/false
fi
sleep 3
[ -z &quot;${pid}&quot; ] &amp;&amp; return $?

for i in $(seq 0 10); do
fedora_alive $pid || return 0

echo &quot;Fedora shutdown failed, retry in 5 secs&quot;
sleep 5
/var/opt/fedora/tomcat/bin/shutdown.sh &gt; /dev/null 2&gt;&amp;1
done
fedora_alive $pid || return 0
echo &quot;Force kill Fedora.&quot;
kill ${pid}
sleep 5
fedora_alive || return 0
kill -9 ${pid}
}

case &quot;$1&quot; in
start) start ;;
stop) stop ;;
restart) stop; start ;;
status) status ;;
*)
echo $&quot;Usage: $0 {start|stop|status|restart}&quot;
exit 2
esac
exit $?</pre>
</li>
<li>Save the file and exit editor.</li>
<li>Set proper permissions.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
chmod 755 /etc/init.d/fedora</pre>
<h1><strong>Start fedora service</strong></h1>
<p>To start the fedora service, you can now execute:</p>
<pre class="brush: bash; title: ; notranslate">
service fedora start</pre>
<h1><strong>Test Fedora Commons</strong></h1>
<h2>Test if MySQL Service is running</h2>
<pre class="brush: bash; title: ; notranslate">
service mysqld status</pre>
<p>Start the service if it has not yet started by executing:</p>
<pre class="brush: bash; title: ; notranslate">
service mysqld start</pre>
<h2>Test if Fedora Commons is running</h2>
<pre class="brush: bash; title: ; notranslate">
service fedora status</pre>
<p>Start the service if it is not yet started by executing:</p>
<pre class="brush: bash; title: ; notranslate">
service fedora start</pre>
<p>You can also set the Fedora Commons service to automatically start at startup. Execute:</p>
<pre class="brush: bash; title: ; notranslate">
chkconfig --add fedora
chkconfig fedora on</pre>
<h2>Test tomcat servlet engine</h2>
<p>Open a browser and browse <a href="http://localhost:8080">http://localhost:8080</a>. If the page displays Apache Tomcat Start page, this means the tomcat servlet engine is running.<br />
Now browse to <a href="http://localhost:8080/fedora">http://localhost:8080/fedora</a>. It shall ask you the login credentials. Provide user-name as <span style="color: #006400;"><strong>fedoraAdmin</strong></span> and password as <span style="color: #006400;"><strong>adminFedora</strong></span>. Remember to use the password that we have supplied during the section <em><strong>&#8220;Install Fedora Commons&#8221;</strong></em>. After logging in, you shall see the <strong>&#8220;Apache-AXIS&#8221;</strong> page. This means that the fedora service is running well.</p>
<h1><strong>Further test with demo objects</strong></h1>
<p>This step is optional, but can be performed to see if fedora commons is behaving appropriately by storing objects, datastreams, and their metadata, as well as to check if it provides interface to retrieve and update those objects. To do this, we need to ingest the demo objects to the fedora server. Follow these steps:</p>
<ul>
<li>Ensure that all the required services and daemons and running.</li>
<li>Open a terminal and follow these steps:
<pre class="brush: bash; title: ; notranslate">
cd $FEDORA_HOME/client/bin/
fedora-ingest-demos.sh localhost 8080 fedoraAdmin fedoraAdmin http</pre>
</li>
<li>This step will ingest the demo objects to the fedora commons repository. To check the demo objects, open a browser and browse <a href="http://localhost:8080/fedora/get/demo:5">http://localhost:8080/fedora/get/demo:5</a>. If it displays the page with the description of the demo object, this means that fedora is working correctly.</li>
<li>The repository objects can be tested with the fedora GUI client as well.</li>
<li>Open a terminal and follow these steps:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cd $FEDORA_HOME/client/bin/
./fedora-admin.sh</pre>
<p>Type the password for the user fedoraAdmin, i.e. <strong><span style="color: #006400;">adminFedora</span></strong> in our example. Now you can use the UI for searching of objects, adding new objects to the repository and other actions.</p>
<p>Enjoy using the Fedora Commons data repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/fedora-commons-installation-and-configuration-guide/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to install Redmine?</title>
		<link>http://asingh.com.np/blog/how-to-install-redmine/</link>
		<comments>http://asingh.com.np/blog/how-to-install-redmine/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 08:38:40 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=36</guid>
		<description><![CDATA[Introduction Redmine is an open source, web-based project management and bug-tracking tool. It includes calendar and gantt charts to aid visual representation of projects and their deadlines. It supports multiple projects. Redmine is a FOSS solution which provides integrated project management features, issue tracking, and support for multiple version control options. Projects investigating commercial tools [...]]]></description>
			<content:encoded><![CDATA[<h1><strong>Introduction</strong></h1>
<p><a href="http://www.redmine.org">Redmine</a> is an open source, web-based project management and bug-tracking tool. It includes calendar and gantt charts to aid visual representation of projects and their deadlines. It supports multiple projects. Redmine is a FOSS solution which provides integrated project management features, issue tracking, and support for multiple version control options. Projects investigating commercial tools like IBM Rational Team Concert but wanting to stick with a FOSS solution may find this tool to be a good starting point though without the full depth and breadth of commercial SCRUMM and AGILE tools.<br />
The design of Redmine is significantly influenced by Trac, a software package with some similar features. Redmine is written using the Ruby on Rails framework. It is cross-platform and cross-database.(Source: <a href="http://en.wikipedia.org/wiki/Redmine">Wikipedia</a>)</p>
<h1>
	<strong>Prerequisites</strong></h1>
<ul>
<li>Ruby</li>
<li>Gem</li>
<li>Rails</li>
<li>Ruby Development Libraries</li>
<li>Ruby Sqlite support</li>
<li>Thin</li>
<li>Apache webserver with proxy modules</li>
<li>MySQL</li>
</ul>
<p>
	To install the prerequisites, you can issue theses following commands at the terminal as a root user:</p>
<pre class="brush: bash; title: ; notranslate">
yum -y groupinstall&quot;Web Server&quot; &quot;Ruby&quot;
yum -y install rubygem-rails rubygem-sqlite3-ruby ruby-devel mysql mysql-libs mysql-server ruby-mysql ImageMagick ImageMagick-devel</pre>
<h1><strong>Obtaining Redmine</strong></h1>
<p>
	Redmine is a free software and you can obtain redmine from this link: <a href="http://rubyforge.org/frs/?group_id=1850">http://rubyforge.org/frs/?group_id=1850</a>. Please, select the recent bundle to download.</p>
<h1><strong>Pre-Installation Tasks</strong></h1>
<h2>Updating the GEM system</h2>
<pre class="brush: bash; title: ; notranslate">
gem update --system</pre>
<h2>Setup Thin</h2>
<pre class="brush: bash; title: ; notranslate">
gem install rack rmagick thin
thin install</pre>
<h2>Configure Thin for your server</h2>
<pre class="brush: bash; title: ; notranslate">
chkconfig --add thin
chkconfig --level 345 thin on</pre>
<h2>Configuring Apache as a load balancer and proxy</h2>
<p>Edit /etc/httpd/conf/httpd.conf file and put these lines if they are already not there:</p>
<pre class="brush: plain; title: ; notranslate">
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
&lt;IfModule mod_proxy.c&gt;
       #turning ProxyRequests on and allowing proxying from all may allow
       #spammers to use your proxy to send email.
       ProxyRequests On
       &lt;Proxy *&gt;
                AddDefaultCharset off
                Order deny,allow
                Allow from 127.0.0.0/255.0.0.0
       &lt;/Proxy&gt;
       # Enable/disable the handling of HTTP/1.1 &quot;Via:&quot; headers.
       # (&quot;Full&quot; adds the server version; &quot;Block&quot; removes all outgoing Via: headers)
       # Set to one of: Off | On | Full | Block
       ProxyVia On
&lt;/IfModule&gt;</pre>
<h2>Configure Thin for your application</h2>
<p>Create a thin configuration file for your application:</p>
<pre class="brush: bash; title: ; notranslate">
thin config -C /etc/thin/&lt;config-name&gt;.yml -c &lt;rails-app-root-path&gt; --servers &lt;number-of-threads&gt; -e &lt;environment&gt;</pre>
<p>
	Replace <strong>&lt;config-name&gt;</strong> with the name of the configuration file, <strong>&lt;rails-app-root-path&gt;</strong> with the path to the root of your application, <strong>&lt;number-of-threads&gt;</strong> with the number of Thin processes to be started and <strong>&lt;environment&gt;</strong> with the environment in which to run the code. For example:</p>
<p>
	Since our example setting contains:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;application-name&gt; = myredmineapp
&lt;rails-app-root-path&gt; = /var/redmine
&lt;number-of-threads&gt; = 3
&lt;environment&gt; = production</pre>
<p>
	the following code will set that for us:</p>
<pre class="brush: bash; title: ; notranslate">
thin config -C /etc/thin/myredmineapp.yml -c /var/redmine --servers 3 -e production</pre>
<h2>Adding an Apache virtual host for Redmine</h2>
<p>
	Now you can create a virtual host to host your Redmine application.</p>
<ul>
<li>Add a configuration file in the conf.d directory of your httpd base (i.e. /etc/httpd/conf.d):</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
touch /etc/httpd/conf.d/redmine</pre>
<ul>
<li>Open the file to add content.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
vim /etc/httpd/conf.d/redmine</pre>
<ul>
<li>Add the virtual host configuration to the file.</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
&lt;VirtualHost *&gt;
        ServerName redmine.yourdomain.com
        DocumentRoot /var/redmine
        &lt;Proxy balancer://mycluster&gt;
                 BalancerMember http://127.0.0.1:3000
                 BalancerMember http://127.0.0.1:3001
                 BalancerMember http://127.0.0.1:3002
        &lt;/Proxy&gt;
        ProxyPass / balancer://mycluster/
        ProxyPassReverse / balancer://mycluster/
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log vcombined
        CustomLog /var/log/httpd/redmine-access.log combined
&lt;/VirtualHost&gt;</pre>
<p>
	Change &ldquo;redmine.yourdomain.com&rdquo; with a virtual host of your setting.</p>
<ul>
<li>Save the file and exit the editor.</li>
</ul>
<h1><strong>Redmine Installation</strong></h1>
<h2>Setting the Redmine Installation base</h2>
<ul>
<li>Move to the directory containing Redmine tarball.</li>
<li>Extract the tarball to the parent directory of Redmine installation (i.e. in our case /var/).</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
tar -xvf redmine-*.tar -C /var/
mv /var/redmine-* /var/redmine/</pre>
<ul>
<li>Set permission to read and execute to the public directory.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
chmod -R a+rx /var/redmine/public/
cd /var/redmine/
chmod -R 755 files log tmp public/plugin_assets</pre>
<h2>Database Configuration</h2>
<ul>
<li>Create the database configuration file.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cd /var/redmine/config/
cp database.yml-example database.yml</pre>
<ul>
<li>Edit the database.yml file and delete all the lines expect for the production section. Tweak the parameters of the production section to fit your settings:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
vim /var/redmine/config/database.yml</pre>
<pre class="brush: plain; title: ; notranslate">
production:
	adapter: mysql
	database: redmine
	host: localhost
	username: redmine
	password: &lt;redmine_mysql_password&gt;
	socket: /var/lib/mysql/mysql.sock</pre>
<p>
	Change <strong>&lt;redmine_mysql_password&gt;</strong> with a valid password string and remember the same password will be used which configuring the database.</p>
<ul>
<li>
		Start services.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
service httpd start
service mysqld start
service thin start</pre>
<ul>
<li>
		Create the database and user for Redmine.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
mysql -u root -p</pre>
<p>
	When asked, provide the password for the MySQL&#39;s root user.</p>
<pre class="brush: sql; title: ; notranslate">
create database redmine default character set utf8;
grant all on redmine.* to redmine@localhost identified by '&lt;redmine_mysql_password&gt;';
flush privileges;</pre>
<ul>
<li>
		Generate a session store secret.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cd /var/redmine/
RAILS_ENV=production rake config/initializers/session_store.rb</pre>
<ul>
<li>
		Run Database object creation script:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cd /var/redmine/
RAILS_ENV=production rake db:migrate</pre>
<h1><strong>Final Touch</strong></h1>
<ul>
<li>
		Restart thin service.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
service thin restart</pre>
<ul>
<li>
		Set Apache and MySQL to run at startup.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
chkconfig mysqld on
chkconfig httpd on</pre>
<p>
	Now you can browse you site at either at http://localhost:3000 or at http://redmine.yourdomain.com .</p>
]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/how-to-install-redmine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install bugzilla?</title>
		<link>http://asingh.com.np/blog/how-to-install-bugzilla/</link>
		<comments>http://asingh.com.np/blog/how-to-install-bugzilla/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 07:49:48 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=17</guid>
		<description><![CDATA[This setup guide is aimed at helping users install and configure Bugzilla on Fedora or RedHat Enterprise Linux (RHEL) platform. Introduction Bugzilla is a web-based general-purpose bug tracker and testing tool originally developed and used by the Mozilla project, and licensed under the Mozilla Public License. Released as open source software by Netscape Communications in [...]]]></description>
			<content:encoded><![CDATA[<p>This setup guide is aimed at helping users install and configure Bugzilla on Fedora or RedHat Enterprise Linux (RHEL) platform.</p>
<h1>Introduction</h1>
<p><a href="http://www.bugzilla.org/">Bugzilla</a> is a web-based general-purpose bug tracker and testing tool originally developed and used by the Mozilla project, and licensed under the Mozilla Public License. Released as open source software by Netscape Communications in 1998, it has been adopted by a variety of organizations for use as a defect tracker for both free software and proprietary products. (Source: <a href="http://en.wikipedia.org/wiki/Bugzilla">Wikipedia</a>)</p>
<h1>Prerequisites</h1>
<ul>
<li>Perl (5.8.1 or above)</li>
<li>Database Engine (MySQL or Oracle or PostgreSQL)</li>
<li>Webserver (Apache, IIS)</li>
<li>Required Perl Modules</li>
<li>Mail Transfer Agent (Sendmail 8.7 or above)</li>
</ul>
<p>In this tutorial, we will be using a Fedora system with MySQL as the database server, apache as the webserver and Sendmail as the MTA. To install all of these prerequisites, you can issue the following command on the terminal as a root user:</p>
<pre class="brush: bash; title: ; notranslate">
yum -y install perl httpd sendmail mod_perl mysql mysql-server mysql-libs mysql-connector-odbc mysqlclient* perl-Class-DBI-mysql libcgi perl-DateManip perl-DateTime-Format-Builder libdbi libdbi-dbd-MySQL libdbi-drivers libdbi-devel perl-CGI-Untaint-email perl-CPAN perl-libxml-perl </pre>
<h1>Obtaining Bugzilla</h1>
<p>Bugzilla is a free software and you can download it from Bugzilla website. To download the recent stable release, follow this <a href="http://www.bugzilla.org/download/#stable">link</a>.</p>
<h1>Installation of Prerequisites</h1>
<ul>
<li>Be sure you&#8217;ve installed all the prerequisites as discussed above.</li>
<li>Download the Bugzilla recent stable release tarball.</li>
<li>Copy the tarball to the httpd&#8217;s DocumentRoot (i.e. <em><strong>/var/www/html/</strong></em>):</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cp bugzilla-*.*.*.tar.gz /var/www/html/
</pre>
<ul>
<li>Extract the tarball:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cd /var/www/html/
tar -zxvf bugzilla-*.*.*.tar.gz
</pre>
<ul>
<li>The previous command shall create a folder named <em><strong>bugzilla-*.*</strong></em>. Now, you can safely remove the tarball.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
rm bugzilla-*.*.*.tar.gz</pre>
<ul>
<li>Now we need to check the installed Perl modules and find a list of all the Perl modules to be installed.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cd bugzilla-*.*
./checksetup.pl --check-modules</pre>
<ul>
<li>Next step is to install the required Perl modules (this assumes that you have CPAN installed in your computer). The following command will use CPAN LWP agent and install all the required modules.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
perl install-module.pl --all</pre>
<h1>Configuration</h1>
<p>After the installation of all the prerequisites has successfully been done, we configure and tune the installation.</p>
<ul>
<li>Move inside the bugzilla directory (<em><strong>/var/www/bugzilla-*.*</strong></em>) if you are not already inside it</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
cd /var/www/html/bugzilla-*.*</pre>
<ul>
<li>Now run the check setup perl script to begin configuration.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
./checksetup.pl</pre>
<p style="margin-left: 0.51in; margin-bottom: 0in;">This time, <em><strong>checksetup.pl</strong></em> should tell you that all the correct modules are installed and will display a message about, and write out a file called, <em><strong>localconfig</strong></em>. This file contains the default settings for a number of Bugzilla parameters.</p>
<p style="margin-left: 0.51in; margin-bottom: 0in;">Load this file in your editor. The only two values you need to change are <em><strong>$db_driver</strong></em> and <em><strong>$db_pass</strong></em>, respectively the type of the database and the password for the user you will create for your database. Pick a strong password (for simplicity, it should not contain single quote characters) and put it here. <em><strong>$db_driver</strong></em> can be either <em>&#8216;MySQL&#8217;</em>, <em>&#8216;Pg&#8217;</em> or <em>&#8216;oracle&#8217;</em>. Since we are using MySQL, the $db_driver variable should be set to <span style="color: #0066cc;">&#8216;MySQL&#8217;</span>.</p>
<ul>
<li>Set the <em><strong>$db_driver</strong></em> variable to <em>&#8216;MySQL&#8217;</em>.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
$db_driver = 'mysql';</pre>
<ul>
<li>Set <em><strong>$db_host</strong></em> to the hostname or ip of the myql server. The preferred value is <em>&#8216;localhost&#8217;</em>, since the same machine is also to be configured as a database server.</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
$db_host = 'localhost';</pre>
<ul>
<li>Set the <em><strong>$db_name</strong></em> as <em>&#8216;bugs&#8217;</em> and <em><strong>$db_user</strong></em> as <em>&#8216;bugs&#8217;</em>.</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
$db_name = 'bugs';
$db_user = 'bugs';</pre>
<ul>
<li>Set <em><strong>$db_pass</strong></em> to the password of the &#8216;bugs&#8217; database user in MySQL. Let&#8217;s assume that password is <em>bugs123#</em>.</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
$db_pass = 'bugs123#';</pre>
<p style="margin-left: 0.51in; margin-bottom: 0in;"><span style="color: #b22222;">Note: You are encouraged to use your own strong password. This password has just been used as a reference. Remember, the same password needs to be used while creating a MySQL user for Bugzilla.</span></p>
<ul>
<li>After setting all the above variables, just save the file and exit the editor.</li>
<li>Now we need to tune and configure MySQL to allow easy access to Bugzilla and its components. To do so edit the MySQL configuration file (generally <em><strong>/etc/my.cnf</strong></em>on Linux systems) and follow the following procedure:
<ul>
<li>Under the <em><strong>[mysqld] </strong></em>section inside that file, add directive to allow MySQL insert data bigger than 64K (default), since Bugzilla needs to insert data more than the default size. Bugzilla needs to use large attachments.</li>
</ul>
</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
[mysqld]
# Allow packets up to 4MB
max_allowed_packet=4M</pre>
<ul>
<li>Also, Bugzilla requires small words to be indexed in full-text search which is not enabled by default. Hence we need to add a directive to allow indexing of even small words in full-text search.</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
[mysqld]
# Allow small words in full-text indexes
ft_min_word_len=2</pre>
<p class="rteindent1 rteindent2" style="margin-bottom: 0in;"><span style="color: #b22222;">Rebuilding the indexes can be done based on documentation found at</span> <a href="http://www.mysql.com/doc/en/Fulltext_Fine-tuning.html">http://www.MySQL.com/doc/en/Fulltext_Fine-tuning.html</a>.</p>
<ul>
<li>Now we add a database user defined by the variable $db_user (i.e. bugs) and set the password to $db_pass (i.e. bugs123#), though you are encouraged to use your own password. Further we set this user to have all sort of privileges over the $db_name (i.e. bugs) database.</li>
</ul>
<pre class="brush: sql; title: ; notranslate">
GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'bugs123#';
FLUSH PRIVILEGES;</pre>
<p class="rteindent1 rteindent2" style="margin-bottom: 0in;"><span style="color: #b22222;">Note: Please use the same password that you specified in the <em><strong>localconfig</strong></em> file identified by the variable <em><strong>$db_pass</strong></em>.</span></p>
<ul>
<li>Next we allow MySQL to have attachment tables to grow beyond 4 GB (the default maximum limit is just 4 GB and Bugzilla might require more space). Although this step forms a part of database configuration, we will postpone this step until the rest part of the configuration is complete.</li>
</ul>
<pre class="brush: sql; title: ; notranslate">
use bugs;
ALTER TABLE attachments AVG_ROW_LENGTH=1000000, MAX_ROWS=20000;</pre>
<p style="margin-left: 0.76in; margin-bottom: 0in;">This command sets MySQL to let the attachment table grow up to 20 GB.</p>
<ul>
<li>Now after the local configuration file (i.e. <em><strong>localconfig</strong></em>) has been edited and all the other necessary configuration has been made, we again rerun the script to make Bugzilla bind to the configuration and create necessary files and setting parameters. Running the script reconfirms that all the modules are present, and notices the altered localconfig file, which it assumes you have edited to your satisfaction. It compiles the UI templates, connects to the database using the <em><strong>&#8216;bugs&#8217;</strong></em> user you created and the password you defined, and creates the &#8216;<em><strong>bugs&#8217;</strong></em> database and the tables therein. After that, it asks for details of an administrator account. Bugzilla can have multiple administrators &#8211; you can create more later &#8211; but it needs one to start off with. Enter the email address of an administrator, his or her full name, and a suitable Bugzilla password.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
./checksetup.pl</pre>
<ul>
<li>Next comes the configuration of the web-server to correctly display the Bugzilla pages and apply appropriate permissions to the Bugzilla installation base directory. Since we are using Apache web-server, we have two options to run Bugzilla. Bugzilla is written using Perl CGI, and hence two apache modules are available to run and show CGI scripts. You can choose any one of them (remember to install the required apache module before performing this step). <em><strong>Using mod_cgi is preferred.</strong></em>
<ul>
<li><span style="text-decoration: underline;"><strong>Apache httpd with mod_cgi</strong></span>
<ul>
<li>Open the httpd configuration file (<em><strong>/etc/httpd/conf/httpd.conf</strong></em>).</li>
<li>Now we add a <em><strong>&lt;directory&gt;</strong></em> directive to the configuration file to permit fine-grained permission setting over the Bugzilla installation base.</li>
</ul>
</li>
</ul>
</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
Alias /bugzilla/ /var/www/html/bugzilla-*.*/

&lt;Directory &quot;/var/www/html/bugzilla-*.*&quot;&gt;
	AddHandler cgi-script cgi
	DirectoryIndex index.cgi
	Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
	AllowOverride None
	Order allow,deny
	Allow from all
&lt;/Directory&gt;

&lt;Directory &quot;/var/www/html/bugzilla-*.*/data&quot;&gt;
	Options FollowSymLinks
	AllowOverride None
	Order allow,deny
	Allow from all
&lt;/Directory&gt; </pre>
<ul>
<li>Save the configuration file and exit the editor.</li>
<li>Run the <em><strong>checksetup.pl</strong></em> script to complete the configuration.</li>
</ul>
<ul>
<li><span style="text-decoration: underline;"><strong>Apache httpd with mod_perl</strong></span></li>
<li>Open the httpd configuration file (<em><strong>/etc/httpd/conf/httpd.conf</strong></em>).</li>
<li>Add the following directive in the http configuration file before any other mod_perl directives:</li>
</ul>
<pre class="brush: plain; title: ; notranslate">

PerlSwitches -I/var/www/html/bugzilla -w -T
PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl</pre>
<ul>
<li>Save the file and exit the editor.</li>
<li>Run the <em><strong>checksetup.pl</strong></em> script to complete the configuration.</li>
<li>Now restart the httpd daemon to apply the settings.</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
/sbin/service httpd restart</pre>
<ul>
<li>Now, you can point your browser at <a href="../../../bugzilla/">http://localhost/bugzilla/</a> to open the Bugzilla page.</li>
<li>At this point, you are required to login with the administrator account which you created while running the <em><strong>checksetup.pl</strong></em> script. <em><strong>Generally the user name is the email address that you provided while running the script.</strong></em></li>
<li>After logging in to the Bugzilla system, you are required to edit some key parameters. To edit the parameters, follow the <em><strong>“Administration”</strong></em> link on the top navigation bar, and from the page that opens, you can follow the <em><strong>“Parameters”</strong></em> link. Alternatively, you can point your browser to <a href="../../../bugzilla/editparams.cgi">http://localhost/bugzilla/editparams.cgi</a>.
<ul>
<li>Set the <em><strong>maintainer</strong></em> parameter to your email address &lt;<a href="mailto:yourname@yourdomain.tld">yourname@yourdomain.tld</a>&gt;.</li>
<li>Set the <em><strong>urlbase</strong></em> parameter to http://&lt;hostname&gt;/bugzilla/. Remember to replace the &lt;hostname&gt; with the appropriate hostname of the bugzilla server machine and don&#8217;t use “localhost” for this parameter.</li>
<li>Save the parameters by clicking on the “Save Changes” button at the bottom of the page.</li>
</ul>
</li>
<li>On the Parameters page, there is a vertical navigation bar on the left most part. The navigation bar contains links to various settings that you might want to change according to your need. After editing any of the parameters, don&#8217;t forget to save the changes. Unless the changes are saved, they are not applied to the Bugzilla system.</li>
<li>Next you need to add products, components, versions, and milestones. For this purpose follow the <em><strong>“Administration”</strong></em> link on the top navigation bar and then follow the appropriate links. By default a test product and a test component is already added. You can edit those and replace by your own. The administration page also contains other link to other settings, you can choose to change them according to your need.</li>
<li>From the administration page, follow the <em><strong>“Users”</strong></em> link and add new user and/or edit existing users.</li>
<li>To change the preferences of the currently logged in user, follow the <em><strong>“Preferences”</strong></em> link at the bottom or top navigation bar, alternatively, you can point your browser to <a href="../../../bugzilla/userprefs.cgi">http://localhost/bugzilla/userprefs.cgi</a>.</li>
<li>You can file a new bug by following the <em><strong>“New”</strong></em> link on the navigation bar, alternatively you can point your browser to <a href="../../../bugzilla/enter_bug.cgi">http://localhost/bugzilla/enter_bug.cgi</a>.</li>
<li>You can use the <em><strong>“Search”</strong></em> or the <em><strong>“Reports”</strong></em> features to get information about the bugs that have been filed by various users of the system.</li>
</ul>
<p>Enjoy a robust bugtracker and testing platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/how-to-install-bugzilla/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to setup key based SSH authentication?</title>
		<link>http://asingh.com.np/blog/how-to-setup-key-based-ssh-authentication/</link>
		<comments>http://asingh.com.np/blog/how-to-setup-key-based-ssh-authentication/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 06:21:34 +0000</pubDate>
		<dc:creator>Abhishek Singh</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Planet Fedora]]></category>

		<guid isPermaLink="false">http://asingh.com.np/?p=13</guid>
		<description><![CDATA[&#160; SSH (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP ports can also be forwarded over the secure [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<dl>
<dd>SSH (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP ports can also be forwarded over the secure channel. SSH connects and logs into the specified hostname (with optional user name). The user must prove his/her identity to the remote machine using one of several methods depending on the protocol version used. In this guide we will see how to set up a password-less method to authenticate to a SSH server.</dd>
</dl>
<h1>
<p><strong>Case Scenario</strong></h1>
<dl>
<dd>For this case, we make the following assumptions:</p>
<ol>
<li>The originating host, which we would like to authenticate to a SSH server, is named <span style="color: #008000;"><strong><em>&#8220;bob&#8221;</em></strong></span>.</li>
<li>The SSH server or the remote host is named <span style="color: #006400;"><strong><em>&#8220;monica&#8221;</em></strong></span>.</li>
<li>Both machines have SSH package installed. Also that bob is equipped with SSH client and monica is equipped with OpenSSH server; and the server daemon is running on the default port (i.e. 22).</li>
<li>The user account on monica to which we want to authenticate is <span style="color: #8b4513;"><strong><em>&#8220;foo&#8221;</em></strong></span> and the current logged in user on the bob&#8217;s machine is <span style="color: #8b4513;"><strong><em>&#8220;bar&#8221;</em></strong></span>. <cite>Please replace &#8220;foo&#8221; and &#8220;bar&#8221; with actual user names; and &#8220;bob;&#8221; and &#8220;monica&#8221; with actual names of the machine in a real world.</cite></li>
</ol>
<h1><strong><cite>Setting up the Authentication</cite></strong></h1>
<h2>
<p>Generating the key</h2>
</dd>
</dl>
<ul>
<li>You need to generate a SSH key for your host if you have not yet generated. To generate a key, login to bob as the user &#8220;bar&#8221;. Run the following command:</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
ssh-keygen
</pre>
<ul>
<li>Now that you&#8217;re required to copy the key over the SSH server <strong>&#8220;monica&#8221;</strong>. To copy the file, we will use a tool called <strong><em>&#8220;SCP&#8221;</em></strong>. Follow these steps:</li>
</ul>
<dl>
<dd>
<pre class="brush: bash; title: ; notranslate">
		cd ~/.ssh/ scp id_rsa.pub foo@monica:~foo/.ssh/bob_id_rsa.pub
		</pre>
<h2>
<p>Enabling authorization</h2>
</dd>
</dl>
<p>Now that you need to add the SSH key from the file <strong>bob_id_rsa.pub</strong> to the file authorized_keys which resides under <strong>~foo/.ssh/</strong> directory. If the file does not exist, you have to manually create it.</p>
<dl>
<dd>
<ol>
<li>Login to monica (the SSH server).
<pre class="brush: bash; title: ; notranslate">
				ssh monica -l foo
				</pre>
</li>
<li>Move to the .ssh directory.
<pre class="brush: bash; title: ; notranslate">
				cd ~/.ssh/
				</pre>
</li>
<li>Create the authorized_keys file (only if it does not exist).
<pre class="brush: bash; title: ; notranslate">
touch authorized_keys</pre>
</li>
<li>Append bob&#8217;s SSH key to the key-file.
<pre class="brush: bash; title: ; notranslate">
 cat bob_id_rsa.pub &gt;&gt; authorized_keys
 </pre>
<p>Remember to use double redirection (&gt;&gt;). If you use a single redirection (&gt;), it will truncate the file and then add the SSH key from bob; all the other</li>
<li>Make sure that the files in .ssh are writable only by you, on both machines, and non-executable by anyone.
<pre class="brush: bash; title: ; notranslate">
				chmod 644 authorized_keys
				</pre>
</li>
<li>Exit from the monica&#8217;s SSH session.
<pre class="brush: bash; title: ; notranslate">
				exit
				</pre>
</li>
</ol>
</dd>
</dl>
<h2></h2>
<h2>Testing the setup</h2>
<dl></dl>
<p>Try logging in to monica again.</p>
<pre class="brush: bash; title: ; notranslate">
ssh monica -l foo
</pre>
<p>Now you can notice that you don&#8217;t require a password to login.</p>
]]></content:encoded>
			<wfw:commentRss>http://asingh.com.np/blog/how-to-setup-key-based-ssh-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

