安裝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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章