Posts Categorized: red hat centos

Installing Munin 2.x on Centos 6

Ensure you have the epel repository installed then: yum install –disablerepo=rpmforge munin-node.noarch munin.noarch The configuration file for Apache is located at: vi /etc/httpd/conf.d/munin.conf Create the username/password file referred to in the above file: htpasswd -cm /etc/munin/munin-htpasswd muninadmin New password: Re-type new password: Restart the munin-node service and ensure it starts on boot: /etc/init.d/munin-node start chkconfig… Read more »

Pxeboot CentOS Environment

Organised Chaos

While re-purposing a few old Google Search Appliances I set up a Network Boot Enviornment as follows: Install Dependencies yum install tftp-server tftp syslinux httpd dhcp Configure tftp mkdir /tftpboot vi /etc/xinetd.d/tftp service tftp { socket_type             = dgram protocol                = udp wait                    = yes user                    = root server                  = /usr/sbin/in.tftpd server_args             = -s -v /tftpboot… Read more »

Compiling Dansguardian with Increased MaxChildren

squid

I have three main proxy servers running Squid, Squidguard and DansGuardian servicing over 1300 desktop computers. The stock DansGuardian code includes a setting to limit the number of potential DansGuardian child processes to the operating system file descriptor limits. I have managed to increase this to 900 but would like to push it further. The setting… Read more »

Radius with LDAP Authentication

The notes here are a quick howto for using LDAP authentication against Active Directory. It is possible to use Samba/Winbind/Kerberos authentication within Radius too and I may post those notes when I get a chance but for now this is how I implemented it with LDAP. Install required software on CentOS/Red Hat: yum install freeradius… Read more »

proftpd Unable to open config file: /etc/security/pam_env.conf

Although it wasn’t causing any problems I wanted to stop proftpd logging these lines: Aug 15 09:51:00 servername proftpd: pam_unix(proftpd:session): session opened for user joebloggs by (uid=0) Aug 15 09:51:01 servername proftpd: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory Aug 15 09:51:01 servername proftpd: pam_succeed_if(proftpd:session): error retrieving information about user 0 Aug… Read more »

Minecraft Server on CentOS 6

I downloaded the minecraft server package and extracted it to /opt/minecraft I installed screen and Java (OpenJDK) using yum as follows: yum install java-1.7.0-openjdk screen The SysV init startup scripts provided on the Wiki didn’t work for me so I cobbled the following together which works for me. Anyone else wishing to use this should… Read more »

IPTables Custom Chain for SSH access

I wanted a custom IPTables firewall chain to allow SSH access to a machine. The idea is that users hit a web page that adds their dynamic IP address to a list and then a script inserts that IP address into IPTables to allow SSH access. I achieved this as follows. In /etc/sysconfig/iptables I added: *filter… Read more »

ProFTPd CentOS 6: PAM unable to dlopen /lib64/security/pam_stack.so

Installed ProFTPd on CentOS 6 and found that users could not log in. The proftpd logs showed: USER jonny (Login failed): Incorrect password. The /var/log/secure log showed: proftpd: PAM unable to dlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot open shared object file: No such file or directory The solution is to replace the /etc/pam.d/proftpd file with the following (as… Read more »

BIND on CentOS 5

The version of Bind in the normal Red Hat / CentOS repositories is a little out of date. To get more up-to-date versions (9.7.4 at the time of writing) use the Centalt and EPEL repositories. Create the following file: vi /etc/yum.repos.d/centalt.repo And add the following to it: [CentALT] name=CentALT Packages for Enterprise Linux 5 –… Read more »

Apache GeoIP Country Detection

Creating customised content based on the origin country of your website visitors requires installing the mod_geoip module for Apache and also the MaxMind GeoIP database as follows (on CentOS): mkdir ~/geoip cd  ~/geoip wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz tar xzf GeoIP* cd GeoIP* ./configure make make check make install cd .. wget http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.5.tar.gz tar xzf mod_geoip2_1.2.5.tar.gz cd mod_geoip2_1.2.5… Read more »