
Linux
文章平均质量分 57
Lion King
惟草木之零落兮,恐美人之迟暮。
长太息以掩涕兮,哀民生之多艰。
亦余心之所善兮,虽九死其犹未悔。
路漫漫其修远兮,吾将上下而求索。
民生各有所乐兮,余独好修以为常。
虽体解吾犹未变兮,岂余心之可惩。
展开
-
Ubuntu:算法自动化测试平台搭建
算法测试平台是专为验证、评估和优化算法设计的综合性工具或系统,广泛应用于机器学习、数据分析、人工智能等领域。其核心目标在于提升算法开发效率、确保结果可靠性,并支持团队协作,本文将搭建简易的算法平台,提供简单的实现方式(与实际项目有很大的不同),但实现思路是清晰的。原创 2025-03-05 15:29:45 · 684 阅读 · 0 评论 -
Win10子系统Ubuntu实战(一)
在 Windows 10 中安装 Ubuntu 子系统(Windows Subsystem for Linux,简称 WSL)有几个主要的用途和好处:Linux 环境的支持、跨平台开发、命令行工具、测试和验证、教育用途。总体而言,WSL 提供了一种将 Windows 和 Linux 生态系统融合在一起的方式,为用户提供更灵活和多样化的开发和使用体验。本文将是系列文章的第一篇。原创 2024-01-09 17:11:11 · 4414 阅读 · 0 评论 -
Linux脚本:Bash脚本看这一篇就够了
Linux脚本有很多解析器(Shell),不同解析器要求的脚本语法是不一样的。系统在解析脚本时,如果没有在脚本声明指定解析器,则会采用系统默认解析器来对脚本进行解析。sh是非常重要解析器,历史很悠久,地位很牢固。特别地,Bash是用途最广的Shell,而且是兼容sh的解析器,因此本文着重Bash Shell的研究。原创 2022-10-27 13:57:08 · 28279 阅读 · 2 评论 -
Linux判断同网段的方法
一、理论基础要想判断两个不同的IP是否属于同网段,可以通过判断IP的网络标识是否一致来直接判断。网络标识一致,则处于同网段;反之,不是同网段。运算方式可以通过IP地址、子网掩码和默认网关运算二、实践是检验真理的唯一标准1、Linux运算信息获取ifconfigip route show(1)linux设备1IP地址:10.80.20.237子网掩码:255.255.254.0默认网关:10.80.21.2542、windows运算信息获取ipconfig原创 2021-11-03 10:52:09 · 13498 阅读 · 1 评论 -
Ubuntu搭建nfs网络文件系统
1、安装nfs创建共享文件夹,赋予最高权限,并关闭防火墙: sudo apt-get update sudo apt install nfs-kernel-server sudo mkdir -p /mnt/justdoit sudo chown nobody:nogroup /mnt/justdoit sudo chmod 777 /mnt/justdoit sudo nano /etc/exports # 最后一行写入以下配置 ..原创 2021-09-10 11:49:18 · 11161 阅读 · 0 评论 -
Ubuntu安装Jenkins
环境搭建1、java环境搭建ubuntu 18.04默认不安装java环境,而jenkins依赖java环境。(1)安装步骤sudo apt-get install openjdk-8-jdkjava -version如图,安装成功。2、Jenkins部署sudo apt-get install jenkins如图提示,Package ‘jenkins’ has no installation candidate,意思是没有包可以安装更新安装包在进行安装wget -q -O原创 2021-07-11 13:43:39 · 16839 阅读 · 0 评论 -
Ubuntu上运行selenium的pytest脚本
环境部署1、查看python版本# 一般情况下,ubuntu 18.04 默认安装了python3python32、安装pip3# 一般情况下,默认没有pip3,因此需要安装sudo apt-get install python3-pip3、安裝pytest、selenium等(1)脚本依赖库pip3 install pytestpip3 install selenium(2)最新版本google浏览器安装https://dl.google.com/linux/direct原创 2021-07-10 19:46:35 · 11726 阅读 · 2 评论 -
Ubuntu文件共享Samba服务器的搭建与使用
一、安装Samba1、安装apt-get install samba samba-common2、配置(1)创建分享文件夹并赋予最高权限sudo mkdir /media/openailab/8df43ce0-9208-4234-8529-32e54196787d/syncthing/sharesudo chmod 777 /media/openailab/8df43ce0-9208-4234-8529-32e54196787d/syncthing/share -R(2)修改配置文件vi原创 2021-05-13 16:38:20 · 175 阅读 · 0 评论 -
Linux的scp命令
简介scp命令用于 Linux 之间复制文件和目录,是基于 ssh 登陆进行安全的远程文件拷贝命令。帮助文档openailab@tengine3:~$ scpusage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[use原创 2021-04-15 11:29:20 · 313 阅读 · 0 评论 -
Linux查看服务器运行时间
帮助文档root@econe-desktop:~/solution/models# uptime --helpUsage: uptime [options]Options: -p, --pretty show uptime in pretty format -h, --help display this help and exit -s, --since system up since -V, --version output version information原创 2021-03-12 16:30:26 · 1199 阅读 · 0 评论 -
centos的lsb_release命令
帮助文档[root@omnimastertest download]# lsb_release --helpFSG lsb_release v2.0 prints certain LSB (Linux Standard Base) andDistribution information.Usage: lsb_release [OPTION]...With no OPTION specified defaults to -v.Options: -v, --version Displ原创 2020-09-11 23:21:55 · 3215 阅读 · 0 评论 -
Linux的du命令
帮助文档openailab@openailab-System-Product-Name:~/deploy$ du --helpUsage: du [OPTION]... [FILE]... or: du [OPTION]... --files0-from=FSummarize disk usage of the set of FILEs, recursively for directories.Mandatory arguments to long options are mandatory原创 2020-09-10 11:03:40 · 198 阅读 · 0 评论 -
Linux的mount命令
帮助文档openailab@openailab-System-Product-Name:~/oaldata$ mount --helpUsage: mount [-lhV] mount -a [options] mount [options] [--source] <source> | [--target] <directory> mount [options] <source> <directory> mount <operation&原创 2020-09-09 22:07:32 · 465 阅读 · 0 评论 -
Linux的find命令
帮助文档openailab@openailab-System-Product-Name:~/oaldata/datasets/yeqinfang$ find --helpUsage: find [-H] [-L] [-P] [-Olevel] [-D debugopts] [path...] [expression]default path is the current directory; default expression is -printexpression may consist of原创 2020-09-09 11:51:17 · 222 阅读 · 0 评论 -
Linux的df命令
有个疑惑如图,我的Linux系统,有1T固态硬盘和3.6T机械硬盘,我想知道“/home/openailab/oaldata/datasets”路径使用哪个磁盘进行存储。我该怎么做?一个想法从挂载情况来看,根目录挂载在固态硬盘上,也就是所有路径的起点 “/”。如果这样的话,目测路径“/home/openailab/oaldata/datasets”的存储,使用的就是固态硬盘。一个实践为了验证这个想法,我们往这个路径下存东西,先存他一个T。结果没到1个T,固态硬盘就满了。这也就验证了我的想法,原创 2020-09-09 10:21:38 · 564 阅读 · 0 评论 -
Linux的watch指令
帮助文档[root@omnimastertest ~]# watch --helpUsage: watch [options] commandOptions: -b, --beep beep if command has a non-zero exit -c, --color interpret ANSI color and style sequences -d, --differences[=<permanent>]原创 2020-09-04 15:16:48 · 408 阅读 · 0 评论 -
Linux拉取资源缓慢的问题
1、pip安装缓慢pip是python的安装指令,有时候因为镜像源的问题,而导致安装缓慢,可临时更改镜像源:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn module_name2、curl拉取缓慢sudo curl -L https://github.com/docker/compose/releases /download/1.25.4/docke原创 2020-08-28 17:01:26 · 499 阅读 · 0 评论 -
Linux查看端口进程lsof
lsof$ lsof -hlsof 4.89 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhKlnNoOPRtUvV原创 2020-08-25 10:28:01 · 517 阅读 · 0 评论 -
Ubuntu自动更新,导致虚拟机报错
问题描述我的Ubuntu服务器自动更新了,发现VM无法使用,报错如下:Before you can run VMware, several modules must be complied and loaded into the running kernel.点击安装,报如下错误:Unable to install all modules. See log /tmp/vmware-haypin/vmware…根据提示去查看日志,发现某些文件,编译出现问题了。解决办法1、安装vmware-hos原创 2020-07-30 16:34:36 · 2648 阅读 · 11 评论 -
Ubuntu图形界面奔溃,但能远程连接
问题描述我的Ubuntu奔溃了!!!好开心,又可以写博客了!!!是这样的,在一个天气晴朗的早晨,我到公司后,准备维护我的服务器。在操作界面的时候,发现界面不能用(Ubuntu界面卡死了)。命令行倒是能用,于是,我通过指令把虚拟机都关掉了(服务器装在虚拟机上)。接着,重启一下电脑,发现进不了图形界面了!想办法进入急救模式,发现进不了。好在远程服务器主机,还是可以的。问题思考通过问题描述,我们知道以下信息:1、Ubuntu图形界面卡死,说明图形界面出问题了2、重启之后,进入不了图形界面,原创 2020-07-30 16:06:09 · 2980 阅读 · 4 评论 -
Ubuntu人工智能训练环境搭建
Ubuntu版本信息:cat /etc/lsb-release创建部署用户创建一个用户,非root用户即可,创建用户示例:# 创建用户sudo useradd -d /home/yeqinfang -m yeqinfangsudo passwd yeqinfang# 赋予免密sudo权限,可以不执⾏echo "yeqinfang ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/yeqinfang sudo chmod 04原创 2020-06-30 18:09:02 · 13321 阅读 · 0 评论 -
Ubuntu登录ftp,并下载文件
安装sudo apt install lftpsudo apt install screen下载文件(1) 连接格式:lftp account@ip(2)查看ftp服务器的文件(3)查看本地目录(下载到我本地的目录)(4)进入ftp文件的目录,查看被下载的文件(5)下载文件cudnn…mirror cudnn-10.1-linux-x64-v7.6.5.32.tgz报错:解决办法:先退出lftpexit本地安装指令 setseboolsudo apt instal原创 2020-06-30 17:53:48 · 18307 阅读 · 0 评论 -
centos7重启网卡报错
问题描述CentOs7重启网卡报错:service network restart根据提示操作:systemctl status network.service报错信息如下:Fail to start LSB:Bring up/down networking解决办法systemctl stop NetworkManagersystemctl disable NetworkManagerservice network restart...原创 2020-06-24 11:47:28 · 11677 阅读 · 2 评论 -
Ubuntu设置中文输入法
操作步骤1、找到设置,并点开2、点开后,进行设置3、选择中文输入法4、选中之后关闭,并将添加的语言(最后尾),拖动到第一位5、关闭之后添加输入源6、移动到第一项7、选择输入法...原创 2020-05-30 18:16:03 · 50124 阅读 · 14 评论 -
centos的k8s:kubectl指令的使用
查看pod资源kubectl get podskubectl get all删除容器和服务注意:执行删除操作前,需要确认环境是否有集群,集群里是否有同名服务,如果有的话没需要在前面加上集群名称kubectl delete replicaset.apps/openailab-things-access-service-5f7ff9f9bb拉起服务注意:k8s会自动拉起,那么服务会自动启动,无需再进行如下操作cd /usr/local/deploy/openailab-k8s-yam原创 2020-05-25 11:23:29 · 10988 阅读 · 0 评论 -
Linux的docker容器自启动
docker设置容器自启动docker container update --restart=always 容器ID例子:原创 2020-05-22 19:50:25 · 10851 阅读 · 0 评论 -
Centos8软件部署
登录私有镜像如下的账号、ip、端口需要替换(要与k8s镜像仓库一致)docker login --username=账号 ip:端口服务编排清单一些服务名称,如:apollocas-server…编排文件上传编排文件,并解压到指定目录mkdir -p /home/tengine2cd /home/tengine2unzip -d /usr/local/deploy openailab-k8s-yaml.zip创建命名空间命名空间在上面的解压包里/usr/local/dep原创 2020-05-22 15:17:37 · 11128 阅读 · 0 评论 -
Centos8安装nginx
安装cd /usr/local/mkdir nginxcd nginxmkdir logs conf conf.d htmlvim conf/nginx.conf根据需要自定义配置文件。执行docker命令安装nginxdocker run --name nginx --restart=always -d -p 80:80 -p 9000:9000 \-v /usr/local/nginx/logs:/var/log/nginx \-v /usr/local/nginx/conf.d:原创 2020-05-22 10:50:57 · 10829 阅读 · 0 评论 -
Centos8安装vsftpd
安装yum -y install vsftpd配置vsftpd.confvim /etc/vsftpd/vsftpd.conf添加:pasv_enable=YESpasv_min_port=22222pasv_max_port=22232allow_writeable_chroot=YESlisten_port=21tcp_wrappers=YES#系统用户登录后的根目录-根据实际情况修改local_root=/home/oas/file/download#匿名用户登录后的根目原创 2020-05-22 10:46:04 · 12635 阅读 · 0 评论 -
Centos8安装Mosquitto
master安装创建目录:mkdir -p /usr/local/mosquitto/master/cd /usr/local/mosquitto/master/mkdir configmkdir datachmod 777 datamkdir logchmod 777 log创建Topic配置文件:cd configvim aclfile.example输入内容:user tengine2topic write /tengine2/#user tengine2topic原创 2020-05-21 21:13:44 · 11942 阅读 · 0 评论 -
Centos8安装软加密狗
安装工具包rpm -ivh senseshield-2.3.0.45988.x86_64.rpm生成c2d文件ssclt --offline_bind_c2d --c2d ./将生成的c2d文件拿去加密https://developer.lm.virbox.com/将加密的d2c文件拿来使用ssclt --update_d2c --d2c sense_offline_bind_20200521201808.D2C查看结果ssclt --slock...原创 2020-05-21 20:54:09 · 11361 阅读 · 0 评论 -
Centos8安装ElasticSearch
安装JDK1.8官网下载jdk1.8,接着上传JDK后进行安装:rpm -ivh jdk-8u211-linux-x64.rpm下载ElasticSearch6.7.2并解压cd /usr/localwget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.2.tar.gztar -zxvf elasticsearch-6.7.2.tar.gzmv ./elasticsearch-6.7.2 ./e原创 2020-05-21 20:13:20 · 12283 阅读 · 0 评论 -
Centos8安装Redis
标题cd /usr/localwget http://download.redis.io/releases/redis-5.0.5.tar.gztar -zxvf redis-5.0.5.tar.gzmv ./redis-5.0.5 ./rediscd redismakecd src && make install在执行make的时候出现如下错误:解决办法:yum install gcc gcc-c++再次执行报如下错误:解决办法:make MALLOC=lib原创 2020-05-21 16:54:57 · 11438 阅读 · 0 评论 -
Centos8安装PostgreSQL
安装PostgreSQLyum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpmyum install postgresql11yum install postgresql11-server通过上面步骤,若无法安装成功,尝试以下安装:sudo dnf -y install https://download.postgresql.原创 2020-05-21 14:59:18 · 15458 阅读 · 0 评论 -
Centos8安装Kubernetes
安装前准备1、关于防火墙的原因(nftables后端兼容性问题,产生重复的防火墙规则),因此要关闭防火墙,我这里喜欢一次到位,永久关闭。(1)临时关闭:systemctl status firewalldsystemctl stop firewalld(2)永久关闭:systemctl disable firewalld2、关于selinux的原因(关闭selinux以允许容器访问宿主机的文件系统),因此要关闭selinux(1)临时关闭:getenforcesetenforce 0原创 2020-05-21 11:00:58 · 11873 阅读 · 0 评论 -
Centos8上安装Docker
需求驱动为什么已经写过docker安装了,还要再写一遍?这个嘛。。。因为上次是centos7搭建服务,这次是centos8,开发组要求centos8上面验证。这次,就是踩坑的过程,值得你拥有。Docker版本要求1、要求 CentOs 系统的内核版本高于 3.10,可通过如下指令查看版本uname -r卸载docker,并更新yumsudo yum remove docker docker-common container-selinux docker-selinux docker-engin原创 2020-05-20 18:37:57 · 12133 阅读 · 0 评论 -
Ubuntu桌面远程方式
准备工作工具:xshell操作步骤1、安装xrdpapt-get install xrdp2、安装vnc4serverapt-get install vnc4server3、安装xfce4apt-get install xubuntu-desktopLightDM,即:Light Display Manager,是一个全新的、轻量的Linux桌面的桌面显示管理器,而传统的U...原创 2020-05-01 11:26:24 · 11253 阅读 · 0 评论 -
Ubuntu修改镜像源为国内镜像
问题描述国外镜像比较慢,我是很有耐心等待,听听歌什么的,直到有一天,我真正需要速度的时候,我便开始了开挂之旅。操作步骤1、安全起见,先备份:sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak2、替换为国内镜像源sudo vim /etc/apt/sources.list替换为:deb http://mirrors.us...原创 2020-05-01 10:48:23 · 12165 阅读 · 0 评论 -
Ubuntu能够ping通,但不能ssh登录
问题描述使用xshell登录不上Ubuntu,原因是Ubuntu的ssh服务没有安装。解决办法apt-get updateapt-get upgradeapt-get install openssh-server原创 2020-05-01 10:11:37 · 12090 阅读 · 0 评论 -
Linux查看系统信息
1、查看cpu型号cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c2、查看cpu情况lscpu3、查看内存cat /proc/meminfo或free4、查看内存条数和大小sudo dmidecode -t memory5、主板型号sudo dmidecode |grep -A16 "System Infor...原创 2020-04-23 18:25:53 · 11083 阅读 · 0 评论