-
k8s,是个矿!也就是说坑多。首先是准本工作,关防火墙,关swapufw disableswapoff -a然后安装docker,上一篇帖子写过安装特定版本的docker sudo apt-get remove docker docker-engine docker.io containerd runcsudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88sudo add-apt-repository \ "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \ $(lsb_release -cs) \ stable"sudo apt-get updateapt-cache madison docker-cesudo apt-get install docker-ce=5:18.09.7~3-0~ubuntu-xenial docker-ce-cli=5:18.09.7~3-0~ubuntu-xenial containerd.io docker version这里的版本号(稳定版本号)是变的,前后两天,名称就不同了,需要看好apt-cache madison docker-ce列出的具体名称,替换到上面的安装命令里,否则找不到包。修改docker的驱动为systemd,否则会报错。sudo vim /etc/docker/daemon.json{ "registry-mirrors": ["https://registry.docker-cn.com"], "exec-opts": ["native.cgroupdriver=systemd"] }sudo systemctl daemon-reloadsudo systemctl restart docker安装 curlsudo apt-get update && sudo apt-get install -y apt-transport-https curlcurl -s https:// mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -编辑kubernetes.list文件,将源替换为国内的源。sudo cat <<EOF >/etc/apt/sources.list.d/kubernetes.listdeb http://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xenial mainEOFsudo apt-get update//一定要更新才会从源下载列表sudo apt-get install software-properties-common安装k8s三件套:kubelet、kubectl、kubeadm这里用的是1.18.0-00版本,按顺序执行apt-get install -y kubelet=1.18.0-00apt-get install -y kubectl=1.18.0-00apt-get install -y kubeadm=1.18.0-00sudo apt-mark hold kubelet kubeadm kubectlkubeadm version在master上运行sudo kubeadm init --kubernetes-version=v1.18.19 --service-cidr=10.96.0.0/12 --pod-network-cidr=10.96.0.0/16 --ignore-preflight-errors=Swap在node上,用复制的命令将节点加入到组中。
-
【功能模块】【操作步骤&问题现象】1、2、【截图信息】【日志信息】(可选,上传日志内容或者附件)
-
在对小熊派鸿蒙季板子,编译环境进行安装的时候,在进行第六步,在ubuntu获取源码时失败,总是显示 Could not resolve host :gitee.com 503418
-
【功能模块】 Atlas 200DK 开发者套件【操作步骤&问题现象】1、su root后,ifconfig无法检测到虚拟网卡2、按照https://support.huaweicloud.com/environment-deployment-Atlas200DK202/atlased_04_0037.html对应的说明安装网卡驱动,无“其他设备”【截图信息】已通过typeC-USB正确连接 Atlas 200DK 开发者套件【日志信息】(可选,上传日志内容或者附件)
-
ubuntu没安装到sda导致BIOS找不到启动项的解决方法1、环境服务器:Taishan 200 2280OS:ubuntu 18.04.1 2、问题一服务器上有4块硬盘,其中sda已经安装了centos,尝试将ubuntu安装到sdd上,使用自动分区。发现安装完ubuntu后,BIOS(boot options)中找不到ubuntu启动项,导致无法启动ubuntu。因为我喜欢一台机器装好几个系统,这个问题遇到好几次了,在此总结下。3、分析进入centos用lsblk看了下分区,可以看到ubuntu的分区其实已经分好了 一般来说,BIOS找不到启动项,应该是在硬盘分区里 找不到bootloader如使用efibootloader查看启动项信息,我这台机器中Centos的bootloader,就是在Centos安装硬盘/boot/efi分区下的EFI/centos/shimaa64.efi 那么这里是怀疑sdd中的bootloader丢失了。找了一台正常安装ubuntu的机器,看了下sda1分区内容 然后在看看当前的问题机,我们将sdd1挂载到/mnt上mount /dev/sdd1 /mnt挂载后,查看里面的内容,发现里面是空的 在安装过程中,还是比较顺利的,但是现在引导分区丢失了,这里怀疑是不是没有安装到sdd1,而是将ubuntu的启动分区安装到sda去了用tree看了下sda1(即/boot/efi)里面的内容,果然,ubuntu的引导分区安装到了sda1而不是sdd1 4、解决在sdd1上构建一样的目录结构然后将efi文件复制过来tree如下 然后重启,查看BIOS是否能识别到ubuntu,可以看到,原本没有ubuntu,现在已经有了 但是问题还没结束,虽然可以启动了,但是进系统后查看/boot/efi是挂载到sda1上的,而不是sdd1 查看/etc/fstab这个UUID应该是sda1的ls -l /dev/disk/by-uuid查看分区与uuid对应关系我们将fstab的UUID改成sdd1的然后重启服务器,进入ubuntu,分区正常。至此,问题解决。估计是自动分区搞的鬼,把引导分区装到sda盘上了,下次手动分了试试
-
0.引子 测试环境ubuntu18.4cuda10.2使用conda创建cudatoolkit=10.1测试代码:import numpy as npfrom mindspore import Tensorfrom mindspore.ops import functional as Fimport mindspore.context as context context.set_context(device_target="GPU")x = Tensor(np.ones([1,3,3,4]).astype(np.float32))y = Tensor(np.ones([1,3,3,4]).astype(np.float32))print(F.tensor_add(x, y)) 1.问题解决 1.1 ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory解决方法:1.首先通过:conda list 确认是否安装 cudatoolkit=10.1如果没有的话,执行: conda install cudatoolkit=10.1 cudnn=72.增加 LD_LIBRARY_PATH:先通过: which python 确定当前conda环境路径,笔者的输出:/root/miniconda3/envs/tf2c/bin/python在增加LD_LIBRARY_PATH:export LD_LIBRARY_PATH="/root/miniconda3/envs/tf2c/lib"此时第一个问题就解决了1.2 OSError: MindSpore version 1.0.0 and cuda version 10.2 does not match, reference to the match info on: https://www.mindspore.cn/install详细错误信息为:Traceback (most recent call last): File "test_img.py", line 5, in <module> from mindspore import Tensor File "/root/miniconda3/envs/tf2c/lib/python3.7/site-packages/mindspore/__init__.py", line 17, in <module> from ._version_check import check_version_and_env_config File "/root/miniconda3/envs/tf2c/lib/python3.7/site-packages/mindspore/_version_check.py", line 256, in <module> check_version_and_env_config() File "/root/miniconda3/envs/tf2c/lib/python3.7/site-packages/mindspore/_version_check.py", line 250, in check_version_and_env_config env_checker.check_version() File "/root/miniconda3/envs/tf2c/lib/python3.7/site-packages/mindspore/_version_check.py", line 95, in check_version raise EnvironmentError(f"MindSpore version {__version__} and cuda version {v_str} does not match, "OSError: MindSpore version 1.0.0 and cuda version 10.2 does not match, reference to the match info on: https://www.mindspore.cn/install解决方法:修改 /root/miniconda3/envs/tf2c/lib/python3.7/site-packages/mindspore/_version_check.py 文件注释一下几行: """ if v_str not in self.version: raise EnvironmentError(f"MindSpore version {__version__} and cuda version {v_str} does not match, " "reference to the match info on: https://www.mindspore.cn/install") """问题解决。执行代码,输出:[[[[2. 2. 2. 2.] [2. 2. 2. 2.] [2. 2. 2. 2.]] [[2. 2. 2. 2.] [2. 2. 2. 2.] [2. 2. 2. 2.]] [[2. 2. 2. 2.] ————————————————原文链接:https://blog.csdn.net/xiaosongshine/article/details/109250085
-
Ubuntu如何通过本地源安装GCC1、按需选择场景(1)挂载光驱方式(设备支持光驱或虚拟光驱)(2)ISO源文件方式(需要上传至Ubuntu系统任一目录)2、登录Ubuntu 16.04.4操作系统命令行3、将Ubuntu16.04.4安装源挂载至/media/cdrom,如无/media/cdrom则需要手动创建:(1)挂载光驱方式(设备支持光驱或虚拟光驱)sudo mount -o loop -t iso9660 /dev/cdrom /media/cdrom #/dev/cdrom为光驱设备或sudo mount /dev/cdrom /media/cdrom(2)ISO源文件方式(需要上传至Ubuntu系统任一目录)sudo mount -o loop -t iso9660 xxxxxxxx.iso /media/cdrom #xxxxxxxx.iso为安装源ISO文件绝对路径4、手动添加安装源光驱或ISO镜像至软件源列表sudo apt-cdrom -m -d=/media/cdrom add5、更新软件源:sudo apt-get update6、安装所需要的软件,如make、gcc等编译环境,可执行sudo apt-get install build-essential(安装单一软件时,将build-essential替换为对应软件名即可),遇到安装提示时输入y,然后回车,安装完成后执行gcc -v查看gcc版本信息。
-
apt-get updateapt-get install bind9之后可以设置/etc/bind/named.conf.local 本地网络域,这里不用略过;root@ecs-385f:~# vi /etc/bind/named.conf.options options { directory "/var/cache/bind"; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. forwarders { 8.8.8.8; }; //这里修改为8.8.8.8,开放dns转到外网 //======================================================================== // If BIND logs error messages about the root key being expired, // you will need to update your keys. See https://www.isc.org/bind-keys //======================================================================== dnssec-validation auto; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; };};重启进程,使配置生效。/etc/init.d/bind9 restart测试使用笔记本,设置dns为ECS的EIP,发现开始排障:在服务器上测试root@ecs-385f:/etc/bind# dig @127.0.0.1 www.sina.com; <<>> DiG 9.11.3-1ubuntu1.14-Ubuntu <<>> @127.0.0.1 www.sina.com; (1 server found);; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9334;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 13, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096; COOKIE: f43778f78a9331bb40b5f28960866d501ce9b34d41877cdc (good);; QUESTION SECTION:;www.sina.com. IN A;; ANSWER SECTION:www.sina.com. 2 IN CNAME spool.grid.sinaedge.com.spool.grid.sinaedge.com. 59 IN A 123.126.55.41spool.grid.sinaedge.com. 59 IN A 123.125.104.150;; AUTHORITY SECTION:. 85716 IN NS m.root-servers.net.. 85716 IN NS g.root-servers.net.. 85716 IN NS e.root-servers.net.. 85716 IN NS f.root-servers.net.. 85716 IN NS c.root-servers.net.. 85716 IN NS i.root-servers.net.. 85716 IN NS b.root-servers.net.. 85716 IN NS k.root-servers.net.. 85716 IN NS d.root-servers.net.. 85716 IN NS l.root-servers.net.. 85716 IN NS a.root-servers.net.. 85716 IN NS h.root-servers.net.. 85716 IN NS j.root-servers.net.;; Query time: 367 msec;; SERVER: 127.0.0.1#53(127.0.0.1);; WHEN: Mon Apr 26 15:35:44 CST 2021;; MSG SIZE rcvd: 346说明本地服务是可用的。接下来就是要在服务器上抓包,来分析dns的请求是否已经发送到了ecs上。抓包没有问题。/etc/bind/named.conf.options中尝试添加allow-query {0.0.0.0/0;}; 放通所有的请求源地址。再次测试,OK了。
-
【问题描述】Ubuntu配置apt在线源后执行apt update报Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate. Could not handshake: Error in the certificate verification. 错误,详细描述如下:Ign:1 https://repo.huaweicloud.com/ubuntu-ports bionic InReleaseIgn:2 https://repo.huaweicloud.com/ubuntu-ports bionic-security InReleaseIgn:3 https://repo.huaweicloud.com/ubuntu-ports bionic-updates InReleaseIgn:4 https://repo.huaweicloud.com/ubuntu-ports bionic-backports InReleaseErr:5 https://repo.huaweicloud.com/ubuntu-ports bionic Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate. Could not handshake: Error in the certificate verification. Err:6 https://repo.huaweicloud.com/ubuntu-ports bionic-security Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate. Could not handshake: Error in the certificate verification. Err:7 https://repo.huaweicloud.com/ubuntu-ports bionic-updates Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate. Could not handshake: Error in the certificate verification. Err:8 https://repo.huaweicloud.com/ubuntu-ports bionic-backports Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate. Could not handshake: Error in the certificate verification. 【解决方法】vim /etc/apt/sources.list增加[trusted=yes],如下所示deb [trusted=yes] https://repo.huaweicloud.com/ubuntu-ports/ bionic main restricted universe multiversedeb-src [trusted=yes] https://repo.huaweicloud.com/ubuntu-ports/ bionic main restricted universe multiversedeb [trusted=yes] https://repo.huaweicloud.com/ubuntu-ports/ bionic-security main restricted universe multiversedeb-src [trusted=yes] https://repo.huaweicloud.com/ubuntu-ports/ bionic-security main restricted universe multiversedeb [trusted=yes] https://repo.huaweicloud.com/ubuntu-ports/ bionic-updates main restricted universe multiversedeb-src [trusted=yes] https://repo.huaweicloud.com/ubuntu-ports/ bionic-updates main restricted universe multiversedeb [trusted=yes] https://repo.huaweicloud.com/ubuntu-ports/ bionic-backports main restricted universe multiversedeb-src [trusted=yes] https://repo.huaweicloud.com/ubuntu-ports/ bionic-backports main restricted universe multiverse## Not recommended# deb https://repo.huaweicloud.com/ubuntu-ports/ bionic-proposed main restricted universe multiverse# deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic-proposed main restricted universe multiverse
-
16.04下的开发环境是否能够使用pip安装其框架支持mindspore开发?如果不能的话 能否使用docker拉取相关镜像搭建开发环境?具体的拉取镜像命令是什么?是下面这个吗docker run -it --runtime=nvidia mindspore/mindspore-gpu:1.0.0 /bin/bash
-
摘要: 作为开发,nosql我们用的越来越多,代表性的是mongodb,速度快性能好,还能完美的创建二维索引.这里我们梳理一下ubuntu上安装mongodb创建账号和库及添加坐标索引一 安装 1.1 安装php-mongodbsudo apt-get install php-mongodb 1.2 安装mongodb-orgsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 如果是ubuntu16或者18则echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list接下来sudo apt-get update sudo apt-get install -y mongodb-org sudo service mongod start # 启动二 常见启动等命令sudo service mongod start # 启动 sudo service mongod stop # 关闭 ps aux | grep mongod # 查看进程三 创建表,角色与权限 3.1 管理员账号mongo --host 127.0.0.1 use admin db.createUser( ... { ... user: "test", ... pwd: "test@1111", ... roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ] ... } ... ) db.getUser('test') exit3.2 对象库管理员账号及权限mongo --host 127.0.0.1 -u 'test' --authenticationDatabase 'admin' -p 'test@1111' use admin db.auth('test','test@1111') use lbs db.createUser( ... { ... user: "testlbs", ... pwd: "testlbs1111", ... roles: [ { role: "readWrite", db: "lbs" }, ... { role: "read", db: "lbs" } ] ... } ... ) exit3.3 对象库索引mongo --host 127.0.0.1 -u 'testlbs' --authenticationDatabase 'lbs' -p 'testlbs1111' db use lbs db db.createCollection('lbs',{capped:false}) db.lbs.createIndex({'location':'2dsphere'}) db.lbs.createIndex({'uniqid':1},{unique:true})四 卸载 4.1 关闭守护进程mongodsudo service mongod stop4.2 卸载安装的软件包sudo apt-get purge mongodb-org* 4.3 移除数据库和日志文件(数据库和日志文件的路径取决于/etc/mongod.conf文件中的配置)sudo rm -r /var/log/mongodb sudo rm -r /var/lib/mongodb
-
scala 最新的版本2.13.5小提示:如果网络受限而不能下载,换个移动网络环境试试。官网地址:https://www.scala-lang.org/download/ubuntu版本下载链接:https://downloads.lightbend.com/scala/2.13.5/scala-2.13.5.tgz下载后解压缩:sudo tar -xzvf scala-2.13.5.tgz -C /usr/localsudo mv scala-2.13.5 scala 设置环境变量:vi /etc/profile在文件的末尾追加:export SCALA_HOME=/usr/local/scala export PATH=$SCALA_HOME/bin:$PATH:wqroot@ecs-385f:~# source /etc/profileroot@ecs-385f:~# scalaWelcome to Scala 2.13.5 (OpenJDK 64-Bit Server VM, Java 11.0.10).Type in expressions for evaluation. Or try :help.scala>
-
【功能模块】【操作步骤&问题现象】1、2、【截图信息】【日志信息】(可选,上传日志内容或者附件)
-
默认安装的ubuntu18.04中文显示一直是乱码,本来也没什么,就是代码注释看着不方便。今天动手改了一下:一、修改或者新建.inputrc 文件root@ecs-385f:~# vi ~/.inputrc set meta-flag onset convert-meta offset input-meta onset output-meta on二、加入环境变量vim ~/.bashrc文件尾部增加:export LANG=LANG="zh_CN.utf-8"export LANGUAGE="zh_CN:zh:en_US:en"export LC_ALL="zh_CN.utf-8"$ source ~/.bashrc三、修改secureCRT配置选项->会话选项这个字体真的挺难看的,但是试了下别的字体,显示不正常。先用着吧!
-
root@ubuntu:/opt/qemu-5.2.0# ./configure Using './build' as the directory for build outputcross containers noNOTE: guest cross-compilers enabled: cc ccThe Meson build systemVersion: 0.55.3Source dir: /opt/qemu-5.2.0Build dir: /opt/qemu-5.2.0/buildBuild type: native buildProject name: qemuProject version: 5.2.0C compiler for the host machine: cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")C linker for the host machine: cc ld.bfd 2.34Host machine cpu family: x86_64Host machine cpu: x86_64../meson.build:10: WARNING: Module unstable-keyval has no backwards or forwards compatibility and might not exist in future releases.Program sh found: YESProgram python3 found: YES (/usr/bin/python3)C++ compiler for the host machine: c++ (gcc 9.3.0 "c++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")C++ linker for the host machine: c++ ld.bfd 2.34Program cgcc found: NOLibrary m found: YESLibrary util found: YESRun-time dependency appleframeworks found: NO (tried framework)Found pkg-config: /usr/bin/pkg-config (0.29.1)Run-time dependency pixman-1 found: NO (tried pkgconfig)../meson.build:302:2: ERROR: Dependency "pixman-1" not found, tried pkgconfigA full log can be found at /opt/qemu-5.2.0/build/meson-logs/meson-log.txtERROR: meson setup failed请大佬帮忙分析啥问题???
上滑加载中
推荐直播
-
全面解析华为云EI-API服务:理论基础与实践应用指南
2024/11/29 周五 18:20-20:20
Alex 华为云学堂技术讲师
本期直播给大家带来的是理论与实践结合的华为云EI-API的服务介绍。从“主要功能,应用场景,实践案例,调用流程”四个维度来深入解析“语音交互API,文字识别API,自然语言处理API,图像识别API及图像搜索API”五大场景下API服务,同时结合实验,来加深开发者对API服务理解。
回顾中 -
企业员工、应届毕业生、在读研究生共探项目实践
2024/12/02 周一 19:00-21:00
姚圣伟 在职软件工程师 昇腾社区优秀开发者 华为云云享专家 HCDG天津地区发起人
大神带你一键了解和掌握LeakyReLU自定义算子在ONNX网络中应用和优化技巧,在线分享如何入门,以及在工作中如何结合实际项目进行学习
即将直播 -
昇腾云服务ModelArts深度解析:理论基础与实践应用指南
2024/12/03 周二 14:30-16:30
Alex 华为云学堂技术讲师
如何快速创建和部署模型,管理全周期AI工作流呢?本期直播聚焦华为昇腾云服务ModelArts一站式AI开发平台功能介绍,同时结合基于ModelArts 的实践性实验,帮助开发者从理论到实验更好地理解和使用ModelArts。
去报名
热门标签