RHEL7基本操作
1.創(chuàng)建一個(gè)可用的實(shí)驗(yàn)快照
2.固定的可以聯(lián)網(wǎng)IP地址
3.關(guān)閉防火墻
4.關(guān)閉selinux
5.光盤自動(dòng)掛載
6.配置好本地yum源
##如果是RHEL6 安裝Vmware tools
一、配置IP地址
RHEL7中弱化了setup的功能,對(duì)于網(wǎng)絡(luò)管理來說,network服務(wù)的功能弱化,主要通過NetworkManager對(duì)網(wǎng)絡(luò)進(jìn)行管理
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
TYPE=Ethernet
BOOTPROTO=static ##靜態(tài)IP
IPADDR=192.168.100.200 ##IP地址
NETMASK=255.255.255.0 ##子網(wǎng)掩碼
GATEWAY=192.168.100.100 ##默認(rèn)網(wǎng)關(guān)
DNS1=192.168.100.100 ##DNS
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=no
IPV6_DEFROUTE=no
IPV6_PEERDNS=no
IPV6_PEERROUTES=no
IPV6_FAILURE_FATAL=no
NAME=eno16777736
DEVICE=eno16777736
ONBOOT=yes ##系統(tǒng)啟動(dòng)時(shí)激活網(wǎng)卡
[root@localhost ~]# systemctl restart network
二、關(guān)閉防火墻并設(shè)置開機(jī)自動(dòng)關(guān)閉
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
三、關(guān)閉selinux并設(shè)置開機(jī)自動(dòng)關(guān)閉
[root@localhost ~]# setenforce 0 #臨時(shí)關(guān)閉
開機(jī)自動(dòng)關(guān)閉:
[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
四、設(shè)置光盤開機(jī)自動(dòng)掛載
[root@localhost ~]# echo "/dev/sr0 /mnt iso9660 defaults 0 0" >> /etc/fstab
驗(yàn)證:
root@localhost ~]# mount -a
mount: /dev/sr0 寫保護(hù),將以只讀方式掛載
五、配置好本地yum源
[root@localhost ~]# rm -rf /etc/yum.repos.d/*
[root@localhost ~]# cat > /etc/yum.repos.d/rhel7.repo <<END
[rhel7]
name=rhel-source
baseurl=file:///mnt
enabled=1
gpgcheck=0
END
驗(yàn)證:
[root@localhost ~]# cat /etc/yum.repos.d/rhel7.repo?
[rhel7]
name=rhel7
baseurl=file:///mnt
enabled=1
gpgcheck=0
[root@localhost ~]# yum clean all #清空yum緩存
[root@localhost ~]# yum list #生成緩存列表
本文轉(zhuǎn)自信自己belive51CTO博客,原文鏈接:?
http://blog.51cto.com/11638205/2048122,如需轉(zhuǎn)載請(qǐng)自行聯(lián)系原作者
總結(jié)
- 上一篇: iOS开发 - UITextView输入
- 下一篇: jQuery Ajax: $.post请