0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS6でswiftclient

0
Posted at

swiftclient3.0からはpython2.6をサポートしなくなりました。
(これまでも使うたびにwarningが表示)
そこで、まずはpython2.7をCentOS6に導入します。

できるだけ楽にpython2.7を導入するために下記のレポジトリを使います。

The Software Collections ( SCL ) Repository

yum install centos-release-scl

python2.7をインストールしてみます。

yum install python27

SCLでは、既存環境を汚さないように別のディレクトリにパッケージがインストールされます。

 /opt/rh/python27/

導入したパッケージを使う場合には環境変数を合わせることが必要です。

source /opt/rh/python27/enable

上記のenableファイルの中身はこんな感じです。

export PATH=/opt/rh/python27/root/usr/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export MANPATH=/opt/rh/python27/root/usr/share/man:${MANPATH}
# For systemtap
export XDG_DATA_DIRS=/opt/rh/python27/root/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
# For pkg-config
export PKG_CONFIG_PATH=/opt/rh/python27/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}

下記で新たにbashを動かすこともできます。

scl enable python27 bash

この環境でswiftclientをインストールします。
(swiftclientに必要なパッケージのインストール、またはアップデート)

pip install pip setuptools python-keystoneclient python-swiftclient --upgrade

無事swiftclient3.0が導入できました!

$ swift --version
python-swiftclient 3.0.0
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?