wordpress的安装

今天发现wordpress对于写blog是个非常优秀的软件,于是将之安装到服务器上。安装过程如下:

1. 下载wordpress

$ wget -c http://cn.wordpress.org/wordpress-3.4.1-zh_CN.zip

2. 将wordpress-3.4.1-zh_CN.zip上传到服务器的 /var/www/html/ 文件夹中并解压

# cd  /var/www/html/
# unzip wordpress-3.4.1-zh_CN.zip
# mv wordpress wordpress_chenlianfu

3. 安装 php-devel 和 php-mysql 等插件

# yum install -y php php-devel php-mysql

4. 创建 wordpress 数据库

$ mysql -u root -p
mysql> create database wordpress

5. 在/etc/httpd/conf/httpd.conf中加入下一行,并重启httpd服务

Alias /chenlianfu_blog "/var/www/html/wordpress_chenlianfu"
# /etc/init.d/httpd  restart

6. 安装并配置wordpress

在浏览器输入http://www.hzaumycology.com/chenlianfu_blog/wp-admin/install.php,进入安装界面,按提示进行,将生成的config文件内容写入到配置文件中。

vim /var/www/html/wordpress_chenlianfu/wp-config.php

 

KVM安装虚拟机

自CentOS 6开始,虚拟化平台已经从xen转向KVM,所以在CentOS 6安装KVM还是非常的简单的。

CentOS 6安装配置KVM

1、安装KVM

#yum groupinstall Virtualization 'Virtualization Client'

2、安装api支持

#yum install libvirt
#service libvirtd start

3、验证是否已经载入KVM模块

$ lsmod | grep kvm

4、使用virt-manager安装guest

virt-manager是一个api gui工具,可以很方便的管理虚拟机。下面简单介绍使用virt-manager安装虚拟机系统。

1)打开virt-manager,Add-connection,hypervisor选择QEMU/KVM,点击connect。
2)在连接localhost(QEMU)右键-NEW,输入guest名称,还有选择安装方式,我这里选择
iso文件安装,点击forword。
3)选择iso文件路径,点击forword。
4)定义分配内存及cpu个数。
5)定义磁盘映像大小。
6)下一步就是常规的系统安装了。

5、使用virt-install安装guest

当你的CentOS没有桌面环境时,可以使用virt-install命令安装,如:

1、输入虚拟机名称
2、分配多少内存
3、定义虚拟机磁盘映像的位置
4、此步可以直接输入iso的位置或是url
5、进行系统常规安

 

BLAST+中makeblastdb参数详解

一般我们是有一个fasta文件用来格式化数据库,以前的命令是formatdb,现在是makeblastdb

一般用到的格式如下:

makeblastdb -in input_file -dbtype molecule_type -title database_title -parse_seqids -out database_name -logfile File_Name

注意:BLAST+2.2.24中这个参数不要加 -parse_seqids,不然成死循环

-in 后接输入文件,你要格式化的fasta序列
-dbtype 后接序列类型,nucl为核酸,prot为蛋白
-title 给数据库起个名,好看~~(不能用在后面搜索时-db的参数)
-parse_seqids 推荐加上,现在有啥原因还没搞清楚
-out 后接数据库名,自己起一个有意义的名字,以后blast+搜索时要用到的-db的参数
-logfile 日志文件,如果没有默认输出到屏幕

MegaBlast/Discontiguous MegaBlast/BlastN, Blastp/PSI-Blast/PHI-BLAST的区别与选择

从blastn页面上的简单帮助可以看到Highly similar sequences (megablast)多用于比较相似性比较高(相似性在95%以上)的序列,速度快;More dissimilar sequences (discontiguous megablast)用于相似性稍低于megablast的比对,但是灵敏度和精确度更高,多用于不同物种间的同源比对;而Somewhat similar sequences (blastn)用于比对相似性较差的序列,可以比对最短7个碱基的长度,所以比对精确度最高,比对结果最多,速度最慢。

所以,在选择的时候根据你提交的序列和搜索的目的进行选择,如果是想看这段序列在数据库当中是否有收录,可以用megablast,如果想用其他物 种的基因注释信息来注释一个未注释物种的序列,可以选择discontiguous megablast,如果想得到更多更全面的结果,可以选择blastn。

说完blastn,接着说blastp~blsatp中也有三个不同的算法可以选择,如下:

blastp (protein-protein BLAST)就是简单地进行蛋白与蛋白的比对,寻找蛋白质相
似序列;

PSI-BLAST (Position-Specific Iterated BLAST)叫做位点特异性迭代比对,它
在蛋白质数据库中循环搜索查询蛋白质,所有前一次被psi-blast发现的统计显著蛋白质序
列将整合成新记分矩 阵,通过多次迭代比对,直到不再发现统计显著的新蛋白质;

PHI-BLAST (Pattern Hit Initiated BLAST)可以在搜索的时候限定蛋白质的模式
(pattern),只给出包含此模式的比对结果。

Blastp/PSI-Blast/PHI-BLAST都是蛋白序列与蛋白序列之间的Blast比对

1. Blastp: 标准的蛋白序列与蛋白序列之间的比对 Standard protein BLAST is designed for protein searches. Blastp用于确定查询的氨基酸序列在蛋白数据库中找到相似的序列。跟其它的Blast程序一样,目的是要找到相似的区域。

2. PSI-BLAST : 敏感度更高的蛋白序列与蛋白序列之间的比对 PSI-BLAST is designed for more sensitive protein-protein similarity searches. Position-Specific Iterated (PSI)-BLAST,是一种更加高灵敏的Blastp程序,对于发现远亲物种的相似蛋白或某个蛋白家族的新成员非常有效。当你使用标准的Blastp 比对失败时,或比对的结果仅仅是一些假基因或推测的基因序列时(”hypothetical protein” or “similar to…”),你可以选择PSI-BLAST重新试试。

3. PHI-BLAST : 模式发现迭代BLAST PHI-BLAST can do a restricted protein pattern search. PHI-BLAST, 模式发现迭代BLAST, 用蛋白查询来搜索蛋白数据库的一个程序。仅仅找出那些查询序列中含有的特殊模式的对齐。

PHI的语法详细介绍看这里:http://www.ncbi.nlm.nih.gov/blast/html/PHIsyntax.html

BLAST本地化web运用

1 首先,到ftp://ftp.ncbi.nih.gov/blast/executables/release/LATEST/下载最新的版本的wwwblast(写此文时对应的文件为wwwblast-2.2.26-x64-linux.tar.gz)。

2 然后将该文件解压,不需要configure即可使用。设定所解压的文件夹到Apache路径。

将如下几行加入/etc/httpd/conf/httpd.conf中:

Alias /blast "/home/chenlianfu/programs/wwwblast"
<Directory "/home/chenlianfu/programs/wwwblast">
    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

3 wwwblast默认提供了2个test的数据库,分别为test_na_db和test_aa_db。

4 使用正常版的 makeblastdb 来创建数据库,并将数据库文件放入文件夹的db/路径下。

5. 修改 blast.html 文件。

<select name = "DATALIB">
    <option VALUE = “nt"> nt #nt是db/中所含有的数据库名。
</select>

6. 修改 blast.rc 配置文件。

NumCpuToUse     6	#CPU的使用个数,线程数。

blastn nt	#blastn程序所能使用的数据库名称。
tblastn nt	#下同...
tblastx nt 
blastp 
blastx

5 这样,在网页中就能正常使用nt数据库了。

UniProtKB

1. UniProtKB是什么?
UnProtKB,即UniProt Knowledgebase,主要包括两个部分:UniProtKB/Swiss-Prot和UniProtKB/TrEMBL。其中UniProtKB/Swiss-Prot是手工注释和修正的蛋白质数据库,来源于实验结果,计算和科学结论。后来由于精确的Swiss-Prot数据库无法很快得以扩大从而包含所有的蛋白质序列,于是加入了UniProtKB/TrEMBL这一部分,该数据库蛋白质主要经过计算来进行自动注释,分类。
2. UniProtKB下载
UniProt数据库每4周更新一次,下载地址如下:

ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz
ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_trembl.fasta.gz
uniprot_sprot.fasta.gz 56M
uniprot_trembl.fasta.gz 5.3G

Configuring_@INC_of_perl

Perl uses by default the array @INC as include path when searching for modules to load. This path is compiled into the perl binary when building it from source and can be printed by running perl -V, which will show something like:

$ perl -V
...
Compiled at Jun 22 2012 13:27:28
@INC:
    /usr/local/lib64/perl5
    /usr/local/share/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib64/perl5
    /usr/share/perl5

1. Using the module lib

The standard module lib can be used to specify an explicit path to include. It must be stated at the top of the script:

#!/usr/bin/perl
#
use lib "/opt/special/plib";
use strict;
use warnings;
..

2. Using the switch ­I at the command line

The switch ­I can be used to specify additional library locations when invoking the interpreter.

perl -I /opt/special/plib script.pl

3. Using the switch ­I in the first line of the script

The same ­I switch can be added to the interpreter specification.

#!/usr/bin/perl -I /opt/special/plib
#
use strict;
use warnings;
..

4. Manipulating @INC directly

The array @INC can be manipulated directly using array operations

#!/usr/bin/perl
#
BEGIN {
unshift(@INC, "/opt/special/plib");
}
use strict;
use warnings;

This is the same as using the module lib, which in fact does something like this.

5. Using the environment variable PERL5LIB

The environment variable PERL5LIB can be used to specify additional include directories when running a perl script.

> export PERL5LIB=/opt/special/plib  #Adding this sequnce to 
/etc/profile, then the @INC would be changed persistently.
> /path/to/script.pl

6. Changing @INC at compile time

CentOs配置OpenSSH无密码登陆

1 配置服务器/etc/ssh/sshd_config文件。

去掉以下内容的注释符“#”或修改成如下方式。

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
PermitRootLogin no    #不允许root用户登陆ssh,目的是为了系统安全。
Protocol 2    #选择第二种协议,目的是为了系统的安全。

2 在客户端生成一对公私钥,将公钥复制到服务器的user/.ssh/authorized_keys文件中。

$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
$ scp ~/.ssh/id_dsa.pub user@Sever's_IP:/home/user/.ssh/
$ ssh user@Sever's_IP
$ cat /home/user/.ssh/id_dsa.pub >> /home/user/.ssh/authorized_keys

3 修改远程服务器/home/user/.ssh/authorized_keys的权限为600,即可通过OpenSSH远程无密码登陆服务器。

$ chmod 600 ~/.ssh/authorized_keys

4.添加id_rsa到ssh-agent。如果连接服务器返回“Agent admitted failure to sign using the key”。

$ ssh-add
再次连线就正常了。

5. 设置 selinux

若没有关闭 selinux,则依然不能无密码登录,关闭即可。

$ sudo setenforce 0

此外,若用户的家目录权限过大,比如为777,则也会导致即使正确进行以上设置后,任然需要输入密码登录。

CentOS搭建GTK

1. GTK+的安装

如果系统中已经安装有 GTK+,要安装新版本的 GTK+ 时,最好使用新的安装目录/opt/gtk,GTK+ 及其依赖库都将安装在这个目录下。

原因为:在 Linux 系统上使用的很多软件都是在 GTK+ 库的支持下运行的(比如 GNOME桌面)。如果相关的 GTK+ 库发生损坏,或者库的版本发生了变化,轻微的可造成某些程序不能正常运行,严重的可能会给系统运行带来障碍(比如进入不了桌面环境,等等。)因此,新版本的 GTK+ 的安装应该避免对原来的 GTK+ 造成影响,以保证系统的正常运行。

1.1 配置重要的环境变量

$ export PKG_CONFIG_PATH=/opt/gtk/lib/pkgconfig:$PKG_CONFIG_PATH
$ export LD_LIBRARY_PATH=/opt/gtk/lib64:/opt/gtk/lib:$LD_LIBRARY_PATH

一些程序的运行需要依赖于此环境变量,可以将其加入.bashrc配置文件中。

1.2 按顺序下载源码包并安装

最好各个选择稳定版本,参考:http://www.gtk.org/download/linux.php

根据依赖关系的要求,库的安装大致按照这样的先后顺序进行:libffi(3.0.13)GLib(2.34.3)Atk(2.6.0)、[optional: poppler]、[optional:libspectre,需要libgs(ghostscript)]、cairo(1.10.2)Pango(1.32.6)TIFF librarygdk-pixbuf(2.26.5)Gtk+(3.6.0)

其中TIFF library可以使用‘yum install libtiff*’进行安装。

安装Pango的时候,提示错误:
configure: error: *** Could not enable any backends.
*** Must have at least one backend to build Pango.
此时,需要安装:
HarfBuzz(old-master),需要安装老版本的。
fontconfig(2.10.93),需要安装最新版的。
FreeType(2.4.9)

在安装gtk+-3.6 configure的时候,提示错误:
configure: error: Package requirements (atk atk-bridge-2.0) were not met
则需要安装 at-spi2-core-2.6.3at-spi2-atk-2.6.2

花费了近一晚上,终于搞定了,真是不简单啊…
其实,可以按如下顺序安装:

libxml2-2.9.1   ftp://xmlsoft.org/libxml2/libxml2-2.9.1.tar.gz
DocBook-utils-0.6.14    ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/docbook-utils-0.6.14.tar.gz
libxslt-1.1.28  ftp://xmlsoft.org/libxslt/libxslt-1.1.28.tar.gz
SGMLSpm-1.1     http://search.cpan.org/CPAN/authors/id/R/RA/RAAB/SGMLSpm-1.1.tar.gz
libffi-3.0.13   ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz
xcb-proto-1.8   http://xcb.freedesktop.org/dist/xcb-proto-1.8.tar.bz2
FreeType-2.4.12 ftp://mirror.ovh.net/gentoo-distfiles/distfiles/freetype-2.4.12.tar.bz2
expat-2.1.0     http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gz
libXau-1.0.8    ftp://ftp.x.org/pub/individual/lib/libXau-1.0.8.tar.bz2
libXdmcp-1.1.1  ftp://ftp.x.org/pub/individual/lib/libXdmcp-1.1.1.tar.bz2
Fontconfig-2.10.2       http://fontconfig.org/release/fontconfig-2.10.2.tar.bz2
GLib-2.34.3     ftp://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.3.tar.xz
Pixman-0.30.0   http://cairographics.org/releases/pixman-0.30.0.tar.gz
libxcb-1.9.1    http://xcb.freedesktop.org/dist/libxcb-1.9.1.tar.bz2
libpng-1.6.2    http://downloads.sourceforge.net/libpng/libpng-1.6.2.tar.xz
Cairo-1.12.14   http://cairographics.org/releases/cairo-1.12.14.tar.xz
Graphite2       http://projects.palaso.org/attachments/download/384/graphite2-1.2.3.tgz
ASM-2.10.07     http://www.nasm.us/pub/nasm/releasebuilds/2.10.07/nasm-2.10.07.tar.xz
D-Bus-1.6.10    http://dbus.freedesktop.org/releases/dbus/dbus-1.6.10.tar.gz
ICU-51.2        http://download.icu-project.org/files/icu4c/51.2/icu4c-51_2-src.tgz
Intltool-0.50.2 http://launchpad.net/intltool/trunk/0.50.2/+download/intltool-0.50.2.tar.gz
gobject-introspection-1.34.2    ftp://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.34/gobject-introspection-1.34.2.tar.xz
GTK-Doc-1.18    ftp://ftp.gnome.org/pub/gnome/sources/gtk-doc/1.18/gtk-doc-1.18.tar.xz
libjpeg-turbo-1.3.0     http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.3.0.tar.gz
LibTIFF-4.0.3   ftp://ftp.remotesensing.org/libtiff/tiff-4.0.3.tar.gz
at-spi2-core-2.6.3      ftp://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.6/at-spi2-core-2.6.3.tar.xz
Harfbuzz-0.9.18 http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.18.tar.bz2
ATK-2.6.0       ftp://ftp.gnome.org/pub/gnome/sources/atk/2.6/atk-2.6.0.tar.xz
at-spi2-atk-2.6.2       ftp://ftp.gnome.org/pub/gnome/sources/at-spi2-atk/2.6/at-spi2-atk-2.6.2.tar.xz
gdk-pixbuf-2.26.5       ftp://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.5.tar.xz
Pango-1.32.5    ftp://ftp.gnome.org/pub/gnome/sources/pango/1.32/pango-1.32.5.tar.xz
GTK+-3.6.4              ftp://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xz

以上安装中需要注意的是:1. 在安装DocBook-utils-0.6.14的时候,configure后需要接参数–disable-docs,否则fontconfig的安装会报错。 2. 若提示错误:glib-compile-schemas: command not found,则表示在root用户中没有该命令,于是make install不成功,需要使root用户的$PATH中含有/opt/gtk/bin目录。

学习 Linux LVM

1,首先,了解相关的术语,参考下表:

*************************** 1. row ***************************
英文简称: LVM
中文名称: 逻辑卷管理
英文全称: Logic Volume Management
    解释: LVM能将不同的物理卷(即类型为8E,无文件系统的LVM分区)整合到一起,合并
成一个大分区(无论这些小的LVM分区是否在一个磁盘上),这个大分区称为卷组。然后在这个
大分区上创建逻辑卷。这样做的好处是可以随时并入新的物理卷,增加大分区,然后随时扩增
LVM下的逻辑卷大小而不需要重启系统。
*************************** 2. row ***************************
英文简称: PV
中文名称: 物理卷
英文全称: Physical Volume
    解释: 硬盘上的分区
*************************** 3. row ***************************
英文简称: LG
中文名称: 逻辑卷
英文全称: Logic Volume
    解释: 将一个大区再进行分区所得的分区,为逻辑卷。在LVM中将很多物理卷(PV)合并
成卷组(VG),在对这个大的卷组进行分区得到逻辑卷(LV)。逻辑卷才可以被格式化,挂载进
行数据读写。
*************************** 4. row ***************************
英文简称: VG
中文名称: 卷组
英文全称: Volume Group
    解释: 卷组包含单个或多个物理卷

2, 接着掌握相关命令,参考下表:

*************************** 1. row ***************************
      command: cfdisk
     parmeter: 磁盘分区工具,图形化界面,注意Type选项,选择8E即为LVM分区
usage_example: 图形化界面,看之即懂
*************************** 2. row ***************************
      command: pvcreate
     parmeter: 将现有的分区初始化成用于LVM的物理卷
usage_example: pvcreate /dev/sda1
*************************** 3. row ***************************
      command: vgcreate
     parmeter: 使用物理卷创建出一个卷组,-s参数能设定增量单位
usage_example: vgcreate -s 32M vg_hzaumycology /dev/sda2,创建一个卷
组vg_hzaumycology,并将/dev/sda2加入到卷组。
*************************** 4. row ***************************
      command: vgextend
     parmeter: 将一个物理卷加入到卷组中
usage_example: vgextend vg_hzaumycology /dev/sdb1,该命令将物理卷/dev
/sdb1加入到卷组vg_hzaumycology中。
*************************** 5. row ***************************
      command: lvcreate
     parmeter: 在卷组上创建逻辑卷(LV), -L 指定创建LV大小, -n LV的名字
usage_example: lvcreate -L 300G -n vg_hzaumycology-lv_home vg_hza
umycology,在卷组vg_hzaumycology上创建一个大小为500G的逻辑卷,卷名为vg_hz
aumycology-lv_home。
*************************** 6. row ***************************
      command: vgdisplay
     parmeter: 查看现有的卷组情况
usage_example: vgdisplay卷组状态
*************************** 7. row ***************************
      command: mkfs.ext4
     parmeter: 格式化工具,按默认参数格式化分区即可
usage_example: mkfs.ext4 /dev/vg_hzaumycology/vg_hzaumycology-lv_
home,将卷组中的逻辑卷格式化成ext4文件系统,
*************************** 8. row ***************************
      command: lvextend
     parmeter: 增加逻辑卷的空间 -L后接+1G,表示增加1G空间, -L后接1G,表示这
个LV的空间是多少
usage_example: lvextend -L +500G /dev/vg_hzaumycology/vg_hzaumyco
logy-lv_home,将该逻辑卷扩增500G空间。
*************************** 9. row ***************************
      command: df
     parmeter: 查看磁盘使用状况
usage_example: df -m,查看的磁盘大小以M
*************************** 10. row ***************************
      command: resize2fs
     parmeter: 扩充文件系统
usage_example: reisize2fs /dev/vg_hzaumycology/vg_hzaumycology-lv
_home,扩充该逻辑卷,和lvextend命令配合来增加磁盘空间,对应的文件系统为ext4。
*************************** 11. row ***************************
      command: resize2fs_
     parmeter: 扩充文件系统
usage_example: reisize_reiserfs /dev/vg_hzaumycology/vg_hzaumycol
ogy-lv_home,扩充该逻辑卷,和lvextend命令配合来增加磁盘空间,不过对应的文件系
统为ReiserFS。

3, 然后,按步骤了解LVM机制。以在CentOS6.2上添置一个3TB硬盘为例。

<1> 安装需要的软件和程序

#yum install cfdisk 
安装cfdisk。CentOS6.2默认没有cfdisk这个命令,先安装该命令。

<2> 磁盘分区,创建物理卷

使用cfdisk命令来创建type为8E的LVM物理卷(PV)。
使用cfdisk命令将3TB硬盘分为/dev/sdb1(type为8E)和/dev/sdb2(Type为83)
两个分区,大小都为1500G。
partprobe 强制让核心重新捕捉一次 partition table.

<3> 创建卷组(VG)

使用vgcreate创建一个卷组。
CentOS6.2系统在装机是使用的默认设置,将/dev/sda1设为主分区,不属于LVM,
挂载到CentOS6.2系统/boot目录下,用于系统的启动;将/dev/sda2分区加入卷
组。
#vgcreate vg_hzaumycology /dev/sda2;

<4> 创建逻辑卷(LV)

使用lvcreate创建逻辑卷。
CentOS6.2默认创建了3个逻辑卷(LV)。
#lvcreate -L 50G -n vg_hzaumycology-lv_root vg_hzaumycology; 
#lvcreate -L 300G -n vg_hzaumycology-lv_home vg_hzaumycology; 
#lvcreate -L 32G -n vg_hzaumycology-lv_swap vg_hzaumycology; 
逻辑卷在CentOS6.2系统中对应的位置为"/dev/卷组名/逻辑卷名"。

 <5> 格式化逻辑卷

使用mkfs.ext4在逻辑卷上创建文件系统。
#mkfs.ext4 /dev/vg_hzaumycology/vg_hzaumycology-lv_root;
#mkfs.ext4 /dev/vg_hzaumycology/vg_hzaumycology-lv_home;

<6> 将另外一个物理卷加入到卷组中

使用vgdisplay命令查看VG,使用vgextend命令将物理卷加入到卷组从而扩增卷组
大小。
#vgdisplay;查看到系统默认创建的卷组vg_hzaumycology  
#lvdisplay;查看到系统有3个逻辑卷vg_hzaumycology-lv_root, lvcreate 
vg_hzaumycology-lv_home和vg_hzaumycology-lv_swap分别对应这系统的
/root,/home目录和SWAP分区。#vgextend vg_hzaumycology /dev/sdb1; 
将第二块硬盘的第一个分区1500G的空间加入到卷组vg_hzaumycology中。

<7> 扩增逻辑卷的容量

有了物理卷的加入,利于逻辑卷的扩增,使用命令lvextend和resize2fs来扩增逻
辑卷。
#lvextend -L +500G /dev/vg_hzaumycology/vg_hzaumycology-lv_
home; 给逻辑卷vg_hzaumycology-lv_home增加500G空间。
#resize2fs /dev/vg_hzaumycology/vg_hzaumycology-lv_home; 重新
给逻辑卷定大小,这一步需要许多时间,因为500G空间较大。完毕使用df -m命令查
看磁盘分区状况,才能看到磁盘容量变大。

<8> 为第二块磁盘的第二个分区/dev/sdb2创建文件系统并在开机自动挂载到指定位置

#mkfs.ext4 /dev/sdb2; 将/dev/sdb2格式化,创建文件系统ext4。 
#mkdir /bioinformatic; chown chenlianfu:chenlianfu /bioinform
atics; 
#chmod 750 /bioinformatics; 创建文件夹bioinformatics并修改权限用于
挂载/dev/sdb2。添加“/dev/sdb2 /bioinformatics ext4 uid=500,gid=
501 1 2”到/etc/fstab中。

将3TB磁盘分为2个1.5TB分区,其中一个分区整合到LVM中,另外一个分区不整合到LVM
而单独为一个区。以后重装系统到此3TB磁盘的时候,好将文件备份到分区2中,以避免
重要文件的丢失。