How Linux is partitioned and how to turn off Iptables and SELinux

Source: Internet
Author: User
Tags iptables

There are generally three types of partitioning: data is not very important

/boot (System boot partition): System-led information/software system kernel 200M

Swap (Swap partition): System downtime to avoid system memory runs out

If the system memory is not enough, the system will temporarily use swap (swap partition)

Size: If your memory is less than 8G then swap to memory 1.5 times times later when using the 512M

If your memory is larger than 8G, swap to 8G.

/(Root partition): How much is left

The second type: data is important

/boot (System boot partition): System-led information/software system kernel 200M

Swap (Swap partition): System downtime to avoid system memory runs out

If the system memory is not enough, the system will temporarily use swap (swap partition)

Size: If your memory is less than 8G then swap to memory 1.5 times times later when using the 512M

If your memory is larger than 8G, swap to 8G.

/(Root partition): 40-200g

/data (storing data): How much is left (this is used to store important data)

The Third kind: Do not know the data is not important (not only you use the server alone)

/boot (System boot partition): System-led information/software system kernel 200M

Swap (Swap partition): System downtime to avoid system memory runs out

If the system memory is not enough, the system will temporarily use swap (swap partition)

Size: If your memory is less than 8G then swap to memory 1.5 times times later when using the 512M

If your memory is larger than 8G, swap to 8G.

/(Root partition): 40-200g

The rest of the space does not divide, keep who uses this machine who will partition.

Remote connection Server Troubleshooting

Note: I personally use the Xshell software here

The first step, first check the IP with the server does not pass

Using the command: Ping

What is the pass:

Reply from 10.0.0.200: Byte =32 time <1ms ttl=64

Reply from 10.0.0.200: Byte =32 time <1ms ttl=64

Ping Statistics for 10.0.0.200:

Packet: Sent = 4, received = 4, lost = 0 (0% missing),

Estimated time to round trip (in milliseconds):

Shortest = 0ms, longest = 0ms, average = 0ms

Does not pass the appearance:
10.0. 0.201  +  10.0. 0.1 reply: Unable to access the target host. The request timed out. The request timed out. The request timed out 10.0. 0.201 Ping statistics for:     4 1 3 (% lost),
Check to see if the remote Connection service is turned on

Use command: Telnet

Format: Telnet Server IP Address port number

Cases:

[e:\~]$ telnet  10.0.  0.20010.0. 0.200:... Connection established. (with this sentence to represent success)

If the wrong thing to do is to open the service to remote connection, of course, there are Linux servers above the Iptables firewall and SELinux block.

How to turn off Iptables firewall and selinux off SELinux

Temporarily deactivate SELinux (fails after restarting the server):

[Email protected]0  [[email protected]-~ ]# Getenforce (view current SELinux status) Permissive (temporarily off)

Modify the SELinux configuration file (to permanently turn off SELinux, which requires restarting the server):

Enforcing SELinux default state SELinux is enabled and running

Permissive SELinux temporary shutdown display warning

Disabled SELinux completely shut down

[Email protected]sed's#selinux=enforcing#selinux=disabled#g' / etc/selinux/Config  (this is the changed command) [[email protected]-"grep"Disabled    " /etc/selinux/config  (view the results that have been changed)     #- No selinux policy is loaded. SELINUX=disabled
Close Iptables Firewall

Temporary shutdown: Normally two times (restart the computer firewall will open again)

/etc/init.d/iptables  stop  After you run the firewall once and generally check the status of/etc/init.d/iptables status to see the firewall

Shut down permanently: Turn off the boot Project iptables firewall (requires reboot to take effect)

chkconfig Manage boot-up software [[email protected]-~ ]# chkconfig iptables off   [Email protected]-~]# chkconfig | grep  0: Off    1: Off    2: Off    3: Off    4 : Off    5: Off    6: Off     all off is off.

Currently in the study of Linux, if the summary is not good, please point out, I will try to correct.

How Linux is partitioned and how to turn off Iptables and SELinux

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.