分类 linux articles

Linux 命令行下下载 Google Drive/Docs

转载自 https://onebox.site/archives/250.html 说到如何在Linux命令行下下载Google网盘(云端硬盘)的文件,第一个想到的应该是gdrive(prasmussen/gdrive),这个脚本可以下载、上传、同步等功能,当然需要事先命令gdrive about关联网盘,显然适合自己使用。 如果说要下载别人分享的文件呢?直……

Continue reading

ubuntu 搭建S3服务 mino单机和集群集群

搭建mino 集群 单机版 # 新建用户 sudo useradd -r minio-user -s /sbin/nologin sudo chown -R minio-user:minio-user /usr/local/bin/minio sudo mkdir /usr/local/share/minio sudo chown -R minio-user:minio-user /usr/local/share/minio sudo mkdir /etc/minio sudo chown -R minio-user:minio-user /etc/minio # 记得替换 MINIO_VOLUMES cat /etc/default/minio # Local export path. MINIO_VOLUMES="/tmp/minio/" # Use if you want to run Minio on a custom port. MINIO_OPTS="--address :443" EOT # 替换key cat /etc/default/minio # Access Key of the server. MINIO_ACCESS_KEY=Server-Access-Key # Secret key of the server. MINIO_SECRET_KEY=Server-Secret-Key EOT # 下载安装service文件 ( cd /etc/systemd/system/; curl -O https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/minio.service ) # 记得替换 /etc/systemd/system/minio.service # 中user和group # 重载配置 systemctl daemon-reload……

Continue reading

kali rolling 国内源

#阿里云kali源 deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-free deb-src http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-free #中科大kali源 deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free deb-src http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free……

Continue reading

Online.net 的ubuntu增加ipv6地址

官方教程有问题 这里总结下,省的下次又不会配了 配置 ipv6 block 打开 https://console.online.net/en/network/ 创建子网 配置 仓储地址 编辑 sources.list sudo vim /etc/apt/sources.list 在末尾增加dhcp6的源地址 #DHCP6 Client deb http://httpredir.debian.org/debian experimental main 然后创建 apt 偏好文件 sudo vim /etc/apt/apt.conf.d/99defaultrelease 这里 14.04填写 APT::Default-Release "jessie"; 16.04填写 APT::Default-Release "xenial"; 更新apt源 sudo apt update sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010 安装设置DHCP6 客户端 sudo apt-get install odhcp6c 然后测试……

Continue reading

Ubuntu安装最新版nginx

众所周知,Ubuntu 上官方源的更新速度一直是慢得令人发指的,很多人不得不自己编译 nginx,非常麻烦。 所以。我们直接用nginx官方源来安装。 增加源地址: sudo vim /etc/apt/sources.list 增加nginx官方源地址: deb http://nginx.org/packages/mainline/ubuntu/ xenial nginx deb-src http://nginx.org/packages/mainline/ubuntu/ xenial nginx 导入key cd wget http://nginx.org/keys/nginx_signing.key sudo apt-key add nginx_signing.key 卸载旧版本 sudo apt remove nginx nginx-common nginx-full nginx-core 安装官方最新版 sudo apt update sudo apt install nginx……

Continue reading

Ubuntu下安装Transmission 挂PT 并配置域名访问

安装 Transmission sudo apt-get install transmission-daemon 修改配置文件 先停止transmission sudo service transmission-daemon stop 编辑 sudo vim /etc/transmission-daemon/settings.json 第14行修改为“dht-enabled”: false, 第15行是下载目录修改成你自己的“download-dir”: “/home/transmission/downloads”, 第20行修改为“encryption”……

Continue reading

Nginx 反向代理nuget配置文件

2 前提条件 域名要解析到服务器ip上去 ubuntu16.04 安装Nginx 非常简单,因为需要喜欢内容所以装的是full版本 sudo apt update -y sudo apt install nginx-full -y 安装好之后配置好反向代理 ssl证书 我使用的是 certbot 自动获取的 Let’s Encrypt 证书 安装 certbot sudo apt-get update -y sudo apt-get install software-properties-common sudo add-apt-repository ppa:certbot/certbot sudo apt-get update -y sudo apt-get install python-certbot-nginx -y 使用 sudo certbot --nginx Let’s Encrypt 证书 有效期很短 但是certbot可以一……

Continue reading

Markdown 语法高亮的常用语言关键字

markdown 语言 关键字 Bash bash CoffeeScript coffeescript C++ cpp C# cs CSS css Diff diff HTTP http lni lni java java JavaScript javascript JSON json Markfile markfile MarkDown markdown Objective-C objectivec Perl perl Python python ruby ruby SQL sql XML xml ARM汇编 armasm AVR汇编 avrasm MIPS汇编 mipsasm X86汇编 x86asm Erlang erlang F# fsharp Haskell haskell GLSL glsl Lisp lisp……

Continue reading

Fork别人的代码 原作者更新后如何同步

我的博客主题是直接fork原作者的,所以当原作者更新之后,我要合并冲突,跟随更新 下面说一下简单的方法,算是自己做个笔记 给主题的fork加一个remote 给 fork 配置一个 remote 使用 git remote -v 查看远程状态 ➜ next git:(master) git remote -v origin [email protected]:luodaoyi/hexo-theme-next.git (fetch) origin [email protected]:luodaoyi/hexo-theme-next.git (push) 把原作者的远程仓库添加到remote git remote add upstream https://github.com/iissnan/hexo-theme-next.git 再次查看是否添加成功 ➜……

Continue reading