We need to do some basic security when we have a VPS or server that has a Linux system open.
There are probably several areas:1. Prohibit root account ssh, use custom account ssh;This way, the hacker must first guess the account number, then can guess the password;2. Prohibit account login, use PubKey login;3. For IP ACLs, allow only a few specific IP access;4. SSH port Migration, change the default 22 por
Hex code (type L to list codes): 8e #8e为LVMChanged system type of partition 1 to 8e (Linux LVM)Command (M for help): W #保存The partition table has been altered!Calling IOCTL () to re-read partition table.Syncing disks.
4. Reread the partition table
Partprobe5. View Volume Group
Vgdisplay
The above code shows the current VG details, where you need to record the following: VG Name6. Create Add Volume GroupCreate a new PV and add the/dev
user space to not be hungry, and the soft interrupts that are triggered can be implemented as quickly as possible. ("Linux kernel design and implementation" 85 pages)
The reason for downtime is obvious, physical mem is insufficient, causing frequent swap. In fact, this is also a common VPS use of a problem, usually by the Apache occupy too much memory caused. KSWAPD0 is the system's virtual memory manage
hope you start with a lot of caution, in fact, memory is not expensive ...
Add swap files for VPS (available for Aliyun)
1. Create a swap file (two methods, recommend the former, because it will be slow to create with DD!) )
Fallocate-l 1024m/swapfile
Or
DD If=/dev/zero of=/swapfile bs=1m count=1024
2. Set Swap permissions
chmod 600/swapfile
3. format file as Swap
Mkswap/swapfile
4. Activate swap file
Swapon/swapfile
5. Edit the/etc/fstab
the 15-day free key key application, as well as deployed to our Linux VPS Host as a demonstration to see how the whole process is, if there is really a user like, you can choose.
First, apply for free 15 days plesk Panel key keys
The code is as follows
Copy Code
How to Use n2n to configure a practical and free VPN solution on Linux
A Traditional VPN, such as OpenVPN or PPTP, is composed of a VPN Server and one or more clients connected to this server. When any two VPN clients communicate with each other, the VPN Server needs to relay the VPN data traffic between them. The problem with such a central radiation VPN topology is that when the number of connected clien
VPS built in the Web server, running for a long time, the use of memory is more and more high, for small memory VPS may directly use the swap partition, thus affecting the performance of the system application. The following is a very simple script to clean up Linux memory, and you can periodically clean up your Linux
Tags: log start res operator VI editor Lin run editor sshdLinux SSH key logon and cancellation key login 2016-05-18? Linux tips ? No comments Using the VI Editor in VPS to edit the sshd configuration filevi /etc/ssh/sshd_configFind Rsaauthentication and pubkeyauthentication two lines and remove the "#" from the front.Locate the Passwordauthentication line and change the following "yes" to "no". (Cancel key
Recently engaged in a VPS, with Putty landing every time to enter the root account password, more trouble, so the internet to find the SSH certificate method.In fact, this should be the Putty recommended authentication method.1. Generate the key using the Putty SSH key generation tool Puttygen.exe.Generated key type and number of bits by default, SSH-2 rsa,1024 bitSave the private key to local, you will be prompted to save the private key to set a pas
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.