Skip to content

Commit

Permalink
2017-03-17补充了CentOS7和CentOS6的差异
Browse files Browse the repository at this point in the history
  • Loading branch information
judasn committed Mar 17, 2017
1 parent c98252c commit 9cc57ca
Show file tree
Hide file tree
Showing 20 changed files with 109 additions and 1 deletion.
43 changes: 43 additions & 0 deletions CentOS-7-Install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# CentOS 安装


## 概括

- 本教程中主要演示了 VMware Workstation 下安装 `CentOS 7.3` 的过程。
- VMware 的使用细节可以看这篇:[CentOS 6 安装](CentOS-Install.md)

## VMware 下安装 CentOS 过程

- VMware Workstation 的介绍和下载
- 官网:<https://www.vmware.com/products/workstation>
- wiki:<https://zh.wikipedia.org/wiki/VMware_Workstation>
- 百度 wiki:<http://baike.baidu.com/view/555554.htm>
- 百度云下载(64 位):<http://pan.baidu.com/s/1eRuJAFK>
- 官网下载:<http://www.vmware.com/products/workstation/workstation-evaluation>


- 安装细节开始:
- ![VMware 下安装](images/CentOS-7-Install-a-1.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-2.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-3.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-4.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-5.jpg)
- 如上图,默认是最小安装,点击进去,选择桌面安装。
- 如上图,默认是自动分区,如果懂得分区,点击进去,进行手动分区,CentOS 7 少了主分区,逻辑分区的选择了。
- ![VMware 下安装](images/CentOS-7-Install-a-6.jpg)
- 如上图,root 密码必须设置,我习惯测试的时候是:123456
- 我没有创建用户,喜欢用 root
- ![VMware 下安装](images/CentOS-7-Install-a-7.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-8.jpg)
- 如上图,许可证必须点击进去勾选同意相关协议。
- 如上图,网络可以稍后在设置,主机名可以现在先填写
- ![VMware 下安装](images/CentOS-7-Install-a-9.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-10.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-11.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-12.jpg)
- 如上图右上角,一般我们都选择跳过
- ![VMware 下安装](images/CentOS-7-Install-a-13.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-14.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-15.jpg)
- ![VMware 下安装](images/CentOS-7-Install-a-16.jpg)
- 到此完成,其他该做啥就做啥
2 changes: 1 addition & 1 deletion CentOS-Virtual-Machine-Copy-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- 修改 IP 地址
- 把 HWADDR 的值改为上面要求记下来的:00:0c:29:4c:46:01

- 命令:`nmcli con`
- 命令:`nmcli con > /opt/info.txt`
- 如果显示两行 UUID 的信息的话,复制不是 System eth0 的那个 UUID 值,下面有用。
- 编辑:`sudo vim /etc/sysconfig/network-scripts/ifcfg-eth0`
- 把文件中的 UUID 值 改为上面要求复制的 UUID 值。
Expand Down
65 changes: 65 additions & 0 deletions CentOS6-and-CentOS7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# CentOS 6 和 CentOS 7 介绍

## 总体差异

- ![总体差异](images/CentOS6-and-CentOS7-a-1.png)

## 想装回过去的一些工具

- 安装:`yum install -y tree net-tools bind-utils tree sysstat vim-en* lrzsz NetworkManager-tui ntp ntpdate iftop tcpdump telnet traceroute`

## 查看版本号/主机名

- `cat /etc/redhat-release`
- `cat /etc/hostname`

## 常用配置差异

- [CentOS 网络配置](centos-settings/CentOS-Network-Settings.md)
- [CentOS 图形界面的关闭与开启](centos-settings/Close-XWindow.md)

## systemctl 的用法

- 相当于 CentOS 6 的:service nginx stop
- `systemctl is-enabled iptables.service` #查询服务是否开机启动
- `systemctl enable iptables.service` #开机运行服务
- `systemctl disable iptables.service` #取消开机运行
- `systemctl start iptables.service` #启动服务
- `systemctl stop iptables.service` #停止服务
- `systemctl restart iptables.service` #重启服务
- `systemctl reload iptables.service` #重新加载服务配置文件
- `systemctl status iptables.service` #查询服务运行状态
- `systemctl --failed` #显示启动失败的服务
- `systemctl list-units --type=service` #查看所有服务
- `systemctl is-enabled httpd` #查看httpd服务是否开机启动
- 对于启动脚本的存放位置,也不再是 `/etc/init.d/`(这个目录也是存在的),而是 `/usr/lib/systemd/system/`

## 关闭 firewall 使用 iptables

- 关闭 firewall
- `systemctl stop firewalld.service` #停止firewall
- `systemctl disable firewalld.service` #禁止firewall开机启动
- 安装 iptables
- yum install -y iptables-services
- 启动 iptables
- systemctl restart iptables.service #最后重启防火墙使配置生效
- systemctl enable iptables.service #设置防火墙开机启动
- 其他使用照旧

## ifconfig 没有了

- 查看网络配置:`ip a`
- 装回 ifconfig:`yum insall -y net-tools`

## 设置时区

- `timedatectl set-timezone Asia/Shanghai`
- `timedatectl status`


## 资料

- <http://blog.topspeedsnail.com/archives/3017>
- <http://chenbaocheng.com/2015/07/15/Centos-7-%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AEiptables/>
- <http://cuidehua.blog.51cto.com/5449828/1858374>
- <http://putty.biz/760>
Binary file added images/CentOS-7-Install-a-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-14.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-15.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-16.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS-7-Install-a-9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CentOS6-and-CentOS7-a-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9cc57ca

Please sign in to comment.