Tag Archive for 'centos'

NFS quick howto for centos 5

NFS quick howto for centos 5

To use nfs successfully, you have to configure the server and the client. In this example, the client is 192.168.0.3 and the server is 192.168.0.1. The folder to be shared is /home/sharing, and to be mounted to /mnt on the client

On the server

  1. Make directory that you want to use.
    • # mkdir /home/sharing
  2. Edit /etc/exports, insert the client machine’s ip
    • # vi /etc/exports
    • Add this line:
    • /home/sharing 192.168.0.3/255.255.255.255(rw,sync)
  3. Save
  4. Edit /etc/hosts.allow
    • # vi /etc/hosts.allow
    • Add this line:
    • portmap: 192.168.0.0/255.255.255.0
  5. Save
  6. Start nfs and portmap
    • # /etc/init.d /nfs start
    • # /etc/init.d/portmap start
On the client
  1. Start portmap
    • # /etc/init.d/portmap start
  2. Mount the nfs folder
    • # mount 192.168.0.1:/home/sharing /mnt
  3. Check /var/log/messages for any error that might occur
    • # tailf /var/log/messages
  4. Use mount to check if the folder is mounted properly
    • # mount 
    • This should be the output:
    • 192.168.0.1:/home/sharing on /mnt type nfs (rw,addr=192.168.0.1)
  5. Edit /etc/fstab to mount the shared folder on boot
    • # vi /etc/fstab
    • Add this line
    • 192.168.0.1:/mnt/sdb1/backup /mnt nfs rw,hard,intr 0 0
  6. Save
You can use 'man exports' to see the options available for /etc/exports

Continue reading ‘NFS quick howto for centos 5′

LVM错误排除

最近在VMWare狂搞LVM管理,东删除西删除,新的PV被我弄得“uuid not found”了。翻翻LVM管理手册

1
 vgreduce  --removemissing

修正了这个错误。
直接使用整个PV

1
# lvextend /dev/web_document/www1 /dev/hdd

Linux VLM how to

创建和管理LVM

要创建一个LVM系统,一般需要经过以下步骤:

1、 创建分区

使用分区工具(如:fdisk等)创建LVM分区,方法和创建其他一般分区的方式是一样的,区别仅仅是LVM的分区类型为8e。

2、 创建物理卷

创建物理卷的命令为pvcreate,利用该命令将希望添加到卷组的所有分区或者磁盘创建为物理卷。将整个磁盘创建为物理卷的命令为:

1
# pvcreate /dev/hdb

将单个分区创建为物理卷的命令为:

1
# pvcreate /dev/hda5

Continue reading ‘Linux VLM how to’

Yellow Dog发布新版本

New Yellow Dog Linux Logo

New Yellow Dog Linux Logo

Yellow Dog 是一个可以运行在PS3上的Linux发型版,是由Terra Soft发布,不久前被fixstars收购了Terra Soft,现在它发布了新的Yellow Dog Linux,支持SONY’s Playstation 3、Apple PowerPC G4/G5、IBM Power Systems和YDL PowerStation。Yellow Dog Linux 6.1是Fixstars收购Terra Soft后第一个版本,基于RHEL/CentOS的Linux发行版,提供多个很好的改进,其中包括添加针对PS3′s SIXAXIS controller的蓝牙支持。根据官方站点上的介绍,Yellow Dog同样适用与办公、服务器以及群集,在他的DVD中包含2000多个软件包。

你可以免费适用Yellow Dog,从一些知名的镜像站点可以轻松获得,比如这里,官方下载地址在这里

Centos libstdc++.so.5

CentOS libstdc++.so.5 可以这样安装:

1
sudo yum install compat-libstdc++-33.i386

Centos Yum 国内配置文件

1
2
3
4
5
6
7
8
9
10
#
# /etc/yum.conf
[main]
gpgcheck=1
verbose = 0
socket_timeout = 3
enabled = 1
baseurl=http://mirror.be10.com/centos/4.5/os/$basearch/
hostfilepath = /var/cache/yum/timedhosts.txt
maxhostfileage = 1