“服务器笔记“
linux下ssh-copy-id命令详解
ssh-copy-id 命令笔记 1. 命令简介 ssh-copy-id 是一个用于将本地 SSH 公钥自动添加到远程服务器 authorized_keys 文件的工具,实现免密 SSH 登录。 2. 基本语法 ssh-copy-id [-i [identity_file]] [user@]hostname 3. 常用选项 选项 说明 -i [identity_file] 指定公钥文件(默认:~/.ssh/id_rsa.pub) -p port 指定 SSH 端口(非默认 22 端口时使用) -f 强制模式,不检查密钥是否已存在 ...
docker端口映射不能正常访问
在用docker启动nginx后,通过ip地址无法访问 docker run -d --name mynginx -p 80:80 nginx Linux转发是要开启内核转发功能net.ipv4.ip_forward的,于是检查内核转发是否打开 [root@VM-20-17-centos ~]# sysctl net.ipv4.ip_forward net.ipv4.ip_forward = 0 这里发现内核转发是处于关闭状态的(0代表内核转发没有打开)这里手动echo命令开启内核转发,并再次查询内核转发是否开启 [root@VM-20-17-cent...
windows下apache支持php-nts版本
帮同学的windows服务装个禅道,登录进去才发现只有apache,没有php,也没有mysql 装完php和mysql,发现访问php文件直接展示没有解析,于是就开始配置apache解析php的模块 好多年windows+apache这种组合了,搞了半天才解决 LoadModule fcgid_module modules/mod_fcgid.so <IfModule fcgid_module> FcgidInitialEnv PHPRC "F:/Web/PHPServer/Bin/PHP" ...
Mac 升级系统后 ssh 报错
报错如下: Unable to negotiate with 10.10.10.100 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss 解决办法: cd ~/.ssh vim config Host * ControlMaster auto ControlPath ~/.ssh/master-%r@%h:%p IdentityFile ~/.ssh/id_rsa IdentitiesOnly yes HostkeyAlgorithms +ssh-rsa Pubk...
centos7 执行启动邮件服务报错-systemctl start postfix
错误信息如下 Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details. 解决办法 修改 /etc/postfix/main.cf的设置 inet_protocols = ipv4 inet_interfaces = all
最完美 ThinkPHP(tp) 的 Nginx 配置文件
系统 LSB Version: :....(太长了) Distributor ID: CentOS Description: CentOS Linux release 8.2.2004 (Core) Release: 8.2.2004 Codename: Core 使用官网给的没有生效 location / { // …..省略部分代码 if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; } } 于是 s...
centos下openresty+lua入门实践
安装openresty 1、安装依赖开发库 yum install pcre-devel openssl-devel gcc curl postgresql-devel 2、下载 + 编译 + 安装 wget https://openresty.org/download/openresty-1.19.3.1.tar.gz 我刚开始先下载的1.19.3.1版本,但是在编译时增加nginx_upstream_check_module模块,一直报错,错误信息如下 ./configure: error: the ngx_http_upstream_check_m...
docker安装es的中文分词器ik插件
两种安装方式 1、use elasticsearch-plugin to install docker exec -it elasticsearch /bin/sh cd bin/ elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.1.1/elasticsearch-analysis-ik-7.1.1.zip 执行完毕后 elasticsearch-plugin list #查看 elasticsear...
Mac下使用clion调试redis源码
1、先从github上下载源码 1.1搜索https://github.com/search?q=redis+clion 1.2最好是选择别人配置好CMakeLists.txt的,不然自己配置也很麻烦 2、下载完成,开始配置 //选择一个想要调试的版本进行下载 wget https://github.com/htw0056/redis-3.0-annotated-cmake-in-clion/archive/master.zip //解压 unzip redis-3.0-annotated-cmake-in-clion-master.zip //重命名+...
Mac下安装gdb证书
1、先按照csdn上面的这边文章进行添加证书,名称设为 code_gdbsign https://blog.csdn.net/LU_ZHAO/article/details/104803399/ 2、假如你的mac系统大于Mac OS X 10.14,则 vim gdb-entitlement.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/...