cephradosgw如何实现一键安装脚本
这篇文章将为大家详细讲解有关ceph radosgw如何实现一键安装脚本,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
目前创新互联已为上千多家的企业提供了网站建设、域名、网站空间、绵阳服务器托管、企业网站设计、壶关网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。
在ubuntu12.04.5 bit环境下,经常配置radosgw,所以写了个脚本搞定radosgw一键安装,不含ssl的配置,需要的自己添加一下。ceph0.80.x测试通过。
#!/bin/bash wget -q -O- https://raw.github.com/ceph/ceph/master/keys/autobuild.asc | sudo apt-key add - echo deb http://gitbuilder.ceph.com/apache2-deb-$(lsb_release -sc)-x86_64-basic/ref/master $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph-apache.list echo deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-$(lsb_release -sc)-x86_64-basic/ref/master $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph-fastcgi.list HOSTNAME=`hostname` apt-get install apache2 libapache2-mod-fastcgi radosgw -y ceph-authtool --create-keyring /etc/ceph/ceph.client.radosgw.$HOSTNAME.keyring cd /etc/ceph/ chmod +r ceph.client.radosgw.$HOATNAME.keyring ceph-authtool /etc/ceph/ceph.client.radosgw.$HOSTNAME.keyring -n client.radosgw.$HOSTNAME --gen-key ceph-authtool -n client.radosgw.$HOSTNAME --cap osd 'allow rwx' --cap mon 'allow rwx' /etc/ceph/ceph.client.radosgw.$HOSTNAME.keyring ceph -k /etc/ceph/ceph.client.admin.keyring auth add client.radosgw.$HOSTNAME -i /etc/ceph/ceph.client.radosgw.$HOSTNAME.keyring echo -n " [client.radosgw.$HOSTNAME] host = $HOSTNAME keyring = /etc/ceph/ceph.client.radosgw.$HOSTNAME.keyring rgw socket path = /tmp/radosgw.sock log file = /var/log/ceph/radosgw.$HOSTNAME.log rgw DNS name = $HOSTNAME " >> /etc/ceph/ceph.conf echo -n "#!/bin/sh exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n client.radosgw.$HOSTNAME" > /var/www/s3gw.fcgi chmod +x /var/www/s3gw.fcgi echo -n "FastCgiExternalServer /var/www/s3gw.fcgi -socket /tmp/radosgw.sockServerName $HOSTNAME DocumentRoot /var/www RewriteEngine On RewriteRule ^/(.*) /s3gw.fcgi?%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] " > /etc/apache2/sites-available/rgw.conf echo "ServerName $HOSTNAME" >> /etc/apache2/apache2.conf sudo a2enmod rewrite sudo a2enmod fastcgi a2ensite rgw.conf a2dissite default service ceph restart service apache2 restart /etc/init.d/radosgw startAllowEncodedSlashes On ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/access.log combined ServerSignature Off Options +ExecCGI AllowOverride All SetHandler fastcgi-script Order allow,deny Allow from all AuthBasicAuthoritative Off
关于“ceph radosgw如何实现一键安装脚本”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
网站题目:cephradosgw如何实现一键安装脚本
标题来源:http://azwzsj.com/article/gcpsej.html