<?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>TerralTech</title>
	<atom:link href="http://terraltech.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://terraltech.com</link>
	<description>The power of  sharing knowledge</description>
	<lastBuildDate>Mon, 13 May 2013 22:05:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=terraltech&amp;popout=1&amp;url=http%3A%2F%2Fterraltech.com%2F&amp;language=en_US&amp;category=text&amp;title=TerralTech&amp;description=The+power+of++sharing+knowledge&amp;tags=blog" type="text/html" />
		<item>
		<title>How to install Solr on Ubuntu and auto start at boot</title>
		<link>http://terraltech.com/how-to-install-solr-on-ubuntu-and-auto-start-at-boot/</link>
		<comments>http://terraltech.com/how-to-install-solr-on-ubuntu-and-auto-start-at-boot/#comments</comments>
		<pubDate>Mon, 13 May 2013 22:02:40 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[HowTos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solr]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1461</guid>
		<description><![CDATA[<p><img width="620" height="415" src="http://terraltech.com/wp-content/uploads/2013/05/Solr.jpg?20840a" class="attachment-post-thumbnail wp-post-image" alt="Solr" /></p><blockquote><a title="Apache Solr" href="http://en.wikipedia.org/wiki/Apache_Solr" target="_blank" rel="nofollow">Solr</a> (pronounced "solar") is an open source enterprise search platform from the Apache Lucene project. Its major features include full-text search, hit highlighting, faceted search, dynamic clustering, database integration, and rich document (e.g., Word, PDF) handling. Providing distributed search and index replication, Solr is highly scalable. Solr is the most popular enterprise search engine.</blockquote>
Installing Solr version 4.3.0 on Ubuntu 12.04 LTS
<h2>Requirement</h2>
<ol>
	<li>Java 1.6 or greater. running <strong>java -version</strong> at the command line should show version number starting with 1.6</li>
	<li>Solr release which you can find <a title="Solr" href="http://lucene.apache.org/solr/mirrors-solr-latest-redir.html" target="_blank" rel="nofollow">here</a>.</li>
</ol>
<h2>Installation</h2>
Getting Tomcat6, install all dependencies with it
<code>apt-get install tomcat6</code>
Checking Java version
<code>java -version</code>
Should get a result similar to this
<code>java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)</code>
Download the latest version of Solr and extract it
<code>wget http://apache.spinellicreations.com/lucene/solr/4.3.0/solr-4.3.0.tgz
tar zxvf solr-4.3.0.tgz
mv solr-4.3.0 /usr/local/solr-4.3.0</code>
Testing Solr
<code>cd /usr/local/solr-4.3.0
java -jar start.jar</code>
Open your favorite web browser and open this URL
<span style="text-decoration: underline; color: #0000ff;">http://:8983/solr/</span>
Replace by the IP address of the Solr host

You should get something looks like this
[caption id="attachment_1465" align="alignnone" width="300"]<a href="http://terraltech.com/wp-content/uploads/2013/05/Solr.png?20840a"><img class="size-medium wp-image-1465" alt="Solr Dashboard" src="http://terraltech.com/wp-content/uploads/2013/05/Solr-300x167.png?20840a" width="300" height="167" /></a> Solr Dashboard[/caption]
<h2>Auto start Solr at boot</h2>
Follow my older post: <a title="Running Java applications as daemon on Linux" href="http://terraltech.com/running-java-applications-as-daemon-on-linux/" target="_blank">Running Java applications as daemon on Linux</a>


<strong>See also:</strong>
<ul>
	<li><a title="Solr Tutorial" href="http://lucene.apache.org/solr/4_3_0/tutorial.html" target="_blank" rel="nofollow">http://lucene.apache.org/solr/4_3_0/tutorial.html</a></li>
</ul>]]></description>
		<wfw:commentRss>http://terraltech.com/how-to-install-solr-on-ubuntu-and-auto-start-at-boot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brief Installation of Ubuntu 13.04 Raring Ringtail Desktop edition</title>
		<link>http://terraltech.com/brief-installation-of-ubuntu-13-04-raring-ringtail-desktop-edition/</link>
		<comments>http://terraltech.com/brief-installation-of-ubuntu-13-04-raring-ringtail-desktop-edition/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 15:02:17 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[Video Tutorials]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1409</guid>
		<description><![CDATA[Download Ubuntu Desktop: http://www.ubuntu.com/download/desktop Alternative downloads: http://www.ubuntu.com/download/alternative-downloads]]></description>
		<wfw:commentRss>http://terraltech.com/brief-installation-of-ubuntu-13-04-raring-ringtail-desktop-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joining Ubuntu to MS Active Directory domain</title>
		<link>http://terraltech.com/joining-ubuntu-to-ms-active-directory-domain/</link>
		<comments>http://terraltech.com/joining-ubuntu-to-ms-active-directory-domain/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 21:17:39 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[HowTos]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Likewise-Open]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1373</guid>
		<description><![CDATA[<p><img width="2048" height="1536" src="http://terraltech.com/wp-content/uploads/2013/04/Window.jpg?20840a" class="attachment-post-thumbnail wp-post-image" alt="Window" /></p><h2>Likewise Open</h2>
Likewise Open provides a complete authentication solution allowing *nix systems to be fully integrated into Active Directory environments.
Very easy to configure and it include GUI but in this post I don't explain how to setup the GUI.
<h3>Pre-configuration</h3>
Edit your resolv.conf and add the Microsoft DNS like this:
<code>vim /etc/resolve.conf
nameserver 192.168.0.1</code>
If you have static IP address you can have something like this in your /etc/network/interfaces file
<code>iface eth0 inet static
    address 192.168.0.3
    netmask 255.255.255.0
    gateway 192.168.0.1
    dns-search DOMAIN.local
    dns-nameservers 192.168.0.55</code>
But it's better if you have your DHCP server hand out the DNS nameserver address and search list.
<h3>Installation</h3>
<code>apt-get update &amp;&amp; apt-get install likewise-open</code>
<h3>Joining a domain</h3>
With the command domainjoin-cli you can add the server to your AD domain
<code>domainjoin-cli join fqdn.of.the.domain Administrator</code>
It will prompt for the "Administrator" password followed with this message if it succeed
<code>SUCCESS
You should reboot this system before attempting GUI logins as a domain user.</code>
<h3>Verification and useful command</h3>
View the Status of the local and AD Authentication Providers
<code>lw-get-status</code>
List all known services and their status
<code>lwsm list</code>
Enumerate the users in Active Directory and view their members, GIDs, and SIDs
<code>lw-enum-users</code>
Listing Local and Domain users/group
<code>getent passwd
getent group</code>
Print real and effective user and group IDs
<code>id DOMAIN\\user</code>
<h3>Remote login to Ubuntu with AD user</h3>
Use one of these:
<code>ssh DOMAIN&#92;&#92;USER@HOSTNAME
ssh 'DOMAIN&#92;USER'@HOSTNAME
ssh -l 'DOMAIN&#92;USER' HOSTNAME</code>
<h3>Allow Active Directory Domain Administrators to Administer Ubuntu</h3>
Edit the sudoers file
<code>visudo</code>
Add these lines
<code>%DOMAIN\\Administrators ALL=(ALL) ALL
DOMAIN\\USERNAME ALL=(ALL) ALL</code>
Adding "%" at the beginning means we are referring to a Group, without it for user.
With this we give sudo privileges to Active Directory users and groups.

<strong>See also:</strong>
<ul>
	<li><a title="http://download1.beyondtrust.com/Technical-Support/Downloads/files/pbiso/Manuals/likewise-open-guide.html" href="http://download1.beyondtrust.com/Technical-Support/Downloads/files/pbiso/Manuals/likewise-open-guide.html" target="_blank" rel="nofollow">Likewise Open Installation and Administration Guide</a></li>
	<li><a title="https://help.ubuntu.com/10.04/serverguide/likewise-open.html" href="https://help.ubuntu.com/10.04/serverguide/likewise-open.html" target="_blank" rel="&quot;nofollow">https://help.ubuntu.com/10.04/serverguide/likewise-open.html</a></li>
	<li><a title="https://help.ubuntu.com/community/LikewiseOpen" href="https://help.ubuntu.com/community/LikewiseOpen" target="_blank" rel="&quot;nofollow">https://help.ubuntu.com/community/LikewiseOpen</a></li>
</ul>]]></description>
		<wfw:commentRss>http://terraltech.com/joining-ubuntu-to-ms-active-directory-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to setup Deployd on Ubuntu server</title>
		<link>http://terraltech.com/how-to-setup-deployd-on-ubuntu-server/</link>
		<comments>http://terraltech.com/how-to-setup-deployd-on-ubuntu-server/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 12:34:49 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[HowTos]]></category>
		<category><![CDATA[Deployd]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[NodeJS]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1348</guid>
		<description><![CDATA[<p><img width="795" height="393" src="http://terraltech.com/wp-content/uploads/2013/04/Deployd.png?20840a" class="attachment-post-thumbnail wp-post-image" alt="Deployd" /></p><h2>Before we start</h2>
Pre-Requirements before we begin the installation:
You must have <strong>mongod 2.0.x</strong> and <strong>node 0.8.x</strong> or higher installed and available in your PATH.
I am going to use <strong>Ubuntu 10.04</strong> for this tutorial
<h2>Installation</h2>
Updating the operating system
<code>apt-get update &amp;&amp; apt-get upgrade</code>
<h3>NodeJS</h3>
<blockquote><a title="http://en.wikipedia.org/wiki/Nodejs" href="http://en.wikipedia.org/wiki/Nodejs" target="_blank">Node.js</a> is a server-side software system designed for writing scalable Internet applications, notably web servers. Programs are written on the server side in JavaScript, using event-driven, asynchronous I/O to minimize overhead and maximize scalability.</blockquote>
Installation steps
<code>sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs</code>
Verifying installation
<code>node -v
v0.10.4</code>
and
<code>npm -v
1.2.18</code>
Check that you have the Path
<code>echo $NODE_PATH</code>
You should get something like this
<code>/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript:/usr/lib/node_modules/</code>
Otherwise add this line to your ~/.bashrc or ~/.profile
<code>export NODE_PATH=$NODE_PATH:/usr/lib/node_modules/</code>
Of course you need to logout/login to apply the changes!
<h3>MongoDB</h3>
<blockquote><a title="http://en.wikipedia.org/wiki/MongoDB" href="http://en.wikipedia.org/wiki/MongoDB" target="_blank" rel="nofollow">MongoDB</a> (from "humongous") is an open source document-oriented database system developed and supported by 10gen. It is part of the NoSQL family of database systems. Instead of storing data in tables as is done in a "classical" relational database, MongoDB stores structured data as JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster.</blockquote>
Import the 10gen public GPG Key
<code>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10</code>
Create a /etc/apt/sources.list.d/10gen.list file and include the following line for the 10gen repository
<code>deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen</code>
Resynchronize the package index files from their sources
<code>apt-get update</code>
Install the packages
<code>sudo apt-get install mongodb-10gen</code>
Check the package's version
<code>dpkg -l | grep mongodb
mongodb-10gen 2.4.2 An object/document-oriented database</code>

To make Deployd run continuously we're going to use Forever, a NodeJs module
<code>npm install forever -g</code>
This will daemonize your app and make sure it runs even if it crashes.
<h3>Deployd</h3>
<blockquote><a title="http://deployd.com/" href="http://deployd.com/" target="_blank" rel="nofollow">Deployd</a> is a tool that makes building APIs for web and mobile apps simple by providing important ready-made functionality out of the box that meet the demands of complex applications.</blockquote>
<code>npm install deployd -g</code>
MangoDB conf file: /etc/mongodb.conf
MongoDB instance will store its data files in the /var/lib/mongodb and its log files in /var/log/mongodb, and run using the mongodb user account.
The dpd program should be available. Try
<code>dpd -V
0.6.10</code>
<h2>Deployd app</h2>
Creating new user and database for our application in MongoDB
<code>mongo shell
use admin
db.addUser( { user: "deployd", pwd: "deployd", roles: [ "userAdminAnyDatabase" ] } )
use deployd
db.addUser( { user: "deployd", pwd: "deployd", roles: [ "readWrite", "dbAdmin" ] } )</code>
List all database
<code>show dbs
admin 0.203125GB
deployd 0.203125GB
local 0.078125GB</code>
Choose where you're going to deploy your app and create your first app
<code>cd /var/www/
dpd create hello-world</code>
Go to the hello-world directory and create <strong>production.js</strong> file, follow instructions in <a title="http://docs.deployd.com/docs/server/run-script.md" href="http://docs.deployd.com/docs/server/run-script.md" target="_blank">http://docs.deployd.com/docs/server/run-script.md</a>
Modify your <strong>production.js</strong> file with the MongoDB information created above.
And make sure your MongoDB is listening on the same port as configured in the <strong>production.js</strong> file.
Issue the following command to see on what port is listening your program
<code>netstat -ntap</code>
Running your app
<code>forever start production.js</code>
Open this URL to see "Welcome to Deployd!"
<code>http://www.MyDomain.com:5000/</code>
To get Deployed dashboard
<code>http://www.MyDomain.com:5000/dashboard</code>
You should be prompt for authentification key
To get key, in "hello-world" directory type:
<code>dpd keygen</code>
and
<code>dpd showkey</code>
Copy the key into the browser to get access.
Enjoy!

<strong>See also:</strong>
<ul>
	<li><a title="Deployd Guide" href="http://docs.deployd.com/guides" target="_blank" rel="nofollow">http://docs.deployd.com/guides</a></li>
	<li><a title="Install MongoDB on Ubuntu" href="http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/" target="_blank" rel="nofollow">http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/</a></li>
	<li><a title="Installing Node.js via package manager" href="https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager" target="_blank" rel="nofollow">https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager</a></li>
</ul>]]></description>
		<wfw:commentRss>http://terraltech.com/how-to-setup-deployd-on-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command line Games</title>
		<link>http://terraltech.com/command-line-games/</link>
		<comments>http://terraltech.com/command-line-games/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 14:15:14 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[GeeKy]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1306</guid>
		<description><![CDATA[<p><img width="640" height="479" src="http://terraltech.com/wp-content/uploads/2013/04/Atari2600.jpg?20840a" class="attachment-post-thumbnail wp-post-image" alt="Atari2600" /></p>Do you like video games? want to have fun on your break at work or just remembering the old time's sake...
Play one of the oldest and mythic games in your favorite console, no need to install drivers or a super graphical card and for free!
[box type="info"]Caution! use With moderation.[/box]
<h2>Petris</h2>
<a title="Petris" href="https://github.com/vchimishuk/petris" target="_blank" rel="nofollow">Console tetris game</a> implementation on Python.
<h3>Installation</h3>
<code>apt-get update &amp;&amp; apt-get install petris</code>
Run the game and enjoy!
<code>petris</code>

[caption id="attachment_1310" align="alignnone" width="421"]<a href="http://terraltech.com/wp-content/uploads/2013/04/petris.png?20840a"><img class="size-full wp-image-1310" alt="Petris" src="http://terraltech.com/wp-content/uploads/2013/04/petris.png?20840a" width="421" height="312" /></a> Petris[/caption]
<h2>nSnake</h2>
<a title="http://alexdantas.net/projects/nsnake/" href="http://alexdantas.net/projects/nsnake/" target="_blank">nSnake</a> is a implementation of the classic snake game with textual interface. It is playable at command-line and uses the nCurses C library for graphics.
<h3>Installation</h3>
Download the latest version from : http://sourceforge.net/projects/nsnake/files/GNU-Linux/
<code>wget http://sourceforge.net/projects/nsnake/files/GNU-Linux/nsnake-1.5.tar.gz
tar zxvf nsnake-1.5.tar.gz
cd nsnake-1.5
sudo apt-get install libncurses5-dev
make
sudo make install</code>
[highlight bgcolor="#000000" txtcolor="#2EFE2E"]*nsnake successfuly installed![/highlight]
Now you can start palying! :)
<code>$ nsnake</code>

[caption id="attachment_1313" align="alignnone" width="567"]<a href="http://terraltech.com/wp-content/uploads/2013/04/nSnake.png?20840a"><img class="size-full wp-image-1313" alt="nSnake" src="http://terraltech.com/wp-content/uploads/2013/04/nSnake.png?20840a" width="567" height="343" /></a> nSnake[/caption]
<h2>Pacman4consol</h2>
A <a title="https://sites.google.com/site/doctormike/pacman.html" href="https://sites.google.com/site/doctormike/pacman.html" target="_blank">pacman</a> clone with custom level support!
<h3>Installation</h3>
<code>wget https://sites.google.com/site/doctormike/pacman-1.2.tar.gz
tar zxvf pacman-1.2.tar.gz
cd pacman-1.2
make
make install</code>
Let the party start ;)

[caption id="attachment_1316" align="alignnone" width="207"]<a href="http://terraltech.com/wp-content/uploads/2013/04/Pacman.png?20840a"><img class="size-full wp-image-1316" alt="Pacman" src="http://terraltech.com/wp-content/uploads/2013/04/Pacman.png?20840a" width="207" height="442" /></a> Pacman[/caption]]]></description>
		<wfw:commentRss>http://terraltech.com/command-line-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing your Rsyslog and LogAnalyzer</title>
		<link>http://terraltech.com/securing-your-rsyslog-and-loganalyzer/</link>
		<comments>http://terraltech.com/securing-your-rsyslog-and-loganalyzer/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 10:26:33 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[Tiny Post]]></category>
		<category><![CDATA[Certtool]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LogAnalyzer]]></category>
		<category><![CDATA[Rsyslog]]></category>
		<category><![CDATA[Syslog]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1232</guid>
		<description><![CDATA[I suppose that you already have Rsyslog and LogAnalyzer up and running, if not see &#8220;Installing Rsyslog and LogAnalyzer&#8221; The tools to generate certificates and debug connections are available in the gnutls-bin package. Install it with the following command: sudo apt-get install gnutls-bin rsyslog-gnutls On the LogAnalyzer server PART 1 Generate the private key: sudo [...]]]></description>
		<wfw:commentRss>http://terraltech.com/securing-your-rsyslog-and-loganalyzer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a private key to connect on your Linux servers</title>
		<link>http://terraltech.com/using-a-private-key-to-connect-on-your-linux-servers/</link>
		<comments>http://terraltech.com/using-a-private-key-to-connect-on-your-linux-servers/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 13:25:12 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[Tiny Post]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[ssh-keygen]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1206</guid>
		<description><![CDATA[Why using a Private key to connect on your Linux servers? This will prevent you entering the password each time you want to connect via SSH on your Linux server. On the server On your Linux server as root we&#8217;re going to create a new user # adduser NEWUSERNAME Connect as NEWUSERNAME # su NEWUSERNAME [...]]]></description>
		<wfw:commentRss>http://terraltech.com/using-a-private-key-to-connect-on-your-linux-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syslog server with Rsyslog and LogAnalyzer</title>
		<link>http://terraltech.com/syslog-server-with-rsyslog-and-loganalyzer/</link>
		<comments>http://terraltech.com/syslog-server-with-rsyslog-and-loganalyzer/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 09:12:49 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[HowTos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LogAnalyzer]]></category>
		<category><![CDATA[Rsyslog]]></category>
		<category><![CDATA[Syslog]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1166</guid>
		<description><![CDATA[<p><img width="953" height="441" src="http://terraltech.com/wp-content/uploads/2013/03/Logs.png?20840a" class="attachment-post-thumbnail wp-post-image" alt="Logs" /></p><blockquote><a title="http://en.wikipedia.org/wiki/Syslog" href="http://en.wikipedia.org/wiki/Syslog" target="_blank" rel="nofollow">Syslog</a> is a standard for computer data logging. It separates the software that generates messages from the system that stores them and the software that reports and analyzes them.</blockquote>
<h2>Installing Rsyslog server</h2>
<h3>Installing Rsyslog from repository</h3>
Install PGP Key into your apt system
<code>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com AEF0CF8E</code>
Edit your sources.list and add these lines
<code>sudo vim /etc/apt/sources.list</code>
<code># Adiscon repository
deb http://ubuntu.adiscon.com/v7-devel precise/
deb-src http://ubuntu.adiscon.com/v7-devel precise/</code>
Update your apt cache and install rsyslog
<code>sudo apt-get update &amp;&amp; sudo apt-get upgrade</code>
<code>sudo apt-get install rsyslog</code>
<h3>Installing some dependencies</h3>
<code>apt-get install rsyslog rsyslog-mysql unzip zip binutils cpp fetchmail flex gcc libc6-dev libpcre3 libpopt-dev lynx m4 make ncftp nmap openssl perl perl-modules zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++ mysql-server mysql-client libmysqlclient15-dev apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl</code>
Enter the password for MySQL when the installation ask you for it.
Check that Apache and MySQL are listening on ports
<code>netstat -tapn</code>
<code>Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      25240/mysqld
tcp        0      0 0.0.0.0::80             0.0.0.0:*               LISTEN      25844/apache2</code>
Next we configure the rsyslog server to listen on TCP port 514:
<code>sudo vim /etc/rsyslog.conf</code>
<code>$ModLoad MySQL
*.* &gt;127.0.0.1,&lt;SyslogDatabase&gt;,&lt;rsyslogUserName&gt;,&lt;rsyslogUserPassword&gt;</code>
Default values:
&lt;rsyslogUserName&gt;: rsyslog
&lt;SyslogDatabase&gt;: Syslog , created by default during the installation process of the dependencies
&lt;rsyslogUserPassword&gt;: Password inserted during the installation process of the dependencies
Comment out these lines in the rsyslog.conf
<code># provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514</code>
Restarting the rsyslog service
<code>/etc/init.d/rsyslog restart</code>
Checking that rsyslog is listening on TCP port 514
<code> netstat -ntap</code>
<code>Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      25240/mysqld
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      25844/apache2
tcp        0      0 0.0.0.0:514             0.0.0.0:*               LISTEN      27177/rsyslogd</code>
<h3>Installing the Log Analyzer</h3>
First download the most recent build from here: <a title="http://loganalyzer.adiscon.com/downloads" href="http://loganalyzer.adiscon.com/downloads" target="_blank" rel="nofollow">http://loganalyzer.adiscon.com/downloads</a>
<code>cd /usr/local/src
wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.3.tar.gz</code>
Extracting the file
<code>tar zxvf loganalyzer-3.6.3.tar.gz </code>
Move loganalyzer-x.x.x/src/ folder to you webserver root folder
<code>mv loganalyzer-3.6.3/src/* /var/www/</code>
Changing user rights to Apache
<code> chown www-data:www-data -Rf /var/www/*</code>
<code>cp loganalyzer-3.6.3/contrib/* /var/www/</code>
<code>chmod +x /var/www/configure.sh /var/www/secure.sh</code>
<code>./configure.sh</code>
This will create a blank config.php, and will also set write access to everyone to it.
Now open in your favorite browser http://&lt;LogAnalyzerIP&gt;/install.php
Go through the simple steps configuration "Next" till the configuration steps is finished
Don't forget to remove the installation file when finished
<code>rm -f /var/www/install.php</code>
<span style="text-decoration: underline;">Troubleshoot:</span>
If you get this error message: <span style="color: #ff0000;">Syslog file is not readable, read access may be denied</span>
Add use www-data to adm group
<code>sudo vim /etc/group
adm:x:4:www-data</code>
Reload Apache
<code>service apache2 reload</code>
<h2>Configuring Rsyslog to send data to Log Analyzer server</h2>
All you need to do is editing rsyslog.conf file
<code>vim /etc/rsyslog.conf</code>
Add the following lines
<code># provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
$WorkDirectory /rsyslog/work # default location for work (spool) files
$ActionQueueType LinkedList # use asynchronous processing
$ActionQueueFileName srvrfwd # set file name, also enables disk mode
$ActionResumeRetryCount -1 # infinite retries on insert failure
$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
*.* @@&lt;RsyslogIPaddress&gt;</code>
<code>/etc/init.d/rsyslog restart</code>
Checking that rsyslog is communicating with the server
<code> netstat -tapn</code>
<code>Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0   5612 192.168.0.10:55793      192.168.0.20:514        ESTABLISHED 11592/rsyslogd</code>
This is what you should get if your setup is successful

[caption id="attachment_1190" align="aligncenter" width="1498"]<a href="http://terraltech.com/wp-content/uploads/2013/03/Rsyslog-report.png?20840a"><img class="size-full wp-image-1190" alt="Rsyslog reports with LogAnalyzer" src="http://terraltech.com/wp-content/uploads/2013/03/Rsyslog-report.png?20840a" width="1498" height="548" /></a> Rsyslog reports with LogAnalyzer[/caption]

[caption id="attachment_1191" align="aligncenter" width="1491"]<a href="http://terraltech.com/wp-content/uploads/2013/03/Rsync-Statistic.png?20840a"><img class="size-full wp-image-1191" alt="Rsyslog statistics with LogAnalyzer" src="http://terraltech.com/wp-content/uploads/2013/03/Rsync-Statistic.png?20840a" width="1491" height="696" /></a> Rsyslog statistics with LogAnalyzer[/caption]

<strong>See Also:</strong>
<ul>
	<li><a title="http://loganalyzer.adiscon.com/doc/install.html" href="http://loganalyzer.adiscon.com/doc/install.html" target="_blank" rel="nofollow">http://loganalyzer.adiscon.com/doc/install.html</a></li>
	<li><a title="http://www.rsyslog.com/ubuntu-repository/" href="http://www.rsyslog.com/ubuntu-repository/" target="_blank" rel="nofollow">http://www.rsyslog.com/ubuntu-repository/</a></li>
	<li><a title="http://loganalyzer.adiscon.com/downloads" href="http://loganalyzer.adiscon.com/downloads" target="_blank" rel="nofollow">http://loganalyzer.adiscon.com/downloads</a></li>
	<li><a href="http://terraltech.com/securing-your-rsyslog-and-loganalyzer/" title="Securing your Rsyslog and LogAnalyzer" target="_blank">http://terraltech.com/securing-your-rsyslog-and-loganalyzer/</a></li>
</ul>]]></description>
		<wfw:commentRss>http://terraltech.com/syslog-server-with-rsyslog-and-loganalyzer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling SSL in Monit and M/Monit</title>
		<link>http://terraltech.com/enabling-ssl-in-monit-and-mmonit/</link>
		<comments>http://terraltech.com/enabling-ssl-in-monit-and-mmonit/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 12:33:04 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[Tiny Post]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monit]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Openssl]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[TLS]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1162</guid>
		<description><![CDATA[Usually we use HTTP to connect to the web, HTTPS protocol is the result of simply layering the Hypertext Transfer Protocol (HTTP) on top of the SSL/TLS protocol. The TLS/SSL protocol allows client-server applications to communicate across a network in a way designed to prevent eavesdropping and tampering. I suppose that you already have Monit [...]]]></description>
		<wfw:commentRss>http://terraltech.com/enabling-ssl-in-monit-and-mmonit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install M/Monit &#8211; Monit</title>
		<link>http://terraltech.com/how-to-install-mmonit-monit/</link>
		<comments>http://terraltech.com/how-to-install-mmonit-monit/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 10:19:09 +0000</pubDate>
		<dc:creator>techadmin</dc:creator>
				<category><![CDATA[HowTos]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monit]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://terraltech.com/?p=1036</guid>
		<description><![CDATA[<p><img width="985" height="682" src="http://terraltech.com/wp-content/uploads/2013/03/monit.png?20840a" class="attachment-post-thumbnail wp-post-image" alt="monitoring servers with monit" /></p><blockquote><a title="http://en.wikipedia.org/wiki/Monit" href="http://en.wikipedia.org/wiki/Monit" target="_blank">monit</a> is a free, open source process supervision tool for Unix and Linux. With monit, system status can be viewed directly from the command line, or via the native HTTP(S) web server.
M/Monit, a purchased software distributed by the creators of monit (Tildeslash LTD) expands upon the capabilities of monit, providing multi-host monitoring and analysis from within one web interface.</blockquote>
<h2>What monit can do</h2>
It can start a process if it is stopped, restart a process if it is not responding or stop a process if it is using too much resources. You can use Monit to monitor files, directories, filesystems
<h2>Installing monit</h2>
<h3>Installing monit on Ubuntu</h3>
Installing as a package from the distribution repository
<code> sudo apt-get install monit</code>
<h3>Installing monit on Centos</h3>
First we need to install some prerequisite
<code>yum -y install openssl* gcc</code>
<code>yum install pam-devel
yum install openssl-devel</code>
Download the latest version from here <a title="http://mmonit.com/monit/" href="http://mmonit.com/monit/" target="_blank" rel="nofollow">http://mmonit.com/monit/</a>
<code>cd /usr/src/
wget http://mmonit.com/monit/dist/monit-5.5.tar.gz</code>
Extract tar file
<code>tar zxvf monit-5.5.tar.gz</code>
Compiling from source
<code>cd monit-5.5/
./configure
make &amp;&amp; make install</code>
Monit control file:
<code> cp /path/to/monit-5.5/monitrc ~/.monitrc
chmod 0700 .monitrc</code>
<h2>Installing M/Monit "simple"</h2>
This part of the tutorial was written for Ubuntu 12.04, but the configuration should apply to other distributions with little changes as well.

Download the latest version from here <a title="http://mmonit.com/download/" href="http://mmonit.com/download/" target="_blank" rel="nofollow">http://mmonit.com/download/</a>
<code>wget http://mmonit.com/dist/mmonit-2.4-linux-x64.tar.gz</code>
extract tar file and start mmonit
<code>tar zxvf mmonit-2.4-linux-x64.tar.gz
mv mmonit-2.4/ /usr/local/mmonit/
cd /usr/local/mmonit/
./bin/mmonit</code>
Open URL http://ServerIP:8080/
Default Login: admin
Default Password: swordfish
<h2>Installing M/Monit "advanced"</h2>
<h3>Installing mysql</h3>
<code>sudo apt-get install mysql-server php5-mysql</code>
Create mmonit database:
<code>mysqladmin create mmonit -u root -p</code>
Create the mmonit user and grant access to the mmonit database:
<code>mysql&gt; GRANT ALL ON mmonit.* to mmonit@localhost identified by 'MmonitPassword';</code>
Create the schema:
<code>mysql -u mmonit mmonit -p &lt; /usr/local/mmonit/db/mmonit-schema.mysql</code>
<h3>Adding new user</h3>
<code>adduser mmonit</code>
Changing mmonit owner and group
<code>sudo chown -R mmonit:mmonit /usr/local/mmonit</code>
<h3>Configure M/Monit</h3>
Edit configuration file mmonit/conf/server.xml and replace the SQLite &lt;Realm&gt; element with
<code>&lt;Realm url="mysql://mmonit:MmonitPassword@127.0.0.1:3306/mmonit"
minConnections="5"
maxConnections="30"
reapConnections="300" /&gt;</code>
Adjust username, password, host and port number in the connection URL as required.
<h3>Automatic startup M/Monit</h3>
Register M/Monit as Monit service in the Monit configuration file (/etc/monit/monitrc):
<code>check process mmonit with pidfile /usr/local/mmonit/logs/mmonit.pid
start program = "/usr/local/mmonit/bin/mmonit -d" as uid MmonitUID and gid MmonitGID
stop program = "/usr/local/mmonit/bin/mmonit stop" as uid MmonitUID and gid MmonitGID</code>
Replace MmonitUID and MmonitGID by the respective ID.
Reload monit
<code>monit reload</code>
Open URL http://ServerIP:8080/
Default Login: admin
Default Password: swordfish
<h2>Configuration of Monit to communicate with M/Monit</h2>
<a href="http://terraltech.com/wp-content/uploads/2013/03/mmonit.png?20840a"><img class="size-full wp-image-1155" alt="mmonit" src="http://terraltech.com/wp-content/uploads/2013/03/mmonit.png?20840a" width="599" height="107" /></a>
To setup communication between Monit and M/Monit, add the following statements to the top of each Monit control file, monitrc:
<code>sudo vim /etc/monit/monitrc</code>
<code>set mmonit http://&lt;user&gt;:&lt;password&gt;@&lt;M/Monit-host&gt;:&lt;port&gt;/collector
set httpd port 2812 and use address &lt;monit-host&gt;
allow localhost
allow &lt;M/Monit-host&gt;
allow username:password</code>
Default &lt;user&gt;:&lt;password&gt; is monit:monit
To change these, connect to your WebUI &gt; Admin &gt; Users
And edit the default user monit's password, or add a new one.
<strong>See also:</strong>
<ul>
	<li><a title="http://mmonit.com/" href="http://mmonit.com/" target="_blank" rel="nofollow">http://mmonit.com/</a></li>
	<li><a title="http://mmonit.com/wiki/MMonit/Setup" href="http://mmonit.com/wiki/MMonit/Setup" target="_blank" rel="nofollow">http://mmonit.com/wiki/MMonit/Setup</a></li>
	<li><a title="http://mmonit.com/wiki/Monit/HowTo" href="http://mmonit.com/wiki/Monit/HowTo" target="_blank" rel="nofollow">http://mmonit.com/wiki/Monit/HowTo</a></li>
	<li><a title="http://mmonit.com/wiki/Monit/ConfigurationExamples" href="http://mmonit.com/wiki/Monit/ConfigurationExamples" target="_blank" rel="nofollow">http://mmonit.com/wiki/Monit/ConfigurationExamples</a></li>
	<li><a href="http://terraltech.com/enabling-ssl-in-monit-and-mmonit/" title="Enabling SSL in Monit and M/Monit" target="_blank">http://terraltech.com/enabling-ssl-in-monit-and-mmonit/</a></li>
</ul>]]></description>
		<wfw:commentRss>http://terraltech.com/how-to-install-mmonit-monit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

 Served from: terraltech.com @ 2013-05-26 03:51:21 by W3 Total Cache -->