นี่คือคำสั่ง tarantoolctl ที่สามารถเรียกใช้ในผู้ให้บริการโฮสต์ฟรีของ OnWorks โดยใช้หนึ่งในเวิร์กสเตชันออนไลน์ฟรีของเรา เช่น Ubuntu Online, Fedora Online, โปรแกรมจำลองออนไลน์ของ Windows หรือโปรแกรมจำลองออนไลน์ของ MAC OS
โครงการ:
ชื่อ
tarantoolctl - ยูทิลิตี้เพื่อควบคุมอินสแตนซ์ tarantool
เรื่องย่อ
เป็นกลุ่ม /etc/tarantool/instances.enabled/my_instance.lua
tarantoolctl เริ่ม my_instance
tarantoolctl หยุด my_instance
tarantoolctl เข้าสู่ระบบ my_instance
DESCRIPTION
สคริปต์ถูกอ่านว่า "/etc/sysconfig/tarantool" หรือ "/etc/default/tarantool" ไฟล์
มีตัวเลือกอินสแตนซ์เริ่มต้นทั่วไป:
$ cat /etc/default/tarantool
-- ตัวเลือกสำหรับ Tarantool
default_cfg = {
-- จะกลายเป็น pid_file .. อินสแตนซ์ .. '.pid'
pid_file = "/var/run/tarantool",
-- จะกลายเป็น wal_dir/instance/
wal_dir = "/var/lib/tarantool",
-- snap_dir/ตัวอย่าง/
snap_dir = "/var/lib/tarantool",
--sophia_dir/อินสแตนซ์/
sophia_dir = "/var/lib/tarantool/sophia",
-- ตัวบันทึก/ตัวอย่าง .. '.log'
คนตัดไม้ = "/var/log/tarantool",
ชื่อผู้ใช้ = "tarantool",
}
instance_dir = "/etc/tarantool/instances.enabled"
ไฟล์กำหนด "instance_dir" ซึ่งผู้ใช้สามารถวางแอปพลิเคชันของเขา (อินสแตนซ์)
แต่ละอินสแตนซ์สามารถควบคุมได้โดย "tarantoolctl":
ที่เริ่มต้น ตัวอย่าง
tarantoolctl เริ่ม instance_name
การหยุด ตัวอย่าง
tarantoolctl หยุด instance_name
logrotate ตัวอย่าง เข้าสู่ระบบ
tarantoolctl ล็อกโรเตต instance_name
เข้าสู่ ตัวอย่าง ผู้ดูแลระบบ ปลอบใจ
tarantoolctl ป้อน instance_name
สถานะ
tarantoolctl สถานะ instance_name
ตรวจสอบว่าอินสแตนซ์ขึ้นหรือไม่
หากมีไฟล์ pid และมีซ็อกเก็ตควบคุมและซ็อกเก็ตควบคุมยังมีชีวิตอยู่ ส่งคืนรหัส 0
โค้ดส่งคืน != 0 ในกรณีอื่นๆ สามารถบ่นในบันทึก (stderr) ได้หากมีไฟล์ pid และ
ซ็อกเก็ตไม่ได้ ฯลฯ
แยก อินสแตนซ์ ควบคุม
หากคุณใช้ SysV init คุณสามารถใช้ symlink จาก "tarantoolctl" ถึง
"/etc/init.d/instance_name[.lua]" "tarantoolctl" ตรวจพบว่าเริ่มต้นโดย symlink และ
ใช้ instance_name เป็น "`basename $0 .lua`"
ลิขสิทธิ์
ลิขสิทธิ์ (C) 2010-2013 Tarantool AUTORS: โปรดดูไฟล์ AUTHORS
2016-01-19 tarantoolctl(1)
ใช้ tarantoolctl ออนไลน์โดยใช้บริการ onworks.net
