云计算试题

使用VMware软件和提供的CentOS-7-x86 64-DVD-1511.iso创建虚拟机,自行配置好网络并多添加一块大小为20G的硬盘,使用fdisk命令对该硬盘进形分区,要求分出三个大小为5G的分区。使用这三个分区,创建名xcloudvg的卷组。然后创建名xcloudlv的逻辑卷,大小为12G,最后用xfs文件系统对逻辑卷进行格式化并挂载到/mnt目录下。将上述所有操作命令和返回结果以文本形式提交到答题框

root@localhost \~\]# fdisk /dev/sdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table Building a new DOS disklabel with disk identifier 0x98399b7d. Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): Using default response p Partition number (1-4, default 1): First sector (2048-41943039, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039): +5G Partition 1 of type Linux and of size 5 GiB is set Command (m for help): n Partition type: p primary (1 primary, 0 extended, 3 free) e extended Select (default p): Using default response p Partition number (2-4, default 2): First sector (10487808-41943039, default 10487808): Using default value 10487808 Last sector, +sectors or +size{K,M,G} (10487808-41943039, default 41943039): +5G Partition 2 of type Linux and of size 5 GiB is set Command (m for help): n Partition type: p primary (2 primary, 0 extended, 2 free) e extended Select (default p): Using default response p Partition number (3,4, default 3): First sector (20973568-41943039, default 20973568): Using default value 20973568 Last sector, +sectors or +size{K,M,G} (20973568-41943039, default 41943039): +5G Partition 3 of type Linux and of size 5 GiB is set Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. \[root@localhost \~\]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 40G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 39.5G 0 part ├─centos-root 253:0 0 35.6G 0 lvm / └─centos-swap 253:1 0 3.9G 0 lvm \[SWAP

sdb 8:16 0 20G 0 disk

├─sdb1 8:17 0 5G 0 part

├─sdb2 8:18 0 5G 0 part

└─sdb3 8:19 0 5G 0 part

sr0 11:0 1 1024M 0 rom

root@localhost \~\]# vgcreate xcloudvg /dev/sdb1 /dev/sdb2 /dev/sdb3 Physical volume "/dev/sdb1" successfully created Physical volume "/dev/sdb2" successfully created Physical volume "/dev/sdb3" successfully created Volume group "xcloudvg" successfully created \[root@localhost \~\]# lvcreate -n xcloudlv -L 12G xcloudvg Logical volume "xcloudlv" created. \[root@localhost \~\]# mkfs -t xfs /dev/mapper/xcloudvg-xcloudlv meta-data=/dev/mapper/xcloudvg-xcloudlv isize=256 agcount=4, agsize=786432 blks = sectsz=512 attr=2, projid32bit=1 = crc=0 finobt=0 data = bsize=4096 blocks=3145728, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=0 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 \[root@localhost \~\]# mount /dev/mapper/xcloudvg-xcloudlv /mnt \[root@localhost \~\]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 40G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 39.5G 0 part ├─centos-root 253:0 0 35.6G 0 lvm / └─centos-swap 253:1 0 3.9G 0 lvm \[SWAP

sdb 8:16 0 20G 0 disk

├─sdb1 8:17 0 5G 0 part

│ └─xcloudvg-xcloudlv 253:2 0 12G 0 lvm /mnt

├─sdb2 8:18 0 5G 0 part

│ └─xcloudvg-xcloudlv 253:2 0 12G 0 lvm /mnt

└─sdb3 8:19 0 5G 0 part

└─xcloudvg-xcloudlv 253:2 0 12G 0 lvm /mnt

sr0 11:0 1 1024M 0 rom

使用VMware软件和提供的CentOS-7-x86 64-DVD-1511.iso创建虚拟机,自行配置好网络和YUM源,安装mariadb数据库,安装完毕后登录数据库,查询当前系统的时间和用户。依次将操作命令和返回结果以文本形式提交到答题框。(数据库用户名root,密码000000: 关于数据库的命令均使用小写

root@localhost \~\]# cd /etc/yum.repos.d/ \[root@localhost yum.repos.d\]# ls CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo \[root@localhost yum.repos.d\]# mkdir bak \[root@localhost yum.repos.d\]# mv C\* bak \[root@localhost yum.repos.d\]# vi loacl.repo \[centos

name=centos

baseurl=file:///opt/centos

gpgcheck=0

enabled=1

~

"loacl.repo" [New] 6L, 70C written

root@localhost yum.repos.d\]# cd \[root@localhost \~\]# cd /opt \[root@localhost opt\]# ls \[root@localhost opt\]# mkdir centos \[root@localhost opt\]# cd \[root@localhost \~\]# ls anaconda-ks.cfg cirros-0.3.4-x86_64-disk.img K8S.tar.gz wordpress-4.7.3-zh_CN.zip CentOS-7-x86_64-DVD-1511.iso Docker.tar.gz lnmp \[root@localhost \~\]# mount CentOS-7-x86_64-DVD-1511.iso /opt/centos mount: /dev/loop0 is write-protected, mounting read-only \[root@localhost \~\]# yum repolist Loaded plugins: fastestmirror centos \| 3.6 kB 00:00:00 (1/2): centos/group_gz \| 155 kB 00:00:00 (2/2): centos/primary_db \| 2.8 MB 00:00:00 Determining fastest mirrors repo id repo name status centos centos 3,723 repolist: 3,723 \[root@localhost \~\]# yum install -y mariadb mariadb-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Resolving Dependencies --\> Running transaction check ...... Complete! \[root@localhost \~\]# systemctl start mariadb \[root@localhost \~\]# systemctl enable mariadb Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. \[root@localhost \~\]# mysql_secure_installation /usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): (enter回车) OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? \[Y/n\] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? \[Y/n\] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? \[Y/n\] n ... skipping. By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? \[Y/n\] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? \[Y/n\] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! \[root@localhost \~\]# mysql -uroot -p000000 Welcome to the MariaDB monitor. Commands end with ; or \\g. Your MariaDB connection id is 9 Server version: 5.5.44-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement. MariaDB \[(none)\]\> show databases; +--------------------+ \| Database \| +--------------------+ \| information_schema \| \| mysql \| \| performance_schema \| +--------------------+ 3 rows in set (0.00 sec) MariaDB \[(none)\]\> select sysdate(); +---------------------+ \| sysdate() \| +---------------------+ \| 2023-12-26 09:58:33 \| +---------------------+ 1 row in set (0.00 sec) MariaDB \[(none)\]\> select user(); +----------------+ \| user() \| +----------------+ \| root@localhost \| +----------------+ 1 row in set (0.00 sec) \[root@localhost \~\]#

相关推荐
m0_6948455710 分钟前
tinylisp 是什么?超轻量 Lisp 解释器编译与运行教程
服务器·开发语言·云计算·github·lisp
ESBK202518 分钟前
第四届移动互联网、云计算与信息安全国际会议(MICCIS 2026)二轮征稿启动,诚邀全球学者共赴学术盛宴
大数据·网络·物联网·网络安全·云计算·密码学·信息与通信
_运维那些事儿14 小时前
VM环境的CI/CD
linux·运维·网络·阿里云·ci/cd·docker·云计算
人间打气筒(Ada)17 小时前
k8s:CNI网络插件flannel与calico
linux·云原生·容器·kubernetes·云计算·k8s
主机哥哥1 天前
2026年阿里云五种方案快速部署 OpenClaw(Clawdbot)详细教程
阿里云·云计算
m0_694845571 天前
music-website 是什么?前后端分离音乐网站部署实战
linux·运维·服务器·云计算·github
新新学长搞科研1 天前
【智慧城市专题IEEE会议】第六届物联网与智慧城市国际学术会议(IoTSC 2026)
人工智能·分布式·科技·物联网·云计算·智慧城市·学术会议
翼龙云_cloud1 天前
亚马逊云代理商: RDS 误删实例急救指南 5 步找回数据
服务器·云计算·aws
翼龙云_cloud1 天前
阿里云代理商: 如何选择适合自己的阿里云 ECS 配置?
服务器·阿里云·云计算
以太浮标1 天前
华为eNSP模拟器综合实验之- DHCP Option 43 解析
服务器·网络·华为·云计算