![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
踏上不归路
weixin_48125776
这个作者很懒,什么都没留下…
展开
-
ubuntu 16.04安装python3.6 和pip3
安装方式在Ubuntu下安装python有两种方式:通过apt安装 (推荐)源码安装这里推荐第一种方式安装,因为apt安装会帮你做很多善后工作,而源码安装可能需要配置和系统修改的地方比较多。无论是第一点还是第二点,首先要确认当前系统中Python3是否已安装。确认本地Python3版本Python3在本地环境里一般存在三种情况:系统内置python3.6版本系统未安装任何python3版本系统安装了python3版本,但是非3.6版本第一种情况,则直接可以跳过本文阅读;第二种.原创 2022-01-13 15:47:04 · 636 阅读 · 0 评论 -
ubuntu 安装python3.6
sudo add-apt-repository ppa:deadsnakes/ppasudo apt-get updatesudo apt-get install python3.6好吧,仅仅做这一步,根本就不够,还要安装pip和python3.6-dev:#安装pipwget https://bootstrap.pypa.io/get-pip.py --no-check-certificatepython3 get-pip.py#安装python3.6-devapt-get instal原创 2021-08-18 17:19:27 · 1200 阅读 · 0 评论 -
docker 内添加 apt 源
mv /etc/apt/sources.list /etc/apt/sources.list.bakcat </etc/apt/sources.listdeb http://mirrors.ustc.edu.cn/debian stable main contrib non-freedeb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-freeEOF原创 2021-07-16 15:02:21 · 455 阅读 · 0 评论 -
nginx 配置文件 ok reload 报错
pkill nginx && service nginx restartQA Stack服务器管理员TagsAccountNginx无法停止并且缺少nginx.pid33我想停止Nginx,但是这样失败了。$ sudo service nginx stopStopping nginx: [FAILED]并且nginx.conf定义了nginx.pid的位置有一行。/etc/nginx/转载 2021-05-21 17:32:51 · 108 阅读 · 0 评论 -
rancher部署k8s集群+部署项目
1.安装rancher网上有自己搜2.安装docker-ce更新apt包索引:$ sudo apt-get update让apt能通过HTTPS使用仓库:$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common添加官方的GPG 密钥:$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo原创 2021-03-05 18:27:41 · 456 阅读 · 0 评论 -
rancher添加集群失败:Etcd Cluster is not healthy
一、背景有一台虚拟机,曾经用来做过rancher集群的agent(角色:etcd、control、worker),后来我删除了这个集群,现在又想用这台虚拟机做rancher集群,结果添加失败,报[etcd] Failed to bring up Etcd Plane: [etcd] Etcd Cluster is not healthy错误etcd二、解决谷歌后找到了原因:删除集群的时候没有清除完相关的资源在虚拟机上执行以下操作step1:删除rancher相关容器(注:以下命令会删除所有容器,转载 2021-02-20 17:46:23 · 1218 阅读 · 0 评论 -
mysql主从Slave_SQL_Running:no
方法一进入slave服务器stop slave;SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;start slave;show slave status\Ghttps://www.cnblogs.com/l-hh/p/9922548.html如果方法一未成功,请使用以下方法首先停掉Slave服务:slave stop到主服务器上查看主机状态:show master status;记录File和Position对应的值然后到slave服务器上执行手动同步:m原创 2021-02-18 17:50:43 · 63 阅读 · 0 评论 -
django数据查询之聚合查询和分组查询
<1> aggregate(*args,**kwargs):通过对QuerySet进行计算,返回一个聚合值的字典。aggregate()中每一个参数都指定一个包含在字典中的返回值。即在查询集上生成聚合。复制代码1 from django.db.models import Avg,Min,Sum,Max23 从整个查询集生成统计值。比如,你想要计算所有在售书的平均价钱。Django的查询语法提供了一种方式描述所有4 图书的集合。56 >>> Book.object原创 2021-01-05 16:40:10 · 264 阅读 · 0 评论 -
djang单个文件启动
django 单个文件启动import osimport djangoos.environ.setdefault(“DJANGO_SETTINGS_MODULE”, “model.settings”)django.setup()原创 2021-01-05 16:32:27 · 48 阅读 · 0 评论 -
django 创建项目
1.创建工程django-admin startproject 工程名2.工程目录说明cd project 进入工程目录tree说明:与项目同名的目录是工程文件settings.py是项目整体的配置文件urls.py是项目的路由配置文件wsgi.py是项目与WSGI协议兼容的Web服务器入口manage.py是项目的管理文件3.运行djangopython manage.py runserver4.验证在浏览器输入 127.0.0.1:8000 便可以看到效果5.创建子原创 2020-08-06 11:02:34 · 57 阅读 · 0 评论