人民好代表 發表於 2024-2-21 00:00:00

最小化安装CentOS 6.X之后需要做的配置

<p><strong style=" font-size: 14px;">一, /boot分区备份</strong><span style=" font-size: 14px;">&nbsp;</span><br style=" font-size: 14px;"/><br style=" font-size: 14px;"/><strong style=" font-size: 14px;">二,网络配置</strong><span style=" font-size: 14px;">&nbsp;</span><br style=" font-size: 14px;"/><br style=" font-size: 14px;"/><span style=" font-size: 14px;">修改主机名:&nbsp;</span></p><p class="msgborder" style="margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; "><br/>
        #vi /etc/sysconfig/network&nbsp;<br/>
        NETWORKING=yes&nbsp;<br/>
        #HOSTNAME=localhost.localdomain&nbsp;<br/>
        HOSTNAME=CentOS-1&nbsp;<br/>
        #也可以在这里设置网关&nbsp;<br/>
        #GATEWAY=192。168.30.1&nbsp;</p><p><br style=" font-size: 14px;"/><span style=" font-size: 14px;">设置网络为DHCP获取&nbsp;</span></p><p class="msgborder" style="margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; "><br/>
        vi /etc/sysconfig/network-scrip/ifcfg-eth0&nbsp;<br/>
        DEVICE=&quot;eth0&quot;&nbsp;<br/>
        BOOTPROTO=&quot;dhcp&quot;&nbsp;<br/>
        HWADDR=&quot;08:00:27:A7:AB:97&quot;&nbsp;<br/>
        NM_CONTROLLED=&quot;no&quot;&nbsp;<br/>
        ONBOOT=&quot;no&quot;&nbsp;<br/>
        TYPE=&quot;Ethernet&quot;&nbsp;<br/>
        UUID=&quot;9622f9e1-6218-4c56-9f45-7ae29b477e89&quot;&nbsp;</p><p><br style=" font-size: 14px;"/><span style=" font-size: 14px;">设置静态IP&nbsp;</span></p><p class="msgborder" style="margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; "><br/>
        vi /etc/sysconfig/network-scrip/ifcfg-eth0&nbsp;<br/>
        # cat /etc/sysconfig/network-scripts/ifcfg-eth0&nbsp;<br/>
        DEVICE=eth0&nbsp;<br/>
        BOOTPROTO=none&nbsp;<br/>
        HWADDR=08:00:27:e2:62:9b&nbsp;<br/>
        NM_CONTROLLED=no&nbsp;<br/>
        ONBOOT=yes&nbsp;<br/>
        TYPE=Ethernet&nbsp;<br/>
        IPADDR=192.168.30.223&nbsp;<br/>
        NETMASK=255.255.255.0&nbsp;<br/>
        GATEWAY=192.168.30.1&nbsp;<br/>
        DNS=8.8.8.8&nbsp;<br/>
        USERCTL=no&nbsp;<br/>
        IPV6INIT=no&nbsp;</p><p><br style=" font-size: 14px;"/><br style=" font-size: 14px;"/><strong style=" font-size: 14px;">三,安装wget工具</strong><span style=" font-size: 14px;">&nbsp;</span><br style=" font-size: 14px;"/>&nbsp; &nbsp;</p><p class="msgborder" style="margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; ">&nbsp; &nbsp;
        yum install wget</p><p><br style=" font-size: 14px;"/><br style=" font-size: 14px;"/><strong style=" font-size: 14px;">四,源配置</strong><span style=" font-size: 14px;">&nbsp;</span><br style=" font-size: 14px;"/>&nbsp; &nbsp;</p><p class="msgborder" style="margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; "><br/>
        cd /etc/yum.repos.d&nbsp;<br/>
        mv CentOS-Base.repo bak-CentOS-Base.repo&nbsp;<br/>
        wget http://mirrors.163.com/.help/CentOS6-Base-163.repo&nbsp;<br/>
        yum clean all&nbsp;<br/>
        yum makecache&nbsp;</p><p><br style=" font-size: 14px;"/><br style=" font-size: 14px;"/><strong style=" font-size: 14px;">五,ssh密钥配置</strong><span style=" font-size: 14px;">&nbsp;</span><br style=" font-size: 14px;"/><br style=" font-size: 14px;"/><br style=" font-size: 14px;"/><strong style=" font-size: 14px;">六,sudo配置</strong><span style=" font-size: 14px;">&nbsp;</span><br style=" font-size: 14px;"/><br style=" font-size: 14px;"/><strong style=" font-size: 14px;">七,编译环境和工具的安装</strong><span style=" font-size: 14px;">&nbsp;</span></p><p class="msgborder" style="margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; "><br/>
        yum groupinstall &quot;Development Libraries&quot; &quot;Development Tools&quot;&nbsp;</p>
頁: [1]
查看完整版本: 最小化安装CentOS 6.X之后需要做的配置