递归更改目录权限为775,常规文件权限为644

在windows系统上copy文件到linux系统上后,肯定是权限放到了最大了,全部为777的权限。当然,肯定要限制权限了。我们的目的是要把目录权限全部设定为775,文件权限全部设定为664。这两者被设定的权限不一致,应以如下方式解决。

$chmod 775 -R the_file_you_just_coped/

#-R的参数表示递归处理,将所有的文件目录和文件都设为775的权限。

$find the_file_you_just_coped/ -type f -exec chmod a-x {} \;

#-type参数表示查找文件类型,f代表一般正规文件;-exec参数表示对查找结果进行其它命令处理,在此对查找结果进行的处理是chmod a-x {},即删除x权限;\;是必须带的。

CentOS系统的安装

CentOS系统的安装。

#本说明书版本v2012.1.14.002。

#选择安装CentOS6.2 64位系统。

#该系统的安装文件为DVD文件,其中DVD1为主安装文件,DVD2为软件盘。安装过程中只使用
DVD1即可。

1 在官网上选择镜像站点,下载DVD文件。

2 在Windows系统下通过UltraISO软件和刻录机将DVD1刻录到DVD盘上。

#该系统无法使用U盘安装,使用DVD光驱安装是最简便的方法了。

3 使用DVD光驱按提示安装系统。

4 下载r8168网卡驱动并安装。

系统自带的驱动为r8169,在此驱动下网络的丢包率高达50%,因此在远程操作服务器时会卡的
不行。驱动下载地址为ftp://WebUser:AxPL9s3k@95.130.192.218/cn/nic/r8168-
8.027.00.tar.bz2。解压驱动包,在root权限下运行驱动包里面的autorun.sh文件即可
自动安装驱动。
介绍几个网络相关命令:
#lspci    用于查看pci设备,可以看到网卡的型号。
#ethtool -i eth0    用于查看网卡eth0的驱动。
#lsmod    用于查看所安装的驱动。

5 在联网下进行系统更新。

6 安装rpmforge来扩增套件来源。

根据使用的Unix版本到http://pkgs.repoforge.org/rpmforge-release/自行下载
相应的rpm包并安装。

7 通过yum命令安装常规程序。

常用的程序以及安装命令分别如下。
#sudo yum install 
gcc gcc-c++ gcc-gfortran  readline-devel libXt-devel    #安装R语言所需要的。
kernel-devel kernel-headers kernel    #安装显卡驱动所需要。
ffmpeg git yasm    #安装mplayer所需要的。
fuse-sshfs    #使用sshfs来进行ssh远程文件系统的挂载。
gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-ffmpeg #rhythmbox播放mp3格式解码所必须的。
libGL.so.1 libXmu.so.6 libXrender.so.1 libstdc++.so.5	#安装cinema5软件所需。
sharutils	#编码压缩打包--uudecode。
expat-devel	#安装perl模块XML::Parser所需,该模块为iprscan软件所需。
screen

8 安装ntfs-3g,用于挂载文件系统为ntfs的磁盘。

源码包的下载页面为http://www.tuxera.com/community/ntfs-3g-download/。

9 下载最新稳定版perl源码包并安装。

源码包下载页面为http://www.perl.org/get.html。

10 下载bioperl源码包并安装。

源码包的下载页面为http://bioperl.org/DIST/。
Bioperl的安装可以参考:
http://www.hzaumycology.com/chenlianfu_blog/?p=11

11 下载Adobe Flash Player并安装。

源码包下载页面为http://get.adobe.com/flashplayer/。

12 下载ClustalW2并安装。

源码包下载页面为ftp://ftp.ebi.ac.uk/pub/software/clustalw2/。

13 下载R源码包并安装。

源码包下载页面为http://mirrors.ustc.edu.cn/CRAN/。

14 下载mplayer源码包并安装。

源码包下载页面为http://www.mplayerhq.hu/design7/dload.html。
要是遇到播放视频有声音没画面,出现“"Can't open /dev/fb0: "这样的错误提示。
则进行如下操作
#yum install gtk+****devel zlib****devel;
#yum install *x11*;
然后再重新编译安装mplayer就好啦。

15 下载显卡驱动并安装。

****************************************************************************
安装命令:
#sh NVIDIA-Linux-x86-XXXX.-pkg1.run -k $(uname -r)

在安装结束时,它会询问是否由安装程序自动生成新的xorg.conf文件,建议选“YES”。若出现X Window无法启动等问题,将/etc/X11/xorg.conf.backup恢复即可。

安装过程中可能会出现的错误:

    ERROR: Unable to find the kernel source tree for the currently running kernel.
    Please make sure you have installed the kernel source files for your
    kernel and that they are properly configured; on Red Hat Linux systems, cant.t
    for example, be sure you have the ‘kernel-source’ RPM installed. If you
    know the correct kernel source files are installed, you may specify the
    kernel source path with the ‘–kernel-source-path’ command line option.

如果出现这个错误,则说明引用了错误的kernel source,可以在安装命令后添加参数指定。
#sh NVIDIA-Linux-x86-1.0-9755-pkg1.run --kernel-source-path=/usr/src/kernels/2.6.18-1.2798.fc6-i686

原因在于nvidia installer默认会去/lib/modules/2.6.18-1.2798.fc6/build寻找核源码,而该链接指向/usr/src /kernels/2.6.18-1.2798.fc6-i586,正确应为/usr/src/kernels/2.6.18-1.2798.fc6- i686。

    ERROR:
    Unable to load the kernel module ‘nvidia.ko’. This happens most frequently when this kernel was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the kernel target, or if a driver such as rivafb/nvidiafb is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s).

则是因为没有指明所要安装的内核版本,即需要添加参数“-k $(uname -r)”。
****************************************************************************

 

Bioperl安装

1 更新CPAN

>perl -MCPAN -e shell
cpan>install Bundle::CPAN
cpan>q

修改CPAN源

perl -p -i -e "s#urllist.*#urllist' => [q[http://mirrors.aliyun.com/CPAN/], q[http://mirrors.163.com/CPAN/]],#" /usr/share/perl5/CPAN/Config.pm

2 安装/更新 Module::Build,并设置为默认的安装工具

>cpan
cpan>install Module::Build
cpan>o conf prefer_installer MB
cpan>o conf commit
cpan>q

3 安装expat library

>cpan
cpan>o conf makepl_arg "EXPATLIBPATH=/non-standard/lib EXPATINCPATH=/non-standard/include"
cpan>o conf commit

4 使用最简易的方法安装bioperl

1.到http://www.bioperl.org/wiki/Getting_BioPerl下载最新的源码包

$ wget -c http://bioperl.org/DIST/BioPerl-1.6.1.tar.bz2

2.解压缩文件,并改变目录到解压缩的文件夹中

$ tar jxvf BioPerl-1.6.1.tar.bz2
$ cd BioPerl-1.6.1

3.安装bioperl

>perl Build.PL
>./Build test
>./Build install (需要在perl5/site_perl/source中有写权限)

5 使用CPAN shell来安装BioPerl

1.打开cpan

>perl -MCPAN -e shell
>cpan

2.查看安装的BioPerl版本很文件

cpan>d /bioperl/

3. 安装BioPerl

cpan>install C/CJ/CJFIELDS/BioPerl-1.6.1.tar.gz
cpan>force install C/CJ/CJFIELDS/BioPerl-1.6.1.tar.gz (强制安装)

6 编译安装

perl Makefile.PL # makes the system specific makefile
make # builds all the libaries
make test # runs a short test
make install # installs the package correctly.