找回密码
 注册
搜索
热搜: 回贴
微赢网络技术论坛 门户 服务器 Linux/BSD 查看内容

Ubuntu下安装Omnet 3.3

2009-12-20 13:14| 发布者: admin| 查看: 106| 评论: 0|原作者: 云忆

在牛哥的帮忙下,终于在Ubuntu8.04版本下安装成功了Omnet 3.3
下面对安装中重要步骤作一个简单说明:
注意很重要的一点:
由于安装Omnet 过程中需要root的访问权限,所以需要使用root用户登录Ubuntu
root登录方法:
一、启用root用户登录:
1.重新配置 root 的密码:
  $sudo passwd root #按照提示输入两次新的密码,并加以确认。
  2.启用root用户登录:
  $sudo vi /etc/X11/gdm/gdm.conf #打开gnome的配置文档,在末行模式中输入:AllowRoot回车,找到AllowRoot=false ,把false改为true,保存后退出。
  之后,重启系统时,就能够用 root 登录了。假如您想要禁用 root 帐号,则执行下列命令:
  $sudo passwd -l root

二、Ubuntu 中的 root 帐号默认是被禁用了的。
在 Ubuntu 中激活 root 帐号的过程如下:
1. 在终端执行 sudo passwd root 指令后,系统将会提示您配置一个新的 root 帐号密码。
2. 点击 System -> Preferences -> Login Window 菜单,并转换到 Security 选项页,然后选中其下的“Allow local system administrator login”选项。
执行上述两步后,您便能够使用 root 帐号登录 Ubuntu 系统了。
假如要再次禁用 root 帐号,那么能够执行 sudo passwd -l root。

三、假如一直想一直用root也能够"sudo -s"。

四、使用$ su 切换root用户
下面开始进行Omnet 的安装
一、下载omnetpp-3.3-src.tgz,官方网址:http://www.omnetpp.org/
将其解压到/opt
#tar -C /opt -zxvf omnetpp-3.3-src.tgz
二、下载tcl/tk,官方网址:http://www.tcl.tk/
如果下载不成功,可以使用Ubuntu的包安装命令
#apt-get install tcl/tk
三、进入Omnet目录下
#cd /opt/omnetpp-3.3
运行 #./configure,只有会提示如下内容:
# ./configure
...
WARNING: The configuration script could not detect the following packages:

MPI (optional) LibXML/Expat Akaroa (optional)

Scroll up to see the warning messages (use shift PgUp key), and see config.log
for more details. While you can use OMNeT /OMNEST in the current
configuration, please be aware that some functionality may be unavailable
or incomplete.
...
上面的Warning内容提示有一些需要的安装包还没有安装
使用命令安装 #apt-get install ~~~~
只有再运行 #./configure,会提示如下内容:
$ ./configure
...
WARNING: your PATH doesn't contain /home/dhinton/dev/3rdparty/omnetpp/bin!
Add the following line to your startup file:
export PATH=$PATH:/opt/omnetpp-3.3/bin # .(bash_)profile if you use sh/bash
setenv PATH=$PATH:/opt/omnetpp-3.3/bin # .cshrc if you use csh,tcsh etc.

WARNING: You selected shared libraries in configure.user, but your
LD_LIBRARY_PATH doesn't seem to contain /home/dhinton/dev/3rdparty/omnetpp/lib!

Add the corresponding line to your startup file:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/omnetpp-3.3/lib
# into .(bash_)profile if you use bash or other sh-like shell
setenv LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/omnetpp-3.3/lib
# into .cshrc if you use tcsh or other csh-like shell

WARNING: The TCL_LIBRARY environment variable is not set, and without it
OMNEST/OMNeT GUI programs may be unable to find the BLT library.
Please set it to point to the following directory:
/usr/local/lib/tcl8.4

Add the corresponding line to your startup file:
export TCL_LIBRARY=/usr/share/tcltk/tcl8.4
# into .(bash_)profile if you use bash or other sh-like shell
setenv TCL_LIBRARY=/usr/share/tcltk/tcl8.4
# into .cshrc if you use tcsh or other csh-like shell
上面的Warning提示我们进行路径设置:
执行命令: #gedit ~/.bashrc 添加下面内容:
export PATH=$PATH:/opt/omnetpp-3.3/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/omnetpp-3.3/lib
export TCL_LIBRARY=/usr/share/tcltk/tcl8.4
设置:configure.user
首先执行 #locate tcl84 tk84 找到tcl和tk的位置。
执行命令: #gedit configure.user 添加下面内容:
TK_CFLAGS="-I/usr/include -I/usr/X11R6/include -I/usr/include/tk8.4 -I/usr/include/tcl8.4"
TK_LIBS="-L/usr/X11R6/lib -l X11 -L/usr/local/lib -ltk84 -ltcl84"
上面步骤完成了Omnet的安装设置
执行下面命令
./configure
make完成安装:)







最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 17:38 , Processed in 0.133383 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部