在ubuntu10.04版本里面,sun的jdk已经被排除在标准库里面,标准库的只有openJDK了
为了安装sun的jdk
先是编译个源文件
比如
sudo vim /etc/apt/sources.list.d/partner.list
然后添加
deb http://archive.canonical.com/ lucid partner
然后保存之后
sudo apt-get update
然后就
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
基本上就可以了.只是源实在是太慢了.. 用习惯10M的源,突然变成100多k真受不了
Tags: java,javac,jdk,LTS,sun,Ubuntu,Ubuntu 10.04.
开头篇
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.5.tar.gz
wegt http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.5.tar.gz
tar zxvf libtorrent-0.12.5.tar.gz
tar zxvf rtorrent-0.8.5.tar.gz
svn co https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable/ xmlrpc-c
cd xmlrpc-c
./configure –disable-cplusplus
make
sudo make install
cd ..
cd libtorrent-0.12.5/
rm -f scripts/{libtool,lt*}.m4
./autogen.sh
./configure
make
sudo make install
cd ..
cd rtorrent-0.8.5/
rm -f scripts/{libtool,lt*}.m4
./autogen.sh
./configure –with-xmlrpc-c
after that command make sure you see "checking for XMLRPC…. OK" near the end of the outputted text**
make
sudo make install
cd ..
以上2步骤中rm -f scripts/{libtool,lt*}.m4 是因为 libtool的问题 具体可以看 http://libtorrent.rakshasa.no/ticket/1852
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -g -DDEBUG -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/local/include -o rtorrent command_download.o command_dynamic.o command_events.o command_file.o command_helpers.o command_local.o command_network.o command_object.o command_peer.o command_tracker.o command_scheduler.o command_ui.o control.o globals.o main.o option_parser.o signal_handler.o ui/libsub_ui.a core/libsub_core.a display/libsub_display.a input/libsub_input.a rpc/libsub_rpc.a utils/libsub_utils.a -lncurses -lsigc-2.0 -lcurl -L/usr/local/lib -ltorrent
../libtool: line 841: X--tag=CXX: command not found
../libtool: line 874: libtool: ignoring unknown tag : command not found
../libtool: line 841: X--mode=link: command not found
../libtool: line 1008: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1009: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
gcc: no input files
gcc: no input files
gcc: no input files
gcc: no input files
../libtool: line 2253: X-g: command not found
../libtool: line 2253: X-O2: command not found
../libtool: line 2253: X-g: command not found
../libtool: line 2253: X-DDEBUG: command not found
../libtool: line 2253: X-I/usr/include/sigc++-2.0: No such file or directory
../libtool: line 2253: X-I/usr/lib/sigc++-2.0/include: No such file or directory
../libtool: line 2253: X-I/usr/local/include: No such file or directory
../libtool: line 1967: X-L/usr/local/lib: No such file or directory
../libtool: line 2422: Xrtorrent: command not found
../libtool: line 2427: X: command not found
../libtool: line 2434: Xrtorrent: command not found
../libtool: line 2442: mkdir /.libs: No such file or directory
如果不这么搞,会出现变异错误,这个错误郁闷了我很久 –_-!!
之后就完全没问题了。。
编译运行很正常
在用screen 运行很流畅 –_-!!
reference: [via]
另外还有一个脚步一步实现版本: http://ubuntuforums.org/showthread.php?t=1064377 wTorrent + rTtorrent installation script: Installing wTorrent on Ubuntu in 3 steps
Tags: Compiler,rTorrent,Ubuntu,Ubuntu 8.04.
http://trac.nchc.org.tw/cloud/wiki/waue/2009/0617
这篇文章已经叙述的很不错了
采用eclipse3.3 暂时是不会有任何问题,执行run as hadoop 那个wordcount会有错误提示

09/10/09 17:17:25 WARN conf.Configuration: DEPRECATED: hadoop-site.xml found in the classpath. Usage of hadoop-site.xml is deprecated. Instead use core-site.xml, mapred-site.xml and hdfs-site.xml to override
properties of core-default.xml, mapred-default.xml and hdfs-default.xml respectively
Usage: wordcount <in> <out>
代码问题,可以暂时不用管
另外文章中给出的
JarFile="sample-0.1.jar"
MainFunc="Sample.WordCount"
LocalOutDir="/tmp/output"
all:help
jar:
jar -cvf ${JarFile} -C bin/ .
run:
hadoop jar ${JarFile} ${MainFunc} input output
clean:
hadoop fs -rmr output
output:
rm -rf ${LocalOutDir}
hadoop fs -get output ${LocalOutDir}
gedit ${LocalOutDir}/part-r-00000 &
help:
@echo "Usage:"
@echo " make jar - Build Jar File."
@echo " make clean - Clean up Output directory on HDFS."
@echo " make run - Run your MapReduce code on Hadoop."
@echo " make output - Download and show output file"
@echo " make help - Show Makefile options."
@echo " "
@echo "Example:"
@echo " make jar; make run; make output; make clean"
这个makefile很不错,复制的时候注意使用tab
然后运行编译在eclipse3.3和3.4版本都很正常
目前有几个问题就是eclipse3.4版用hadoop-0.20.0-eclipse-plugin.jar 我这边出错,读不到这个插件,
用hadoop-0.19.2-eclipse-plugin.jar的时候连接不到本地的hadoop服务
还好用我最新编译的hadoop-0.20.1-eclipse-plugin.jar 可以正常使用,不过蛮搞笑的是用了这个,
在perspective添加了MapReduce的时候那个Map/Reduce Locations不会显示出来,要手动添加,
我不知道是我个人问题,还是普遍情况

目前都可以连接到我的hadoop服务上,可以在eclipse里面查看上传文件
eclipse3.3版本我是用0.20.0的eclipse-plugin
eclipse3.4版本我是用我自己编译的0.20.1的plugin 下载hadoop-0.20.1-eclipse-plugin.jar
Tags: Eclipse,eclipse-plugin,hadoop,hadoop-0.20.1-eclipse-plugin.jar,Linux,Ubuntu.
ubuntu系统默认是不加载的
所以不用umount设备之后再格式化
首先可以查看设备
sudo fdisk –l
然后用命令
硬盘格式化
#危险!将第二个硬盘的第一个分区格式化为 ext3 分区, mkfs.reiserfs mkfs.xfs mkfs.vfat
sudo mkfs.ext3 /dev/sdb1
然后用mount加载即可
不过我发现格式了好几次那个NTFS分区还在,重启也没用,依然无法格式化
后来找到硬盘管理图形软件gparted
用命令安装即可
sudo apt-get install gparted
然后在本地的terminal里面输入 sudo gparted即可开启
之后就类似pq 一样的硬盘分区管理了
分区格式化即可
然后修改/etc/fstab文件
/dev/sdb1 /mnt/hd ext3 defaults
这样每次开机都自动加载硬盘到/mnt/hd下了
然后再修改权限
sudo chmod -R 777 /mnt/hd 即可
Tags: chmod,ext3,fdisk,fstab,gparted,mkfs,mount,sdb,Ubuntu,umount.
STEP #1 – Add the repository in the source file
- edit /etc/apt/sources.list :
sudo gedit /etc/apt/sources.list
- at the end of the file add those 5 lines
# Ubuntu FreeNX Repository for Hardy
deb http://www.datakeylive.com/ubuntu hardy main
deb-src http://www.datakeylive.com/ubuntu hardy main
deb http://ppa.launchpad.net/marceloshima/ubuntu hardy main
deb-src http://ppa.launchpad.net/marceloshima/ubuntu hardy main
deb http://ppa.launchpad.net/freenx-team/ubuntu hardy main
deb-src http://ppa.launchpad.net/freenx-team/ubuntu hardy main
# Ubuntu FreeNX Repository for intrepid
deb http://ppa.launchpad.net/marceloshima/ubuntu intrepid main
deb-src http://ppa.launchpad.net/marceloshima/ubuntu intrepid main
deb http://ppa.launchpad.net/freenx-team/ubuntu intrepid main
deb-src http://ppa.launchpad.net/freenx-team/ubuntu intrepid main
# Ubuntu FreeNX Repository for jaunty
deb http://ppa.launchpad.net/marceloshima/ubuntu jaunty main
deb-src http://ppa.launchpad.net/marceloshima/ubuntu jaunty main
deb http://ppa.launchpad.net/freenx-team/ubuntu jaunty main
deb-src http://ppa.launchpad.net/freenx-team/ubuntu jaunty main
- save and than run the command
sudo apt-get update && sudo apt-get upgrade
STEP #2 – Install the FreeNX packages on your Ubuntu 8.04 machine
sudo apt-get install openssh-server tcl8.4 dbus-x11 libxcomp3 libxcompext3 nxlibs nxagent nxproxy freenx-server expect
STEP #3 – Install the NX Client for Windows
http://www.nomachine.com/download-client-windows.php
Download and install the executable
- to start/stop the server:
sudo /etc/init.d/freenx-server -start or –stop
[via]
方法管用,在我的8.04版本上,顺利安装顺利连上
但是在8.10上,无法找到nxclient源,删掉这个nxclient安装的选择,也能安装
但是在windows那login的时候
8.10那台怎么都连不到。认证错误,应该是key的问题……
Tags: FreeNX,hardy,intrepid,jaunty,NxClient,Ubuntu,Ubuntu 8.04,Ubuntu 8.10,Ubuntu 9.04.
貌似有人也有一样的问题,找不到hadoop.job.ugi
不过我也找不到。。搞了3个小时实在是奇怪
还是用svn put上去好了。。
正常的配置是
You will now be asked to fill in a number of parameters identifying the server. To connect to the VMware image, the values are:
Location name: (Any descriptive name you want; e.g., "VMware server")Map/Reduce Master Host: (The IP address printed at startup)Map/Reduce Master Port: 9001DFS Master Port: 9000User name: hadoop-user
Next, click on the "Advanced" tab. There are two settings here which must be changed.
Scroll down to hadoop.job.ugi. It contains your current Windows login credentials. Highlight the first comma-separated value in this list (your username) and replace it with hadoop-user.
Next, scroll further down to mapred.system.dir. Erase the current value and set it to /hadoop/mapred/system.
When you are done, click "Finish." Your server will now appear in the Map/Reduce Locations panel. If you look in the Project Explorer (upper-left corner of Eclipse), you will see that the MapReduce plugin has added the ability to browse HDFS. Click the [+] buttons to expand the directory tree to see any files already there. If you inserted files into HDFS yourself, they will be visible in this tree.
[via]
但是目前比较奇怪找不到这个hadoop.job.ugi无法显示。。
(全文…)
Tags: Eclipse,hadoop,hdfs,plugins,Ubuntu.