Last active
December 12, 2015 00:58
-
-
Save alram/4687617 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Install fcgi and mod_fastcgi RPMs for el6 | |
# rpm -ivh fcgi-2.4.0-10.el6.x86_64.rpm | |
# rpm -ivh mod_fastcgi-2.4.6-2.el6.rf.x86_64.rpm | |
2) install ceph-radosgw | |
# yum install ceph-radosgw | |
3) Copy /etc/ceph/ceph.conf from 10.42.3.10 and add the radosgw informations | |
[client.radosgw.gateway] | |
host = rados-gw | |
keyring = /etc/ceph/keyring.radosgw.gateway | |
rgw socket path = /tmp/radosgw.sock | |
log file = /var/log/ceph/radosgw.log | |
rgw print continue = false | |
Note: For consistency, it is preferable to update all ceph.conf with this information since an update pushed from another server will overwrite it. | |
4) Create radosgw dir | |
# mkdir -p /var/lib/ceph/radosgw/ceph-radosgw.gateway | |
5) Change httpd ServerName in /etc/httpd/conf/httpd.conf | |
ServerName rados-gw | |
6) Create apache httpd vhost in /etc/httpd/conf.d/rgw.conf: | |
FastCgiExternalServer /var/www/s3gw.fcgi -socket /tmp/radosgw.sock | |
<VirtualHost *:80> | |
ServerName rados-gw | |
ServerAdmin root@localhost | |
DocumentRoot /var/www | |
RewriteEngine On | |
RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] | |
<IfModule mod_fastcgi.c> | |
<Directory /var/www> | |
Options +ExecCGI | |
AllowOverride All | |
SetHandler fastcgi-script | |
Order allow,deny | |
Allow from all | |
AuthBasicAuthoritative Off | |
</Directory> | |
</IfModule> | |
AllowEncodedSlashes On | |
ErrorLog /var/log/httpd/error.log | |
CustomLog /var/log/httpd/access.log combined | |
ServerSignature Off | |
</VirtualHost> | |
7) Comment the following line in /etc/httpd/conf.d/fastcgi.conf: | |
#FastCgiWrapper On | |
8) Create /var/www/s3gw.fcgi with the following content: | |
#!/bin/sh | |
exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n client.radosgw.gateway | |
9) Make s3gw.fcgi executable: | |
# chmod +x /var/www/s3gw.fcgi | |
9) Create client.radosgw.gateway user key: | |
# ceph-authtool -C -n client.radosgw.gateway --gen-key /etc/ceph/keyring.radosgw.gateway | |
# ceph-authtool -n client.radosgw.gateway --cap mon 'allow r' --cap osd 'allow rwx' /etc/ceph/keyring.radosgw.gateway | |
# ceph auth add client.radosgw.gateway --in-file=keyring.radosgw.gateway | |
10) Update /etc/init.d/ceph-radosgw to work on RH (see file) | |
11) Create .rgw.buckets and add it to radosgw from setup42-3 | |
# rados mkpool .rgw.buckets | |
# radosgw-admin pool add --pool .rgw.buckets | |
12) Make apache and radosgw start on boot | |
# chkconfig httpd on | |
# chkconfig ceph-radosgw on | |
13) Start the services | |
# /etc/init.d/httpd start | |
# /etc/init.d/ceph-radosgw start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment