Linux
大鹏的NLP博客
擅长自然语言处理,知识图谱,人工智能,大数据,K8S,软件工程等领域的技术及管理
展开
-
update-alternatives 下安装cudnn
dpkg -l查找,若要查找对应的package,可以加通配符,如查找包含fox的package。注意,卸载时候是package_file.deb对应的package name。这种方式不适合在“update-alternatives”下安装。但是这里对libcudnn8不合适,不知道为什么。“update-alternatives”下安装。如果没有驱动,那么就需要手动安装显卡驱动了。若不知道package name,可以通过。查看是否安装NVIDIA显卡。程序会被解包到var目录下。原创 2023-07-24 16:29:22 · 246 阅读 · 0 评论 -
ubuntu重启:A stop job is running for Advanced key-value store
这个按理说应该可以但是不行,最后让我把redis卸载了,才可以了。原创 2023-07-20 17:09:19 · 434 阅读 · 0 评论 -
Ubuntu中使用update-alternatives实现多版本CUDA切换,卸载cuda 、cudnn
Ubuntu中使用update-alternatives实现多版本CUDA切换原创 2023-07-20 16:37:56 · 623 阅读 · 0 评论 -
Linux 配置 history 命令显示操作时间、登录 IP、用户
在配置文件中(/etc/bashrc 或者 /etc/profile 或者~/.bash_profile 或者 ~/.bashrc)添加如下配置原创 2022-06-16 14:58:21 · 472 阅读 · 0 评论 -
打开端口ubuntu 20
sudo iptables -I INPUT -p tcp --dport 8485 -j ACCEPTsudo iptables-savesudo apt-get install iptables-persistent -ysudo netfilter-persistent savesudo netfilter-persistent reloadiptables -L 查看iptables策略:iptables-save > /etc/network/iptables.up.rules原创 2022-05-11 15:12:49 · 1020 阅读 · 0 评论 -
ubuntu 18 install gcc
lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 18.10Release: 18.10Codename: cosmic检索:ubuntu 18 install gcc “cosmic”sudo gedit /etc/apt/sources.list中科大源:https://mirrors.ustc.edu.cn/repogen/deb https://mirr原创 2021-08-18 17:31:52 · 168 阅读 · 0 评论 -
DOCKER镜像加速-设置国内源
文章目录源地址设置重新加载:重启Docker检查加速器是否生效国内加速地址有:排查看一下状态unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character '"' after object key:value pair安装OpenStack时候的出现一个错误:以下是解决办法。源地址设置在 /etc/docker/daemon.json 中写入如下内容(如果文件不存在请新建该文件)原创 2021-05-24 15:21:18 · 1923 阅读 · 1 评论 -
linux 挂载硬盘笔记
## /etc/fstab# Created by anaconda on Wed Aug 5 01:10:14 2015## Accessible filesystems, by reference, are maintained under '/dev/disk'# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8原创 2015-11-17 21:03:02 · 475 阅读 · 0 评论 -
ssh通过http代理访问服务器
centos 7,root userinstall:Get CorkscrewAdd ProxyCommand to your SSH config file:You may or may not have a configuration file for SSH already. It should be located in $HOME/.ssh/config and is a simple t原创 2016-08-01 17:22:17 · 6783 阅读 · 0 评论 -
linux 下显卡驱动安装笔记
输入:lspci |grep VGA显示:01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos XT [Radeon HD 7470/8470 / R5 235 OEM]下载: http://support.amd.com/zh-cn/download http://support.am原创 2015-10-28 12:37:46 · 5992 阅读 · 0 评论 -
Linux shell的标准输入、输出和错误
1.文件描述符在linux shell执行命令时,每个进程都和三个打开的文件相联系,并使用文件描述符来引用这些文件。由于文件描述符不容易记忆,shell同时也给出了相应的文件名:文件文件描述符输入文件—标准输入0(缺省是键盘,为0时是文件或者其他命令的输出)输出文件—标准输出1(缺省是屏幕,为1时是文件)错误输出文件—转载 2015-04-19 22:23:25 · 1594 阅读 · 0 评论 -
How To Remote Desktop from windows to Linux
在windows 10 连接 CentOS 7上成功stepHere in this guide we are going to install Linux Remote Desktop Client (XRDP) which is an open source remote desktop protocol.Linux remote desktop protocol XRDP allows yo转载 2017-01-25 08:30:27 · 3650 阅读 · 3 评论 -
find简单用法笔记
查找文件 find / -name “opengl” find / -name “opengl” -ls 根据文件的特征进行查询 find / -amin -n # 查找在系统中最后n分钟访问的文件 find / -atime -n # 查找系统中最后n*24小时访问的文件 find / -empty # 查找在系统中为空的文件或者文件夹 find / -group原创 2016-01-11 13:56:18 · 1024 阅读 · 0 评论 -
linux批量删除进程
kill -9 `ps -ef |grep xxx|awk '{print $2}' `原创 2017-01-22 09:44:16 · 973 阅读 · 0 评论 -
用 CentOS 7 打造工作环境笔记
安装过程选择安装过程中使用的语言,这里应 使用英语,不要使用汉语。若安装界面使用汉语,最终安装的系统中会出现两个比较麻烦的问题: 主目录下的系统文件夹如 Downloads、Desktop 等会以中文表示,这使得在命令行 cd 变得很麻烦;终端中某些字符用英文字体,某些字符用中文字体,效果非常差,需要自己修改终端字体方可;选择区域和城市:Asia 和 Shanghai键盘使用 Englis原创 2017-01-25 11:36:10 · 2645 阅读 · 0 评论 -
yum
CentOS7 更新 repo 源 镜像使用帮助cd /etc/yum.repos.d/ mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupwget http://mirrors.163.com/.help/CentOS7-Base-163.repoyum clean all yum原创 2017-02-24 14:55:57 · 301 阅读 · 0 评论 -
python3中pip3安装出错,找不到SSL
最近在Centos7上安装Python3.6.2之后,使用pip3命令出现了问题,提示说找不到ssl模块,出现错误如下:pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.查材料发现两个解决办法:第一种解决办法:添加./con...原创 2018-05-02 10:09:33 · 1906 阅读 · 0 评论 -
运行python脚本后台执行
方法一:脚本后加&加了&以后可以使脚本在后台运行,这样的话你就可以继续工作了。但是有一个问题就是你关闭终端连接后,脚本会停止运行;python3 run.py >/dev/null 2>&1 &方法二:使用nohup在后台执行命令nohup python3 run.py >/dev/null 2>&1 ...原创 2018-05-03 09:40:02 · 27971 阅读 · 0 评论 -
Linux下解决高并发socket最大连接数限制,tcp默认1024个连接
https://www.cnblogs.com/lemon-flm/p/7975812.html https://blog.csdn.net/zdwzzu2006/article/details/7713622原创 2018-05-07 14:37:29 · 5081 阅读 · 0 评论 -
Docker 使用若干问题笔记
docker build -t=”buffoon/gcc:v1” . //注意最后一个点号 -t指定仓库镜像标签,最后的点号是表明从当前路径中寻找Dockerfile文件。TLS handshake timeoutdocker build pull 时出现的问题,原因是连接超时。修改系统配置文件/etc/sysconfig/docker添加镜像仓库--regi...原创 2018-05-16 10:51:41 · 313 阅读 · 0 评论 -
Ubuntu 18下chkconfig报“chkconfig:未找到命令”
错误提示解决办法使用systemctl命令据说在CentOS7.0后,不再使用service,而是systemctl 。centos7.0是向下兼容的,也是可以用service据说许多linux的distributions都已经转投systemd了,而ubuntu自从15.04版本以后都使用了systemd.只介绍常见常用的命令:foobar表示伪变量。打开服务:sudo s...原创 2019-03-28 10:23:03 · 25726 阅读 · 1 评论 -
libopencv_shape.so.3.0: cannot open shared object file: No such file or directory 解决笔记
/etc/ld.so.conf.dopencv.conf/opt/opencv-3.0.0/build/lib原创 2015-08-08 11:00:39 · 10406 阅读 · 2 评论 -
VNC远程连接CentOS6.5桌面笔记
vncVNC(Virtual Network Computing,虚拟网络计算机)是一种可以对远程计算机进行远程控制的软件,支持linux远程桌面管理,也适合其它操作系统。而putty、SSH等只能进行命令模式的远程管理。首先需要检查一下服务器是否已经安装了VNC服务;rpm -qa | grep vnc tigervnc-server-1.1.0-18.el6.x86_64 tigerv原创 2016-06-01 10:27:48 · 2631 阅读 · 0 评论 -
循环粉碎文件:Use the find command to execute shred recursively
find -depth -type f -exec shred -v -n 1 -z -u {} \;原创 2016-04-21 17:34:47 · 638 阅读 · 0 评论 -
linux常用命令的英文单词缩写笔记
命令缩写:ls:list(列出目录内容)cd:Change Directory(改变目录)su:switch user 切换用户rpm:redhat package manager 红帽子打包管理器pwd:print work directory 打印当前目录 显示出当前工作目录的绝对路径ps: process status(进程状态,类似于windows的任务管理器) 常用参数:-a转载 2014-12-15 22:03:41 · 1821 阅读 · 0 评论 -
linux休眠、待机的区别及相关命令笔记
休眠挂起至硬盘,待机挂起至内存。pm(power-manager)立刻关机:sudo haltsudo init 0sudo shutdown -h nowsudo shutdown -h 0定时/延时关机:sudo shutdown -h 19:30sudo shutdown -h +30 ##单位为分钟重启:sudo reboot原创 2015-09-14 21:41:52 · 2382 阅读 · 0 评论 -
安装scipy时:“no lapack/blas resources found“解决笔记
centos6.6下yum install lapack lapack-devel blas blas-develsudo python setup.py install原创 2015-08-02 09:52:47 · 28377 阅读 · 0 评论 -
使用pip升级所有package笔记
以root权限运行该脚本:import pipfrom subprocess import callfor dist in pip.get_installed_distributions(): call("pip install --upgrade " + dist.project_name, shell=True)原创 2015-08-02 09:53:31 · 2787 阅读 · 0 评论 -
lsof(list open files)(未完)
lsof(list open files)是一个列出当前系统打开文件的工具。在linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件。原创 2014-06-13 16:59:47 · 715 阅读 · 0 评论 -
xargs笔记
简介之所以能用到这个命令,关键是由于很多命令不支持“|“管道来传递参数,xargs 可以读入 stdin 的资料,并且以空白字元或断行字元作为分辨,将 stdin 的资料分隔成为 arguments 。 因为是以空白字元作为分隔,所以,如果有一些档名或者是其他意义的名词内含有空白字元的时候, xargs 可能就会误判了. -0 当sdtin含有特殊字元时候,将其当成一般字符,想/’空格等参数-O 当原创 2015-10-23 13:02:44 · 422 阅读 · 0 评论 -
netcdf C centos7 yum安装笔记
sudo wget http://mirror.metrocast.net/fedora/epel/6/i386/epel-release-6-8.noarch.rpm sudo rpm -Uvh epel-release-6-8.noarch.rpm sudo yum –assumeyes install netcdf sudo yum –assumeyes install netcdf-d原创 2015-10-10 11:51:38 · 3625 阅读 · 0 评论 -
linux iconv字符编码批处理方式转换
查看编码:$ find ./ -type f -exec file -i {} \; > /tmp/a file命令查看文件编码 file -i filename查询是否存在已经是utf-8编码的文件:grep “charset=utf-8” /tmp/a递归转换(包括子文件夹) find default -type d -exec mkdir -p utf/{}原创 2016-04-12 15:15:33 · 1309 阅读 · 0 评论 -
How to Set JAVA_HOME / PATH variables Under Linux Bash Profile
Set JAVA_HOME / PATH for a single userLogin to your account and open .bash_profile file$ vi ~/.bash_profileSet JAVA_HOME as follows using syntax export JAVA_HOME=.set it as follows:export JAV原创 2016-03-16 17:47:22 · 1001 阅读 · 0 评论 -
rpm常用参数笔记
RPM是RedHat Package Manager(RedHat软件包管理工具)rpm 执行安装包二进制包(Binary)以及源代码包(Source)两种。二进制包可以直接安装在计算机中,而源代码包将会由RPM自动编译、安装。源代码包经常以src.rpm作为后缀名。RPM源代码包装安装 .src.rpm结尾的文件,这些文件是由软件的源代码包装而成的,用户要安装这类RPM软件包原创 2016-01-13 21:50:20 · 807 阅读 · 0 评论 -
pkg-config的用法笔记
.pc位置:/usr/lib/pkgconfig, /usr/lib64/pkgconfig/参数列表: –list 列出所有已安装的共享库 –cflags 列出指定共享库的预处理和编译flag。 –libs 列出指定共享库的链接flag。执行:pkg-config –libs –cflags opencv 显示: -I/opt/opencv-3.0.0/bu原创 2016-01-12 10:13:21 · 1214 阅读 · 0 评论 -
配置Oracle VM VirtualBox,实现内外网访问笔记,以进行spark、hadoop集群开发测试
许久不用,忘记,免得再忘,特记之。全局设置 主节点设置: 从节点设置:启动hadoop、spark:从节点1启动情况:从节点2启动情况:原创 2016-01-20 12:33:47 · 1639 阅读 · 0 评论 -
linux下shell脚本移动、复制文件笔记
#!/bin/bashfunction jarmv(){ for file in ` ls $1` do if [ -d $1"/"$file ] #如果 file存在且是一个目录则为真 then jarmv $1"/"$file else jarpath=$1"/"$file原创 2015-10-23 13:09:39 · 6771 阅读 · 0 评论 -
centos7网络连接调试常用命令笔记
网络配置文件目录:/etc/sysconfig/network-scripts systemctl status network 网络状态 systemctl restart network 网络重启 ifconfig -a原创 2015-11-17 20:57:07 · 2780 阅读 · 0 评论 -
linux下c++读文件夹下的文件及文件夹笔记
#include #include #include #include #includeusing namespace std;#define MAX_LEN 65535void test_list_files(){ DIR *dir; struct dirent *ptr; char *flow[MAX_LEN]; int num = 0, i原创 2015-11-17 20:59:52 · 1353 阅读 · 0 评论 -
linux之cp/scp命令笔记
cpscp从本地复制到远程从远程复制到本地注意两点cp名称:cp 使用权限:所有使用者 使用方式: cp [options] source dest cp [options] source… directory说明:将一个档案拷贝至另一档案,或将数个档案拷贝至另一目录。 参数: -a 尽可能将档案状态、权限等资料都照原状予以复制原创 2015-10-12 12:28:49 · 584 阅读 · 0 评论