diff --git a/CentOS-7-Install.md b/CentOS-7-Install.md new file mode 100644 index 00000000..3f2aec9d --- /dev/null +++ b/CentOS-7-Install.md @@ -0,0 +1,43 @@ +# CentOS 安装 + + +## 概括 + +- 本教程中主要演示了 VMware Workstation 下安装 `CentOS 7.3` 的过程。 +- VMware 的使用细节可以看这篇:[CentOS 6 安装](CentOS-Install.md) + +## VMware 下安装 CentOS 过程 + +- VMware Workstation 的介绍和下载 + - 官网: + - wiki: + - 百度 wiki: + - 百度云下载(64 位): + - 官网下载: + + +- 安装细节开始: + - ![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) + - 到此完成,其他该做啥就做啥 \ No newline at end of file diff --git a/CentOS-Virtual-Machine-Copy-Settings.md b/CentOS-Virtual-Machine-Copy-Settings.md index 43c398ad..d94c8fef 100644 --- a/CentOS-Virtual-Machine-Copy-Settings.md +++ b/CentOS-Virtual-Machine-Copy-Settings.md @@ -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 值。 diff --git a/CentOS6-and-CentOS7.md b/CentOS6-and-CentOS7.md new file mode 100644 index 00000000..b0c9c3dd --- /dev/null +++ b/CentOS6-and-CentOS7.md @@ -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` + + +## 资料 + +- +- +- +- \ No newline at end of file diff --git a/images/CentOS-7-Install-a-1.jpg b/images/CentOS-7-Install-a-1.jpg new file mode 100644 index 00000000..ae6fd358 Binary files /dev/null and b/images/CentOS-7-Install-a-1.jpg differ diff --git a/images/CentOS-7-Install-a-10.jpg b/images/CentOS-7-Install-a-10.jpg new file mode 100644 index 00000000..edaecb6f Binary files /dev/null and b/images/CentOS-7-Install-a-10.jpg differ diff --git a/images/CentOS-7-Install-a-11.jpg b/images/CentOS-7-Install-a-11.jpg new file mode 100644 index 00000000..7d8a3e23 Binary files /dev/null and b/images/CentOS-7-Install-a-11.jpg differ diff --git a/images/CentOS-7-Install-a-12.jpg b/images/CentOS-7-Install-a-12.jpg new file mode 100644 index 00000000..193e825c Binary files /dev/null and b/images/CentOS-7-Install-a-12.jpg differ diff --git a/images/CentOS-7-Install-a-13.jpg b/images/CentOS-7-Install-a-13.jpg new file mode 100644 index 00000000..4aea90ed Binary files /dev/null and b/images/CentOS-7-Install-a-13.jpg differ diff --git a/images/CentOS-7-Install-a-14.jpg b/images/CentOS-7-Install-a-14.jpg new file mode 100644 index 00000000..269a7ccc Binary files /dev/null and b/images/CentOS-7-Install-a-14.jpg differ diff --git a/images/CentOS-7-Install-a-15.jpg b/images/CentOS-7-Install-a-15.jpg new file mode 100644 index 00000000..760c8af8 Binary files /dev/null and b/images/CentOS-7-Install-a-15.jpg differ diff --git a/images/CentOS-7-Install-a-16.jpg b/images/CentOS-7-Install-a-16.jpg new file mode 100644 index 00000000..21167d4a Binary files /dev/null and b/images/CentOS-7-Install-a-16.jpg differ diff --git a/images/CentOS-7-Install-a-2.jpg b/images/CentOS-7-Install-a-2.jpg new file mode 100644 index 00000000..9290b5dc Binary files /dev/null and b/images/CentOS-7-Install-a-2.jpg differ diff --git a/images/CentOS-7-Install-a-3.jpg b/images/CentOS-7-Install-a-3.jpg new file mode 100644 index 00000000..9ec3185e Binary files /dev/null and b/images/CentOS-7-Install-a-3.jpg differ diff --git a/images/CentOS-7-Install-a-4.jpg b/images/CentOS-7-Install-a-4.jpg new file mode 100644 index 00000000..768b9be5 Binary files /dev/null and b/images/CentOS-7-Install-a-4.jpg differ diff --git a/images/CentOS-7-Install-a-5.jpg b/images/CentOS-7-Install-a-5.jpg new file mode 100644 index 00000000..78fb67eb Binary files /dev/null and b/images/CentOS-7-Install-a-5.jpg differ diff --git a/images/CentOS-7-Install-a-6.jpg b/images/CentOS-7-Install-a-6.jpg new file mode 100644 index 00000000..fd5f32c7 Binary files /dev/null and b/images/CentOS-7-Install-a-6.jpg differ diff --git a/images/CentOS-7-Install-a-7.jpg b/images/CentOS-7-Install-a-7.jpg new file mode 100644 index 00000000..ef41ed75 Binary files /dev/null and b/images/CentOS-7-Install-a-7.jpg differ diff --git a/images/CentOS-7-Install-a-8.jpg b/images/CentOS-7-Install-a-8.jpg new file mode 100644 index 00000000..c58e7c7c Binary files /dev/null and b/images/CentOS-7-Install-a-8.jpg differ diff --git a/images/CentOS-7-Install-a-9.jpg b/images/CentOS-7-Install-a-9.jpg new file mode 100644 index 00000000..81b9696c Binary files /dev/null and b/images/CentOS-7-Install-a-9.jpg differ diff --git a/images/CentOS6-and-CentOS7-a-1.png b/images/CentOS6-and-CentOS7-a-1.png new file mode 100644 index 00000000..47b69ed5 Binary files /dev/null and b/images/CentOS6-and-CentOS7-a-1.png differ