In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what is the common operation of linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Linux blacklist problem
Recently, my computer is always unable to connect to the ssh of the remote linux server, but I can connect to another computer or my own computer after changing the ip. The guess is that the ip of my computer has been blacklisted somehow on the server.
So connect to the ssh of the target server through other computers
Sudo-s enter password # first enter vi / etc/hosts double-click the tab key to list which files match the current path rules; here I directly use vi to open the hosts.deny file vi / etc/hosts.deny# and then look for my ip in command mode (because there are quite a lot of ip in this file, so I directly use the search), the search is / ip address, and then press n to continue to search
Found that there is indeed my ip, so double-click the keyboard D key in command mode, delete the current line, and then in command mode: wq save exit
Restart networking
/ etc/init.d/networking restart
Note: when hosts.allow and host.deny conflict, the hosts.allow setting shall prevail.
Dns configuration of linux
Recently, I found that WeChat Mini Programs's login function could not be used, so I checked the log and found that it was because I could not find the domain name of Tencent, so I tried to ping Baidu and qq.com. It was speculated that dns had failed.
Vi / etc/resolv.conf adds a line nameserver 114.114.114.114 to prevent the file from being modified
Under linux, some configuration files are not allowed to be modified by anyone, including root. In order to prevent being deleted or modified by mistake, you can set the "unmodifiable bit (immutable)" of the file.
For example: chattr + I / etc/resolv.conf if you need to modify the file: chattr-I / etc/resolv.conf then modify the file later
Forcibly shut down a program that occupies a port
Take port 8080 as an example
Lsof-ii:8080COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEjava 808 processes this command lists the processes that occupy this port and their pid. Examples are as follows: linux@server02:~$ lsof-i:8080COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEjava 32877 linux 280u IPv6 271302228 0t0 TCP *: http-alt (LISTEN) then use kill-9 PID to linux@server02:~$ kill-9 32877 "what are the common operations of linux" here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.