When building RPM’s it is possible to use post and pre install/uninstall hooks. These get sometimes some parameters to determine if you are upgrading or uninstalling. This could be handy when creating users while installing. So it is crucial to know these and I always forget them
|
install |
upgrade |
uninstall |
| %pretrans |
$1 == 0 |
$1 == 0 |
(N/A) |
| %pre |
$1 == 1 |
$1 == 2 |
(N/A) |
| %post |
$1 == 1 |
$1 == 2 |
(N/A) |
| %preun |
(N/A) |
$1 == 1 |
$1 == 0 |
| %postun |
(N/A) |
$1 == 1 |
$1 == 0 |
| %posttrans |
$1 == 0 |
$1 == 0 |
(N/A) |
I am falling more and more in love with syslog-ng. After some trial and error I’ve finally configured to parse messages and send them to zabbix for statistics logging. Sounds cool uh? Well it is.
Of course the posibilities are endless when you think about it. For me it is just sake to get performance messages from our application into zabbix to get triggered about problems.
Read further to found out how I did it
Read more…
Just because I always forget:
<VirtualHost 192.168.1.34:7000>
<Location />
DAV svn
SVNPath /data/svn
SVNReposName "Subversion"
AuthName "Authenticate for Subversion"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPUrl ldap://192.168.1.33/dc=kerneldump,dc=org?uid
Require ldap-group cn=svnusers,ou=Group,dc=kerneldump,dc=org
AuthLDAPGroupAttribute memberUid
AuthLDAPGroupAttributeIsDN off
Order deny,allow
Allow from all
CustomLog /var/log/httpd/svn_access_log combined
ErrorLog /var/log/httpd/svn_error_log
</Location>
</VirtualHost>
Put this in an configuration file like mysvn.conf and include it in your httpd.conf file. This creates an virtualhost on port 7000 with immediately in the root the subversion repository. Of course you need to configure your LDAP configuration. Or need to use basic authentication.
For security purposes not every LDAP user is allowed, you need to be member of the svnusers group.
UPDATE Read more…
Just a quick note about Syslog-NG with an mysql backend.
# UDP Syslog Port Listener
source s_udp {
udp(
ip('192.168.0.1')
port(514)
);
};
# MySQL Destination
destination d_mysql {
sql(
type(mysql)
host("server") username("syslog") password("syslog")
database("syslog")
table("logs")
table("messages_${R_YEAR}${R_MONTH}${R_DAY}")
columns("datetime", "host", "program", "pid", "message", "facility", "priority")
values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSGONLY", "$FACILITY", "$LEVEL")
indexes("datetime", "host", "program", "pid", "message", "facility", "priority")
);
};
# Log the source to the destination, pretty straightforward
log {
source(s_udp);
destination(d_mysql);
};
As you can see it is a pretty easy configuration which turned out working great without any crappy connections like fifo’s. Besides that it creates a new table per day (it will create tables automatically), and thanks to the table per day tables stay fast enough for some more advanced features.
Off course this will work with every distribution (ubuntu, centos, redhat, suse, archlinux) where you can install the binaries of syslog-ng which include the necessary MySQL libraries as you can see in the comments below
Just a quick note cause I’m able to constantly forget. When you see the following message when starting system-config-cluster:
No fonts found; this probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org
Install the following package:
dejavu-lgc-fonts
So, I’ve got a new domain. Linux-Wiki.NL. Simple goal is to improve and remember my linux skills over time. Mostly you perform an action and 6 months later when you need to do it again you forgot it. To prevent this I started stumbling around with words linux and wiki in domain names. Surprisingly a .nl domain was free. So I registered it and installed a simple MediaWiki instance, Anonymous edits are not allowed so you are required to create an account. Feel free to contribute with your documents and articles and maybe it will become an nice starting guide for Linux users (beginners and experts).
Where you can find all of this: http://linux-wiki.nl. Please collaborate of course
A nice logo is still under investigation. I do need to push someone with gimp skills or kick myself around for getting a nice small logo.
When compiling PHP on a 64 bit system don’t forget to add “–with-libdir=/lib64″ to the configure statement. A typical configure statement would be:
./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql –with-libdir=/lib64
If you forget “–with-libdir”, make will fail in the mysql section with the error:
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
Source: http://www.blackbeagle.com/2006/10/06/compiling-php-on-a-64-bit-system/
Lately I’m stunned by the attention (X/K)Ubuntu receives. And more and more I’m convinced people really like it. But still. Ubuntu is no ordinary Linux version. It is made for “Human beings”. I admit. I gave it a few tries, even more than a few. I ran it on several machines. But it never succeeded in my eyes as a server distribution.
The problem at this moment in my eyes is that people refer to Ubuntu if you talk about Linux. Despite that they forget that there are far more other beautiful options for the GNU Linux kernel. Ubuntu is a distribution based on the Linux kernel which means it is Linux. Still it is no Linux because it is far more.
With Ubuntu you receive:
- A slick GUI
- A proper hardware detection kit
- A nice office suite
- And enough tools for every administrator/user/beginner
What sickens me is that on sites like Digg (http://www.digg.com/linux_unix) 90% of the articles which get digged are about Ubuntu. I don’t think that is fair. I started to read around and came across some interesting articles. How did Ubuntu became so popular. And I think it is because their proper marketing tricks (free CD’s!). Their “it-is-finished” look (oh well, you come across some bugs sometimes but I like the wobbly ‘windows’). But in my eyes it is friendly; it is indeed for human beings. You put in the DVD. Startup the Live environment and you just click “Install”.
Because of this don’t expect it you can work on it like Windows. Or even not like OS X. If you try to something irregular you are immediately on your own in the nice Terminal (you can even make it transparent). The Wiki (http://wiki.ubuntu.com) is a mess. Not really technical like the Gentoo version. Google is helpful. But never expect it to be friendly.
In my eyes Ubuntu is here to stay. But people should refer to it as a distribution. Not as the OS of the Future.
I would like to close with the following:
Ubuntu is a linux distribution and for this it is Linux. But Ubuntu is not linux.
Currently working for a company we decided to implement Fedora Directory Services as Unix Identity Storage. A nice LDAP server system with a nice interface. Not really useful in the beginnings, probably due to the lack of my own knowledge but it supports nice fail over and replication methods. Multi-master replication was easy to setup. Currently I only have problems with the directory admin server and SSL. It seems when I install the certificates the server is not longer responding. We need the SSL option to comply to the SOX standard.
Who has some experience with this?
Wieers wrote a nice article about putty settings which you really should put as default. Darkblue is better readable and some other stuff is also configured. I really would like this to be the default putty settings in the future.
Article: Improving Putty Setttings on Windows