没有合适的资源?快使用搜索试试~ 我知道了~
首页OpenStack swift 安装文档
资源详情
资源评论
资源推荐

Swift 在 Ubuntu 系统上的安装与配置
由于环境有限,并且刚开始着手 swift,因此选择的是最简单的安装方式,所有组件都部署在一台机
器上,即 SAIO(Swift All In One)安装方式。
一、系统
ubuntu 10.04 Desktop
机器 ip:10.1.29.15
官方网站:http://www.openstack.org/
参考文档:http://swift.openstack.org/development_saio.html
二、SAIO 的安装
注意:2.1~2.5 必须以 root 身份进行操
作
2.1、安装依赖包
1. apt-get install python-software-properties
2. add-apt-repository ppa:swift-core/release
3. apt-get update
4. apt-get install curl gcc git-core memcached
python-configobj python-coverage python-dev
python-nose python-setuptools python-
simplejson python-xattr sqlite3 xfsprogs
python-webob python-eventlet python-greenlet
python-pastedeploy python-netifaces
5. Install anything else you want, like screen, ssh, vim,
etc..
2.2、创建 swift 用户

注意:不要使用 useradd 命令创建,ubuntu 中 useradd 命令默认不会创建用户主目录,使用
adduser 命令
创建 swift 用户
adduser swift
编辑/etc/sudoers,添加以下一行
# User alias specification
swift ALL=(ALL) NOPASSWD:ALL
2.3、使用环路设备来存储
1. mkdir /srv
2. dd if=/dev/zero of=/srv/swift-disk bs=1024
count=0 seek=1000000
(modify seek to make a larger or smaller partition)
3. mkfs.xfs -i size=1024 /srv/swift-disk
4. Edit /etc/fstab and add
/srv/swift-disk /mnt/sdb1 xfs
loop,noatime,nodiratime,nobarrier,logbufs=8 0
0
5. mkdir /mnt/sdb1
6. mount /mnt/sdb1
7. mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3
/mnt/sdb1/4
8. chown swift:swift /mnt/sdb1/*
9. for x in {1..4}; do ln -s /mnt/sdb1/$x
/srv/$x; done
10. mkdir -p /etc/swift/object-server
/etc/swift/container-server
/etc/swift/account-server /srv/1/node/sdb1

/srv/2/node/sdb2 /srv/3/node/sdb3
/srv/4/node/sdb4 /var/run/swift
11. chown -R swift:swift /etc/swift /srv/[1-4]/
/var/run/swift – Make sure to include the
trailing slash after /srv/[1-4]/
12. Add to /etc/rc.local (before the exit 0):
mkdir /var/run/swift
chown swift:swift /var/run/swift
2.4、设置 rsync
1. Create /etc/rsyncd.conf:
uid = swift
gid = swift
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
address = 127.0.0.1
[account6012]
max connections = 25
path = /srv/1/node/
read only = false
lock file = /var/lock/account6012.lock
[account6022]
max connections = 25
path = /srv/2/node/
read only = false
lock file = /var/lock/account6022.lock
[account6032]
max connections = 25
path = /srv/3/node/

read only = false
lock file = /var/lock/account6032.lock
[account6042]
max connections = 25
path = /srv/4/node/
read only = false
lock file = /var/lock/account6042.lock
[container6011]
max connections = 25
path = /srv/1/node/
read only = false
lock file = /var/lock/container6011.lock
[container6021]
max connections = 25
path = /srv/2/node/
read only = false
lock file = /var/lock/container6021.lock
[container6031]
max connections = 25
path = /srv/3/node/
read only = false
lock file = /var/lock/container6031.lock
[container6041]
max connections = 25
path = /srv/4/node/
read only = false
lock file = /var/lock/container6041.lock
[object6010]
max connections = 25
剩余19页未读,继续阅读


















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0