Swap Script +selinux

Source: Internet
Author: User

Automatic creation of new swap partitions and automatic activation of the boot

Command: vim/bin/swap.sh # #编写脚本

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/92/85/wKiom1kARYbjTbb1AAAQzMJvDHQ535.png "title=" ({ d64i}xim{$M) q9rsh8itq.png "alt=" Wkiom1karybjtbb1aaaqzmjvdhq535.png "style=" padding:0px;margin:0px;vertical-align : Top;border:none; "/>

Script Content

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/92/A7/wKioL1kBoc3xitWcAAAptRE6Sk4962.png "title=" b@]) 0teuyt6aw}]%) @~w0ba.png "alt=" Wkiol1kboc3xitwcaaaptre6sk4962.png "style=" Padding:0px;margin:0px;vertical-align: Top;border:none; "/>

Echo/dev/vdb$2 swap swap defualts 0 0 >>/etc/fstab # #设置开机自动激活

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/92/A7/wKioL1kBojXSrka0AACbPCnuPtA817.png "title=" D6ICV71ZO7CSMRISG ' Tt746.png "alt=" Wkiol1kbojxsrka0aacbpcnupta817.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none; "/>

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/92/A7/wKioL1kBomCTsmH7AADesfbyRBo463.png "title=" Udyx4mdw4]0 (gte90{0 ' pl4.png "alt=" Wkiol1kbomctsmh7aadesfbyrbo463.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none; "/>

Start-Up Restart test

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/92/A8/wKiom1kBon_TCwQSAAAi37_1Ww0620.png "title=" 4_ Xg2f_hg63e~diec323~wm.png "alt=" Wkiom1kbon_tcwqsaaai37_1ww0620.png "style=" padding:0px;margin:0px;vertical-align : Top;border:none; "/>



SELinux


Vim/etc/sysconfig/selinux # #修改配置文件

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/92/84/wKiom1kAQtrj1Bs2AAAjSapoTLk030.png "title="%o% Tio1whky{[3]7$zwduhx.png "alt=" Wkiom1kaqtrj1bs2aaajsapotlk030.png "style=" Padding:0px;margin:0px;vertical-align: Top;border:none; "/>

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/92/83/wKioL1kAQwLhk7OqAACjaHcGPRE430.png "title=" ZF] Kpadra[jxe[g@[fo90g8.png "alt=" Wkiol1kaqwlhk7oqaacjahcgpre430.png "style=" Padding:0px;margin:0px;vertical-align: Top;border:none; "/>

Rebooting the system reboot

Getenforce # #查看状态

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/92/84/wKiom1kAQ12jdjpvAAAiUhEzsEI317.png "title=" 1$kg ( ~04af[ik1d3}1spmh9.png "alt=" Wkiom1kaq12jdjpvaaaiuhezsei317.png "style=" Padding:0px;margin:0px;vertical-align: Top;border:none; "/>

The MV file is not visible when you are in the enforcing state

The MV file is not visible when you are in the permissive state

PS Auxz | grep vsftp # #查看vsftp进程

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/92/83/wKioL1kAQ62R4yYHAAB06Cykqbs640.png "title=" Lu@sra[[83bfq3tp~x9umt8.png "alt=" Wkiol1kaq62r4yyhaab06cykqbs640.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none; "/>

Chcon-t public_content_t/var/ftp/pub/east # #配置安全上下文

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/92/84/wKiom1kARIXytR7RAAHSi6XtMWU462.png "title=" 7) b6w ) _gvq}e$_ ' I2AW0@Y1.png "alt=" Wkiom1karixytr7raahsi6xtmwu462.png "style=" Padding:0px;margin:0px;vertical-align: Top;border:none; "/>




Swap Script +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.