Manage server restarts by (administrator) user through web interface

The (privileged/administrator) user without particular system administration knowledge and specific direct access rights to the server should be able to manage server restarts through web interface. The operating system of the server is Debian, the HTTP web server is Apache Tomcat, and the user access Java application. It should be possible that the respective user knows the next scheduled restart time, postpones or re-schedules the restart times. On the one side, it is required to allow fine-grained configuration of the exact restart times: on which dates of the month, on which days of the week, at which hour/minute, etc. On the other side, the feature should be as simple as possible: to be able to learn and to understand it within at most of ca. half an hour.

Web server process running in the background needs to be closed

When working with web servers (such as Tomcat, Apache, etc.) their processes are usually started in the background and cannot be easily closed by Ctrl+C or the Close-Button in GUIs. This goes for both the development process on a developer's workstation, as well as directly on the server in test or production. In Windows based systems those processes can be easily found in the process manager that can be accessed via the GUI. In Unix based systems (Linux, MacOSX) such a GUI doesn't always exist (especially on the server) or is sometimes hard to find. We need a console based solution to ... <ul> <li>Find the right web server process that is running in the background</li> <li>Terminate it via the console</li> </ul>

Add information about folder depth

  1. Add an additional element to all files which are located in subdirectories.
  2. It must be added after the root element. (As an XML file must have only one root element)

    This can be automated with a bash script like the following:

    echo "fixing index.html's"
    HTMLS=$(find photos -type f \( -iname "index.html" -not -iwholename "*svn*" \) )
    for H in $HTMLS
    sed ' /^<head>/ i\ <pathtoroot>../../</pathtoroot> ' "$OUTDIR/$H" > "$OUTDIR/$H"_tmp
    mv "$OUTDIR/$H"_tmp "$OUTDIR/$H"

    echo "fixing IMG_.. html's"
    HTMLS=$(find photos -type f \( -iname "IMG_*.html" -not -iwholename "*svn*" \) )
    for H in $HTMLS
    sed ' /^<head>/ i\ <pathtoroot>../../../</pathtoroot> ' "$OUTDIR/$H" > "$OUTDIR/$H"_tmp
    mv "$OUTDIR/$H"_tmp "$OUTDIR/$H"

  3. in the template create a variable with the value of this element: <xsl:variable name="relPath"><xsl:value-of select="/html/pathtoroot"></xsl:value-of> </xsl:variable>
  4. use Attribute Value Templates to append this path to every relative reference. e.g.:
    <a href="index.html">Home</a> -> <a href="{$relPath}index.html">Home</a>
  5. Add an empty template that matches /html/pathtoroot/, to prevent these paths are printed to the output. (the default rule is "copy text")


easy to use backup tool for linux

Create an incremental backup of a debian-linux server with an easy to use tool. The backup-server is reachable via ftp and sftp. The backup should be encrypted and compressed to be space and bandwidth efficient. There should be an easy way to either restore parts of the backup or the full system after a failure.

Correctly configuring a Jetty Java Servlet container to be used through an Apache Web server via mod_jk

When deploying a JVM-based Web app usually so-called Java Servlet containers resp. application servers are used for the produciton system/environment. Probably the most popular and common Java server in this field is Apache Tomcat (and other even more feature-rich ones like JBoss or GlassFish). Apart from that, there's also Jetty which can be seen as a somewhat lightweight alternative. Nevertheless, there are some subtle differences to be taken into consideration when configuring it as opposed to Tomcat. The usual way to setup such a production system for a Java Web app is to use the Servlet container to serve the Web app and put so to speak in front of it an Apache Web server which handles the requests, hands them over to the container instance (e.g., Jetty or Tomcat) and receives its responses then (to say it in an a bit simplified way). Usually this is done via Apache's mod_jk module which enables communication between app server and Web server through the AJP13 protocol. What should be described and explained now is how to setup such a Java Web app production system ready for deployment in detail (mainly from a configuration perspective). The main focus shall be put at differences which are to be taken into account here between Jetty and Apache Tomcat.

Using Git DVCS (distributed version control system) and GitHub to effectively collaborate on an open-source software project

While collaboratively working together on an open-source project (which aims to provide a fresh web app framework in this concrete case) and moves at a fast pace it conseqeuntly turned out that using the standard approach of centralized VCS for it soon hit its limits. Therefore, we jointly decided in the community to switch to a decentralized one, namely Git. This DVCS was originally developed by Linus Torvalds for managing the development of the Linux kernel. Its main concept basically is that everybody has his/her own complete "clone" of the code repository. So there isn't a single centralized code repository as in the structure/architecture of Subversion, but a number of decentralized ones. As a consequence Git was also developed to have very powerful and convenient capabilities of merging branches of code repository clones. This feature which is also one of Git's biggest strengths shall be described and explained in more detail. Git's basic usage is mainly command line based and can especially in the beginning pose quite a steep learning curve on new users. So it should be given a short introduction to Git's main concepts and concrete usages as well. Another very nice companion to Git is the Git code repositories hosting site/service GitHub (github.com) which can make using Git simpler and furthermore improve collaborative development processes and tasks of a programming/development project. This shall also be presented and explained.
Subscribe to unix