RED hat 還是老的Linux

來源:互聯網
上載者:User

標籤:load   reboot   cte   dev   psi   wan   config   查看   stat   

1.固定的可以連網ip地址2.關閉防火牆3.關閉selinux4.光碟片自動掛載5.配置好本地yum源RHEL6配置方法:1.ifconfig 2.設定檔(永久) 3.setup/nmtui1.  ifconfig查看IP地址  crtl+l 清屏    RHEL中弱化了setup的功能,對於網路管理來說,network服務的     功能弱化,主要通過NetworkManager對網路進行管理    RHEL7通過nmtui修改網路設定(RHEL7預設安裝,前提是需        要開啟NetworkManager.service才可以使用)首先,確定NetworkManager服務正常運行systemctl status NetworkManager查看網路服務運行是否正常systemctl start NetworkManager  啟動networkmanager服務   第二種 vim /etc/sysconfig/network-scripts/ifcfg-eno16777736TYPE="Ethernet"BOOTPROTO="none" ip地址類型:none static dhcpDEFROUTE="yes"IPV4_FAILURE_FATAL="no"IPV6INIT="yes"IPV6_AUTOCONF="yes"IPV6_DEFROUTE="yes"IPV6_FAILURE_FATAL="no"NAME="eno16777736"UUID="0ac62b8e-60b6-47ad-8967-c70369eeeaab"DEVICE="eno16777736"ONBOOT="yes"   是否啟動DNS1="8.8.8.8"    DNSIPADDR="192.168.1.63"    IP地址PREFIX= "24"   掩碼長度GATEWAY=192.168.1.1    預設閘道IPV6_PEERDNS=yesIPV6_PEERROUTES=yesIPV6_PRIVACY=no關閉防火牆,開機自動關閉rehl7  firewalld查看命令及狀態systemctl status firewalld.service● firewalld.service - firewalld - dynamic firewall daemon   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)   Active: active (running) since 六 2017-05-06 23:31:20 CST; 21min ago Main PID: 863 (firewalld)   CGroup: /system.slice/firewalld.service           └─863 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid5月 07 07:24:08 zq systemd[1]: Starting firewalld - dynamic firewall daemon...5月 06 23:31:20 zq systemd[1]: Started firewalld - dynamic firewall daemon.Hint: Some lines were ellipsized, use -l to show in full.防火牆的關閉與開機自動關閉             systemctl stop firewalld  關閉命令[[email protected] ~]# systemctl disable firewalld 禁用命令Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.關閉selinux並設定開機自動關閉[[email protected] ~]# setenforce 0 暫時關閉usage:  setenforce [ Enforcing | Permissive | 1 | 0 ][[email protected] ~]# vim /etc/sysconfig/selinux  永久關閉 # This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:#     enforcing - SELinux security policy is enforced.#     permissive - SELinux prints warnings instead of enforcing.#     disabled - No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of three two values:#     targeted - Targeted processes are protected,#     minimum - Modification of targeted policy. Only selected processes are protected. #     mls - Multi Level Security protection.SELINUXTYPE=targeted重啟生效  reboot設定光碟片開機自動掛載 一切皆檔案[[email protected] ~]# mount -a  驗證[[email protected] ~]# ls /mnt   addons  GPL       LiveOS      release-notes            RPM-GPG-KEY-redhat-releaseEFI     images    media.repo  repodata                 TRANS.TBLEULA    isolinux  Packages    RPM-GPG-KEY-redhat-beta[[email protected] ~]# df  查看檔案系統          1K-塊    已用     可用 已用% 掛載點/dev/sda3      20961280 3249680 17711600   16% /devtmpfs         486124       0   486124    0% /devtmpfs            500664     156   500508    1% /dev/shmtmpfs            500664    7204   493460    2% /runtmpfs            500664       0   500664    0% /sys/fs/cgroup/dev/sda1        508588  141104   367484   28% /boottmpfs            100136      16   100120    1% /run/user/1000配置掛載檔案vim /etc/fstab## /etc/fstab# Created by anaconda on Sun May  7 05:20:03 2017## Accessible filesystems, by reference, are maintained under ‘/dev/disk‘# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info#UUID=7b8743cb-c53a-4848-83b7-d8c90a5413a0 /                       xfs     defaults        0 0UUID=a0ac773e-aa81-49cb-887c-e0752f0d2456 /boot                   xfs     defaults        0 0UUID=4685bbff-8ccc-4937-9d33-5c34f9608a9f swap                    swap    defaults        0 0/dev/cdrom    /mnt                   iso9660   defaults      0 0這行是配置內容tmpfs            100136       0   100136    0% /run/user/0/dev/sr0        3947824 3947824        0  100% /mnt配置yum源二.yum的設定檔yum的一切配置資訊都儲存在一個叫yum.repos.d的設定檔中,通常位於/etc目錄下這是整個yum系統的重中之重vim /etc/yum.repos.d/rehl7.repo建立新的設定檔[Server]name=Red Hat Enterprise Linux Serverbaseurl=file:///mnt    訪問路徑enable=1       可以允許嗎 可以    啟用gpgcheck=0      需要檢查嗎 不需要   取消驗證沒有配置的先刪除原有的檔案rm -fr /etc/yum.repos.d/*建立檔案  檔案的形式 必須是.repo

[[email protected] ~]# yum clean all已載入外掛程式:langpacks, product-id, search-disabled-repos, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.正在清理軟體源: ServerCleaning up everything[[email protected] ~]# yum list已載入外掛程式:langpacks, product-id, search-disabled-repos, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Server                                                        | 4.1 kB  00:00:00     (1/2): Server/group_gz                                        | 136 kB  00:00:00     (2/2): Server/primary_db                                      | 3.6 MB  00:00:00     已安裝的軟體包

  

  

RED hat 還是老的Linux

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.