Archive for the 'Ubuntu' Category

ADSL & Ubuntu Desktop 6.06.1 LiveCD

I try Ubuntu Desktop LiveCD at home, and post my first blog at Ubuntu.
My PC is very old (bought at 2001), CPU is Celeron 700, Memory is 512M.
I use ADSL, so before left office, I have gotten how to use adsl in Ubuntu, it is very easy, just run
pppoeconf
and type the name/password.
it is no bad.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

Vmware Workstation虚拟机下安装Ubuntu Server

因为工作的需要,开始学习Linux,看到网上Ubuntu比较火,就选择从Ubuntu开始学习Linux。
开始安装之前,先对Ubuntu做个简单的介绍(摘自Ubuntu中文网)

Ubuntu 是一个完全基于 Linux 的操作系统,它不但免费,而且有专业人员和业余爱好者共同为其提供技术支持。爱好者的数量是很大的,我们希望你也能加入!
Ubuntu 爱好者社群背后的理念是“Ubuntu 哲学”:软件应该是免费的,世界各地的用户都应能够用上以他们自己的语言为界面语言的软件,他们能力上的缺失也不应该成为使用软件的障碍。此外,他们也应该拥有按照个人需要任意定制和修改软件的自由。
这些自由令 Ubuntu 与商业软件有着根本性的不同:你不但可以免费获得软件,而且还拥有依个人需要修改软件的自由。
Ubuntu 既适合服务器、也适合个人家用。目前的 Ubuntu 版本支持 PC(Intel x86)、64-bit PC(AMD 64)和PowerPC(苹果 iBook 和 Powerbook,G4 和 G5)结构。
Ubuntu 包括超过一万六千种软件,但其核心桌面组件的大小不超过一张 CD 光盘的容量。Ubuntu 可以胜任所有常规桌面工作,从文字处理、试算表到网络服务器到编程工具。详情查看 Ubuntu 于桌面 Ubuntu 于服务器.

我的操作系统环境是Windows XP
准备工作:
安装Vmware,这个没有什么特别的,这里就不介绍了。
获得Ubuntu Server:
通过Shipit – Ubuntu 光盘发行系统免费订购光盘版,不过因为需要4-6个星期,所以如果你的带宽还可以接收的话,建议还是自己下载Ubuntu Server最新版本吧,速度还是很快的。
安装Ubuntu Server:

  • 运行Vmware
  • 创建新的Virtual Machine
  • Virtual Machine Configuration选Typical
  • Guest Operation System选Linux,Version选Ubuntu
  • Network connection选Use bridged networking
  • Disk capacity你看着办吧,我选的是2G。
  • Start the Virtual machine
  • 安装时选择LAMP Server版本(这个自带了Apache2,PHP5,Perl5)
  • 接下来的工作就不多说了,语言版本建议选择英文,不然安装好的操作系统有乱码。

安装成功后,我做了如下工作:

  • 修改root的密码,我喜欢在root环境下工作,这样就没有必要每次都在命令前面写sudo了
  • sudo passwd root
    密码自己设。

  • 备份并更新sources.list
  • cd /etc/apt
    mv sources.list sources.list.1
    wget http://blog.rubypdf.com/wp-download/sources.list
    apt-get update

  • 为了便于远程控制(Vmware下使用很不方便),安装sshd
  • apt-get install openssh-server
    下载windows版本的ssh,我选择的是putty,这样就可以方便地在windows环境下操作Ubuntu了。

  • 另外推荐一款web版本的管理程序webmin
  • 下载webmin1.300
    安装:dpkg --install webmin_1.300_all.deb
    自动安装成功后,就可以通过http://localhost:10000/进行管理了(默认用户名和密码分别是root/password)。

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

tree,linux(Unix)下按层级显示目录结构的脚本

因为想生成Grails创建的目录结构,就尝试ls命令,发现不能满足我的要求(能力不够),网上找到这么一个脚本Tree.sh,感觉不错,这里贡献下,顺便说下安装过程中碰到的一个小问题。
我在Ubuntu下直接下载tree.sh并按要求安装,然后运行tree,得到如下错误:

/bin/sh^M: bad interpreter: No such file or directory

一时没有了主意,还是google吧,结果很少,但不是零,打开页面一看,不知哪国语言,但稀里糊涂地感觉是文本文件的类型问题,想了想,还是自己创建个tree文件,然后把tree.sh里的内容copy过来好了,这招的确有效,不然还要找工具来转换,因为我还不知道什么工具能做这样的转换呢(Linux刚刚入门不到一个星期)。

#!/bin/sh

#######################################################
# UNIX TREE #
# File: ~/apps/tree/tree.sh #
# Version: 2.1 #
# Displays Structure of Directory Hierarchy #
# —————————————– #
# This tiny script uses “ls”, “grep”, and “sed” #
# in a single command to show the nesting of #
# sub-directories. #
# #
# Setup: #
# % cd ~/apps/tree #
# % chmod u+x tree.sh #
# % ln -s ~/apps/tree/tree.sh ~/bin/tree #
# #
# Usage: #
# % tree [directory] #
# #
# Examples: #
# % tree #
# % tree /etc/opt #
# % tree .. #
# #
# Public Domain Software — Free to Use as You Like #
# http://www.centerkey.com/tree #
#######################################################

echo
if [ "$1" != "" ] #if parameter exists, use as base folder
then cd $1
fi
pwd
ls -R | grep “:$” | \
sed -e ’s/:$//’ -e ’s/[^-][^\/]*\//–/g’ -e ’s/^/ /’ -e ’s/-/|/’
# 1st sed: remove colons
# 2nd sed: replace higher level folder names with dashes
# 3rd sed: indent graph three spaces
# 4th sed: replace first dash with a vertical bar
if [ `ls -F -1 | grep "/" | wc -l` = 0 ] # check if no folders
then echo ” -> no sub-directories”
fi
echo
exit

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride