安装 vagrant , 安装 box 这里不再写,网上教程很多
1). yum install vim
2). yum install net-tools # 可以使用 ifconfig
3). 安装完centos,安装nginx: yum install nginx 报错如下:
[root@localhost vagrant]# yum install nginx
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirrors.aliyun.com
No package nginx available.
Error: Nothing to do
[root@localhost vagrant]#
解决方法: yum install epel-release
这时候在执行: yum install nginx 安装 nginx 成功
systemctl start nginx.service
systemctl stop nginx.service