云计算1+X平台运维与开发认证(初级)操作题详解
操作题(详解)
主从数据库管理
在xserver1、xserver2上安装mariadb数据库,并配置为主从数据库(xserver1为主节点、xserver2为从节点),实现两个数据库的主从同步。配置完毕后,请在xserver2上的数据库中执⾏“show slave status \G”命令查询从节点复制状态,将查询到的结果以⽂本形式提交到答题框。
#server1主
[root@xserver1 ~]#yum install mariadb-server mariadb -y
[root@xserver1 ~]# vi /etc/myf
[mysqld]
server-id=1
log-bin=mysql-bin
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
"/etc/myf" 21L, 600C written
[root@xserver1 ~]# systemctl restart mariadb
#server2从
[root@xserver2 ~]#yum install -y mariadb mariadb-server
[root@xserver2 ~]# vi /etc/myf
[mysqld]
server-id = 2
log-bin=mysql-bin
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
[root@xserver2 ~]# systemctl restart mariadb
#server1主
[root@xserver1 ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> flush tables with read lock;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>exit
Bye
[root@xserver1 ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> grant replication slave on *.* to 'yzq'@'192.168.182.129' identified by '000000';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show master status;
+------------------+----------+--------------+------------------+
| File            | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000003 |      400 |||
stuffed animal是什么意思+------------------+----------+--------------+------------------+
1 row in set(0.00 sec)
#server2从
#server2从
[root@xserver2 ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> change master to master_host='192.168.182.128',master_user='yzq',master_password='000000',master_log_file='mysql-bin.000003',m aster_log_pos=400;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> slave start;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.182.128
Master_User: yzq
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000003
Read_Master_Log_Pos: 400
Relay_Log_File: mariadb-relay-bin.000002
Relay_Log_Pos: 529
Relay_Master_Log_File: mysql-bin.000003
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 400
Relay_Log_Space: 825
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
mysql面试题初级
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:免费视频网站源码下载
Master_Server_Id: 1
1 row in set(0.00 sec)scrapy框架怎么读
MariaDB [(none)]>
Mariadb
使⽤VMware软件和提供的CentOS-7-x86_64-DVD-1511.iso创建虚拟机,⾃⾏配置好⽹络和YUM源,安装mariadb数据库,安装完毕后登录数据库,查询当前系统的时间和⽤户。依次将操作命令和返回结果以⽂本形式提交到答题框。(数据库⽤户名root,密码000000;关于数据库的命令均使⽤⼩写)
[root@xserver ~]# cat /pos.po
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[root@xserver ~]# yum install -y mariadb mariadb-server
[root@xserver ~]# mysql -uroot -p000000
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 46
Server version: 10.1.17-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>select sysdate();
+---------------------+
最新php招聘信息| sysdate()|
+---------------------+
| 2020-12-07 10:17:33 |
+---------------------+
1 row in set(0.00 sec)
mvc设计模式的概念和作用
MariaDB [(none)]>select user();
+----------------+
| user()|
+----------------+
| root@localhost |
+----------------+
1 row in set(0.00 sec)
OpenStack题
OpenStack Neutron管理
使⽤VMWare软件启动提供的opensatckallinone镜像,⾃⾏检查openstack中各服务的状态,若有问题⾃⾏排查。在dashboard界⾯创建云主机外部⽹络ext-net。⼦⽹为ext-subnet,云主机浮动IP可⽤⽹段为192.168.200.100~192.168.200.200,⽹关为
192.168.200.1。创建云主机内部⽹络int-net1,⼦⽹为int-subnet1,云主机⼦⽹IP可⽤⽹段为10.0.0.100 ~ 10.0.0.200,⽹关为10.0.0.1。添加名为extrouter的路由器,添加⽹关在ext-net⽹络,添加内部端⼝到int-net1⽹络,完成内部⽹络int-net1和外部⽹络的连通。将执⾏neutron router-show ext-router命令所返回的结果以⽂本形式提交到答题框。
(1)在管理员⽹络⾥创建外部⽹ext-net
(2)创建外部⽹络⼦⽹ext-subnet
(3)创建内部⽹络int-net1
(3)创建内部⽹络int-net1
(4)创建内部⽹络⼦⽹int-subnet1

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。