服务器免密
先获取本地电脑的公钥
cd ~/.ssh/
cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKwgecKjlwNdP28+z6wInxGkJbvan4v2JGiWc32TxOQWjgoehtc8iOTwls479P0Z9Wa0cMx/UIZ/b3sIEhSs+EAaNaxXI/P9PghViO490Dy9kB9McwQk3zXDGpyJ+RnVU3DoSeD60arIXt+yTgZV0TqTi7m8+00YWwXhP/btkPggY5L9IW1PfXNba2Jg14ueeRL5Kx5NLvnc/VE1fDsmlsMcRp6xBxsT7kJtI/HJvTX5NifIBXSvm2vC+DUc59K+oT6mjmfZVOIzqk8oEdA0ignBjml8w+BnR4yF8pAhqTp5VURZvJP8N1sYrJQ6abjbX6ID8y/2akXL0nuQZ0uzF1 xiaozhu@ismallpig.com
把当前的本地的公钥直接加入到服务器的可免密公钥文件~/.ssh/authorized_keys中
ssh-copy-id root@118.25.58.236
进入服务器
cd ~/.ssh/
vim authorized_keys (加上上述公钥)
Exit(退出,尝试)
scp -r ./dic_name root@ecs.ismallpig.com:/www/wwwroot/dic_name
self.form = {brand_right: 0}
Nginx
Hosts :/etc/hosts
Docroot is::/usr/local/var/www
配置文件:/usr/local/etc/nginx/nginx.conf
服务安装路径:/usr/local/etc/nginx/servers/.
1:查看所有进程监听的端口
sudo lsof -i -P | grep -i "listen"
2:查看端口占用情况(80为例)
lsof -i:80
3:关闭进程 (-9。强制。 11112 80端口对应进程的PID)
kill -9 11112
git rm -r --cached .idea
Docker
启动docker:docker-compose up --build -d
进入docker:exec -it demo /bin/bash
进入根目录:cd /var/www/
grep -R ‘you text’ ./
检测端口是否通:telnet 49.232.99.177 3306
lsof -i tcp:8080 检测本地端口占用情况
更改服务器composer为国内阿里源:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
wget 下载互联网资源
Win 查看端口 杀进程
netstat -ano | findstr 8801
tasklist | find ‘进程ID’
taskkill /f /t /im ‘进程ID或名称‘
发表评论 取消回复