首先升级到最新的firmware,这一步是为了可以使用ssh登录。如果你是第一次登录的话,密码是空的。

qiuworld$ ssh root@192.168.2.2
root@192.168.2.2's password: 
Last login: Thu Jan  1 10:08:45 1970 from 192.168.2.3
Linux (none) 2.6.10_mvl401_AG_NAS_3.1.1.exported #1 Thu Sep 6 11:57:38 JST 2007 armv5tejl GNU/Linux
 
Welcome to MontaVista(R) Linux(R) Professional Edition 4.0.1 (0502020).
 
 
root@(none):~#

系统时间非常不正确。

root@(none):~# date --set "Wed Jan 18 23:21:21 JST 2012"
Wed Jan 18 23:21:21 JST 2012

安装funplug,funplug的作用是安装编译好的软件。因为NAS一般都不带有编译环境,所以使用编译好[......]

Read more

Tags: ,

admin on 一月 4th, 2012

在安装了CentOS6.2之后,遇到了传说中的
kernel:do_IRQ: 3.189 No irq handler for vector (irq -1)
错误。其中3.189不一定,可能是0.189, 1.89, 2.189 …。这里,189是IRQ中断号,而前面的数字,我推测,应该是CPU号。

在网上查了无数资料,大多数人给出的答案是修改boot文件参数,加上pci=noms[......]

Read more

Tags: ,

admin on 十二月 6th, 2011

写了一个php页,但是总是运行到一半的时候停止响应,页面停留在上一页上。

第一步,先ping服务器,看服务器是否死机或者脱网。ping IP.如果并非物理性脱网,服务器可能受到了DDoS攻击。

第二步,如果服务器没有脱网,登录服务器,ssh xxx@xxx.com。如果远程登录不了,就超出了本文的范围。如果可以登录,需要留看内存,cpu占用情况。

2c39f9a2e58fdf8697[......]

Read more

Tags: , ,

admin on 十一月 15th, 2011

安装HTSeq,需要Python版本在2.5以上(但是在Python 3下不行),并且需要安装NumPy。如果已经安装了NumPy的话,安装HTSeq并不困难。但是如果没有安装的话,可能会比较麻烦。

首先,需要安装python 2.5以上的版本。因为centOS 5所带的Python版本是2.4,无法满足HTSeq的安装要求。但是,我并不建议直接升组安装python2.5以上的版本,因为yum等很多功能都由python来实现,所以我的办法是全新安装一个python的版本到一个指定的目录下面去。

下载并安装Python 2.7.2.

[ouj@qiuworld.com ~]$ tar -xzvf Python-2.7.2.tgz
[ouj@qiuworld.com ~]$ cd Python-2.7.2
[ouj@qiuworld.com Python-2.7.2]$ sudo yum install tcl #需要安装tcl/tk库
[ouj@qiuworld.com Python-2.7.2]$ sudo yum install tcl-devel
[ouj@qiuworld.com Python-2.7.2]$ sudo yum install tk
[ouj@qiuworld.com Python-2.7.2]$ sudo yum install tk-devel
[ouj@qiuworld.com Python-2.7.2]$ ./configure --prefix=/opt/python2.7 --with-threads --enable-shared
[ouj@qiuworld.com Python-2.7.2]$ make
[ouj@qiuworld.com Python-2.7.2]$ sudo make install
[ouj@qiuworld.com Python-2.7.2]$ sudo ln -s /opt/python2.7/bin/python /usr/bin/python2.7
[ouj@qiuworld.com Python-2.7.2]$ sudo echo '/opt/python2.7/lib'>> /etc/ld.so.conf.d/opt-python2.7.conf
[ouj@qiuworld.com Python-2.7.2]$ sudo /sbin/ldconfig
[ouj@qiuworld.com Python-2.7.2]$ python2.7
Python 2.7.2 (default, Nov 14 2011, 17:02:46) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named numpy

如果不新建/etc/ld.so.conf.d/opt-python2.7.conf文件并在当中写入一行/opt/python2.7/lib,将会得到如下错误:[......]

Read more

Tags: , ,

admin on 十一月 2nd, 2011

本来人们都说要避免使用document.write,因为网页一但加载完毕,它会重开网页,也就是会先生成一个空白页。于是最好使用DOM,然后append啊,html啊之类的。但是我想做的就是打开文件,然后使用document.write来重写整个网页。我的代码是

document.open();
document.write(html);
document.close();

在firefox[......]

Read more

Tags: , ,

admin on 九月 28th, 2011

在安装了graphviz之后,在R当中安装Rgraphviz。命令:

[ouj@qiuworld ~]$ sudo R CMD INSTALL Rgraphviz_1.30.1.tar.gz 
[sudo] password for ouj: 
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for whether compiler has bool... yes
configure: No --with-graphviz option was specified. Trying to find Graphviz using other methods.
checking for pkg-config... /usr/bin/pkg-config
Package libgvc was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgvc.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgvc' found
configure: pkg-config was not able to find the Graphviz library libgvc. This either indicates that Graphviz is old or that something is wrong. Verify Graphviz is installed and that PKG_CONFIG_PATH is correct.
checking for dotneato-config... no
configure: dotneato-config not found in PATH.
configure: Using default directory /usr/local, consider specifiying --with-graphviz
configure: Found Graphviz version '2.28.0'.
configure: Graphviz major version is '2' and minor version is '28'.
configure: Using the following compilation and linking flags for Rgraphviz
configure:    PKG_CPPFLAGS=-I/usr/local/include/graphviz
configure:    PKG_LIBS=-L/usr/local/lib/graphviz -L/usr/local/lib -lgvc
configure:    GVIZ_DEFS= -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28 
configure: Setting Graphviz Build version to '2.28.0'.
configure: creating ./config.status
config.status: creating R/graphviz_build_version.R
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c LL_funcs.c -o LL_funcs.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c Rgraphviz.c -o Rgraphviz.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c RgraphvizInit.c -o RgraphvizInit.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c agopen.c -o agopen.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c agread.c -o agread.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c agwrite.c -o agwrite.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c bezier.c -o bezier.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c buildEdgeList.c -o buildEdgeList.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c buildNodeList.c -o buildNodeList.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c doLayout.c -o doLayout.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c graphvizVersion.c -o graphvizVersion.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include/graphviz  -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28  -I/usr/local/include    -fpic  -g -O2 -c init.c -o init.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rgraphviz.so LL_funcs.o Rgraphviz.o RgraphvizInit.o agopen.o agread.o agwrite.o bezier.o buildEdgeList.o buildNodeList.o doLayout.o graphvizVersion.o init.o -L/usr/local/lib/graphviz -L/usr/local/lib -lgvc
installing to /usr/local/lib64/R/library/Rgraphviz/libs
** R
** inst
** preparing package for lazy loading
Creating a new generic function for "head" in "Rgraphviz"
Creating a new generic function for "tail" in "Rgraphviz"
Creating a new generic function for "lines" in "Rgraphviz"
Creating a new generic function for "plot" in "Rgraphviz"
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'Rgraphviz', details:
  call: value[[3L]](cond)
  error: unable to load shared object '/usr/local/lib64/R/library/Rgraphviz/libs/Rgraphviz.so':
  libgvc.so.6: cannot open shared object file: No such file or directory
 
  Check that (1) graphviz is installed on your system; (2) the
  installed version of graphviz matches '2.28.0'; this is the version
  used to build this Rgraphviz package; (3) graphviz is accessible to
  R, e.g., the path to the graphviz 'bin' directory is in the system
  'PATH' variable.  See additional instructions in the 'README' file of
  the Rgraphviz 'source' distribution, available at
 
  http://bioconductor.org/packages/release/bioc/html/Rgraphviz.html
 
  Ask further questions on the Bioconductor mailing list
 
  http://bioconductor.org/docs/mailList.html
 
 
Error: loading failed
Execution halted
ERROR: loading failed

不知道如何解决。在网上搜索了两天之后,并在邮件组里分问,分析认为是动态链接库的问题。解压原代码安装包,测试:

[ouj@qiuworld ~]$ R CMD ldd /usr/local/lib/libgvc.so.6
	linux-vdso.so.1 =>  (0x00007fff173fc000)
	libxdot.so.4 => /usr/local/lib/libxdot.so.4 (0x00002b5c100e0000)
	libgraph.so.5 => /usr/local/lib/libgraph.so.5 (0x00002b5c102e4000)
	libcdt.so.5 => /usr/local/lib/libcdt.so.5 (0x00002b5c104f0000)
	libpathplan.so.4 => /usr/local/lib/libpathplan.so.4 (0x00002b5c106f5000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00002b5c10914000)
	libexpat.so.0 => /lib64/libexpat.so.0 (0x00002b5c10b18000)
	libz.so.1 => /usr/lib64/libz.so.1 (0x00002b5c10d3a000)
	libm.so.6 => /lib64/libm.so.6 (0x00002b5c10f4f000)
	libc.so.6 => /lib64/libc.so.6 (0x00002b5c111d2000)
	/lib64/ld-linux-x86-64.so.2 (0x000000349cc00000)
[ouj@qiuworld ~]$ sudo R CMD ldd Rgraphviz/src/Rgraphviz.so
[sudo] password for ouj: 
	linux-vdso.so.1 =>  (0x00007fff58b40000)
	libgvc.so.6 => not found
	libc.so.6 => /lib64/libc.so.6 (0x00002aacd51ae000)
	/lib64/ld-linux-x86-64.so.2 (0x000000349cc00000)

果然。可是没有办法使用export 为sudo 输出共亨链接库,只好先使用

[ouj@qiuworld ~]$ sudo LD_LIBRARY_PATH=/usr/lib:/usr/local/lib R CMD INSTALL Rgraphviz_1.30.1.tar.gz
...

先安装上。接下来的问题是如何将LD_LIBRARY_PATH=LD_LIBRARY_PATH:/usr/local/lib写给每个用户,并在每次登录的时候都可以正常使用。否则在使用Rgraphviz包时,都需要LD_LIBRARY_PATH=/usr/lib:/usr/local/lib R来启动R。
[......]

Read more

Tags: , , ,

admin on 五月 17th, 2011

命令
描述


apropos whatis
显示和word相关的命令。 参见线程安全


man -t man | ps2pdf – > man.pdf
生成一个PDF格式的帮助文件

which command
显示命令的完整路径名

time command
计算命令运行的时间


time cat
开始计时. C[......]

Read more

Tags: ,

因为服务器并不是自己安装的,所以对其中的很多东西并不了然。我把过程记录下来,以便以后翻看。

首先使用phpinfo()函数查看apache2安装的目录是在/local/apache2,我需要修改的目标目录为/www/html/sample然后运行:

[jianhong@quiworld local]$ cd /local/apache2
[jianhong@quiworld apache2]$ ls
conf  conf.d  logs  modules  run
[jianhong@quiworld apache2]$ cd conf
[jianhong@quiworld conf]$ ls
gbrowse.conf  httpd.conf  httpd.conf.bak  magic
[jianhong@quiworld conf]$ sudo cp httpd.conf httpd.conf.0517.bak
[sudo] password for jianhong: 
[jianhong@quiworld conf]$ sudo vi httpd.conf
#
#Add by Jianhong Ou for alternative splicing miner
<Directory "/www/html/sample">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
 
[jianhong@quiworld conf]$ sudo /local/init.d/httpd restart

设置完成。

Tags: , ,