https://wiki.mumble.info/api.php?action=feedcontributions&user=XenonR&feedformat=atomMumble Wiki - User contributions [en]2024-03-28T13:44:50ZUser contributionsMediaWiki 1.31.0https://wiki.mumble.info/index.php?title=Ice/Deutsch&diff=3554Ice/Deutsch2009-10-09T12:25:22Z<p>XenonR: translation complete</p>
<hr />
<div>Mumur unterstützt Remote scripting mit [http://www.zeroc.com/ ZeroC ICE], einem RPC Mechanismus.<br />
<br />
Es gibt C++, Java, .NET, Python, PHP and Ruby Unterstützungen für alle Platformen (Win32, Linux and OSX).<br />
<br />
Ice kann auch über ein Netzwerk betrieben werden, somit kann eine Webapplikation mit dem laufenden Murmur Prozess komunizieren.<br />
<br />
= debian Webserver und Murmur für ZeroC-Ice konfigurieren=<br />
<br />
Dies sind Beispiele nutze sie auf eigene Gefahr!<br />
<br />
'''Dieser Leitfaden ist für debian 5.0 (lenny)'''<br />
<br />
Ich gehe davon aus das du bereits einen funktionierenden apache2 mit PHP Unterstützung hast.<br />
<br />
'''Voraussetzungen'''<br />
<br />
Als erstes installieren wir einige benötigte Packete, dies machen wir in einem root-shell.<br />
<br />
apt-get update<br />
<br />
apt-get install mumble-server icecpp libzeroc-ice32 php-zeroc-ice lzma<br />
<br />
Diese sind namentlich der Mumble-Server selbst (mumble-server), ZeroC Ice selbst (icecpp), die ZeroC-Ice C++ Laufzeitbibliothek (libzeroc-ice32), das IcePHP Modul (php-zeroc-ice) und der lzma Extraktor.<br />
Sei dir bewusst darüber das wir vorerst eine älterer Serverversion OHNE Ice Unterstützung installieren. Das werden wir später korrigieren.<br />
<br />
Zusätzlich benötigen wir den aktuellen Server (Murmur).<br />
<br />
Man kann ihn über die Adresse http://mumble.sourceforge.net/ beziehen. "Stable Static Linux Server". Ich empfehle dafür das Heim-Verzeichnis.<br />
cd ~<br />
wget http://switch.dl.sourceforge.net/sourceforge/mumble/murmur-static_x86-1.1.8.tar.lzma<br />
unlzma -v murmur-static_x86-1.1.8.tar.lzma<br />
tar xfv murmur-static_x86-1.1.8.tar<br />
<br />
''' Schritt 1 - Murmur konfigurieren'''<br />
<br />
OPTIONAL: Um Murmur mit jedem Systemstart automatisch zu starten bearbeite die Datei /etc/default/mumble-server entsprechend mit einem Editior deiner Wahl.<br />
<br />
Nun öffne die Datei /etc/mumble-server.ini<br />
vim /etc/mumble-server.ini<br />
OR<br />
nano -w /etc/mumble-server.ini <br />
Kommentiere die Zeile die mit dbus= beginnt aus<br />
#dbus=system<br />
Erstelle eine neue Zeile und füge folgendes in diese ein<br />
ice="tcp -h 127.0.0.1 -p 6502"<br />
Murmur weiß damit das er auf Ice Anfragen achten soll.<br />
<br />
''' Schritt 2 - Murmur manuell aktualisieren '''<br />
<br />
Sicherlich kamm schon die Frage auf warum wir eine "veraltete" Version installiert haben.<br />
<br />
Die Antwort ist denkbar einfach, damit wir erniger Arbeit haben. Allerdings gibt es einen kleinen Nachteil.<br />
<br />
Wenn das Packet im Repository eine Aktualisierung erhält kann das unsere Ice Unterstützung wieder rückgängig machen. Aber ich behaupte dennoch das dies der beste Weg ist und man kann dieses Problem leicht wieder beheben in dem man die murmurd einfach nochmal manuel aktualisiert.<br />
<br />
Die statische Linux Binärdatei wurde bereits in das Heimverzeichnis entpackt und nun benötigen wir einige Dateien von dort.<br />
<br />
Al erstes ersetzen wir die ältere Version durch die Neuere.<br />
cd ~/murmur-static_x86-1.1.8<br />
chmod +x ./murmur.x86<br />
cp murmur.x86 /usr/sbin/murmurd<br />
Nun kopiere die zugehörige Ice Spezifikation.<br />
cp Murmur.ice /var/lib/mumble-server/Murmur.ice<br />
<br />
''' Schritt 3 - PHP Einstellungen '''<br />
Nun müssen wir der PHP-Ice Erweiterung noch mitteilen wo sie die Ice Spezifikation für Murmur findet.<br />
Es sollte bereits eine Datei /etc/php5/conf.d/IcePHP.ini von der Installation existieren.<br />
Öffne diese in einem Editor.<br />
vim /etc/php5/conf.d/IcePHP.ini<br />
ODER<br />
nano -w /etc/php5/conf.d/IcePHP.ini<br />
Am Ende der Datei füge folgende Zeile hinzu:<br />
ice.slice = /var/lib/mumble-server/Murmur.ice<br />
<br />
''' Schritt 4 - Reload '''<br />
<br />
Alles nötige sollte nun getan sein und wir wollen unsere neuen Eisntellungen testen.<br />
<br />
Neustart von apache2.<br />
/etc/init.d/apache2 restart<br />
Murmur starten.<br />
/etc/init.d/mumble-server start<br />
Nun wollen wir einen prüfenden Blick in die Log-Datei werfen ob alles wie erwartet funktioniert.<br />
tail -n10 /var/log/mumble-server/mumble-server.log<br />
Wenn du eine ähnliche Zeile wie die folgende findest:<br />
...<br />
<W>2009-04-06 13:37:11.316 MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" running<br />
...<br />
sollte alles funktionieren und du kannst nun mit Murmur über die IcePHP Erweiterung kommunizieren.<br />
<br />
''' Nochmals, denke darann das die Ice Unterstützung evtl. zerstört wird wenn das Packet über die Packetverwaltung aktualisiert wird! '''</div>XenonRhttps://wiki.mumble.info/index.php?title=Ice&diff=3553Ice2009-10-09T12:09:27Z<p>XenonR: fixed missing dependency</p>
<hr />
<div>Murmur supports remote scripting using [http://www.zeroc.com/ ZeroC Ice], a RPC mechanism. There are bindings for C++, Java, .NET, Python, PHP and Ruby, and this is supported on all our platforms (Win32, Linux and OSX). Ice also works over a network, meaning you can create a web application that interfaces with a murmur process running on another machine.<br />
<br />
= Getting ready to use Ice =<br />
<br />
You can download Ice directly from ZeroC. If you installed a binary version of Murmur, it already includes the necessary components for running Ice, but you might need additional tools to develop with it.<br />
<br />
To enable Ice in your murmur.ini configuration file first comment out<br />
dbus=session<br />
to disable dbus and add<br />
ice="tcp -h 127.0.0.1 -p 6502"<br />
to enable Ice for localhost on port 6502.<br />
<br />
To check if Ice in fact does listen, type<br />
netstat -apn | grep 6502<br />
<br />
== Apache and PHP ==<br />
<br />
If you want to use Ice from PHP, you'll have to add the extension to php and tell php where to find the Murmur.ice file.<br />
<br />
To add the IcePHP extension to php, first check that the file IcePHP.so for linux, or php_ice.dll for windows is in your php extensions folder specified in your php.ini as <br />
extension_dir = /usr/lib/php5/extensions<br />
If it is not, get the correspoding files from [http://www.zeroc.com/download.html ZeroCs downloads page].<br />
<br />
Then either in your php.ini file or in your /etc/php.d or /etc/php5/conf.d folder in ice.ini, add the line<br />
extension=IcePHP.so<br />
At least the linux rpms will do this automatically, so check that you're not doing it a second time.<br />
<br />
Second, you have to tell the PHP parser where to find the slice ('''S'''pecification '''L'''anguage for '''Ice''') file.<br />
Add<br />
ice.slice = /path/to/Murmur.ice<br />
to your php.ini or other config file (ice.ini).<br />
<br />
=== Troubleshooting ===<br />
If you encounter problems, check your apache log.<br />
<br />
If it tells you the php extension was compiled on an older api, you have to compile the IcePHP.so from source.<br />
<br />
Download Ice-3.3.0.tar.gz from [http://www.zeroc.com/download.html ZeroCs downloads page], untar, cd, cd into php, as written in the INSTALL file export ICE_HOME environment variable pointing to your ice install dir. If you installed it with an rpm, type<br />
export ICE_HOME=/usr<br />
then make, and in the lib folder, there'll be your IcePHP.so file.<br />
<br />
= Using Ice =<br />
<br />
How to use Ice differs from language to language. The parameters and method names will remain the same, but the syntax will naturally be different. Murmur will, by default, open up an adapter on port 6502 (or 10000 for homedir installs), which has a single accessible object named "Meta". This is the Meta server, and from it you can retrieve adapters for any configured server.<br />
<br />
There's an example included in the source; have a look at [http://mumble.svn.sourceforge.net/viewvc/mumble/trunk/scripts/icedemo.php?view=markup icedemo.php].<br />
<br />
The ice interface is fully documented, and you can browse the [http://mumble.sourceforge.net/slice generated documentation].<br />
<br />
= How to set up a Debian web server to work with ZeroC-Ice =<br />
<br />
These are example scripts. Use at your own risk.<br />
<br />
'''This guide is for debian 5.0 (lenny) -upgraded to date 06.04.2009-'''<br />
<br />
I assume you already have a working apache2 and php environment.<br />
<br />
<br />
'''Prerequisites'''<br />
<br />
First we need some essentials to aquire these execute the following in a root shell<br />
<br />
apt-get update<br />
<br />
apt-get install mumble-server icecpp libzeroc-ice32 php-zeroc-ice lzma<br />
<br />
These are namely the Mumble server himself (mumble-server), ZeroC Ice himself (icecpp), the ZeroC-Ice C++ runtime Library (libzeroc-ice32), the Ice PHP extension (php-zeroc-ice) and the lzma extractor.<br />
Be aware that this installs a older server version WITHOUT Ice support. We will fix this later on.<br />
<br />
Additionally we need the current Murmur, thats what the Mumble server is called, release.<br />
<br />
Go to http://mumble.sourceforge.net/ and download the latest stable Static Linux Server. I suggest your home directory for that.<br />
cd ~<br />
wget http://switch.dl.sourceforge.net/sourceforge/mumble/murmur-static_x86-1.1.8.tar.lzma<br />
unlzma -v murmur-static_x86-1.1.8.tar.lzma<br />
tar xfv murmur-static_x86-1.1.8.tar<br />
<br />
<br />
''' Step 1 - Murmur Setup'''<br />
<br />
OPTIONAL: To run Murmur at every startup change the config value in /etc/default/mumble-server acordingly with a editor of your choice.<br />
<br />
Now open the file /etc/mumble-server.ini<br />
vim /etc/mumble-server.ini<br />
OR<br />
nano -w /etc/mumble-server.ini <br />
Uncomemnt the line that starts with dbus=<br />
#dbus=system<br />
Create a new line and paste<br />
ice="tcp -h 127.0.0.1 -p 6502"<br />
Murmur now knows that he should listen for Ice requests.<br />
<br />
<br />
''' Step 2 - Manual update Murmur '''<br />
<br />
First of all why did we installed a old version first to replace it now?<br />
<br />
It's easy, we have much less to do. Anyway there is a downside.<br />
<br />
When the package is updated in the repository you will probably break your Ice support. But i think thats the best way and you can easily fix that just with replacing the murmurd binary again.<br />
<br />
You alread extracted the Static Linux Server to your home directory. Now we need some files from there.<br />
<br />
First replace the repository binary with the manually downloaded one.<br />
cd ~/murmur-static_x86-1.1.8<br />
chmod +x ./murmur.x86<br />
cp murmur.x86 /usr/sbin/murmurd<br />
Now copy the Ice specification for murmur.<br />
cp Murmur.ice /var/lib/mumble-server/Murmur.ice<br />
<br />
<br />
''' Step 3 - PHP Setup '''<br />
Now we need to tell the PHP-Ice Extension where the Ice specification file can be found.<br />
You should already have a file /etc/php5/conf.d/IcePHP.ini from your PHP module install.<br />
Open it with a editor.<br />
vim /etc/php5/conf.d/IcePHP.ini<br />
OR<br />
nano -w /etc/php5/conf.d/IcePHP.ini<br />
Paste the folowing in a new line at the end of the file<br />
ice.slice = /var/lib/mumble-server/Murmur.ice<br />
<br />
<br />
''' Step 4 - Reload and Check '''<br />
<br />
Everything needed should be done now let us populate your new settings.<br />
<br />
Restart your apache2.<br />
/etc/init.d/apache2 restart<br />
And start your Mumble server<br />
/etc/init.d/mumble-server start<br />
Now we will take a look in the mumble-server log to see if everything is fine.<br />
tail -n10 /var/log/mumble-server/mumble-server.log<br />
If you find a line similar to the following <br />
...<br />
<W>2009-04-06 13:37:11.316 MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" running<br />
...<br />
everything is fine and you can now comunicate to Murmur over the IcePHP extension.<br />
<br />
''' Again be aware of that you can break your Ice support when the package gets an update in the repository! '''<br />
<br />
--[[User:xenonR|xenonR]] 13:02, 06 April 2009 (UTC)<br />
<br />
= How to set up a Windows web server and use the Ice php scripts =<br />
<br />
These are example scripts. Use at your own risk. These scripts are not intended for production machines. These are examples of what Ice can do. Note that if you already have a web server installed on the server you can adapt this guide to use it instead of installing Apache.<br />
<br />
First install [http://apache.mirror.facebook.com/httpd/binaries/win32/apache_2.2.11-win32-x86-openssl-0.9.8i.msi Apache]. Install it to ''C:\apache\''. <br />
<br />
Now install [http://www.php.net/get/php-5.2.8-win32-installer.msi/from/us.php.net/mirror PHP]. Tell PHP to install to ''C:\PHP5\''. In the installer on the "Web Server Setup" window select Apache 2.2.x Module. When you get to "Select Apache Configuration Directory" put ''C:\apache\conf\''. Proceed through the installer. Install the defaults, you do not need to install the extensions for PHP. <br />
<br />
Now [http://zeroc.com/download.html download] and install Ice-''x.x.x''-VC60.msi. Go to ''C:\Ice-3.3.1-VC60\bin\'' and copy <br />
bzip2.dll <br />
ice33.dll <br />
iceutil33.dll <br />
msvcp60.dll <br />
msvcrt.dll <br />
php_ice.dll <br />
slice33.dll <br />
stlport_vc646.dll <br />
to ''C:\apache\bin'' . Now open ''C:\PHP5\php.ini'' and add the following two lines to the bottom of the file: <br />
extension=php_ice.dll<br />
ice.slice=C:\PHP5\Murmur.ice<br />
<br />
Now save and exit php.ini.<br />
<br />
After you have done all that, download [http://mumble.svn.sourceforge.net/viewvc/mumble/trunk/src/murmur/Murmur.ice?view=log Murmur.ice], [http://mumble.svn.sourceforge.net/viewvc/mumble/trunk/scripts/icedemo.php?view=log icedemo.php], and [http://mumble.svn.sourceforge.net/viewvc/mumble/trunk/scripts/weblist.php?view=log weblist.php] (Click the links, and on the Sourceforge page right click on "(download)" and select "Save Link As...".) Put Murmur.ice in ''C:\PHP5''. Put icedemo.php and weblist.php in ''C:\apache\htdocs''. <br />
<br />
Double click the Apache icon in the system tray and select "Restart".<br />
<br />
You now need at least one running Murmur server. Go to C:\Program Files\Mumble and double click murmur.exe and the server will start.<br />
<br />
You should now be able to go to http://<your IP or Domain>/icedemo.php (or weblist.php). Make SURE that you have icedemo.php protected so that only YOU can access it. If you do not want to use icedemo.php, [http://mumble.sourceforge.net/Running_Murmur#Web-Interfaces here] is a list of other web interfaces you can use.<br />
<br />
= Using Glacier2 =<br />
<br />
Glacier2 is a Ice routing and firewall utility, and allows you to securely run the server on one machine and murmur on another. Note that if both server and client are on a secure LAN, you can just use iptables to protect the Ice port, which is a lot easier than setting up Glacier2.<br />
<br />
The examples here assume that 1.2.3.4 is the public IP address of the server running Murmur. We're going to use the username "magic" with the password "pink".<br />
<br />
== Configuring Glacier2 ==<br />
<br />
Create a config file called config.glacier2 and put the following in it:<br />
Glacier2.Client.Endpoints=tcp -h 1.2.3.4 -p 4063<br />
Glacier2.SessionTimeout=60<br />
Glacier2.CryptPasswords=passwords.txt<br />
<br />
Then, create a password hash using the OpenSSL utility.<br />
openssl passwd pink<br />
this will spit out a hash, which looks something like CTThafhdv9Lz2<br />
<br />
Create a file called passwords.txt containing:<br />
magic CTThafhdv9Lz2<br />
<br />
Start glacier2 as this:<br />
glacier2router --Ice.Config=config.glacier2<br />
<br />
You will need to have Ice installed - http://zeroc.com/download.html glacier2router is a binary that is located in ''<location_of_Ice_installation>/bin/glacier2router.exe.''<br />
<br />
== Configuring Murmur ==<br />
<br />
There's nothing to do in murmur. Seriously. Leave the default setting of binding to 127.0.0.1 alone.<br />
<br />
== Configuring Client (PHP) ==<br />
<br />
This is where it starts getting slightly ugly. Note that this requires Ice >= 3.3.1, as Ice 3.3.0 has a bug in it which prevents this from working. The following is the adaptation necessary to weblist.php to get it to work:<br />
<br />
<pre><br />
try {<br />
$router = $ICE->stringToProxy("Glacier2/router:tcp -p 4063 -h 1.2.3.4");<br />
$router = $router->ice_uncheckedCast("::Glacier2::Router")->ice_router(null);<br />
$session = $router->createSession("magic", "pink");<br />
$base = $ICE->stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502")->ice_router($router);<br />
$meta = $base->ice_checkedCast("::Murmur::Meta")->ice_router($router);<br />
<br />
...<br />
</pre><br />
<br />
For each object you get a proxy to (including the return from $meta->getServer), you need to add ->ice_router($router)<br />
<br />
[[Category:Documentation]]<br />
[[Category:Documentation English]]</div>XenonRhttps://wiki.mumble.info/index.php?title=Ice/Deutsch&diff=3045Ice/Deutsch2009-04-06T13:12:20Z<p>XenonR: Started Ice/German</p>
<hr />
<div>Mumur unterstützt Remote scripting mit [http://www.zeroc.com/ ZeroC ICE], einem RPC Mechanismus.<br />
<br />
Es gibt C++, Java, .NET, Python, PHP and Ruby Unterstützungen für alle Platformen (Win32, Linux and OSX).<br />
<br />
Ice kann auch über ein Netzwerk betrieben werden, somit kann eine Webapplikation mit dem laufenden Murmur Prozess komunizieren.<br />
<br />
= debian Webserver und Murmur für ZeroC-Ice konfigurieren=<br />
<br />
Dies sind Beispiele nutze sie auf eigene Gefahr!<br />
<br />
'''Dieser Leitfaden ist für debian 5.0 (lenny)'''<br />
<br />
Ich gehe davon aus das du bereits einen funktionierenden apache2 mit PHP Unterstützung hast.<br />
<br />
'''Voraussetzungen'''<br />
<br />
Als erstes installieren wir einige benötigte Packete, dies machen wir in einem root-shell.<br />
<br />
apt-get update<br />
<br />
apt-get install mumble-server libzeroc-ice32 php-zeroc-ice lzma<br />
<br />
Diese sind namentlich der Mumble-Server selbst (mumble-server), die ZeroC-Ice C++ Laufzeitbibliothek (libzeroc-ice32), das IcePHP Modul (php-zeroc-ice) und der lzma Extraktor.<br />
Sei dir bewusst darüber das wir vorerst eine älterer Serverversion OHNE Ice Unterstützung installieren. Das werden wir später korrigieren.<br />
<br />
Zusätzlich benötigen wir den aktuellen Server (Murmur).<br />
<br />
Man kann ihn über die Adresse http://mumble.sourceforge.net/ beziehen. "Stable Static Linux Server". Ich empfehle dafür das Heim-Verzeichnis.<br />
cd ~<br />
wget http://switch.dl.sourceforge.net/sourceforge/mumble/murmur-static_x86-1.1.8.tar.lzma<br />
unlzma -v murmur-static_x86-1.1.8.tar.lzma<br />
tar xfv murmur-static_x86-1.1.8.tar<br />
<br />
''' Schritt 1 - Murmur konfigurieren'''<br />
<br />
OPTIONAL: Um Murmur mit jedem Systemstart automatisch zu starten bearbeite die Datei /etc/default/mumble-server entsprechend mit einem Editior deiner Wahl.<br />
<br />
Nun öffne die Datei /etc/mumble-server.ini<br />
vim /etc/mumble-server.ini<br />
OR<br />
nano -w /etc/mumble-server.ini <br />
Kommentiere die Zeile die mit dbus= beginnt aus<br />
#dbus=system<br />
Erstelle eine neue Zeile und füge folgendes in diese ein<br />
ice="tcp -h 127.0.0.1 -p 6502"<br />
Murmur weiß damit das er auf Ice Anfragen achten soll.<br />
<br />
''' Schritt 2 - Murmur manuell aktualisieren '''<br />
<br />
First of all why did we installed a old version first to replace it now?<br />
<br />
It's easy, we have much less to do. Anyway there is a downside.<br />
<br />
When the package is updated in the repository you will probably break your Ice support. But i think thats the best way and you can easily fix that just with replacing the murmurd binary again.<br />
<br />
You alread extracted the Static Linux Server to your home directory. Now we need some files from there.<br />
<br />
First replace the repository binary with the manually downloaded one.<br />
cd ~/murmur-static_x86-1.1.8<br />
chmod +x ./murmur.x86<br />
cp murmur.x86 /usr/sbin/murmurd<br />
Now copy the Ice specification for murmur.<br />
cp Murmur.ice /var/lib/mumble-server/Murmur.ice<br />
<br />
''' Step 3 - PHP Setup '''<br />
Now we need to tell the PHP-Ice Extension where the Ice specification file can be found.<br />
You should already have a file /etc/php5/conf.d/IcePHP.ini from your PHP module install.<br />
Open it with a editor.<br />
vim /etc/php5/conf.d/IcePHP.ini<br />
OR<br />
nano -w /etc/php5/conf.d/IcePHP.ini<br />
Paste the folowing in a new line at the end of the file<br />
ice.slice = /var/lib/mumble-server/Murmur.ice<br />
<br />
''' Step 4 - Relaod and Check '''<br />
<br />
Everything needed should be done now let us populate your new settings.<br />
<br />
Restart your apache2.<br />
/etc/init.d/apache2 restart<br />
And start your Mumble server<br />
/etc/init.d/mumble-server start<br />
Now we will take a look in the mumble-server log to see if everything is fine.<br />
tail -n10 /var/log/mumble-server/mumble-server.log<br />
If you find a line similar to the following <br />
...<br />
<W>2009-04-06 13:37:11.316 MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" running<br />
...<br />
everything is fine and you can now comunicate to Murmur over the IcePHP extension.<br />
<br />
''' Again be aware of that you can break your Ice support when the package gets an update in the repository! '''</div>XenonRhttps://wiki.mumble.info/index.php?title=User:XenonR&diff=3044User:XenonR2009-04-06T12:06:38Z<p>XenonR: New page: Don't slap me! ^^</p>
<hr />
<div>Don't slap me! ^^</div>XenonRhttps://wiki.mumble.info/index.php?title=Ice&diff=3043Ice2009-04-06T12:04:46Z<p>XenonR: Section: rework debian 5 server setup</p>
<hr />
<div>Murmur supports remote scripting using [http://www.zeroc.com/ ZeroC ICE], a RPC mechanism. There are bindings for C++, Java, .NET, Python, PHP and Ruby, and this is supported on all our platforms (Win32, Linux and OSX). ICE also works over a network, meaning you can create a web application that interfaces with a murmur process running on another machine.<br />
<br />
= Getting ready to use ICE =<br />
<br />
You can download ICE directly from ZeroC. If you installed a binary version of Murmur, it already includes the necessary components for running ICE, but you might need additional tools to develop with it.<br />
<br />
To enable ICE in your murmur.ini configuration file first comment out<br />
dbus=session<br />
to disable dbus and add<br />
ice="tcp -h 127.0.0.1 -p 6502"<br />
to enable ICE for localhost on port 6502.<br />
<br />
To check if ICE in fact does listen, type<br />
netstat -apn | grep 6502<br />
<br />
== Apache and PHP ==<br />
<br />
If you want to use ICE from PHP, you'll have to add the extension to php and tell php where to find the Murmur.ice file.<br />
<br />
To add the IcePHP extension to php, first check that the file IcePHP.so for linux, or php_ice.dll for windows is in your php extensions folder specified in your php.ini as <br />
extension_dir = /usr/lib/php5/extensions<br />
If it is not, get the correspoding files from [http://www.zeroc.com/download.html ZeroCs downloads page].<br />
<br />
Then either in your php.ini file or in your /etc/php.d or /etc/php5/conf.d folder in ice.ini, add the line<br />
extension=IcePHP.so<br />
At least the linux rpms will do this automatically, so check that you're not doing it a second time.<br />
<br />
Second, you have to tell the PHP parser where to find the slice ('''S'''pecification '''L'''anguage for '''ICE''') file.<br />
Add<br />
ice.slice = /path/to/Murmur.ice<br />
to your php.ini or other config file (ice.ini).<br />
<br />
=== Troubleshooting ===<br />
If you encounter problems, check your apache log.<br />
<br />
If it tells you the php extension was compiled on an older api, you have to compile the IcePHP.so from source.<br />
<br />
Download Ice-3.3.0.tar.gz from [http://www.zeroc.com/download.html ZeroCs downloads page], untar, cd, cd into php, as written in the INSTALL file export ICE_HOME environment variable pointing to your ice install dir. If you installed it with an rpm, type<br />
export ICE_HOME=/usr<br />
then make, and in the lib folder, there'll be your IcePHP.so file.<br />
<br />
= Using ICE =<br />
<br />
How to use ICE differs from language to language. The parameters and method names will remain the same, but the syntax will naturally be different. Murmur will, by default, open up an adapter on port 6502 (or 10000 for homedir installs), which has a single accessible object named "Meta". This is the Meta server, and from it you can retrieve adapters for any configured server.<br />
<br />
There's an example included in the source; have a look at [http://mumble.svn.sourceforge.net/viewvc/mumble/trunk/scripts/icedemo.php?view=markup icedemo.php].<br />
<br />
The ice interface is fully documented, and you can browse the [http://mumble.sourceforge.net/slice generated documentation].<br />
<br />
= How to set up a Debian web server to work with ZeroC-Ice =<br />
<br />
These are example scripts. Use at your own risk.<br />
<br />
'''This guide is for debian 5.0 (lenny) -upgraded to date 06.04.2009-'''<br />
<br />
I assume you already have a working apache2 and php environment.<br />
<br />
<br />
'''Prerequisites'''<br />
<br />
First we need some essentials to aquire these execute the following in a root shell<br />
<br />
apt-get update<br />
<br />
apt-get install mumble-server libzeroc-ice32 php-zeroc-ice lzma<br />
<br />
These are namely the Mumble server himself (mumble-server), the ZeroC-Ice C++ runtime Library (libzeroc-ice32), the Ice PHP extension (php-zeroc-ice) and the lzma extractor.<br />
Be aware that this installs a older server version WITHOUT Ice support. We will fix this later on.<br />
<br />
Additionally we need the current Murmur, thats what the Mumble server is called, release.<br />
<br />
Go to http://mumble.sourceforge.net/ and download the latest stable Static Linux Server. I suggest your home directory for that.<br />
cd ~<br />
wget http://switch.dl.sourceforge.net/sourceforge/mumble/murmur-static_x86-1.1.8.tar.lzma<br />
unlzma -v murmur-static_x86-1.1.8.tar.lzma<br />
tar xfv murmur-static_x86-1.1.8.tar<br />
<br />
<br />
''' Step 1 - Murmur Setup'''<br />
<br />
OPTIONAL: To run Murmur at every startup change the config value in /etc/default/mumble-server acordingly with a editor of your choice.<br />
<br />
Now open the file /etc/mumble-server.ini<br />
vim /etc/mumble-server.ini<br />
OR<br />
nano -w /etc/mumble-server.ini <br />
Uncomemnt the line that starts with dbus=<br />
#dbus=system<br />
Create a new line and paste<br />
ice="tcp -h 127.0.0.1 -p 6502"<br />
Murmur now knows that he should listen for Ice requests.<br />
<br />
<br />
''' Step 2 - Manual update Murmur '''<br />
<br />
First of all why did we installed a old version first to replace it now?<br />
<br />
It's easy, we have much less to do. Anyway there is a downside.<br />
<br />
When the package is updated in the repository you will probably break your Ice support. But i think thats the best way and you can easily fix that just with replacing the murmurd binary again.<br />
<br />
You alread extracted the Static Linux Server to your home directory. Now we need some files from there.<br />
<br />
First replace the repository binary with the manually downloaded one.<br />
cd ~/murmur-static_x86-1.1.8<br />
chmod +x ./murmur.x86<br />
cp murmur.x86 /usr/sbin/murmurd<br />
Now copy the Ice specification for murmur.<br />
cp Murmur.ice /var/lib/mumble-server/Murmur.ice<br />
<br />
<br />
''' Step 3 - PHP Setup '''<br />
Now we need to tell the PHP-Ice Extension where the Ice specification file can be found.<br />
You should already have a file /etc/php5/conf.d/IcePHP.ini from your PHP module install.<br />
Open it with a editor.<br />
vim /etc/php5/conf.d/IcePHP.ini<br />
OR<br />
nano -w /etc/php5/conf.d/IcePHP.ini<br />
Paste the folowing in a new line at the end of the file<br />
ice.slice = /var/lib/mumble-server/Murmur.ice<br />
<br />
<br />
''' Step 4 - Relaod and Check '''<br />
<br />
Everything needed should be done now let us populate your new settings.<br />
<br />
Restart your apache2.<br />
/etc/init.d/apache2 restart<br />
And start your Mumble server<br />
/etc/init.d/mumble-server start<br />
Now we will take a look in the mumble-server log to see if everything is fine.<br />
tail -n10 /var/log/mumble-server/mumble-server.log<br />
If you find a line similar to the following <br />
...<br />
<W>2009-04-06 13:37:11.316 MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" running<br />
...<br />
everything is fine and you can now comunicate to Murmur over the IcePHP extension.<br />
<br />
''' Again be aware of that you can break your Ice support when the package gets an update in the repository! '''<br />
<br />
--[[User:xenonR|xenonR]] 13:02, 06 April 2009 (UTC)<br />
<br />
= How to set up a Windows web server and use the ICE php scripts =<br />
<br />
These are example scripts. Use at your own risk. These scripts are not intended for production machines. These are examples of what ICE can do.<br />
<br />
First install [http://apache.mirror.facebook.com/httpd/binaries/win32/apache_2.2.11-win32-x86-openssl-0.9.8i.msi Apache]. Install it to ''C:\apache\''. <br />
<br />
Now install [http://www.php.net/get/php-5.2.8-win32-installer.msi/from/us.php.net/mirror PHP]. Tell PHP to install to ''C:\PHP5\''. In the installer on the "Web Server Setup" window select Apache 2.2.x Module. When you get to "Select Apache Configuration Directory" put ''C:\apache\conf\''. Proceed through the installer. Install the defaults, you do not need to install the extensions for PHP. <br />
<br />
Now install [http://www.zeroc.com/download/Ice/3.3/Ice-3.3.0-VC60.msi ICE]. Go to ''C:\Ice-3.3.0-VC60\bin\'' and copy <br />
bzip2.dll <br />
ice33.dll <br />
iceutil33.dll <br />
msvcp60.dll <br />
msvcrt.dll <br />
php_ice.dll <br />
slice33.dll <br />
stlport_vc646.dll <br />
to ''C:\apache\bin'' . Now open ''C:\PHP5\php.ini'' and add the following two lines to the bottom of the file: <br />
extension=php_ice.dll<br />
ice.slice=C:\PHP5\Murmur.ice<br />
<br />
Now save and exit php.ini.<br />
<br />
After you have done all that, download [http://mumble.svn.sourceforge.net/viewvc/mumble/trunk/src/murmur/Murmur.ice?view=log Murmur.ice], [http://mumble.svn.sourceforge.net/viewvc/mumble/trunk/scripts/icedemo.php?view=log icedemo.php], and [http://mumble.svn.sourceforge.net/viewvc/mumble/trunk/scripts/weblist.php?view=log weblist.php] (Click the links, and on the Sourceforge page right click on "(download)" and select "Save Link As...".) Put Murmur.ice in ''C:\PHP5''. Put icedemo.php and weblist.php in ''C:\apache\htdocs''. <br />
<br />
Double click the Apache icon in the system tray and select "Restart".<br />
<br />
You now need at least one running Murmur server. Go to C:\Program Files\Mumble and double click murmur.exe and the server will start.<br />
<br />
You should now be able to go to http://<your IP or Domain>/icedemo.php (or weblist.php).<br />
<br />
= Using Glacier2 =<br />
<br />
Glacier2 is a ICE routing and firewall utility, and allows you to securely run the server on one machine and murmur on another. Note that if both server and client are on a secure LAN, you can just use iptables to protect the ICE port, which is a lot easier than setting up Glacier2.<br />
<br />
The examples here assume that 1.2.3.4 is the public IP address of the server running Murmur. We're going to use the username "magic" with the password "pink".<br />
<br />
== Configuring Glacier2 ==<br />
<br />
Create a config file called config.glacier2 and put the following in it:<br />
Glacier2.Client.Endpoints=tcp -h 1.2.3.4 -p 4063<br />
Glacier2.SessionTimeout=60<br />
Glacier2.CryptPasswords=passwords.txt<br />
<br />
Then, create a password hash using the openssl utility.<br />
openssl passwd pink<br />
this will spit out a hash, which looks something like CTThafhdv9Lz2<br />
<br />
Create a file called password.txt containing:<br />
magic CTThafhdv9Lz2<br />
<br />
Start glacier2 as this:<br />
glacier2router --Ice.Config=config.glacier2<br />
<br />
== Configuring Murmur ==<br />
<br />
There's nothing to do in murmur. Seriously. Leave the default setting of binding to 127.0.0.1 alone.<br />
<br />
== Configuring Client (PHP) ==<br />
<br />
This is where it starts getting slightly ugly. Note that this requires ICE >= 3.3.1, as Ice 3.3.0 has a bug in it which prevents this from working. The following is the adaptation necessary to weblist.php to get it to work:<br />
<br />
<pre><br />
try {<br />
$router = $ICE->stringToProxy("Glacier2/router:tcp -p 4063 -h 1.2.3.4");<br />
$router = $router->ice_uncheckedCast("::Glacier2::Router")->ice_router(null);<br />
$session = $router->createSession("magic", "pink");<br />
$base = $ICE->stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502")->ice_router($router);<br />
$meta = $base->ice_checkedCast("::Murmur::Meta")->ice_router($router);<br />
<br />
...<br />
</pre><br />
<br />
For each object you get a proxy to (including the return from $meta->getServer), you need to add ->ice_router($router)<br />
<br />
[[Category:Documentation]]<br />
[[Category:Documentation English]]</div>XenonR