1. Synology and php's exec() →

  2. Synology DS413 Bootstrap

    Add the following repository to the Package Center and install the Bootstrap Installer from it:

    http://packages.quadrat4.de/

    Once it’s done reboot the DS413 and you should be able to use ipkg now:

    $ipkg update

    $ipkg install bash

  3. Lion and FileMerge

    Ran into another issue because of my recent upgrade to Lion. I use Coda for dev work and have grown used to the built-in source control. One of the features in Coda is a compare files function which uses the FileMerge.app to display the differences.

    Knowing that FileMerge is part of the developer tools I proceeded to download the Xcode application from the Mac App Store. To my dismay FileMerge still did not want to compare the files.

    After some digging I found Coda uses the `opendiff` command to launch FileMerge. Running the command manually brings up the following error message:

    xcode-select: Error: No Xcode folder is set. Run xcode-select -switch <xcode_folder_path> to set the path to the Xcode folder.

    So it seems like `opendiff` doesn’t know where your Xcode.app is by default. To fix it, run the following command:

    sudo xcode-select -switch /Applications/Xcode.app

    The compare files feature in Coda now works as expected.

  4. Lion Terminal.app and the Meta key

    When setting up a new OS X install, one of the settings I always set in the Terminal.app is the `Use option as meta key` option. This allows you to use the Option key instead of Esc as the meta modifier.

    One of my Terminal uses is running IRSSI inside a screen session. To switch between windows in irssi I always use `option + left/right arrow` however in Lion this does not seem to work by default.

    After some googling I didn’t find anything that offered a solution so I dug through the Terminal.app preferences and noticed some additional presets in the Keyboard tab that aren’t there is previous versions of OS X.

    To fix it, in Terminal.app go to

    Preferences -> Settings -> Keyboard

    Locate the two settings

    `option cursor left` and `option cursor right`

    as named in the Key column and delete them by selecting one and click the - (Minus) button at the bottom of the window.

  5. Install Sphinx on CentOS

    Download the latest beta release from the Downloads page.

    wget http://sphinxsearch.com/files/sphinx-2.0.2-1.el5.x86_64.rpm

    Install from the RPM (if updating use ‘rpm -Uvh’ instead):

    rpm -ivh sphinx-2.0.2-1.el5.x86_64.rpm

    Enable auto-lauching of the search daemon on boot:

    chkconfig --level 345 searchd on

    Start the search daemon:

    /etc/init.d/searchd start

  6. Apache Performance Tuning →

  7. Switch to php-mysqlnd

    Background on the issue available here and here. In the end the fix is to use mysqlnd:

    yum --enablerepo=remi remove php-mysql
    
    yum --enablerepo=remi install php-mysqlnd phpMyAdmin
    
    yum --enablerepo=remi install Percona-Server-shared-compat perl-DBD-MySQL

  8. Workaround for installing phpMyAdmin on CentOS

    Having mysql/php/apache already setup I decided to install phpMyAdmin, however because the mysql is Percona there were some dependency checks that failed.

    After a lot of trial and error the following did the trick:

    #stop the services
    /etc/init.d/httpd stop
    /etc/init.d/mysql stop
    
    #remove mysql
    yum --enablerepo=remi remove Percona* mysql*
    
    #install everything in one shot
    yum --enablerepo=remi install Percona-Server-server-55 Percona-Server-client-55 phpMyAdmin
    
    #start the services
    /etc/init.d/httpd start
    /etc/init.d/mysql start
    
    #rerun the secure installation script
    /usr/bin/mysql_secure_installation

    Once that has finished you’ll need to edit the apache config to allow you remote access to the phpMyAdmin site:

    nano /etc/httpd/conf.d/phpMyAdmin.conf
    
    #add allow from your ip address
    allow from 123.456.789.101

    You should now be able to access it at http://example.com/phpMyAdmin/

  9. Change I/O Scheduler on CentOS

    To change the default scheduler from cfq to deadline simply edit /etc/grub.conf and add elevator=deadline to the kernel that is being used:

    $ nano -w /etc/grub.conf
    
    title CentOS (2.6.18-274.3.1.el5)
            root (hd0,0)
            kernel /vmlinuz-2.6.18-274.3.1.el5 ro root=LABEL=/ elevator=deadline
            initrd /initrd-2.6.18-274.3.1.el5.img

    This entry tells the 2.6.18-274.3.1.el5 kernel to use the Deadline scheduler. Make sure to reboot the system to activate the new scheduler.

  10. Secure /tmp on CentOS →