随笔分类 - Linux
摘要:mv /etc/apt/sources.list /etc/apt/sources.list.bakecho "deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free" >> /etc/apt/sources.listec
阅读全文
摘要:报错:UnicodeEncodeError: ‘ascii' codec can't encode characters in position 24-25: ordinal not in range(128) 1、使用locale查看服务器的编码 LANG=LANGUAGE=LC_CTYPE="P
阅读全文
摘要:1、下载 Anaconda 进入 Ubuntu,自己新建下载路径,输入以下命令开始下载 wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2021.11-Linux-x86_64.sh 2、安装 Anaconda
阅读全文
摘要:1、linux里查看gpu的显卡使用状态 nvidia-smi 2、使用指定的gpu运行 linux指令:CUDA_VISIBLE_DEVICES=7 xxx python文件:os.environ["CUDA_VISIBLE_DEVICES"] = "7"
阅读全文
摘要:设置开机自启: rc-local.server [Unit] Description=/etc/rc.local Compatibility ConditionPathExists=/etc/rc.local After=network.target After=postgresql.service
阅读全文
摘要:系统:ubuntu18.04 / Centos 7自带Python3.61、安装pip3 apt-get install -y python3-pip pip3 install --upgrade pip 安装psycopg2报错 解决:sudo apt-get install libpq-dev
阅读全文
摘要:1、准备ubuntu16镜像2、安装:https://zhuanlan.zhihu.com/p/1447048653、安装ubuntu后,sudo passwd root这个命令建立root用户的密码4、更新apt-get:apt-get -y update5、设置静态ip: 5.1、ifconfi
阅读全文
摘要:以centos6为例 克隆结束后的配置: 1、修改主机名 vim /etc/sysconfig/network 修改HOSTNAME 2、修改网卡 vim /etc/udev/rules.d/70-persistent-net.rules 删除第一个SUBSYSTEM,修改NAME="eth0",复
阅读全文
摘要:一、emqx开机自启 a.首先在执行如下命令 vi /lib/systemd/system/emqx.service 创建了emqx.service文件然后在文件中写入如下内容 [Unit] Description=emqxautostart After=network.target [Servic
阅读全文
摘要:1.安装jdk Linux下安装jdk-7u67-linux-x64.rpm 2.免密登录 ssl免密登录(centos6) 3.安装Hadoop tar zxvf hadoop-2.6.5.tar.gz - C /opt/sxt 4.修改Hadoop配置 4.1.配置环境变量 执行vi + /et
阅读全文
摘要:1.首先执行ll -a查看是否有隐藏文件.ssh,如果没有,需要执行ssh localhost登录以下即可 cd ~/.ssh 2.生成秘钥: 可查看https://hadoop.apache.org/docs/r2.6.5/hadoop-project-dist/hadoop-common/Sin
阅读全文
摘要:1、新建一个jdk的安装目录,我这里是在/usr/下新建了java目录,我是使用WinSCP创建的文件夹,把 jdk-7u80-linux-x64.tar.gz压缩包从本地Windows系统中拖到Linux的/usr/local/java目录下,然后进行解压,命令如下:tar xvf jdk-7u8
阅读全文
摘要:centos7: 163yum源: 1)备份当前yum源防止出现意外还可以还原回来cd /etc/yum.repos.d/cp /CentOS-Base.repo /CentOS-Base-repo.bak2)使用wget下载163yum源repo文件wget http://mirrors.163.
阅读全文
摘要:tar 解包:tar zxvf filename.tar 打包:tar czvf filename.tar dirnamegz命令 解压1:gunzip filename.gz 解压2:gzip -d filename.gz 压缩:gzip filename .tar.gz 和 .tgz 解压:ta
阅读全文
摘要:(1)centos上下载docker + docker-compose (2)基础目录 (3)首先创建一个纯净的python+django+uwsgi的镜像,便于后期使用(也可不用创建,后期docker-compose的时候再创建python镜像,这里我们先创建,后期直接把项目放进去,不用每次都下载
阅读全文
摘要:参考:CentOS7下部署Django项目详细操作步骤 注意事项: 在虚拟环境中操作,虚拟环境中安装nginx、uwsgi,虚拟环境外需安装uwsgi -- 临时关闭防火墙:systemctl stop firewalld.service-- 永久关闭防火墙:systemctl disable fi
阅读全文
摘要:一、创建 ln -s 源文件 目标文件 当我们需要在不同的目录,用到相同的文件时,我们不需要在每一个需要的目录下都放一个必须相同的文件,我们只要在某个固定的目录,放上该文件,然后在其它的目录下用ln命令链接(link)它就可以,不必重复的占用磁盘空间,只生成目标文件的一个镜像。 例如:ln -s /
阅读全文
摘要:1.修改指令头颜色及格式: 临时修改:PS1="\[\e[1;33m\][\u@\h \w]\\$\[\e[0m\]" 永久修改:1.新建启动文件:vim /etc/profile.d/env.sh 2.写入:PS1="\[\e[1;33m\][\u@\h \w]\\$\[\e[0m\]" 2.开机
阅读全文
摘要:方法一:1、进入项目目录下,运行下面程序:nohup python manage.py runserver 0.0.0.0:5008 &nohup(no hang up)用途:不挂断的运行命令&用途:在后台运行nohup /root/start.sh &在shell中回车后提示:[~]$ appen
阅读全文
摘要:在“运行”中输入cmd,打开控制台,切换到刚才Putty的安装目录下,我的是E:\Putty,然后输入pscp命令,我们需要这个命令来实现文件的上传。如下命令格式: F:\PuTTY>pscp C:\Users\hello\Desktop\Hello_World.rar root@x.x.x.x:/
阅读全文

浙公网安备 33010602011771号