From: John Wilkins Date: Tue, 9 Jul 2013 01:11:25 +0000 (-0700) Subject: doc: Added Ceph Object Storage installation instructions for CentOS/RHEL 6. X-Git-Tag: v0.67-rc1~139 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5edc1ff7ea07d6b718d72a36e5480b4ca182525a;p=ceph.git doc: Added Ceph Object Storage installation instructions for CentOS/RHEL 6. Signed-off-by: John Wilkins --- diff --git a/doc/install/rpm.rst b/doc/install/rpm.rst index 3089a20c852..d5d6bf196c2 100644 --- a/doc/install/rpm.rst +++ b/doc/install/rpm.rst @@ -56,7 +56,7 @@ Packages are currently built for the RHEL/CentOS6 (``el6``), Fedora 17 platforms. The repository package installs the repository details on your local system for use with ``yum`` or ``up2date``. -Replase the``{DISTRO}`` below with the distro codename:: +Replace the``{DISTRO}`` below with the distro codename:: su -c 'rpm -Uvh http://ceph.com/rpm-bobtail/{DISTRO}/x86_64/ceph-release-1-0.el6.noarch.rpm' @@ -98,10 +98,134 @@ You can download the RPMs directly from:: http://ceph.com/rpm-testing -Installing Packages -=================== + +Installing Ceph Packages +======================== Once you have added either release or development packages to ``yum``, you can install Ceph:: sudo yum install ceph + + + +Installing Ceph Object Storage +============================== + +:term:`Ceph Object Storage` runs on Apache and FastCGI in conjunction with the +:term:`Ceph Storage Cluster`. + +#. Install Apache and FastCGI. :: + + rpm -ivh fcgi-2.4.0-10.el6.x86_64.rpm + rpm -ivh mod_fastcgi-2.4.6-2.el6.rf.x86_64.rpm + + +#. Install the Ceph Object Storage daemon. :: + + yum install ceph-radosgw + + +#. Add the following lines to your Ceph configuration file. + +.. code-block:: ini + + [client.radosgw.gateway] + host = {fqdn} + keyring = /etc/ceph/keyring.radosgw.gateway + rgw socket path = /tmp/radosgw.sock + log file = /var/log/ceph/radosgw.log + rgw print continue = false + +.. note:: Replace ``{fqdn}`` with the output from ``hostname``. This is + important. Debian systems use the simple hostname, but on CentOS 6/RHEL 6 + you must use the fully qualified domain name. + +#. Create a data directory. :: + + mkdir -p /var/lib/ceph/radosgw/ceph-radosgw.gateway + + +#. Change ``httpd ServerName`` in ``/etc/httpd/conf/httpd.conf``. :: + + ServerName {FQDN} + + +#. Create an Apache httpd virtual host in ``/etc/httpd/conf.d/rgw.conf``. + +.. code-block:: ini + + FastCgiExternalServer /var/www/s3gw.fcgi -socket /tmp/radosgw.sock + + ServerName + 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] + + + Options +ExecCGI + AllowOverride All + SetHandler fastcgi-script + Order allow,deny + Allow from all + AuthBasicAuthoritative Off + + + AllowEncodedSlashes On + ErrorLog /var/log/httpd/error.log + CustomLog /var/log/httpd/access.log combined + ServerSignature Off + + +#. Turn off ``fastcgiwrapper`` in ``/etc/httpd/conf.d/fastcgi.conf`` by + commenting out the following line:: + + #FastCgiWrapper On + + +#. Add a ``fastcgi`` script. :: + + #!/bin/sh + exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n client.radosgw.gateway + + +#. Make ``s3gw.fcgi`` executable:: + + chmod +x /var/www/rgw/s3gw.fcgi + + +#. Create a 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=/etc/ceph/keyring.radosgw.gateway + + +#. Please make sure ``/etc/ceph/keyring.radosgw.gateway`` file and + ``/var/log/ceph/radosgw.log`` are accessible by the ``apache`` user. :: + + sudo chown apache:apache /etc/ceph/keyring.radosgw.gateway + sudo chown apache:apache /var/log/ceph/radosgw.log + +.. note:: This is important. The user is ``root`` for Debian. + + +#. Create ``.rgw.buckets`` and add it to the Ceph Object Storage daemon. :: + + rados mkpool .rgw.buckets + radosgw-admin pool add --pool .rgw.buckets + +#. Configure Apache and the Ceph Object Storage daemon to start on boot. :: + + chkconfig httpd on + chkconfig ceph-radosgw on + +#. Start the services. :: + + /etc/init.d/httpd start + /etc/init.d/ceph-radosgw start + +See `Ceph Object Storage`_ for additional details. + +.. _Ceph Object Storage: ../../radosgw