windos10 安装CentOS7 虚拟机笔记

发布于:2025-08-07 ⋅ 阅读:(13) ⋅ 点赞:(0)

下载虚拟机 VMware

VMware Workstation Pro 17官网下载安装教程_vmware17pro下载-CSDN博客

下载镜像

 centos-7-isos-x86_64安装包下载_开源镜像站-阿里云

安装教程

VMware虚拟机中下载安装CentOS 7(详细图文教程)_vmware阿里云镜像下载-CSDN博客

按照教程操作即可

本地连接虚拟机putty下载

Download PuTTY - a free SSH and telnet client for Windows

安装宝塔

 [root@localhost ~]#

login as: root
root@192.168.2.30's password:
Last login: Wed Jul  9 20:08:13 2025
[root@localhost ~]# ls
anaconda-ks.cfg
[root@localhost ~]# ping www.baidu.com   说明有网络
PING www.baidu.com (183.240.99.169) 56(84) bytes of data.
64 bytes from 183.240.99.169 (183.240.99.169): icmp_seq=1 ttl=53 time=15.5 ms
64 bytes from 183.240.99.169 (183.240.99.169): icmp_seq=2 ttl=53 time=15.7 ms
64 bytes from 183.240.99.169 (183.240.99.169): icmp_seq=3 ttl=53 time=15.1 ms
^C
--- www.baidu.com ping statistics ---
36 packets transmitted, 36 received, 0% packet loss, time 35062ms
rtt min/avg/max/mdev = 13.604/17.833/80.947/11.116 ms


[root@localhost ~]# wget --version
-bash: wget: 未找到命令


[root@localhost ~]# yum install -y wget
-bash: -bash:: 未找到命令


安装 yum 
[root@localhost ~]# [root@localhost ~]# yum install -y wget
已加载插件:fastestmirror

[root@localhost ~]# mkdir /etc/yum.repos.d/bak
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/bak/
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
-bash: wget: 未找到命令

[root@localhost ~]# ls
anaconda-ks.cfg

[root@localhost ~]# mkdir /etc/yum.repos.d/bak
mkdir: 无法创建目录"/etc/yum.repos.d/bak": 文件已存在

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/bak/
mv: 无法获取"/etc/yum.repos.d/CentOS-*" 的文件状态(stat): 没有那个文件或目录

[root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2523  100  2523    0     0  22957      0 --:--:-- --:--:-- --:--:-- 23146

[root@localhost ~]# yum clean all

已加载插件:fastestmirror
正在清理软件源: base extras updates
Cleaning up list of fastest mirrors

安装 wget 
[root@localhost ~]# yum install -y wget


已加载插件:fastestmirror
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                        | 3.6 kB  00:00:00
extras                                                      | 2.9 kB  00:00:00
updates                                                     | 2.9 kB  00:00:00
(1/4): base/7/x86_64/group_gz                               | 153 kB  00:00:00
(2/4): extras/7/x86_64/primary_db                           | 253 kB  00:00:00
(3/4): updates/7/x86_64/primary_db                          |  27 MB  00:00:03
base/7/x86_64/primary_db       FAILED
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: (28, 'Connection timed out after 30002 milliseconds')
正在尝试其它镜像。
(4/4): base/7/x86_64/primary_db                             | 6.1 MB  00:00:00
正在解决依赖关系
--> 正在检查事务
---> 软件包 wget.x86_64.0.1.14-18.el7_6.1 将被 安装
--> 解决依赖关系完成

依赖关系解决

===================================================================================
 Package        架构             版本                         源              大小
===================================================================================
正在安装:
 wget           x86_64           1.14-18.el7_6.1              base           547 k

事务概要
===================================================================================
安装  1 软件包

总下载量:547 k
安装大小:2.0 M
。。。。。。。
已安装:
  wget.x86_64 0:1.14-18.el7_6.1

完毕!


查看版本
[root@localhost ~]# wget --version



GNU Wget 1.14 在 linux-gnu 上编译。

+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl

Wgetrc:
    /etc/wgetrc (系统)
字符集: /usr/share/locale
。。。。。。。


安装宝塔
[root@localhost ~]# wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh


--2025-07-09 20:28:12--  http://download.bt.cn/install/install_6.0.sh
正在解析主机 download.bt.cn (download.bt.cn)... 211.99.112.67, 240e:f7:ef00:3:0:7:8000:125
正在连接 download.bt.cn (download.bt.cn)|211.99.112.67|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:50419 (49K) [application/octet-stream]
正在保存至: “install.sh”

100%[=========================================>] 50,419      --.-K/s 用时 0.03s

2025-07-09 20:28:12 (1.90 MB/s) - 已保存 “install.sh” [50419/50419])


+----------------------------------------------------------------------
| Bt-WebPanel FOR CentOS/Ubuntu/Debian
+----------------------------------------------------------------------
| Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.
+----------------------------------------------------------------------
| The WebPanel URL will be http://SERVER_IP:39020 when installed.
+----------------------------------------------------------------------
| 为了您的正常使用,请确保使用全新或纯净的系统安装宝塔面板,不支持已部署项目/环境的系统安装
+----------------------------------------------------------------------

Do you want to install Bt-Panel to the /www directory now?(y/n): y
---------------------------------------------
Selected download node...
Download node: https://download.bt.cn
---------------------------------------------
Swap total sizse: 2096124
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package unzip.x86_64 0:6.0-24.el7_9 will be installed
--> Finished Dependency Resolution
anel/install/public.sh’ saved [5745/5745]

等待安装完成 省略显示日志

==============================================
正在下载面板文件,请稍等...................
==============================================

========================================
正在开启面板SSL,请稍等............
========================================
证书开启成功!
========================================

===================================================================================
 Package                    Arch         Version               Repository     Size
===================================================================================

==================================================================
Congratulations! Installed successfully!
=============注意:首次打开面板浏览器将提示不安全=================

 请选择以下其中一种方式解决不安全提醒
 1、下载证书,地址:https://dg2.bt.cn/ssl/baota_root.pfx,双击安装,密码【www.bt.cn】
 2、点击【高级】-【继续访问】或【接受风险并继续】访问
 教程:https://www.bt.cn/bbs/thread-117246-1-1.html
 mac用户请下载使用此证书:https://dg2.bt.cn/ssl/mac.crt

========================面板账户登录信息==========================

 【云服务器】请在安全组放行 39020 端口
 外网面板地址: https://1**.2**.2*.1**:39020/2580275d  给别人访问的地址
 内网面板地址: https://192.168.2.30:39020/2580275d  本机访问
 username: mjkfezlp
 password: fa96536e

 浏览器访问以下链接,添加宝塔客服
 https://www.bt.cn/new/wechat_customer
==================================================================
Time consumed: 1 Minute!


网站公告

今日签到

点亮在社区的每一天
去签到