此内容没有您所选择的语言版本。
Chapter 1. Install Ceph object gateway
To run the Ceph object gateway service, you should have a running Ceph cluster, the gateway host should have access to storage and public networks, and SELinux should be in permissive mode.
The Ceph Object Gateway daemon runs on Apache and FastCGI.
To run a Ceph Object Storage service, you must install Apache and Ceph Object Gateway daemon on the host that is going to provide the gateway service, i.e, the gateway host. If you plan to run a Ceph Object Storage service with a federated architecture (multiple regions and zones), you must also install the synchronization agent.
Previous versions of Ceph shipped with mod_fastcgi. The current version of Red Hat Ceph Storage ships with mod_proxy_fcgi instead.
In RHEL 7, mod_proxy_fcgi is present in the main httpd package. When you’ve installed the httpd package with yum, mod_proxy_fcgi will already be available for use on your server.
In RHEL 6, mod_proxy_fcgi comes in its own mod_proxy_fcgi package. You will need to install it with yum install mod_proxy_fcgi.
1.1. Install Apache 复制链接链接已复制到粘贴板!
To install Apache on the gateway host, execute the following:
sudo yum install httpd
1.2. Enable RH-COMMON repositories 复制链接链接已复制到粘贴板!
You need to enable RH-COMMON repositories with subscription-manager to install packages required for setting up Ceph Object Gateway on the gateway host.
On RHEL 7, execute:
subscription-manager repos --enable=rhel-7-server-rh-common-rpms
On RHEL 6, execute:
subscription-manager repos --enable=rhel-6-server-rh-common-rpms
1.3. Configure Apache 复制链接链接已复制到粘贴板!
Make the following changes in Apache’s configuration on the gateway host:
1.3.1. Give the ServerName in httpd.conf 复制链接链接已复制到粘贴板!
Uncomment #ServerName in /etc/httpd/conf/httpd.conf and add the name of your server. Provide the fully qualified domain name of the server machine (e.g., hostname -f):
ServerName {fqdn}
1.3.2. Load mod_proxy_fcgi module 复制链接链接已复制到粘贴板!
Update /etc/httpd/conf/httpd.conf to load mod_proxy_fcgi module. Append the following to the file:
<IfModule !proxy_fcgi_module>
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
</IfModule>
1.3.3. Update httpd to listen to public IP address 复制链接链接已复制到粘贴板!
Edit the line Listen 80 in /etc/httpd/conf/httpd.conf with the public IP address of the host that you are configuring as a gateway server.
e.g. Listen {IP ADDRESS}:80 in place of Listen 80.
1.3.4. Start httpd service 复制链接链接已复制到粘贴板!
On RHEL 7, execute:
sudo systemctl start httpd
On RHEL 6, execute:
sudo service httpd start
1.4. Enable SSL 复制链接链接已复制到粘贴板!
Some REST clients use HTTPS by default. So you should consider enabling SSL for Apache. Use the following procedures to enable SSL on the gateway host.
You can use self-certified certificates. Some client APIs check for a trusted certificate authority. You may need to obtain a SSL certificate from a trusted authority to use those client APIs.
To enable SSL, execute the following steps:
Ensure that you have installed the dependencies:
sudo yum install mod_ssl opensslGenerate private key:
openssl genrsa -out ca.key 2048Generate CSR:
openssl req -new -key ca.key -out ca.csrGenerate a certificate:
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crtCopy the files to appropriate locations:
sudo cp ca.crt /etc/pki/tls/certs sudo cp ca.key /etc/pki/tls/private/ca.key sudo cp ca.csr /etc/pki/tls/private/ca.csrUpdate the Apache SSL configuration file
/etc/httpd/conf.d/ssl.conf. with correct locations ofSSLCertificateFileandSSLCertificateKeyFile:SSLCertificateFile /etc/pki/tls/certs/ca.crt SSLCertificateKeyFile /etc/pki/tls/private/ca.keyRestart httpd service:
On RHEL 7, execute:
sudo systemctl restart httpdOn RHEL 6, execute:
sudo service httpd restart
1.5. Install Ceph Object Gateway Daemon 复制链接链接已复制到粘贴板!
Ceph Object Storage services use the Ceph Object Gateway daemon (radosgw) to enable the gateway. For federated architectures, the synchronization agent (radosgw-agent) provides data and metadata synchronization between zones and regions.
To install the Ceph Object Gateway daemon on the gateway host, execute the following:
sudo yum install ceph-radosgw
To install the Ceph Object Gateway synchronization agent, execute the following:
sudo yum install radosgw-agent