linux服务器命令
查看端口信息
netstat -aon|findstr "9001"
netstat -anpl 查看端口占用
bash脚本相关
#读取文件内容
$(cat ./CRM.ini)
生成ssh密钥对
ssh-keygen -m PEM -t rsa -b 4096 -f ~/.ssh/bh
ssh-keygen -t rsa -C "563021874@qq.com"
将公钥传至远程服务器
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 8024 root@host.docker.internal
连接远程ssh
ssh root@host.docker.internal -p 8024
改变文件夹权限
chmod -R 700 /root
删除文件夹
rm -rf MyDocuments/
移动文件夹
mv /easyswoole/phantomjs-2.1.1-linux-x86_64 ~/bin/phantomjs-2.1.1-linux-x86_64
安装phantomjs并测试
mkdir ~/bin/
cd ~/bin/
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
yum -y install bzip2
tar -xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2
ln -s ~/bin/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
phantomjs -v
cd ~/bin/phantomjs-2.1.1-linux-x86_64/bin
touch hello.js
echo "console.log('Hello, world');" >> hello.js
echo "phantom.exit();" >> hello.js
phantomjs hello.js
touch a.js
echo "var page = require('webpage').create();" >> a.js
echo "page.open('https://www.baidu.com/', function () {" >> a.js
echo "page.render('test/example.png');" >> a.js
echo "phantom.exit();" >> a.js
echo "});" >> a.js
phantomjs a.js
查找nginx配置文件位置
whereis nginx
/usr/sbin/nginx -t
cd /etc/nginx/conf.d
cat /etc/nginx/nginx.conf
修改nginx配置
vi /etc/nginx/nginx.conf
nginx重载配置
/usr/sbin/nginx -s reload
修改php配置
vi /etc/php.ini
php重载配置
service php-fpm reload
查看服务器 操作系统版本信息
cat /proc/version
扫描文件
tail -f log_DEBUG.log
windows版grep
docker logs exciting_goldstine 2>&1 | findstr "Bootstrap Password:"
复制文件
cp /easyswoole/haha/dev.php /easyswoole/test/
作者简介:坐标广州,觉得对你有帮助,点个关注支持一下!
本文来自博客园,作者:老猫爱豆,转载请注明原文链接:https://www.cnblogs.com/laomao666/p/15438406.html