Jan 05 2012

Intellij hotkeys in Mac

Published by under Tech

- ctrl+Q: get method comment
- alt+com+left: go back

No responses yet

Dec 29 2011

Start Apache server on Cygwin 1.7 and Windows 7

Published by under Tech

I installed the full Cygwin 1.7 package on Windows 7. When I try to start Apache server following the linux style by running command
$ /usr/sbin/apachectl2 start
I got “Bad system call” error.

After some web search and trial and error, I finally got it work. Below are the steps that I’ve tried. Not sure whether all are necessary though.

Step 1: right click the Cygwin terminal and select “Run as adminstrator”

Step 2: create correct user and group info. Not sure whether this step is necessary.
$ mkpasswd.exe -l
$ mkgroup.exe -l

Step 3: configure server by running command
$ cygserver-config

Step 4: start cygserver
$ net start cygserver

Step 5: start apache
$ /usr/sbin/apachectl2 start

No responses yet

Dec 28 2011

RPM builder quick steps

Published by under Tech

Step 1, install rpm tools
$ yum install rpmdevtools rpmlint

Step 2, set up working directory
$ rpmdev-setuptree

Step 3, create and edit the spec file
$ cd rpmbuild/SPECS
$ rpmdev-newspec

Miscellaneous commands:

show environment variables
rpm --showrc
show specific variable
rpm --eval %_usr

Useful URLs

  • http://rpmbuildtut.wordpress.com/
  • No responses yet

    Dec 27 2011

    Change Java environment in CentOS

    Published by under Tech

    See this blog

    To install/ register a JVM use the following
    /usr/sbin/alternatives --install "/usr/bin/java" "java" "/usr/java/default/bin/java" 2
    /usr/sbin/alternatives --install "/usr/bin/javac" "javac" "/usr/java/default/bin/javac" 2

    And to configure systemwide changes use
    /usr/sbin/alternatives --configure java
    /usr/sbin/alternatives --configure javac

    No responses yet

    Nov 16 2011

    Removing the ‘referer’ part of PHP Error Messages from Apache Logs

    Published by under Tech

    alias tail_httpd_log=”tail -f /var/log/httpd/error_log | perl -pe ‘s/\[error\]\s+\[client.*?\]\s+//; s/, referer:.*//’”

    See this blog

    No responses yet

    Next »