這篇文章將為大家詳細(xì)講解有關(guān)ceph radosgw如何實現(xiàn)一鍵安裝腳本,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
目前創(chuàng)新互聯(lián)已為上千多家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)站空間、綿陽服務(wù)器托管、企業(yè)網(wǎng)站設(shè)計、壺關(guān)網(wǎng)站維護等服務(wù),公司將堅持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。
在ubuntu12.04.5 bit環(huán)境下,經(jīng)常配置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
關(guān)于“ceph radosgw如何實現(xiàn)一鍵安裝腳本”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學(xué)到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。