Trema does not support older Linux distributions such as Fedora 8 but
you may be able run it on Fedora 8 at your own risk!
The following is a memo that shows how I could install Trema on Fedora 8.
1. Install Ruby from RVM
$ bash -s stable < <(curl -s
https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer
)
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && .
"$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
$ . .bash_profile
$ rvm install 1.8.7
$ rvm use 1.8.7
2. Build Trema and sample controllers
2.1 Get source code
$ git clone git://github.com/trema/trema.git
$ cd trema
2.2 Modify Rantfile to suppress errors with older gcc
Trema requires gcc 4.3+ but Fedora 8 only has gcc 4.1. This causes
compilation errors.
To avoid those errors, remove -Wconversion from CFLAGS in Rantfile.
# See http://gcc.gnu.org/wiki/NewWconversion for detail
2.3 Run build.rb
$ ./build.rb
3. Run sample controllers
3.1 Add your account to sudoers.
3.2 Modify "ruby/trema/link.rb" not to call sysctl (patch attached).
3.3 Run sample controllers
$ export PATH=$PATH:/sbin
$ ./trema run objects/examples/learning_switch/learning_switch -c
src/examples/learning_switch/learning_switch.conf
Hope this helps.
Regards,
CHIBA Yasunobu
2012/1/19 Oliver Michel <oliver...@editum.de>:
> occur. These errors are relatively obvious as the script calls the ip-
> command which is not available on Fedora.
"sudo yum install iproute" may install ip command :-)
Regards,
CHIBA Yasunobu
Obviously I got a little lost, thank you :-)
Still learning-switch controller is not running:
> $ sudo ruby ./trema run objects/examples/learning_switch/learning_switch -c src/examples/learning_switch/learning_switch.conf
RTNETLINK answers: Operation not permitted
Command 'sudo /sbin/ip link add name trema0-0 type veth peer name trema0-1' failed!
Do you have any ideas, what the problem here could be?
Thank you,
Oliver
> RTNETLINK answers: Operation not permitted
> Command 'sudo /sbin/ip link add name trema0-0 type veth peer name trema0-1' failed!
It seems creating a virtual Ethernet device is not permitted on your
environment while it is possible with standard Ferora 8 distribution.
I am not familiar with PlanetLab but I suppose the purpose-built Linux
kernel or security mechanism of PlanetLab does not allow you to use
the function.
If you do not need to run the network emulation part of Trema, you may
be able to simply run the sample controller as follows:
$ ./trema run objects/examples/learning_switch/learning_switch
However, if you want to run the network emulation part, further
investigation or other clean Linux environment may be needed.
Regards,
CHIBA Yasunobu
perfect, this lets Trema run. Thank you very much for your kind assistance!
Oliver