zoukankan      html  css  js  c++  java
  • CentOS安装备忘2

    CentOS7安装备忘2

    安装过程中不联网,安装完成也不要立刻联网,先关闭远程的服务后再联网更新。
    安装默认使用English,目的是生成的Home下所有文件夹都是英文的,方便使用。

    ==============
    打开设置,找到语言;
    下面添加输入法:Chinese (Intelligent Pinyin)

    Settings Region & Language
    Input Sources (+)
    Chinese (Intelligent Pinyin)
    -----------------
    上面可以修改使用语言,重启后生效。
    重启后会提示,是否将文件夹的名称修改为中文,建议不要修改,保留英文名称的文件夹名称。
    ====================

    安装好后,关闭或卸载不需要的服务及功能

    安装提前下载好的nefs文件系统支持包,可以挂载ntfs格式的分区。可选
    rpm -Uvh ntfs-3g-2017.3.23-6.sdl7.x86_64.rpm 

    移除远程服务:
    [root@localhost /]# rpm -qa |grep ssh
      libssh2-1.4.3-10.el7_2.1.x86_64
      openssh-7.4p1-16.el7.x86_64
      openssh-server-7.4p1-16.el7.x86_64
      openssh-clients-7.4p1-16.el7.x86_64
    [root@localhost /]# yum remove openssh*

    [root@localhost /]# rpm -qa |grep vnc
      gtk-vnc2-0.7.0-3.el7.x86_64
      tigervnc-server-minimal-1.8.0-5.el7.x86_64
      gvnc-0.7.0-3.el7.x86_64
      tigervnc-license-1.8.0-5.el7.noarch
    [root@localhost /]# yum remove *vnc*
    以上远程服务不卸载,至少关闭掉,使用时再开。
    ==================

    检查更多:
    # netstat -tulpn
    # netstat -tulp
    # systemctl list-sockets
    ========================
    不需要可以直接移除 yum remove ...
    不确定可以关闭
    systemctl status ... 查看状态
    systemctl stop ... 停止,重启后会恢复
    systemctl disable ... 解除自启动
    ========================
    25端口的mail相关服务,
    systemctl status postfix
    systemctl stop postfix
    yum remove postfix
    ========================

    systemctl status chronyd
    systemctl stop chronyd
    yum remove chrony
    ========================
    network(不要删除,)
    systemctl status avahi-daemon.socket avahi-daemon.service
    systemctl stop avahi-daemon.socket avahi-daemon.service
    systemctl disable avahi-daemon.socket avahi-daemon.service
    ========================
    631端口 print服务
    systemctl stop cups.path cups.service cups.socket
    systemctl status cups.path cups.service cups.socket
    systemctl disable cups.path cups.service cups.socket
    ========================

    systemctl stop rpcbind.service rpcbind.socket rpcbind.target
    systemctl status rpcbind.service rpcbind.socket rpcbind.target
    systemctl disable rpcbind.service rpcbind.socket rpcbind.target
    ========================

    打开防火墙,默认区域改为block

    连接网络,防火墙的网络连接区域改为block(右上方改为永久修改,否则重启后设置就恢复初始了)

    yum update
    添加源

    。。。

    =========================

    关闭或删除不必要的服务后:

    仅剩下dns服务, 1080的python2是后来安装的ss; 5353是chrome的dns.

    [root@MiWiFi-R3-srv LibreOffice6.2]# netstat -tulp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name 
    tcp 0 0 MiWiFi-R3-srv:domain 0.0.0.0:* LISTEN 4798/dnsmasq 
    tcp 0 0 localhost:socks 0.0.0.0:* LISTEN 9406/python2 
    udp 0 0 MiWiFi-R3-srv:domain 0.0.0.0:* 4798/dnsmasq 
    udp 0 0 0.0.0.0:bootps 0.0.0.0:* 4798/dnsmasq 
    udp 0 0 0.0.0.0:bootpc 0.0.0.0:* 27118/dhclient 
    udp 0 0 localhost:socks 0.0.0.0:* 9406/python2 
    udp 0 0 224.0.0.251:mdns 0.0.0.0:* 12997/chrome --type 
    udp 0 0 224.0.0.251:mdns 0.0.0.0:* 12950/chrome 
    [root@MiWiFi-R3-srv LibreOffice6.2]# netstat -tulpn
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name 
    tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 4798/dnsmasq 
    tcp 0 0 127.0.0.1:1080 0.0.0.0:* LISTEN 9406/python2 
    udp 0 0 192.168.122.1:53 0.0.0.0:* 4798/dnsmasq 
    udp 0 0 0.0.0.0:67 0.0.0.0:* 4798/dnsmasq 
    udp 0 0 0.0.0.0:68 0.0.0.0:* 27118/dhclient 
    udp 0 0 127.0.0.1:1080 0.0.0.0:* 9406/python2 
    udp 0 0 224.0.0.251:5353 0.0.0.0:* 12997/chrome --type 
    udp 0 0 224.0.0.251:5353 0.0.0.0:* 12950/chrome 
    [root@MiWiFi-R3-srv LibreOffice6.2]#

    =============================

    https://www.howtoing.com/remove-unwanted-services-in-centos-7

  • 相关阅读:
    hdu 1711Number Sequence
    hdu 4911Inversion
    DataView数据变化的各种状态
    c#中的dataview数据视图的sort属性进行排序,用rowfilter属性进行筛选,完成学生档案信息的显示。
    DataView.RowFilter筛选DataTable中的数据
    C# 递归产生树
    treeview递归绑定的两种方法
    C#递归加载树
    c# DropDownList 下拉框实现树形导航
    C# ComboBox 下拉显示层次(树)
  • 原文地址:https://www.cnblogs.com/sztom/p/10402534.html
Copyright © 2011-2022 走看看