安装MPLS-TE示例

ubuntu 无eth0

今天装 ubuntu 10.10,能上网,ifconfig正常,有线、无线、lo都在,但/etc/network/interfaces 中却没有eth0,只有lo。

不知怎么回事,查了一圈,下面的解决方法有效:

1. sudo rm /etc/udev/rule.d/70 -persistent-net.rules,然后重新启动。

2. sudo vi /etc/network/interfaces

检查看看有没有eth0选项,如果没有,添加:

allow-hotplug eth0

auto eth0

iface eth0 inet static

address 192.168.1.xx

netmask 255.255.255.0

gateway 192.168.1.1

重新启动系统后,ifconfig应该显示正常。尝试ping局域网内其他机器。

3. 如果第二步后无法联网,请查看错误信息。

如果是DNS解析问题,需要修改resolv.conf。

nameserver 202.106.0.20

nameserver 202.106.196.115

4. 再次尝试连接外网.

 

 

为ubuntu服务器安装gnome图形桌面

 

一般租用的服务器安装服务器版的LINUX,很少会安装桌面的,主要是觉得浪费资源吧,不过我这样的菜鸟还是喜欢图形桌面,下面主要记录下这次为ubuntu 11.04版本安装GNOME,以备用。

 

Ubuntu服务器安装图形界面最简单的就是用下面的命令安装整个桌面版的ubuntu,但不建议在服务器上使用此方法,因为安装桌面相关软件太多。当然也可以安装后再删除。

 

sudo aptitude install ubuntu-desktop

 

 

sudo apt-get install ubuntu-desktop

 

下面说的是自定义安装GNOME桌面的步骤:

 

 

sudo apt-get update

 

1.安装xwindows的基础(必须):

sudo apt-get install x-windows-system-core

 

2.安装gnome基础(必须):

sudo apt-get installgnome-core

 

3.安装中文显示(这里是ubuntu11.04的中文相关软件包的名称,其它版本的好像有点不同,可以安装新立得软件管理器后,在VNC连接上后搜索相关的language软件包):

sudo apt-get installlanguage-pack-gnome-zh-hans

sudo apt-get installlanguage-pack-gnome-zh-hans-base

sudo apt-get install language-pack-zh-hans

sudo apt-get installlanguage-pack-zh-hans-base

sudo apt-get installlanguage-support-zh-hans

 

4.安装登录管理器:

sudo apt-get install gdm

 

说明: gdm(gnome display manager)即gnome图形界面显示管理器,还有kdm/xdm等,它将使您可以在启动时直接进入GUI桌面环境,而勿需通过 startx 来启动GUI。

 

5.安装新立得软件管理器(这个东西很方便,有时不记得一些软件名称,直接用这个搜索更好用):

sudo apt-get installsynaptic

 

 

这样基本上OK了,当然安装了桌面后再安装VNC服务了,要不然安装桌面有什么用

sudo apt-get install vnc4server

 

VNC的配置另外文章再写。

 

转载请标明出处:冬寒博客 »为ubuntu服务器安装gnome图形桌面

 

本文地址:http://www.wincold.com/archives/152.html

 

标签:gnome,linux, ubuntu

 

 

Ubuntu如何使用root帐户登陆(Ubuntu8.*,9.*,10.*/linux root登陆/unixroot登陆

遵循以下步骤:

1、首先重置root密码:

      利用现有管理员帐户登陆Ubutu,在终端执行命令:sudo passwd root,回车后提示要输入当前用户密码,验证通过后会提示设置root密码,重复密码。再重新启动就可以用root登陆。

2、允许以root用户登录:

      默认情况是不允许用root帐号直接登陆图形界面的。这可以通过修改/etc/gdm/gdm.conf文件来允许root直接登陆,在该文件中找到 AllowRoot=false 将其改为 AllowRoot=true 切换用户就可以了。

注:gdm.conf默认是只读属性,修改前请先使用sudo chmod777 /etc/gdm/gdm.conf 将文件权限设置为为777。

一般不建议直接用root用户登陆系统,因为这样系统安全得不到保障. 通常做法是在需要root权限的时候在shell命令前加 sudo , 例如: sudo apt-get update.

或者输入 su 回车,然后输入root用户密码即可(你会发现终端命令的前导字符有$变为了#).变为#后输入的命令都会以root权限执行了

 

 

 

 

 

 

 

 

怎么在ubuntu下安装deb文件

 

sudo dpkg -i a.deb,或者直接双击运行,注意依赖性问题。

 

我想这个fcgi开发一点也不活跃,而gcc的最新版本不断出来,很有可能是由于这方面引的原因,我又调整了一下关键字

gcc compile fcgi,(之前都是没有方向的搜索)。终于在第一条结果中找到原因了:http://bugs.gentoo.org/256654

 解决办法:

在/include/fcgio.h文件中加上 #include<cstdio>,然后再编译安装就通过了。

 

 

Error : EOF

Bug 485019: #include <cstdio> where needed.

 

diff --git a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc

--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc

+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc

@@ -36,6 +36,7 @@

 

#include <cassert>

#include <cstdlib>

+#include <cstdio>

#include <ctime>

#include <linux/limits.h>

 

diff --git a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/minidump_generator.cc b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/minidump_generator.cc

--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/minidump_generator.cc

+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/minidump_generator.cc

@@ -39,6 +39,7 @@

#include <sys/wait.h>

 

#include <cstdlib>

+#include <cstdio>

#include <ctime>

#include <string.h>

 

diff --git a/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc b/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc

--- a/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc

+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc

@@ -30,6 +30,7 @@

#include <a.out.h>

#include <cstdarg>

#include <cstdlib>

+#include <cstdio>

#include <cxxabi.h>

#include <elf.h>

#include <errno.h>

 

 

 

 

Fails uint32_t not declared in scope:

 

Adding the following include to string_util.h fixed the problem.
#include <stdint.h>

 

threads/cooperative.cc:235: error:‘SIZE_MAX’ was not declared in this scope

加:

#include "stdint.h"

 

 

threads/impl.cc: In function ‘intvigil::co_async_rename(const char*, const char*)’:

threads/impl.cc:1306: error: ‘rename’ was notdeclared in this scope

 

加:

#include <cstdio>

 

 

 

多个文件出现了PyObject重复定义问题:

./../directory/directorymanager.hh:28:error: using typedef-name ‘PyObject’ after ‘class’

/usr/include/python2.6/object.h:108: error:‘PyObject’ has a previous declaration here

 

 

 

 

下载补丁文件pyname_patch.py,对出错的文件进行处理。实际上也可以手动修改PySwigObject *为 SwigPyObject,这主要是由于新的python版本将PySwigObject作为保留字用了。

 

nox_main.cc:164: error: ‘umask’ was notdeclared in this scope

 

#include<sys/stat.h>

 

gcc4.5.2python2.7编译mnox不能通过问题:

 

降低gcc版本,sudo apt-get install gcc 4.4 g++4.4, 在/usr/bin删除gcc和g++,重新建立符号连接。

 

安装python2.6:sudo apt-get install python 2.6

 

编译时增加选项

./boot.sh

./configure –with-python=yesPYTHON_VERSION=2.6

make

 

mnox编译通过后, 运行出现下列问题:

openflow@openflowtutorial:~/mnox/src$ ./nox_core -v -i ptcp mpls

00001|nox|DBG:Starting nox_core(/home/openflow/mnox/src/.libs/lt-nox_core)

00002|nox|ERR:Cannot change the state of'python' to INSTALLED:

'python' ran into an error:

       Unableto construct a Python component:

       Traceback(most recent call last):

         File"./nox/coreapps/pyrt/pyoxidereactor.py", line 327, in instance

           return pyoxidereactor(ctxt)

         File"./nox/coreapps/pyrt/pyoxidereactor.py", line 102, in __init__

           signal.signal(signal.SIGCHLD, self._handleSigchld)

       AttributeError:'pyoxidereactor' object has no attribute '_handleSigchld'

 

 

通过google查询到的修改方法:

修改./nox/coreapps/pyrt/pyoxidereactor.py文件的第102行如下,注意对齐:

#       signal.signal(signal.SIGCHLD, self._handleSigchld)

       signal.signal(signal.SIGCHLD, lambda : self.callLater(0,reapAllProcesses))

 

Mininet and OVS

 

cd ~

git clone git://gitosis.stanford.edu/movs.git

cd movs

./boot.sh

./configure

make

sudo make install

Then, run the VM and run the following within the VM:

cd ~/mininet

git checkout lantz/userovs       //改为:git checkout –b lantz/userovs

sudo make install

 

mpls图形问题GUI:

Get the source from the git repository:

git clone git://gitosis.stanford.edu/envi-mpls.git

Then build the code and run it:

cd envi-mpls/gui/

make

java -jar bin/openflow_gui.jar [ip of the controller]

 

make时提示没有ant,安装ant:

sudo apt-get install ant

 

再make时提示:

Unable to locate tools.jar. Expected tofind it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar

Buildfile:/home/openflow/envi-mpls/gui/build.xml

安装:

sudo apt-get installopenjdk-6-jdk

 

 

 

shell scripts directly.

sudo apt-get install -y git-core

git clone git://github.com/mininet/mininet.git

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值