随笔分类 -  Linux

上一页 1 2
rsync 备份
摘要:Refer to http://jianlee.ylinux.org/Computer/Server/rsync.html简单使用 单机使用同步目录 A 到目录B,以 A 目录为基准,如果 A 目录没有,B 目录有的会删除。 A 目录有, B 目录没有的,就从 A 拷贝到 B 。示例 ("/data/projects/crepo" 是 A,"./" 是 B):$ rsync -av /data/projects/crepo ./注意!如果带目录 "/data/projects/crepo" 带 "/" 后缀,就备份 阅读全文
posted @ 2011-09-21 15:43 -Anny- 阅读(338) 评论(0) 推荐(0)
no such file to load -- zlib when using gem install
摘要:今天在buntu10.10使用源码安装完ruby1.9.2p290和rubygem1.8.10后,想利用gem去安装rails: gem install rails,结果提示 no such file to load -- zlib 错误。zlib is a library implementing the deflate compression method foundin gzip and PKZIP. 解决办法,安装zlib1g 和 zlib1g-dev 包(apt-get install 或者利用Synaptic),然后1.回到ruby源码目录/ext/zlib 下2. ruby ex 阅读全文
posted @ 2011-09-21 15:30 -Anny- 阅读(326) 评论(0) 推荐(0)
Workarounds on issues met when 'npm install' libs
摘要:1. Time outJust retry2. Some unmet dependencies after 'npm install'Just npm install XXX #(XXX means lib package name)3. The package version is lower or deprecated in package.jsonModify the version in package.json: e.x. make changes from "zmq": "1.0.1" to "zmq": 阅读全文
posted @ 2011-09-16 14:13 -Anny- 阅读(244) 评论(0) 推荐(0)
How to resolve such issue 'no such environment: default' when 'npm install' dependencies
摘要:I met such issue 'no such environment: default' when npm install some libs, such as iconv, hashlib...The workround is to modify /usr/local/lib/node/wafadmin/Build.py like below:def get_env(self): return self.env_of_name(DEFAULT)The original is likedef get_env(self): return self.env_of_name(& 阅读全文
posted @ 2011-09-16 11:37 -Anny- 阅读(652) 评论(0) 推荐(0)
查看Ubuntu操作系统位数
摘要:From http://wiki.ubuntu.org.cn/UbuntuSkills#.E6.9F.A5.E7.9C.8B.E7.B3.BB.E7.BB.9F.E6.98.AF32.E4.BD.8D.E8.BF.98.E6.98.AF64.E4.BD.8D 查看系统是32位还是64位 #查看long的位数,返回32或64getconf LONG_BIT#查看文件信息,包含32-bit就是32位,包含64-bit就是64位file /sbin/init 阅读全文
posted @ 2011-09-15 14:53 -Anny- 阅读(3032) 评论(0) 推荐(0)
linux 中i386 i686 i486 I586….等等是什么意思(转)
摘要:From http://sb123.org/893代表intel(英特尔)系列的cpu386 几乎适用于所有的 x86 平台,不论是旧的 pentum 或者是新的 pentum-IV 与 K7 系列的 CPU等等,都可以正常的工作!那个 i 指的是 Intel 兼容的 CPU 的意思,至于 386 不用说,就是 CPU 的等级啦!i586 就是 586 等级的计算机,那是哪些呢?包括 pentum 第一代 MMX CPU, AMD 的 K5, K6 系列 CPU ( socket 7 插脚 ) 等等的 CPU 都算是这个等级;i686 在 pentun II 以后的 Intel 系列 CPU 阅读全文
posted @ 2011-09-15 14:34 -Anny- 阅读(802) 评论(0) 推荐(0)
Git 和Github初次使用 (转)
摘要:转载请注出处 http://hi.baidu.com/kissdev/blog/item/944aa2fab2817215a8d311f1.html1. GIT相比CVS/SVN,Git 的优势:- 支持离线开发,离线Repository- 强大的分支功能,适合多个独立开发者协作- 速度块更多的细节参见 http://mgcore.com/viewthread.php?tid=15556Git使用指南 http://www.linuxgem.org/user_files/linuxgem/Image/git-tutor.pdf2. GitHubGitHub是一个托管Git (开源或闭源)项目的 阅读全文
posted @ 2011-08-23 17:33 -Anny- 阅读(800) 评论(0) 推荐(0)
chmod(转)
摘要:Refer to http://72.235.176.168/qnxman/chmod.htmlchmodchange file modes (POSIX)Syntax:chmod [-R] mode file...Options:-R Recursively change file modes. For each file that names a directory, chmod changes the file mode bits of the directory and all files in the file hierarchy below it.mode Represents t 阅读全文
posted @ 2011-08-23 11:10 -Anny- 阅读(399) 评论(0) 推荐(0)
Cannot Boot WEBrick: "WARN TCPServer Error: Address already in use "
摘要:Refer to: http://railsforum.com/viewtopic.php?id=16387我刚刚使用Ctrl+Z 去停止服务,当再次使用rails s启动时, 发现无法启动,提示WARN TCPServer Error: Address already in use,显然是端口被占用在 Ubuntu的console中,使用lsof|grep 3000列出所有包含3000的打开文件的信息,找到ruby 2949 limei 5u IPv4 19590 0t0 TCP *:3000 (LISTEN)然后在console中利用kill -9 2949 杀掉该进程即可PS:lsof( 阅读全文
posted @ 2011-08-22 11:10 -Anny- 阅读(430) 评论(0) 推荐(0)
[转载]Linux系统下超强远程同步备份工具Rsync使用详解
摘要:Refer to: http://yaronspace.cn/blog/index.php/archives/554服务器之 间常常要保持些文件或目录的一致,比如一些大的软件下载网站,它们通常使用多台服务器来提供下载服务。当一台服务器上的文件更新后,其它的服务器也需要更 新,而且 在更新的时候应该是只对新增或是修改过的文件进行更新,否则会造成网络带宽和时间的浪费。rsync就是能有效的保持文件及目录的一致的优秀软件。rsync,remote synchronize顾名思意就知道它是一款实现远程同步功能的软件,它在同步文件的同时,可以保持原来文件的权限、时间、软硬链接等附加信息,而且可以通过ss 阅读全文
posted @ 2011-08-17 17:37 -Anny- 阅读(339) 评论(0) 推荐(0)
How to get rid of 'Enter password to unlock your login keyring' in Ubuntu(转)
摘要:http://karuppuswamy.com/wordpress/2010/06/18/enter-password-to-unlock-your-keyring-prompt-in-ubuntu/Ubuntu uses Centralized password management tool called Seahorse. This tool is a front end GUI to GNOME’s keyring management system. In simple this tool stores all passwords with a master password wh 阅读全文
posted @ 2011-04-25 18:19 -Anny- 阅读(2980) 评论(0) 推荐(0)
PS-Process Status
摘要:From http://www.linux.ie/newusers/beginners-linux-guide/ps.php1. What does 'ps'mean?ps is the shortage for Process Status. The command should be used to display thecurrently running processes on Unix/Linux systems. If you know the 'Task-Manager'which pops up under Windows NT/2000/XP 阅读全文
posted @ 2011-04-15 15:39 -Anny- 阅读(349) 评论(0) 推荐(0)
VI-文本编辑器(转)
摘要:摘取http://topic.csdn.net/t/20030410/11/1642333.html在 linux 底下最常使用的文本编辑器为 vi ,请问如何进入编辑模式? 在一般模式底下输入: i, I, a, A 为在本行当中输入新字符;(出现 –Insert- ) 在一般模式当中输入: o, O 为在一个新的一行输入新字符; 在一般模式当中输入: r, R 为取代字符!(左下角出现 –Replace-) 如何由编辑模式跳回一般模式? [Esc] 若上下左右键无法使用时,请问如何在一般模式移动光标? h, j, k, l 若 [pagedown] [ pageup] 在一般模式无法使用时 阅读全文
posted @ 2011-04-02 17:10 -Anny- 阅读(194) 评论(0) 推荐(0)
Lesson two for linux command
摘要:13. Sortsort [选项] 文件说明:sort命令对指定文件中所有的行进行排序,并将结果显示在标准输出上。如不指定输入文件或使用“- ”,则表示排序内容来自标准输入。sort排序是根据从输入行抽取的一个或多个关键字进行比较来完成的。排序关键字定义了用来排序的最小的字符序列。缺省情况下以整行为关键字按ASCII字符顺序进行排序。改变缺省设置的选项主要有:- m 若给定文件已排好序,合并文件。- c 检查给定文件是否已排好序,如果它们没有都排好序,则打印一个出错信息,并以状态值1退出。- u 对排序后认为相同的行只留其中一行。 - o 输出文件 将排序输出写到输出文件中而不是标准输出,如果 阅读全文
posted @ 2011-04-02 11:38 -Anny- 阅读(160) 评论(0) 推荐(0)
Lesson one for linux command
摘要:1. Login:输入用户的账号: 系统管理员(root) 或者 普通管理员,登录成功后,系统管理员的提示符是#,普通用户的提示符是$。2. Exit:exit3. Change password:passwd4. 虚拟控制台虚拟控制台可使用户同时在多个控制台上工作,真正体现Linux系统多用户的特性。虚拟控制台的选择可以通过按下Alt键和一个功能键来实现,通常使用F1-F6例如,用户登录后,按一下Alt-F2键,用户又可以看到"login:"提示符,说明用户看到了第二个虚拟控制台。然后只需按Alt-F1键,就可以回到第一个虚拟控制台。 一个新安装的Linux系统默认允许用 阅读全文
posted @ 2011-04-01 18:09 -Anny- 阅读(203) 评论(0) 推荐(0)
Learn Linux command
摘要:http://www.yesky.com/SoftChannel/72348973209223168/20030306/1655510.shtml 阅读全文
posted @ 2011-04-01 17:40 -Anny- 阅读(111) 评论(0) 推荐(0)
Learn UBuntu
摘要:Ubuntu[ùbúntú]它主要是一个以桌面应用为主的Linux操作系统,ubuntu又是一个古非洲语,意思是:人道待人(对他人仁慈).ubuntu 也意谓着:我们都是同源一体Useful knowledge from http://linux.chinaitlab.com/ 阅读全文
posted @ 2011-04-01 17:27 -Anny- 阅读(196) 评论(0) 推荐(0)

上一页 1 2