Archive for September, 2008

Added servers to Nagios

Tuesday, September 23rd, 2008

Added some new fresh servers to nagios: cd /usr/local/share/nagios/etc/servers Add host-file to that directory. In host-file add services: http Edit following files (add new hosts): /usr/local/share/nagios/etc/hostgroups.cfg (add server to hostgroup / VMWare group / ) /usr/local/share/nagios/etc/hostextinfo.cfg /etc/n2rrd/templates/maps/service_name_maps Installed snmp and nrpe on servers to check additional services: yum install net-snmp.x86_64 service snmpd start chkconfig --level 2345 snmpd on yum install nagios-nrpe service nrpe ...

Installed SSL certificate

Tuesday, September 16th, 2008

Applied for and installed SSL certificate on CentOS Moodle server: 1. check if Apache runs mod_ssl and setup httpd.conf to listen to port 443 yum install mod_ssl edit ssl.conf, add "NameVirtualHost *:443" to allow for name based virtual hosts. edit the DocumentRoot in the VirtualHost section 2. Create CSR (Certificate Signing Request): Generate A Private Key openssl ...

mysqloptimize

Monday, September 15th, 2008

Mysql provides client apps with most distributions. On CentOS these are bundles in the mysql rpm. On some distros there are wrappers around the mysqlcheck program like mysqloptimize, mysqlanalyze, mysqlrepair. In CentOS these should be called with mysqlcheck with options like -a, -o or -r.

Setting up Moodle Reporting

Thursday, September 4th, 2008

Setting a reporting concept for client. Things to report: Global: Date Week Site name Site contact 1/2 Version Last update enrolled users # active users # courses # groups Course: this weeks most popular course (by unique ip) this weeks most popular course (by activity) I create an aggregate dashboard kind of report which is clickable which allows each item to link to the history ...

Server problems client

Tuesday, September 2nd, 2008

Got some problems with a client's mysql database. Some processes were 'blocking' the rest. No heavy server load or anything. So after checking and optimizing a few key Moodle tables performance was back on track: CHECK TABLE mdl_user / mdl_course_sections / mdl_log OPTIMIZE TABLE mdl_user / mdl_course_sections / mdl_log Seems logical as with ...

Postgres Apache issue

Tuesday, September 2nd, 2008

Got a strange issue after installing a new Moodle on our shared server: I suspected this was due to some MaxClients (Apache) or max_connection (postgres) setting and after a bit of googling I found out that that was the case: This is a common problem when there are more apache processes than ...

PHP OO

Tuesday, September 2nd, 2008

INHERITANCE APPROACH - Advantage - easy to inherit an implementation - Disadvantage - may be difficult to adapt to changing roles INTERFACE APPROACH - Advantages - can be clearer what methods must be implemented. - A class in another inheritance hierarchy can provide the services of an interface. - Disadvantage - may end up with lots of helper classes. Things to ...