In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "what are the skills to improve the efficiency of Linux management", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what are the skills to improve the efficiency of Linux management"?
Tip 1: uninstall an unresponsive DVD drive
The experience of a novice to the web: when you press the Eject button on the DVD drive of the server (running the Redmond-based operating system), it pops up immediately. He then complains that in most enterprise Linux servers, if you run a process in that directory, the pop-up won't happen. As a long-term Linux administrator, I will restart the machine. If I am not sure what is running and why I do not release the DVD drive, I will eject the disk. But it's inefficient.
Here's how to find the process that holds the DVD drive and easily eject the DVD drive: simulate first. Place a disk in the DVD drive, open a terminal, and load the DVD drive:
# mount / media/cdrom
# cd / media/cdrom
# while [1]; do echo "All your drives are belong to us!"; sleep 30; done
Now open the second terminal and try to eject the DVD drive:
# eject
You will get the following message:
Umount: / media/cdrom: device is busy
Before releasing the device, let's find out who is using it.
# fuser / media/cdrom
The process is running and it is our fault that the disk cannot be ejected.
Now, if you are the root user, you can terminate the process at will:
# fuser-k / media/cdrom
Now you can finally uninstall the drive:
# eject
Fuser is normal.
Tip 2: restore the problem screen
Try the following:
# cat / bin/cat
Be careful! The terminal is like garbage. All the input is very messy. So what should I do?
Enter reset. However, entering reset is too close to entering reboot or shutdown. Your palms are sweating with fear-especially when performing this operation on a production machine.
Rest assured that the machine will not restart during this operation. Continue:
# reset
Now the screen is back to normal. This is much better than logging in again after closing the window, especially if you have to go through five machines and SSH to reach this machine.
Tip 3: screen collaboration
David, a senior maintenance user from product engineering, called and said, "Why can't I compile supercode.c on these new machines you deploy?"
You will ask him, "what kind of machine are you running?"
David replied, "Posh". The dumb company named its five production servers in honor of Spice Girls. Now you can show your skills. The other machine is operated by David:
# su-david
Go to posh:
# ssh posh
When you arrive, run the following code:
# screen-S foo
Then call David:
"David, run the command # screen-x foo" on the terminal.
This connects your conversation with David in Linux shell. You can type, or he can type, but each can see what the other is doing. This avoids moving to other levels, and both sides have the same control. The advantage of this is that David can observe your troubleshooting skills and know exactly how to solve the problem.
* everyone can see the problem: David's compilation script hardcodes an old directory that is not on this new server. Load it and compile it again to solve the problem, and then David continues to work. You can continue your previous entertainment.
One thing to note about this technique is that both parties need to log in as the same user. The screen command can also implement multiple windows and split screens. Please read the manual page for more information.
I have another trick for screen conversations. To detach from it and have it open, type Ctrl-A D (that is, hold down the Ctrl key and click the A key. Then press D).
You can then reassemble it by running the screen-x foo command again.
The above is all the contents of the article "what are the skills to improve the efficiency of Linux management". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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: 291
*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.