A Technical Blog

  • Delete mailman archieves

    If required take backup of the archives $ cp -a /var/lib/mailman/archives/private/<listname>/* <backup_directory> Remove the archives $ rm -rf <listname>/* Once it is removed recreate the html archive files $ mailman/bin/arch <listname> ./arun

  • Detected bug in an extension! Hook FCKeditor_MediaWiki

    Detected bug in an extension! Hook FCKeditor_MediaWiki::onCustomEditor failed to return a value; should return true to continue hook processing or false to abort. Backtrace: #0 mediawiki/includes/Wiki.php(497): wfRunHooks(‘CustomEditor’, Array) #1 mediawiki/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest)) #2 mediawiki/index.php(114): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest)) #3 {main} Edit the following file to fix this issue: “FCKeditor/FCKeditor.body.php”  — public…

  • svn: Can’t convert string from ‘UTF-8’ to native encoding:

    “svn: Can’t convert string from ‘UTF-8’ to native encoding:” This usually happens with special characters in the file name, which the client cannot understand. Just set proper locale in the client to fix this issues, $ export LC_CTYPE=en_US.UTF-8 // make sure the locale is properly set. $ locale LC_CTYPE=en_US.UTF-8 ./arun

  • Fix categories and tags in wordpress custom post_type

    By default word press does not look in to custom post_types for categories and tags, even though the category names are visible you get a NOT FOUND page when you click on the category. A work around found for this issue is : Edit : functions.php add_filter(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { if(is_category() || is_tag()) {…

  • Replace broken hard drive in software RAID1

    This scenario assumes that you have two hard disk with RAID1 setup and one of them is broken (say sdb). To check the status of RAID: $ cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md2 : active raid1 sda3[1] 730202368 blocks [2/1] [U_] md1 : active raid1 sda2[1] 264960 blocks [2/1] [U_]…

  • Enable IPv6 on Direct Admin

    It was rather easy to get IPv6 working with DA if you have the IPv6 subnet allocated for your server. Make sure that you have IPv6 enabled on your DA. # grep ipv6 /usr/local/directadmin/conf/directadmin.conf ipv6=1 Add the IPv6 Addresses to your direct admin, through IP Management (This will add IPv6 address to the interface). Enter…

  • Extending LVM disk space

    Add the new disk drive to the system, you need to reboot the machine and configure the hardware RAID if required. Add the new disk to Volume group For e.g.: if the disk is HP with Smart array # pvcreate /dev/cciss/c0d1 # vgextend <volume_group_name> /dev/cciss/c0d1 Extend the Logical volume: # lvextend -L<+mention_the_size> /dev/<volume_group>/<logical_volume> eg: #…

  • Install and configure rsnapshot for central backup (without root privilege)

    Download and install RsnapShot Download the latest package from: http://rsnapshot.org/downloads.html # wget http://rsnapshot.org/downloads/rsnapshot-1.3.1-1.noarch.rpm # rpm -Uvh rsnapshot-1.3.1-1.noarch.rpm Configure public key authentication – Enable public key authentication with remote hosts with normal user privilege local# ssh-keygen -t rsa local# scp id_rsa.pub ssh-remote-server:id_rsa.pub remote# useradd -c “Backup user” -d /data/home/backup/ backup remote# su – backup remote# vi…

  • Upgrading php to 5.2 or 5.3 in Redhat EL 5

    Unfortunately RHEL 5 does not have php.5.2 package, which is required by most of the applications including latest wordpress and drupal. First thought of compiling php from source, but hard to keep it uptodate. So decided to make the life easier with EPEL/IUS repositories. Remove all existing php related packages: # rpm -e php php-mysql…

  • svn over ssh tunnel

                      It is very often required that you need to commit/update to the svn repository which is only indirectly accessible through a gateway (user can ssh to gateway and gateway can ssh to internal svn server) Suppose you have a working copy (locally on your machine)  setup…

  • Install directadmin on Debian 6

    Install the basic debian server without any server components Install the dependency packages: # sudo apt-get install gcc g++ make flex bison openssl libssl-dev perl perl-base perl-modules libperl-dev libaio1 libaio-dev bind9 Purchase and register the server ip at directadmin.com Once the license is activated, login to the server: $ wget http://www.directadmin.com/setup.sh $ chmod 755 setup.sh…

  • Racktable, Apache+LDAP authentication

    Login to the Rack tables as admin: Add the following line under configuration–> permission allow {$tab_default} * This is for read only account, assign extra permissions if required Configure Apache + LDAP < Directory /var/www/racktables > Options +Indexes FollowSymLinks MultiViews DirectoryIndex index.php AuthName “Rack Tables” AuthType Basic AuthBasicProvider ldap AuthzLDAPAuthoritative on AuthLDAPURL “ldaps://ldaphost.com/dc=company,dc=com?uid?sub?(objectClass=< depends_on_ldap >)”…

  • Rsnapshot Lchown

    # rsnapshot du localhost require Lchown Lchown module not found Install the Lchown module: # wget http://www.rsnapshot.org/downloads/extras/Lchown-1.00.tar.gz # tar xvzf Lchown-1.00.tar.gz # cd Lchown-1.00 # perl Makefile.PL Checking if your kit is complete… Looks good # make install # rsnapshot du localhost require Lchown Lchown module loaded successfully You can also try installing the module…

  • My Favourite MAC OS X applications

    Text Editor vi Text Edit Smultron: http://www.peterborgapps.com/smultron/ Komodo Edit: http://www.activestate.com/komodo-edit Voice/Video Calls Skype : http://skype.com Google talk (browser plugin): : http://www.google.com/chat/video G+ hangout Web Browser Firefox: http://www.mozilla.com/en-US/firefox/fx/ Chrome: http://www.google.com/chrome Twitter Client A Plus: http://www.aplus-app.com/ IM Adium: http://adium.im/ Office Documents Libre office: http://www.libreoffice.org/ Video Player VLC: http://www.videolan.org/vlc/ Miro: http://www.getmiro.com/ ( an excellent stream and bit torrent…

  • Install Cpanel on FreeBSD 8.2

    – Install FreeBSD with proper network and file system configuration (Ref:  http://docs.cpanel.net/twiki/bin/view/AllDocumentation/InstallationGuide/Quick-StartInstallationGuide) – Install dependency packages: # pkg_add -r wget # pkg_add -r perl # pkg_add -r rsync (required later for ports sync) # pkg_add -r gmake To Fix: creating glibconfig.h config.status: executing default commands gmake: not found child exited with value 127 Died at…

Got any book recommendations?