本文提供了如何在不影响everRun功能的情况下更改默认BASH提示的说明。
如果要管理不同的everRun安装,则可能不容易理解SSH或本地控制台会话是在哪个节点上启动的。
默认情况下,SSH会话会提示“Node0”或“Node1”名称:
The steps provided will help to change the SSH BASH prompt from "Node1" to "test-Node1".
= Part 1 =
1. Create a bashrc backup
# cp /etc/bashrc /etc/bashrc.original
2. Edit the bashrc file
3. Replace the "PS1="[\u@\h \W]\\$ " with the customized label
The part to edit is the \h after the @ char.
Example
From PS1="[\u@\h \W]\\$ " to PS1="[\u@test-Node1 \W]\\$ "
4. Save and restart the SSH session, or test with a "su -" command to test it.
The following image provides the example after the change:
5. Repeat the steps for the other node, but using the appropriate name "test-Node0"
= Part 2 =
On the DNS Server it's possible to add an "A" record with the "test-Node0" and "test-Node1" name.
The nodes will be reachable with that name too.
添加评论