云溪的 blog
  • Archive
  • Media
  • Search
  • Tags
  • About

使用 let's encrypt 为网站开启 https

启用可用通道 $ yum -y install yum-utils $ yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional 安装 Certbot $ sudo yum install certbot python2-certbot-nginx 获取 nginx 服务器证书 $ sudo certbot certonly --nginx 遇到问题 certbot 未找到 nginx 二进制文件 The nginx plugin is not working; there may be problems with your existing configuration. The error was: NoInstallationError(“Could not find a usable ’nginx’ binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.”,) 由于我机器之前机器上已经安装 nginx 安装目录为 /usr/local/nginx/sbin/nginx 而 certbot 默认会到 /usr/bin/nginx 目录下找,因此需要建立一个软连接...

July 30, 2019 · 1 min · 云溪

windows 命令行设置环境变量

powershell #Powershell设置环境变量 #查看所有环境变量 ls env: #搜索环境变量 ls env:NODE* #查看单个环境变量 $env:NODE_ENV #添加/更新环境变量 $env:NODE_ENV=development #删除环境变量 del evn:NODE_ENV cmd #cmd设置环境变量 #查看所有环境变量 set #查看单个环境变量 set NODE_ENV #添加/更新环境变量 set NODE_ENV=development #删除环境变量 set NODE_ENV=

July 24, 2019 · 1 min · 云溪

Uninx 网络编程环境搭建

1,安装编译器,为了齐全还是安装一下build-essential sudo apt-get install build-essential 2,下载书中的头文件及示例源码 Source Code 3,解压unpv13e.tar.gz后进入目录查看README,然后可以按照里面提示操作,不过会遇到问题 第一步:在终端中进入upnv13e目录,然后执行代码: 1. chmod u+x configure 2. ./configure 第二步:进入lib目录下执行make: 1. cd lib 2. make 第三步:建立基础类库: 1. cd ../libfree # continue building the basic library 2. make 第四步:编译函数库: 1. cd ../libgai # the getaddrinfo() and getnameinfo() functions 2. make 在执行上述代码的第三步的时候会如果遇到如下错误 gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o in_cksum.o in_cksum.c gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o inet_ntop.o inet_ntop.c inet_ntop.c: In function ‘inet_ntop’: inet_ntop....

July 24, 2019 · 1 min · 云溪

exec.Command 返回 “exit status 1” 获取详细错误信息

cmd := exec.Command("find", "/", "-maxdepth", "1", "-exec", "wc", "-c", "{}", "\\") output, err := cmd.CombinedOutput() if err != nil { fmt.Println(fmt.Sprint(err) + ": " + string(output)) return } fmt.Println(string(output))

July 20, 2019 · 1 min · 云溪

ubuntu 创建桌面快捷方式

安装 sudo apt-get install --no-install-recommends gnome-panel 使用 gnome-desktop-item-edit –create-new ~/Desktop

July 20, 2019 · 1 min · 云溪
« Prev  Next  »
© 2026 云溪的 blog 备案号: 苏ICP备2026029040号-1