云计算试题

使用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 \~\]#

相关推荐
AC赳赳老秦2 天前
OpenClaw阿里云部署实操:多Agent协同,打造云端自动化工作流
人工智能·阿里云·数据挖掘·自动化·云计算·deepseek·openclaw
雨落Liy2 天前
OpenClaw 腾讯云一键更新后全面排障与恢复
云计算·vim·腾讯云
喵叔哟2 天前
3.【.NET10 实战--孢子记账--产品智能化】--.NET 10 核心新特性概览:运行时与 ASP.NET Core 10
云计算·asp.net·.net
Echo-J3 天前
WinDbg 双机调试(调试机为Windows11系统,被调试机为Windows7系统)
安全·网络安全·云计算·系统安全
翼龙云_cloud3 天前
亚马逊云代理商:如何在 AWS Lightsail 上一键部署 OpenClaw 私有化 AI 助手?
人工智能·云计算·aws·openclaw
Virtual_human08063 天前
在VMware workstation上,部署3节点ceph测试,及加入openstack
ceph·云计算·openstack·osd·ceph集群
Lim小刘4 天前
AWS IAM Identity Center 实战操作:从启用、用户、权限集到 SSO 登录
云计算·aws·云安全·sso
腾讯云大数据4 天前
腾讯云ES AI搜索最佳实践:基于ES与Dify的企业级RAG应用方案
大数据·人工智能·elasticsearch·云计算·腾讯云
运维行者_4 天前
使用 Applications Manager 实现 AWS 云监控:保障业务应用高效运行
大数据·运维·服务器·网络·数据库·云计算·aws
明天…ling4 天前
Xshell远程连接阿里云ECS超详细教程
阿里云·云计算