In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to achieve more radosgw stand-alone". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "how to achieve more radosgw stand-alone" bar!
/ bin/sh### BEGIN INIT INFO# Provides Short-Description! / bin/sh### BEGIN INIT INFO# Provides: radosgw# Required-Start: $remote_fs $named $network $time# Required-Stop: $remote_fs $named $network $time# Default-Start: 2 34 'Default-Stop: 0 1' Short-Description: radosgw RESTful rados gateway# Description: radosgw RESTful rados gateway### END INIT INFOPATH=/sbin:/bin:/usr/binif [- x / sbin/start-stop-daemon]; then DEBIAN=1. / lib/lsb/init-functionselse. / etc/rc.d/init.d/functions DEBIAN=0 # detect systemd, also check whether the systemd-run binary exists SYSTEMD_RUN=$ (which systemd-run 2 > / dev/null) grep-qs systemd / proc/1/comm | | SYSTEMD_RUN= "" fidaemon_is_running () {daemon=$1 if pidof $daemon > / dev/null; then echo "$daemon is running." Exit 0 else echo "$daemon is not running." Exit 1 fi} VERBOSE=0for opt in $*; do if ["$opt" = "- v"] | | ["$opt" = "--verbose"]; then VERBOSE=1 fidone# prefix for radosgw instances in ceph.confPREFIX='client.radosgw.'# user to run radosgw as (if not specified in ceph.conf) DEFAULT_USER='root'RADOSGW= `which radosgw`if [!-x "$RADOSGW"]; then [$VERBOSE-eq 1] & & echo "$RADOSGW could not start, it is not executable." Exit 1fi# list daemons, old-style and new-style# NOTE: no support for cluster names that aren't "ceph" dlist= `ceph-conf-list-sections $PREFIX`if [- d "/ var/lib/ceph/radosgw"]; then for d in `ls / var/lib/ceph/radosgw | grep ^ ceph- `; do if [- e "/ var/lib/ceph/radosgw/$d/sysvinit"] Then id= `echo $d | cut-c 6-`dlist= "client.$id $dlist" fi doneficase "$1" in start) for name in $dlist do auto_start= `ceph-conf-n $name 'auto start' `if ["$auto_start" = "no"] | | [$auto_start "=" false "] | [" $auto_start "=" 0 "] Then continue fi shortname= `echo $name | cut-c 8-`if [!-e "/ var/lib/ceph/radosgw/ceph-$shortname/sysvinit"]; then # mapped to this host? Host= `ceph-conf-n $name host`hostname= `hostname-s`if ["$host"! = "$hostname"]; then [$VERBOSE-eq 1] & & echo "hostname $hostname could not be found in ceph.conf: [$name], not starting." Continue fi fi user= `ceph-conf-n $name user`if [- z "$user"]; then user= "$DEFAULT_USER" fi log_file= `$RADOSGW-n $name-- show-config-value log_ file` if [- n "$log_file"]; then if [!-e "$log_file"] Then touch "$log_file" fi chown $user $log_file fi echo "Starting $name..." If [$DEBIAN-eq 1]; then start-stop-daemon-- start- u $user-x $RADOSGW-p / var/run/ceph/client-$name.pid-- n $name elif [- n "$SYSTEMD_RUN"]; then $SYSTEMD_RUN-r su "$user"-c "ulimit-n 32768 $RADOSGW-n $name "else ulimit-n 32768 daemon-- user=" $user "$RADOSGW-n $name" fi done;; reload) echo "Reloading $name..." If [$DEBIAN-eq 1]; then start-stop-daemon-- stop--signal HUP-x $RADOSGW-- oknodo else killproc $RADOSGW-SIGHUP fi;; restart | force-reload) $0 stop $0 start;; stop) timeout=0 for name in $dlist do t = `$ RADOSGW-n $name-- show-config-value rgw_exit_timeout_ secs` if [$t-gt $timeout] Then timeout=$t; fi done if [$DEBIAN-eq 1]; then if [$timeout-gt 0]; then TIMEOUT= "- R $timeout"; fi start-stop-daemon-- stop- x $RADOSGW-t start-stop-daemon-- stop- x $RADOSGW-- oknodo $TIMEOUT else killproc $RADOSGW while pidof $RADOSGW > / dev/null & & [$timeout-gt 0] Do sleep 1 timeout=$ (($timeout-1) done fi;; status) daemon_is_running $RADOSGW;; *) echo "Usage: $0 {start | stop | restart | force-reload | reload | status} [- v |-verbose]" > & 2 exit 3;; esac
The default startup script takes hostname as the judgment variable, which I skipped here.
Use proc
New ceph auth New radosgw user
Add user keyring
Add radosgw service configuration information to ceph.conf
Start the service using a script
At this point, I believe you have a deeper understanding of "radosgw stand-alone how to achieve", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.