Hint: Use apt-get for Debian, yum for RedHat, pacman for Arch [OK]
Common Mistakes:
Using yum on Debian systems
Using brew on Linux
Missing '-server' in package name
3. After installing RabbitMQ, which command shows its current running status?
medium
A. rabbitmq-server start
B. systemctl install rabbitmq
C. rabbitmqctl status
D. rabbitmq status check
Solution
Step 1: Identify the command to check RabbitMQ status
The command 'rabbitmqctl status' is used to check the running status of RabbitMQ.
Step 2: Eliminate incorrect commands
'rabbitmq-server start' starts the server, 'systemctl install' is invalid, and 'rabbitmq status check' is not a valid command.
Final Answer:
rabbitmqctl status -> Option C
Quick Check:
Status check uses rabbitmqctl [OK]
Hint: Use rabbitmqctl for status and control commands [OK]
Common Mistakes:
Confusing start command with status
Using systemctl install (invalid)
Typing incorrect command names
4. You installed RabbitMQ but the service won't start. Which command helps you enable and start it immediately?
medium
A. sudo rabbitmqctl enable && sudo rabbitmqctl start
B. sudo systemctl enable rabbitmq-server && sudo systemctl start rabbitmq-server
C. sudo apt-get start rabbitmq-server
D. sudo service rabbitmq install
Solution
Step 1: Understand how to enable and start services on Linux
Systemd uses 'systemctl enable' to start on boot and 'systemctl start' to start immediately.
Step 2: Identify the correct command for RabbitMQ service
The correct command is 'sudo systemctl enable rabbitmq-server && sudo systemctl start rabbitmq-server'. Other options misuse commands or package managers.