How to Change The ‘Postgres’ User Password

Log in as root su postgres psql -d template1 -U postgres alter user postgres with password ‘newpassword’; \q Then as root run ‘passwd postgres’ and reset the password there as well in order to enable the login from command line.

The [pretty much] Complete Guide to Installing ffMPEG and Audio Binaries

I know you’ve provably seen a lot of guides on how to install ffMPEG, but I’ve noticed that most of them are incomplete and don’t cover the possible issues that can arise during installation. I’ve installed ffMPEG on dozens of servers and have devised a standardized procedure on what I feel is the best way… Continue reading The [pretty much] Complete Guide to Installing ffMPEG and Audio Binaries

Disabling Apache Server Signatures

Apache by default puts a “signature” at the end of error pages and directory listings…here is an example of what this looks like: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7a DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.5 Server at missysadmin.com Port 80 Now, some people may not want to broadcast what type of server they are running or what’s on… Continue reading Disabling Apache Server Signatures

APF “Unable to load iptables module” Error

Upon upgrading the Linux Kernel version (usually in CentOS 4.6 – 5) you may get the following error when trying to start APF: Unable to load iptables module (ipt_state), aborting. To fix this, open /etc/apf/internals/functions.apf and locate the following lines: ml ipt_state 1 ml ipt_multiport 1 And replace them with: ml xt_state ml xt_multiport Then… Continue reading APF “Unable to load iptables module” Error

Yum ‘rpmdb’ Error

To our surprise a bad yum release hosed several of our systems.  While the errors varied, the common link between them was the frightful message: rpmdb: PANIC: fatal region error detected; run recovery This problem can usually be corrected by running the following commands: cd /var/lib/rpm rm -f __db* rpm –rebuilddb -vv

CentOS Yum GCC-Dummy Error

The following error has been reported while doing yum updates on CentOS 4.x systems: –> Processing Dependency: glibc-common = 2.3.4-2.25 for package: glibc-dummy-centos-4 –> Finished Dependency Resolution Error: Missing Dependency: glibc-common = 2.3.4-2.25 is needed by package glibc-dummy-centos-4 To fix this error, the the following commands: yum remove glibc-dummy-centos-4 yum install gcc & yum install… Continue reading CentOS Yum GCC-Dummy Error

MySQL Cheat Sheet

SSH repair and optimize all MySQL databases: # /usr/bin/mysqlcheck –repair –all-databases –password=xxxxxx # /usr/bin/mysqlcheck –optimize –all-databases –password=xxxxxx Upgrade/Downgrade to MySQL 4.x: backup database: # cd /root # /usr/bin/mysqldump –create-options –compatible=mysql40 –all-databases –force –user=root –password=xxxx > backup.sql

MySQL Optimization (my.cnf)

# vi /etc/my.cnf #opteron 852 4GB RAM [mysqld] safe-show-database max_connections = 500 key_buffer = 150M myisam_sort_buffer_size = 64M join_buffer_size = 1M read_buffer_size = 1M sort_buffer_size = 1M table_cache = 1024 thread_cache_size = 100 wait_timeout = 300 connect_timeout = 10 max_allowed_packet = 16M max_connect_errors = 10 query_cache_limit = 1M query_cache_size = 32M query_cache_type = 1 skip-innodb… Continue reading MySQL Optimization (my.cnf)