Archive for the ‘Apache’ Category

451 CAOS Links 2011.10.18

Октябрь 18th, 2011

DOCOMO adopts, invests in Couchbase. Apache Cassandra reaches 1.0. And more.

# DOCOMO Innovations adopted Couchbase as DOCOMO Capital invested in the NoSQL database vendor.

# The Apache Software Foundation announced Apache Cassandra v1.0.

# Nuxeo announced the availability of Nuxeo Cloud.

# SGI formed a distribution relationship with Cloudera and announced a record-breaking performance benchmark.

# Rapid7 announced the launch of Metasploit Community Edition.

# VoltDB announced the general availability of VoltOne.

# Juniper Networks licensed OpenNMS to add fault and performance management capabilities to the Junos Space software platform.

# The Free Software Foundation warned against Microsoft’s “Secure Boot” system.


PlanetMySQL Voting: Vote UP / Vote DOWN

Installing Apache2 With PHP5 And MySQL Support On Ubuntu 11.10 (LAMP)

Октябрь 17th, 2011

Installing Apache2 With PHP5 And MySQL Support On Ubuntu 11.10 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on an Ubuntu 11.10 server with PHP5 support (mod_php) and MySQL support.


PlanetMySQL Voting: Vote UP / Vote DOWN

Blog Summary for Week of September 5

Сентябрь 11th, 2011

1. Apache and MySQL Logging with Syslog-ng
This article shows how to use the popular system logging tool Syslog-ng to log Apache and MySQL events. Apache does not log via syslog-ng by default so we go over two methods of easily remedying this. We also show how to use SQL queries to view syslog-ng data.

2. Using M3 to take System Monitors to the Next Level
Monitis provides built in functionality to monitor a wide variety of system statistics as well as the ability to create custom system monitors. Monitis Monitor Manager, or M3 for short, allows you to take these custom monitors even further by providing you with a simple framework to use the incredible power of regular expressions to pull and format literally any kind of data and automatically send it over the wire to your Monitis dashboard.

3. How to Log to PostgreSQL with Syslog-ng
Here we show how to use syslog-ng to log and view PostgreSQL log data. We also include some tips on troubleshooting and avoiding annoyances.

4. 30 VMware vSphere Performance Tips
There’s a multitude of optimizations that can be made to make your vSphere setup perform at optimal levels . This article covers 30 tips and tricks that will ensure the best performance from VMware’s vSphere and some even apply to other virtualization products. Some of the highlights are to Use only VMware-compatible hardware and Run your system through a burn-in/stress test.

Share Now:
  • del.icio.us
  • Digg
  • Facebook
  • LinkedIn
  • BlinkList
  • DZone
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • Twitter
  • RSS

PlanetMySQL Voting: Vote UP / Vote DOWN

Apache and MySQL Logging with Syslog-ng

Сентябрь 5th, 2011

Apache and syslog-ng

While logging to a database back-end has its benefits, the setup as it stands leaves us wanting. Some applications, such as Apache, do not log via syslog-ng by default. The good news is that this can be easily remedied, and there are a couple of different ways of doing this. First, the less good way:

Method #1: Changing the Apache configuration file.

First, we need to setup syslog-ng appropriately by creating a new source for apache, such as the following:

source s_apache {
 unix-stream("/var/log/apache2/apache_log.socket"
 max-connections(512)
 keep-alive(yes));
 };

log { source(s_apache); destination(d_pgsql); };

This recycles the original destination for PostgreSQL and upon restarting syslog-ng, will create the /var/log/apache2/apache_log.socket which will now need to be referenced in httpd.conf:

CustomLog "|/usr/bin/logger -s -t 'Apache' -p info -u /var/log/apache2/apache_log.socket" Combined
 ErrorLog "|/usr/bin/logger -s -t 'Apache' -p err -u /var/log/apache2/apache_log.socket"

The “-t ‘Apache’” portion of the above lines will act as the $PROGRAM value defined in the d_pgsql destination above, and may be tailed to suit your preferences. After restarting Apache, your logs should now be sent to the PostgreSQL database along with other system logs.

The problem with this method is that the services must be started in a specific order, syslog-ng first, then Apache. If syslog-ng is restarted for any reason and Apache is not started again afterwards, no Apache logs will be sent to syslog-ng. This is why I prefer the next method:

Method #2: file();

This time, let’s leave Apache alone (no changes to your httpd.conf), and just adjust the syslog-ng configuration. First, a source needs to be made, like before, but employing a different method for gathering the logs. Let’s call it “s_apache” again:

source s_apache {
 file("/var/log/apache2/access_log");
 file("/var/log/apache2/error_log");
 };

Also, a new destination, “d_pgsql_apache”….

destination d_pgsql_apache {
 sql(type(pgsql)
 host("ip.of.you.host") username("logwriter") password(“logwriterpassword") port("5432")
 database("syslog")
 table("logs_${HOST}_${R_YEAR}${R_MONTH}${R_DAY}")
 columns("datetime varchar(16)", "host varchar(32)", "program varchar(20)", "pid
 varchar(10)", "message varchar(800)")
 values("$R_DATE", "$HOST", "Apache", "$PID", "$MSG")
 indexes("datetime", "host", "program", "pid", "message"));
 };

The old destination could be used, however the program name will not be entered correctly. Here, the variable $PROGRAM is replaced with “Apache”, so that we always know what program is producing the log. Finally, we need a new log line:

log { source(s_apache); destination(d_pgsql_apache); };

MySQL and syslog-ng

The same format can be applied for MySQL logs:

source s_mysql {
 file("/var/log/mysql/mysqld.sql");
 };
destination d_pgsql_mysql {
 sql(type(pgsql)
 host("ip.of.you.host") username("logwriter") password(“logwriterpassword") port("5432")
 database("syslog")
 table("logs_${HOST}_${R_YEAR}${R_MONTH}${R_DAY}")
 columns("datetime varchar(16)", "host varchar(32)", "program varchar(20)", "pid
 varchar(10)", "message varchar(800)")
 values("$R_DATE", "$HOST", "MySQL", "$PID", "$MSG")
 indexes("datetime", "host", "program", "pid", "message"));
 };

log { source(s_mysql); destination(d_pgsql_mysql); };

Please notice that again, the $PROGRAM variable has been changed, this time to “MySQL” to make our lives easier.

Viewing Logs

So, obviously we could run a simple select statement for “Apache” or “MySQL”, and it would probably give us way more information than we really want to see. Let’s say though, that we are interested in seeing all database connections from all users, in the event that we suspect an account has been compromised. I’ll use my trusty server “Louis” as an example. A simple query like this would do the trick:

select * from logs_louis_20110824 where program = ‘MySQL’ and message like ‘%Connect%’

That’s quite a bit of activity in such a short amount of time, but a useful query all the same. Now that we can monitor Apache and MySQL logs for all of our servers from a central location using PostgreSQL, let’s take a look at syslog-ng’s other capabilities for remote logging. Take a look at Logging to a Remote Host with Syslog-ng for more information on logging over TCP and UDP.

Relevant posts:

Basic Apache and MySQL Performance Tuning: Part1: Apache

Basic Apache and MySQL Performance Tuning: Part 2: MySQL

101 Tips to MySQL Tuning and Optimization

LAMP Security: 21 Tips for Apache

25 Apache Performance Tuning Tips

Integrate Apache Monitoring into Monitis.com

Share Now:
  • del.icio.us
  • Digg
  • Facebook
  • LinkedIn
  • BlinkList
  • DZone
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • Twitter
  • RSS

PlanetMySQL Voting: Vote UP / Vote DOWN

Installing Apache2 With PHP5 And MySQL Support On Fedora 15 (LAMP)

Август 17th, 2011

Installing Apache2 With PHP5 And MySQL Support On Fedora 15 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a Fedora 15 server with PHP5 support (mod_php) and MySQL support.


PlanetMySQL Voting: Vote UP / Vote DOWN

Installing Apache2 With PHP5 And MySQL Support On CentOS 6.0 (LAMP)

Июль 14th, 2011

Installing Apache2 With PHP5 And MySQL Support On CentOS 6.0 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a CentOS 6.0 server with PHP5 support (mod_php) and MySQL support.


PlanetMySQL Voting: Vote UP / Vote DOWN

451 CAOS Links 2011.07.01

Июль 1st, 2011

A herd of Hadoop announcements. Rockmelt raises $30m. And more.

A herd of Hadoop announcements
# Yahoo! and Benchmark Capital confirmed the formation of Hortonworks, an independent company focused on the development and support of Apache Hadoop.

# Cloudera announced the availability of Cloudera Enterprise 3.5 and the launch of Cloudera SCM Express, based on the new Service and Configuration Manager in Cloudera Enterprise 3.5.

# MapR announced the availability of the M3 and M5 editions of its Distribution for Apache Hadoop.

# Platform Computing announced it has signed the Apache Corporate Contributor License Agreement allowing the company to contribute to the Apache Hadoop project, and launched its Platform MapReduce runtime engine.

# Platfora is another new company hoping to make its mark with Hadoop.

# Karmasphere launched the Karmasphere Studio Community Hadoop Virtual Appliance for developers.

# StackIQ announced the beta release of Rocks+ Big Data, a cluster automation offering for Apache Hadoop.

The best of the rest
# Rockmelt raised $30m in a series B funding round led by Accel Partners, Khosla Ventures and existing investor Andreessen Horowitz.

# BeyondTrust acquired Likewise Software’s Likewise Enterprise and Likewise Open products, re-branding them as PowerBroker Identity Services, Enterprise and Open Edition, leaving Likewise focusing on its open source-based Likewise Storage Services product.

# Basho Technologies named Donald J. Rippert, former chief technology officer of Accenture, as president and chief executive officer and closed the remainder of its previously announced funding round.

# Matt Asay compared VMware and Red Hat’s approaches to open source PaaS.

# Miguel de Icaza provided an update on the formation of Xamarin.

# Jaspersoft CEO Brian Gentile suggested that it is a sin to use open source software without contributing money or time, prompting a predictable response from Pentaho inviting guilt-free use of its offerings.

# EnterpriseDB announced the general availability of Postgres Plus Advanced Server 9.0.

# CASH Music highlighted the problems faced by open source groups filing for federal 501(c)(3) non-profit status.

# Microsoft signed Android-related patent deals with Onkyo and Velocity Micro.

# Talend announced that its announced that MDM Enterprise Edition, open source Master Data Management software can now handle more than 100 million records on a single $1200 server.

# Shadow-Soft signed a deal with SkySQL enabling it to resell SkySQL products, training and services in the U.S.


PlanetMySQL Voting: Vote UP / Vote DOWN

451 CAOS Links 2011.07.01

Июль 1st, 2011

A herd of Hadoop announcements. Rockmelt raises $30m. And more.

A herd of Hadoop announcements
# Yahoo! and Benchmark Capital confirmed the formation of Hortonworks, an independent company focused on the development and support of Apache Hadoop.

# Cloudera announced the availability of Cloudera Enterprise 3.5 and the launch of Cloudera SCM Express, based on the new Service and Configuration Manager in Cloudera Enterprise 3.5.

# MapR announced the availability of the M3 and M5 editions of its Distribution for Apache Hadoop.

# Platform Computing announced it has signed the Apache Corporate Contributor License Agreement allowing the company to contribute to the Apache Hadoop project, and launched its Platform MapReduce runtime engine.

# Platfora is another new company hoping to make its mark with Hadoop.

# Karmasphere launched the Karmasphere Studio Community Hadoop Virtual Appliance for developers.

# StackIQ announced the beta release of Rocks+ Big Data, a cluster automation offering for Apache Hadoop.

The best of the rest
# Rockmelt raised $30m in a series B funding round led by Accel Partners, Khosla Ventures and existing investor Andreessen Horowitz.

# BeyondTrust acquired Likewise Software’s Likewise Enterprise and Likewise Open products, re-branding them as PowerBroker Identity Services, Enterprise and Open Edition, leaving Likewise focusing on its open source-based Likewise Storage Services product.

# Basho Technologies named Donald J. Rippert, former chief technology officer of Accenture, as president and chief executive officer and closed the remainder of its previously announced funding round.

# Matt Asay compared VMware and Red Hat’s approaches to open source PaaS.

# Miguel de Icaza provided an update on the formation of Xamarin.

# Jaspersoft CEO Brian Gentile suggested that it is a sin to use open source software without contributing money or time, prompting a predictable response from Pentaho inviting guilt-free use of its offerings.

# EnterpriseDB announced the general availability of Postgres Plus Advanced Server 9.0.

# CASH Music highlighted the problems faced by open source groups filing for federal 501(c)(3) non-profit status.

# Microsoft signed Android-related patent deals with Onkyo and Velocity Micro.

# Talend announced that its announced that MDM Enterprise Edition, open source Master Data Management software can now handle more than 100 million records on a single $1200 server.

# Shadow-Soft signed a deal with SkySQL enabling it to resell SkySQL products, training and services in the U.S.


PlanetMySQL Voting: Vote UP / Vote DOWN

Installing Apache2 With PHP5 And MySQL Support On CentOS 5.6 (LAMP)

Июнь 14th, 2011

Installing Apache2 With PHP5 And MySQL Support On CentOS 5.6 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a CentOS 5.6 server with PHP5 support (mod_php) and MySQL support.


PlanetMySQL Voting: Vote UP / Vote DOWN

Installing Apache2 With PHP5 And MySQL Support On CentOS 5.6 (LAMP)

Июнь 14th, 2011

Installing Apache2 With PHP5 And MySQL Support On CentOS 5.6 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a CentOS 5.6 server with PHP5 support (mod_php) and MySQL support.


PlanetMySQL Voting: Vote UP / Vote DOWN