Skip to content

Commit 9cc57ca

Browse files
committed
2017-03-17补充了CentOS7和CentOS6的差异
1 parent c98252c commit 9cc57ca

20 files changed

+109
-1
lines changed

CentOS-7-Install.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# CentOS 安装
2+
3+
4+
## 概括
5+
6+
- 本教程中主要演示了 VMware Workstation 下安装 `CentOS 7.3` 的过程。
7+
- VMware 的使用细节可以看这篇:[CentOS 6 安装](CentOS-Install.md)
8+
9+
## VMware 下安装 CentOS 过程
10+
11+
- VMware Workstation 的介绍和下载
12+
- 官网:<https://www.vmware.com/products/workstation>
13+
- wiki:<https://zh.wikipedia.org/wiki/VMware_Workstation>
14+
- 百度 wiki:<http://baike.baidu.com/view/555554.htm>
15+
- 百度云下载(64 位):<http://pan.baidu.com/s/1eRuJAFK>
16+
- 官网下载:<http://www.vmware.com/products/workstation/workstation-evaluation>
17+
18+
19+
- 安装细节开始:
20+
- ![VMware 下安装](images/CentOS-7-Install-a-1.jpg)
21+
- ![VMware 下安装](images/CentOS-7-Install-a-2.jpg)
22+
- ![VMware 下安装](images/CentOS-7-Install-a-3.jpg)
23+
- ![VMware 下安装](images/CentOS-7-Install-a-4.jpg)
24+
- ![VMware 下安装](images/CentOS-7-Install-a-5.jpg)
25+
- 如上图,默认是最小安装,点击进去,选择桌面安装。
26+
- 如上图,默认是自动分区,如果懂得分区,点击进去,进行手动分区,CentOS 7 少了主分区,逻辑分区的选择了。
27+
- ![VMware 下安装](images/CentOS-7-Install-a-6.jpg)
28+
- 如上图,root 密码必须设置,我习惯测试的时候是:123456
29+
- 我没有创建用户,喜欢用 root
30+
- ![VMware 下安装](images/CentOS-7-Install-a-7.jpg)
31+
- ![VMware 下安装](images/CentOS-7-Install-a-8.jpg)
32+
- 如上图,许可证必须点击进去勾选同意相关协议。
33+
- 如上图,网络可以稍后在设置,主机名可以现在先填写
34+
- ![VMware 下安装](images/CentOS-7-Install-a-9.jpg)
35+
- ![VMware 下安装](images/CentOS-7-Install-a-10.jpg)
36+
- ![VMware 下安装](images/CentOS-7-Install-a-11.jpg)
37+
- ![VMware 下安装](images/CentOS-7-Install-a-12.jpg)
38+
- 如上图右上角,一般我们都选择跳过
39+
- ![VMware 下安装](images/CentOS-7-Install-a-13.jpg)
40+
- ![VMware 下安装](images/CentOS-7-Install-a-14.jpg)
41+
- ![VMware 下安装](images/CentOS-7-Install-a-15.jpg)
42+
- ![VMware 下安装](images/CentOS-7-Install-a-16.jpg)
43+
- 到此完成,其他该做啥就做啥

CentOS-Virtual-Machine-Copy-Settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- 修改 IP 地址
2020
- 把 HWADDR 的值改为上面要求记下来的:00:0c:29:4c:46:01
2121

22-
- 命令:`nmcli con`
22+
- 命令:`nmcli con > /opt/info.txt`
2323
- 如果显示两行 UUID 的信息的话,复制不是 System eth0 的那个 UUID 值,下面有用。
2424
- 编辑:`sudo vim /etc/sysconfig/network-scripts/ifcfg-eth0`
2525
- 把文件中的 UUID 值 改为上面要求复制的 UUID 值。

CentOS6-and-CentOS7.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# CentOS 6 和 CentOS 7 介绍
2+
3+
## 总体差异
4+
5+
- ![总体差异](images/CentOS6-and-CentOS7-a-1.png)
6+
7+
## 想装回过去的一些工具
8+
9+
- 安装:`yum install -y tree net-tools bind-utils tree sysstat vim-en* lrzsz NetworkManager-tui ntp ntpdate iftop tcpdump telnet traceroute`
10+
11+
## 查看版本号/主机名
12+
13+
- `cat /etc/redhat-release`
14+
- `cat /etc/hostname`
15+
16+
## 常用配置差异
17+
18+
- [CentOS 网络配置](centos-settings/CentOS-Network-Settings.md)
19+
- [CentOS 图形界面的关闭与开启](centos-settings/Close-XWindow.md)
20+
21+
## systemctl 的用法
22+
23+
- 相当于 CentOS 6 的:service nginx stop
24+
- `systemctl is-enabled iptables.service` #查询服务是否开机启动
25+
- `systemctl enable iptables.service` #开机运行服务
26+
- `systemctl disable iptables.service` #取消开机运行
27+
- `systemctl start iptables.service` #启动服务
28+
- `systemctl stop iptables.service` #停止服务
29+
- `systemctl restart iptables.service` #重启服务
30+
- `systemctl reload iptables.service` #重新加载服务配置文件
31+
- `systemctl status iptables.service` #查询服务运行状态
32+
- `systemctl --failed` #显示启动失败的服务
33+
- `systemctl list-units --type=service` #查看所有服务
34+
- `systemctl is-enabled httpd` #查看httpd服务是否开机启动
35+
- 对于启动脚本的存放位置,也不再是 `/etc/init.d/`(这个目录也是存在的),而是 `/usr/lib/systemd/system/`
36+
37+
## 关闭 firewall 使用 iptables
38+
39+
- 关闭 firewall
40+
- `systemctl stop firewalld.service` #停止firewall
41+
- `systemctl disable firewalld.service` #禁止firewall开机启动
42+
- 安装 iptables
43+
- yum install -y iptables-services
44+
- 启动 iptables
45+
- systemctl restart iptables.service #最后重启防火墙使配置生效
46+
- systemctl enable iptables.service #设置防火墙开机启动
47+
- 其他使用照旧
48+
49+
## ifconfig 没有了
50+
51+
- 查看网络配置:`ip a`
52+
- 装回 ifconfig:`yum insall -y net-tools`
53+
54+
## 设置时区
55+
56+
- `timedatectl set-timezone Asia/Shanghai`
57+
- `timedatectl status`
58+
59+
60+
## 资料
61+
62+
- <http://blog.topspeedsnail.com/archives/3017>
63+
- <http://chenbaocheng.com/2015/07/15/Centos-7-%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AEiptables/>
64+
- <http://cuidehua.blog.51cto.com/5449828/1858374>
65+
- <http://putty.biz/760>

images/CentOS-7-Install-a-1.jpg

30.7 KB
Loading

images/CentOS-7-Install-a-10.jpg

34.4 KB
Loading

images/CentOS-7-Install-a-11.jpg

101 KB
Loading

images/CentOS-7-Install-a-12.jpg

37.5 KB
Loading

images/CentOS-7-Install-a-13.jpg

35.6 KB
Loading

images/CentOS-7-Install-a-14.jpg

38.7 KB
Loading

images/CentOS-7-Install-a-15.jpg

37.6 KB
Loading

images/CentOS-7-Install-a-16.jpg

50.9 KB
Loading

images/CentOS-7-Install-a-2.jpg

12.4 KB
Loading

images/CentOS-7-Install-a-3.jpg

57 KB
Loading

images/CentOS-7-Install-a-4.jpg

78.9 KB
Loading

images/CentOS-7-Install-a-5.jpg

79.9 KB
Loading

images/CentOS-7-Install-a-6.jpg

79.1 KB
Loading

images/CentOS-7-Install-a-7.jpg

58.7 KB
Loading

images/CentOS-7-Install-a-8.jpg

66.2 KB
Loading

images/CentOS-7-Install-a-9.jpg

35.2 KB
Loading

images/CentOS6-and-CentOS7-a-1.png

55 KB
Loading

0 commit comments

Comments
 (0)