Enable the rhel-x86_64-server-supplementary-6 RHN channel. This is where the java-1.6.0-sun packages reside, which work much better than openjdk.
rhn-channel -a -c rhel-x86_64-server-supplementary-6 -u $RHN_USERNAME -p $RHN_PASSWORD
Install java and tomcat, then make sure tomcat starts on boot
yum install java-1.6.0-sun tomcat6 chkconfig tomcat6 on
configure: error: C compiler cannot create executables See `config.log' for more details.
What?!? Isn't that the entire purpose of a compiler?!?
As of Java 1.5, there is native SNMP support built in to the JVM. To enable it, there are three Java flags that need to be set. For Tomcat, these should go in the CATALINA_OPTS variable.
Assuming you are not running your JVM as root (you're not, right? RIGHT?!?), snmp-port must be higher than 1024 on a Unix-based system. 9161, for example.
Upgrading from MySQL 5.1
Backup Current Data
Create a backup of your database
mysqldump --opt --all-databases | gzip > ~/mysqldump.sql.gz
Make a separate backup of the `mysql` database, which will come in handy if any recovery operations are required.
mysqldump --opt --databases mysql | gzip > ~/mysql.sql.gz
Also, make a copy of the MySQL configuration files
tar -C /etc -czf /etc/mysql.tar.gz mysql
Remove MySQL 5.1
Now that there are sufficient backups, MySQL 5.1 can be uninstalled.
MySQL Partitions are a great way to rotate data in a table without incurring the overhead of running multiple delete statements. The most common use of this is to partition data by date. You must use MySQL 5.1 (or newer, I presume), and it is recommended to use MySQL 5.1.16 or later in order to take advantage of the ALTER TABLE features that allow adding partitions on existing tables.
It is possible to backup and restore POSIX ACL's using the standard getfacl and setfacl tools.
To backup the ACL's use getfacl
getfacl -R /some/path > backup.acl
Then, to restore the ACL's, use setfacl
This works great to copy ACL's from one server to another.
Prerequisites and Assumptions
- Debian Lenny stable (not backports) packages are used in this document
For a long time I have kept a personal site full of tidbits and snipits of things I had discovered or developed. This was for my own benefit, so that I could keep track of my own thoughts and could access the information from anywhere. Recently, I have decided to try to formalize things a little more in hopes of making this information more useful to other people.
This is an incredibly useful method of analyzing the queries that your MySQL server is processing without having to change the log level, and subsequently, not having to restart the MySQL server.
First, capture the MySQL queries with tcpdump as they come across the wire
tcpdump port 3306 -s 65535 -x -n -q -tttt > tcpdump.out
When you're done capturing the desired traffic, run mk-query-digest from Maatkit to analyze the tcpdump
mk-query-digest --type=tcpdump tcpdump.out | less
If your MySQL data lives on an LVM volume, using an LVM snapshot is a great low-impact method of getting a point-in-time backup of your entire database. The only real gotcha is that snapshot must be made while the data files are in a "safe" state (meaning that all of the data has been written to file, and not only present in memory). Here are the basic steps needed to get a backups