CentOS

MySQL数据库初识

非 Y 不嫁゛ 提交于 2021-02-12 01:59:28
一 数据库概述 1. 数据库???   什么是数据库呢?   先来看看百度怎么说的 数据库,简而言之可视为电子化的文件柜——存储电子文件的处所,用户可以对文件中的数据运行新增、截取、更新、删除等操作。 所谓“数据库”系以一定方式储存在一起、能予多个用户共享、具有尽可能小的冗余度、与应用程序彼此独立的数据集合。   百度的貌似不好理解啊,让我说啊,数据库是存储数据的地方,超哥,你这不是废话么?这位同学,你你你你你说的对,哈哈,存数据的地方是存在哪里呢,存在硬盘上,为什么不是存在内存里面,因为内存无法永久保存。之前我们存数据都是使用的文件,在一个word文档里面写一些羞羞的网址,然后保存,就存储到硬盘上了。有同学就会说了,超哥,我这通过文件不是也将数据保存上了吗?是的,没毛病,但是你想,通过文件来操作数据,效率是不是很低,首先打开关闭就比较慢,其次是我们操作起来也比较麻烦,对不对,如果我想记录一条关于我个人信息的数据,我使用文档来存,是不是很不友好,并且我们要查数据的时候,看图1:图1是一个word里面记录的信息,如果我想查询出所有人的名字,这个操作是不是就很难搞定了,来来来,配合起来~~,你应该说是的,那我就接着说,有同学可能就会说了,老师我用excel啊,看图2,一列就搞定了,没毛病,但是你想打开操作excel效率低不低。并且通过你自己写的程序来操作这些文件是不是很麻烦

centos 7 ,8 安装samba一般步骤,解决用户名密码无法登录的问题,解决ntlm和lanman访问限制

ⅰ亾dé卋堺 提交于 2021-02-12 01:55:10
centos 7 ,8 安装samba一般步骤,解决用户名密码无法登录的问题,解决ntlm和lanman访问限制 参考文章: (1)centos 7 ,8 安装samba一般步骤,解决用户名密码无法登录的问题,解决ntlm和lanman访问限制 (2)https://www.cnblogs.com/sdgtxuyong/p/11769743.html 备忘一下。 来源: oschina 链接: https://my.oschina.net/u/4438370/blog/4952394

Centos 7下在LVM中对xfs文件系统进行扩容

一个人想着一个人 提交于 2021-02-12 01:47:19
Centos 7下在LVM中对xfs文件系统进行扩容 LVM 磁盘管理 1. LVM基本术语 物理卷 (physical volume) : 物理的磁盘分区 $ pvdisplay #显示物理卷 $ pvcreate /dev/sdb1 #创建物理卷 卷组 (volume group) : LVM中的磁盘分区, 可以理解为一个磁盘仓库 $ vgdisplay #显示卷组 $ vgextend cl /dev/sdb1 #扩展卷组 逻辑卷 (logical volume) : 从VG中划分的逻辑分区 $ lvdisplay #显示逻辑卷 $ lvextend -L +100G /dev/cl/root #扩展容量 2. 新添加硬盘扩容LVM分区 2.1 为硬盘添加分区 $ fdisk /dev/sdb n #创建分区 p #选择主分区 1 #分区号, /dev/sdb1 t 8e #分区类型 linux LVM w #写入分区表 $ partprobe #重读分区表 $ mks.xfs /dev/sdb1 #格式化 $ partx /dev/sdb #查看分区情况 2.2 创建PV, 扩容VG, LV $ pvcreate /dev/sdb1 #创建PV $ vgdisplay $ vgextend cl /dev/sdb1 #扩展VG $ lvdisplay $ lvextend

RabbitMQ消息队列

て烟熏妆下的殇ゞ 提交于 2021-02-11 18:29:46
一、介绍 消息队列(Message Queue)是一种应用程序对应用程序的通信方式,应用程序通过读写出入队列的消息来通信。 消息发送后可以立即返回,由消息系统来确保消息的可靠传递。消息发布者只管把消息发布到 MQ 中而不用管谁来取,消息使用者只管从 MQ 中取消息而不管是谁发布的。这样发布者和使用者都不用知道对方的存在。 通俗理解消息队列: 生活中的消息队列,如同邮局的邮箱,如果没有邮箱的话,邮递员必须要"找到"接收邮件的人,递给他这封邮件,才算完成任务,可以想象这个过程是很麻烦、很慢、效率低下的;但是如果有了邮箱,邮件直接放进邮箱中,用户只需要去邮箱中找,看看有没有自己的邮件,有就拿走,没有就下次再来,这样就极大的提升了邮件的收发效率。 官方介绍: RabbitMQ是一个消息代理:它接受和转发消息。您可以将其视为邮局:当您将要发布的邮件放在邮箱中时,您可以确定,邮递员最终会将邮件发送给您的收件人。在这个类比中,RabbitMQ是一个邮箱,邮局和邮递员。 二、在什么情况下会用消息队列? (异步) 2.1 电商订单 比如点外卖,点击下单后的业务逻辑可能包括:检查库存、生成单据、发红包、短信通知等,如果这些业务同步执行,完成下单率会非常低;如发红包,短信通知等不必要的流程,异步执行即可。此时使用MQ,可以在核心流程(扣减库存、生成订单记录)等完成后发送消息到MQ,快速结束本次流程

Docker Registry使用:公有Docker Registry使用、私有Docker Registry的搭建

浪尽此生 提交于 2021-02-11 15:28:33
公有Docker Registry的操作 首先必须注册自己的dockerhub账号,假设为simpledockerhub [root@localhost ]# docker login --默认即https://hub.docker.com Username : simpledockerhub Password: ***** Login Succeeded [root@localhost ]# docker pull hello-world [root@localhost ]# docker tag hello-world simpledockerhub/hello-world [root@localhost ]#docker push simpledockerhub/hello-world ------注意 /前面的名称必须是用户注册的用户名。 这样就把hello-world镜像上传到simpledockerhub用户下,使用docker pull命令就可以下载该镜像了 私有Docker Registry的搭建 1. 单机版:只能通过localhost操作(个人玩玩还行) [root@localhost ]# docker run -d -p 5000:5000 registry:2 [root@localhost ]# docker tag hello-world

AH01630: client denied by server configuration but require all granted is set (Apache 2.4, CentOs)

岁酱吖の 提交于 2021-02-11 14:39:34
问题 I am using Apache 2.4 on CentOs to power my website. However, I always get a 403 forbidden error when trying to access the website through my browser. When I consulted the file error_log in the log directory of /etc/httpd , I repeatedly see the error: AH01630: client denied by server configuration I have read in the Internet as well as in multiple StackOverflow questions that you can solve this error with Require all granted in the html directory configuration of the httpd.conf file ( /etc

Copy file via scp

╄→гoц情女王★ 提交于 2021-02-11 14:21:54
问题 I have two servers. server A and B . I have created user on server A script is here useradd --home-dir /opt/test --no-create-home --shell /opt/test/bin/test.sh --password XXXX test I want to connect server A from B via scp and copy file scp -t -t -r /opt/test/ test@192.168.0.52:/opt/test/ but throws exeption scp: ambiguous target I have read about this error.As I understood this is syntactic error but there is not such a problem Can anybody help me? 回答1: AFAIK scp has no option -t (see man

Ident Authentication failed for user Centos 8 Postgresql12

梦想的初衷 提交于 2021-02-11 14:02:23
问题 So I have problem with ident Authentication on Centos 8 and postgresql-12. Errors below during server addition:::: pgadmin4 error creation server connection on localhost: postgres connect localhost I really tried many answers but no one worked for me. pg_nba.conf file now has following strings: local all all trust local all all md5 host all all 127.0.0.1/32 md5 host all all ::1/128 md5 host all all 10.1.1.0 File pg_ident.conf is empty so I don't have any mapping, Help me ples but after

Error involving Tkinter/matplotlib “no display name and no $DISPLAY environment variable” on CentOS

ぃ、小莉子 提交于 2021-02-11 13:46:37
问题 Most relevant questions I've seen here are not fixing my issue. I'm writing a program that uses matplotlib and tkinter to make a GUI. I'm running CentOS7. I get this when trying to run python36 testGraph.py on my server: Traceback (most recent call last): File "testGraph.py", line 167, in <module> app = SeaofBTCapp() File "testGraph.py", line 57, in __init__ tk.Tk.__init__(self, *args, **kwargs) File "/usr/lib64/python3.6/tkinter/__init__.py", line 2020, in __init__ self.tk = _tkinter.create

docker+mysql基本搭建过程,及修改时间

我们两清 提交于 2021-02-11 13:08:01
修改系统时间 [root@32c64- 0425445 ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/ localtime 或者 [root@32c64 - 0425445 ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/ localtime 或者 [root@32c64 - 0425445 ~ ]# systemctl enable ntpd [root@32c64 - 0425445 ~]# systemctl start ntpd 查询镜像 [root@bms-e4e3 ~ ]# docker search mysql INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED docker.io docker.io /mysql MySQL is a widely used, open-source relati... 7708 [OK] docker.io docker.io /mariadb MariaDB is a community-developed fork of M... 2530 [OK] docker.io docker.io /mysql/mysql-server Optimized MySQL Server Docker