Skip to content

Commit

Permalink
enable comments for all 2009 posts, fix formatting for 2009 (jan-aug)…
Browse files Browse the repository at this point in the history
… posts
  • Loading branch information
gerold committed Jul 3, 2012
1 parent 8fe7450 commit 9beb60b
Show file tree
Hide file tree
Showing 117 changed files with 786 additions and 842 deletions.
@@ -1,5 +1,6 @@
---
author: pim-van-der-wal
comments: true
published: true
date: '2009-01-05 16:16:47'
layout: post
Expand All @@ -19,26 +20,29 @@ tags:
This is a slight departure from our regular programming. Instead of just concentrating on the sys admin side of things I want to show how to add a Nagios check to an existing application. In this case we have a Java application for which we want to monitor whether it is running or not. Later on we can make this more detailed by monitoring error codes in the application but for the moment let's keep it simple.

**Configuring Nagios**

On the Nagios end of things we need to define a command to perform a check on a specific port of the server where the application is running. Add a line like this to the objects/commands.cfg file of your Nagios installation.
`
```
define command{
command_name check_your_application_name
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ -e "This application is alive and well"
}`
}
```

The -e parameter checks for a specific text that is to be returned by the application. This we can use later on to check for more detailed information. Next we need to add a service to Nagios for using this command. We do this by adding the following lines to the objects/localhost.cfg file. To keep this short I left out some lines which configure the frequency of the checks and the types of alerts.
`
```
define service {
use                    generic-service
host_name              your_server_name
service_description    your_service_name
check_command          check_your_application_name!2222
}`
}
```

**Creating a listener port in Java**
In the second part I will show you the actual code to add to your application. Because this is a blog post I left out the package definition and the includes, but other than that the class itself is usable. To add the check to the Java app we need to add a listener thread to application. We do this by creating a class that is derived from Thread. This listener will open a port which is specified by the main application and a respond to any incoming data with a preset text. We really don't care about the input on this end so any input will be  ignored:


In the second part I will show you the actual code to add to your application. Because this is a blog post I left out the package definition and the includes, but other than that the class itself is usable. To add the check to the Java app we need to add a listener thread to application. We do this by creating a class that is derived from Thread. This listener will open a port which is specified by the main application and a respond to any incoming data with a preset text. We really don't care about the input on this end so any input will be  ignored:
```
public class NagiosChecker extends Thread {
// Server socket
private ServerSocket srv;
Expand Down Expand Up @@ -85,11 +89,10 @@ In the second part I will show you the actual code to add to your application. B
}
}
}

```

In case you're still reading this you're probably interested in how to call this class. The following code should be executed in the initialization of the application. It creates the actual socket for port 2222 and starts the listener class. After this the listener class will run indefinitely until the application terminates.


```
ServerSocket srv = null;
try {
srv = new ServerSocket(2222);
Expand All @@ -98,3 +101,4 @@ In case you're still reading this you're probably interested in how to call this
} catch (Exception e) {
System.out.println(e.getMessage());
}
```
@@ -1,6 +1,7 @@
---
author: andrew-kucharski
published: true
comments: true
date: '2009-01-06 00:36:16'
layout: post
slug: beer-money-and-open-source-ad-network
Expand All @@ -17,16 +18,10 @@ Beer money and open source ad network don't really have anything to do with each

Here is what the good folks at [Ad Bard] are all about:


> At Ad Bard, we believe that advertisements can be an effective way for FLOSS oriented websites to generate regular income while remaining useful, relevant, and non-obnoxious.
Our advertising community is entirely built with free/libre and open source software, with all involved algorithms and schemas freely available for public scrutiny.


Its also worth to note that their site is running on the [Drupal](http://www.drupal.org) platform.

Linux System Admin Blog became an accepted member late last year and we plan on running some ads shortly.  So when you see our ads, be encouraged that they are part of the FLOSS community and will do us some good by supplying the badly needed happy hour. Here is one right now...




@@ -1,6 +1,7 @@
---
author: gerold-mercadero
published: true
comments: true
date: '2009-01-06 07:59:42'
layout: post
slug: flvtool2-not-injecting-metadata-video-length
Expand All @@ -17,4 +18,4 @@ You can check for the latest release at [RubyForge](http://rubyforge.org/frs/?gr

Upgrade process is easy, same as the installation process, and if you need help visit our detailed guide on **"[Installing ffmpeg and its components](http://linuxsysadminblog.com/2008/06/install-ffmpeg-ffmpeg-php-and-audio-binaries-on-centos-rhel-system-with-cpanel/)"** and look for Flvtool2 section.

If you're still having problem after Flvtool2 upgrade check your Ruby installation as you may need to update it as well.  If you're on a Cpanel server you can use Cpanel's Ruby install script at "_/scripts/installruby_".
If you're still having problem after Flvtool2 upgrade check your Ruby installation as you may need to update it as well.  If you're on a Cpanel server you can use Cpanel's Ruby install script at `/scripts/installruby`".
1 change: 1 addition & 0 deletions source/_posts/2009-01-13-at-vendors-mercy.markdown
@@ -1,6 +1,7 @@
---
author: max-veprinsky
published: true
comments: true
date: '2009-01-13 08:00:43'
layout: post
slug: at-vendors-mercy
Expand Down
@@ -1,6 +1,7 @@
---
author: gerold-mercadero
published: true
comments: true
date: '2009-01-14 05:48:39'
layout: post
slug: compile-mplayermencoder-with-xvid-and-h264-codec-support
Expand All @@ -13,139 +14,81 @@ categories:

Default Mplayer installation autodetects Xvid, H264 and other codecs. So if you have Xvid and H264 codecs installed your mencoder and mplayer should support it, unless you disable them during compilation.  In order to have your Mencoder and Mplayer support Xvid and H264 you need to install them first and then compile/re-compile Mencoder/Mplayer.




**Install [Xvid](http://www.xvid.org/). **Xvid is a free software MPEG-4 ASP compliant video codec.






* download the latest release from [Xvid.org](http://www.xvid.org/Downloads.43.0.html), during this time of post the latest stable release is 1.2.1.

_wget http://downloads.xvid.org/downloads/xvidcore-1.2.1.tar.gz_


* Unpack tarball file:

_tar xzpf xvidcore-1.2.1.tar.gz_


* Go to build/generic folder:

_cd xvidcore-1.2.1/build/generic/_



* Build and install

_./configure

**Install [Xvid](http://www.xvid.org/).**

Xvid is a free software MPEG-4 ASP compliant video codec.

* download the latest release from [Xvid.org](http://www.xvid.org/Downloads.43.0.html), during this time of post the latest stable release is 1.2.1.
```
wget http://downloads.xvid.org/downloads/xvidcore-1.2.1.tar.gz
```
* Unpack tarball file:
```
tar xzpf xvidcore-1.2.1.tar.gz
```
* Go to build/generic folder:
```
cd xvidcore-1.2.1/build/generic/
```
* Build and install
```
./configure
make

make install_




make install
```
**Note**:  At this point you can recompile your Mplayer/Mencoder to have Xvid support - in case you don't want to have H264 support.


**Install [H264](http://developers.videolan.org/x264.html)**.


**Install [H264](http://developers.videolan.org/x264.html)**.  H264/x264 is a library for creating H.264 video. MPlayer sources are updated whenever an x264 API change occurs, so it is always suggested to use MPlayer from Subversion.  At this time of post x264 in on development release only.



H264/x264 is a library for creating H.264 video. MPlayer sources are updated whenever an x264 API change occurs, so it is always suggested to use MPlayer from Subversion.  At this time of post x264 in on development release only.

Using [GIT](http://git-scm.com) - download [1.6.1](http://www.kernel.org/pub/software/scm/git/git-1.6.1.tar.gz).






* Get the latest x264 source using git:

_git clone git://git.videolan.org/x264.git_


* Build and install:

_cd x264

* Get the latest x264 source using git:
```
git clone git://git.videolan.org/x264.git
```
* Build and install:
```
cd x264
./configure

make

make install_



make install
```

If you don't have GIT and don't want to install it, you can use the daily snapshot.






* Download the latest snapshot(tarball) [here](ftp://ftp.videolan.org/pub/videolan/x264/snapshots/):

_wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090113-2245.tar.bz2_


* Extract tarball

_bzip2 -cd x264-snapshot-20090113-2245.tar.bz2 | tar xvf -

cd x264-snapshot-20090113-2245_


* Build and install

_./configure

* Download the latest snapshot(tarball) [here](ftp://ftp.videolan.org/pub/videolan/x264/snapshots/):
```
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090113-2245.tar.bz2
```
* Extract tarball
```
bzip2 -cd x264-snapshot-20090113-2245.tar.bz2 | tar xvf -
cd x264-snapshot-20090113-2245
```
* Build and install
```
./configure
make

make install_



make install
```

**Compile/Re-compile Mplayer**:




You can use the latest release version of [Mplayer](http://www3.mplayerhq.hu/MPlayer/releases/) for Xvid only but there are issues during build on x264, as it is not updated. It's better to re-compile Mplayer from their SVN.






* Checkout the latest version:

_svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer_


* Build and install:

_cd mplayer

* Checkout the latest version:
```
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
```
* Build and install:
```
cd mplayer
./configure

make

make install_



make install
```

**NOTE:** This install process was tested on Centos 5.2.



@@ -1,5 +1,6 @@
---
published: true
comments: true
author: gerold-mercadero
date: '2009-01-14 21:43:46'
layout: post
Expand All @@ -12,17 +13,23 @@ categories:
---

I got this error while importing large database dump from command line.
_ERROR 1153 (08S01) at line XXX: Got a packet bigger than 'max_allowed_packet' bytes_
```
ERROR 1153 (08S01) at line XXX: Got a packet bigger than 'max_allowed_packet' bytes
```

I searched and found out that it is related to the default _max_allowed_packet_ which is _16M_, so i need to increase this setting from Mysql:

1.) **Change setting on my.cnf and restart mysql:**
_set-variable = max_allowed_packet=32M
/etc/init.d/mysql restart_
```
set-variable = max_allowed_packet=32M
/etc/init.d/mysql restart
```

Or;

2.) **Change setting temporarily. Login to MySQL and issue:**
_SET GLOBAL max_allowed_packet=1000000000;_
**Note:** You may want to restart your Mysql to reload your previous/default settings.
```
SET GLOBAL max_allowed_packet=1000000000;
```

**Note:** You may want to restart your Mysql to reload your previous/default settings.
13 changes: 1 addition & 12 deletions source/_posts/2009-01-21-largest-security-breach-ever.markdown
@@ -1,6 +1,7 @@
---
author: andrew-kucharski
published: true
comments: true
date: '2009-01-21 09:55:32'
layout: post
slug: largest-security-breach-ever
Expand All @@ -16,26 +17,14 @@ categories:

**[Card Data Breached, Firm Says](http://online.wsj.com/article/SB123249174099899837.html)**


> A New Jersey credit-card processor disclosed a data breach that analysts said may rank among the biggest ever reported.
Heartland Payment Systems Inc. said Tuesday that cyber criminals compromised its computer network, gaining access to customer information associated with the 100 million card transactions it handles each month.


The problem was discovered after fraudulent transactions were reported to Heartland by Visa and Master card.  It appears that the breach was discovered by a forensic investigator who said that the malicious software was "light years more sophisticated" than other malevolent programs in existence today.

Heartland processes transactions for more than 250,000 customers and its not clear how many credit card numbers it has access to.

It just goes to show that as much of a pain security is and PCI compliance is just a tip of the iceberg necessary to keep the bad guys out.

For more interesting reading, and a list of the 2008 security[ breaches compiled by ITRC c](http://www.idtheftcenter.org/artman2/publish/lib_survey/ITRC_2008_Breach_List.shtml)heck out the company's site or this [2008 security breach report](http://www.idtheftcenter.org/BreachPDF/ITRC_Breach_Report_2008_final.pdf) (pdf).


>
>
>



0 comments on commit 9beb60b

Please sign in to comment.