Google Collide WebIDE für Debian Squeeze

Da meine Collide-Installation auf meinem neuen Server jetzt schon recht stabil läuft, möchte Ich hier die dazugehörigen Konfigurationen bloggen. Collide ist eine kollaborative WebIDE die vor nicht allzu langer Zeit von Google opensourced wurde. Im Gegensatz zu Etherpad Lite, besitzt Collide einen integrierten FileBrowser, Autocompletion, Syntax Higlightning und Echtzeit-IO auf die Projektdateien, die auf dem Server bearbeitet werden. Bei mehr als 3 Teilnehmern kann es aktuell aber noch zu abstürzen des Programmes kommen, das jedoch aber keinen Dateiverlust zur folge hat. Obwohl Debian Squeeze Packete ohne Backport-Repos ziemlich “veraltet” sind, lässt sich Collide trotzdem benutzen:

Installieren der Abhängigkeiten:

aptitude install openjdk-6-jdk openjdk-6-jre an

Download Google Collide from Google Code

cd /usr/local
mkdir collide
wget http://collide.googlecode.com/files/collide-dist-2012-07-07.tar.bz2
tar xvf -C collide collide-dist-2012-07-07.tar.bz2
ln -s collide/collide /usr/bin/collide
echo -e '#!/bin/bash\n/opt/collide/collide \$@' > /usr/bin/collide
chmod a+x /usr/bin/collide

Anlegen der Initscript-Datei:

#!/bin/bash
### BEGIN INIT INFO
# Provides:          collide
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts collide server
# Description:       starts collide server using start-stop-daemon
### END INIT INFO
# configuration
COLLIDE_BIN="/usr/bin/collide"
COLLIDE_OPTS=""
COLLIDE_LOG="/var/log/collide.log"
COLLIDE_PROJECTPATH="/home/tetamuve/projects"
USER="tetamuve"
# commands
CMD_ECHO="/bin/echo"
CMD_GREP="/bin/grep"
CMD_SLEEP="/bin/sleep"
CMD_KILLALL="/usr/bin/killall"
collide_start() {
        $CMD_ECHO "Starting Collide..."
        start-stop-daemon --quiet --start --background --chuid "$USER" --chdir "$COLLIDE_PROJECTPATH" --exec $COLLIDE_BIN >> $COLLIDE_LOG
}
collide_stop() {
        $CMD_ECHO "Stopping Collide..."
        # CAUTIONÂ : maybe you kill something important in your server
        $CMD_KILLALL java
}
case $1 in
        start)
                collide_start
                ;;
        stop)
                collide_stop
                ;;
        restart)
                collide_stop
                $CMD_SLEEP 5
                collide_start
                ;;
        *)
                $CMD_ECHO "Use: $0 {start|stop|restart}"
                exit 1
                ;;
esac
exit 0

Collide automatisch beim Hochfahren des Servers starten:

chmod +x /etc/init.d/collide
update-rc.d collide defaults 95

Nginx Konfiguration für z.B. collide.example.com:

server {
        server_name collide.example.com;

        access_log /var/log/nginx/collide.example.com.access.log;
        error_log  /var/log/nginx/collide.example.com.error.log info;

        location / {
                auth_basic            "Restricted";
                auth_basic_user_file  security/etherpad_htpasswd;
                proxy_pass         http://127.0.0.1:8080/;
                proxy_redirect     off;

                proxy_set_header   Host             $host;
                proxy_set_header   X-Real-IP        $remote_addr;
                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                proxy_buffering off;
        }

}

Das ganze noch starten :)

/etc/init.d/collide start
ln -s /etc/nginx/sites-available/collide.example.com /etc/nginx/sites-enabled/
/etc/init.d/nginx restart

Et voilà: 

Achja, ein ziemlich schickes Buildscript hab Ich auch noch im ArchLinux User Repository (AUR) hochgeladen: http://aur.archlinux.org/packages.php?ID=60577

Enjoy!

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

* Checkbox GDPR is required

*

I agree

Software
Hacking replay gain audio normalization into Jellyfin

There is already a feature request for audio normalization in Jellyfin media server. This is important if you want to listen to your music collection while always having the same loudness level. Usually, in different recordings or music genres some tracks are louder and others are more quiet. The standard …

Software
Importing playlists to Jellyfin media server

In the following post I would like to describe a way to import music playlists to Jellyfin media server, for example in case you want to migrate them from a former Plex or Emby installation. Usually, Jellyfin is already able to detect playlist files within the media library. Unfortunately my …

Software
Jellyfin media server on Archlinux ARM

In this post, I want to share some insights on building Jellyfin media server for Archlinux ARM. The PKGBUILD for Jellyfin one can find on the AUR, is specifically made for 64 bit architectures. Nevertheless Microsoft released the dotnet runtime, which Jellyfin relies on instead of Mono, also for Linux …