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
Virtual 3D online exhibition with MapBox GL JS

For my last semester in university (summer semester 2018) at the KIT, I was part of a project to create an “online art exhibition”. We planned to produce different media formats in smaller groups. One for video, another for text and promotion and one for the online presence. I’ve figured …

Software
Host your own Mapbox GL JS vector tiles map

I’ve done some research recently on how I could host my own online map viewer with a MapBox GL JS instance, an excellent and modern open-source alternative for Google Maps. The server should also serve own preprocessed map data from OpenStreetmap planet extracts. No external or third-party service will be …

Software
1
Easily setup Signal 2FA on Nextcloud 14

Two-factor authentication (short 2FA) is an important security concept to secure unauthorized access to your web applications. Popular online services like Google Mail, Instagram or Facebook already provide this mechanism to secure user accounts with an additional one-time token. Considering someone is able to obtain your username and password combination, …