tail -f application.log(實時查看日誌文件)html
gzip -d xxx.gz(解壓gzip文件)java
tar –xvf file.tar //解壓 tar包node
tar -xzvf file.tar.gz //解壓tar.gzlinux
wget -c http://www.linuxsense.org/xxxx/xxx.tar.gz(下載 )nginx
https://www.cnblogs.com/yuanbo123/p/5819564.html(java安裝)shell
sudo shutdown -r now(重啓)npm
https://blog.csdn.net/c233728461/article/details/52679558(端口)centos
find / -name nginx(查找文件)bash
/usr/sbin/nginx -s reload(nginx重啓)app
https://jingyan.baidu.com/article/a17d5285eb93ea8099c8f24d.html(切換用戶)
https://www.cnblogs.com/biaopei/p/7730542.html(root權限分配)
https://www.cnblogs.com/mylinux/p/5576316.html(用戶操做)
安裝:https://www.cnblogs.com/lizichao1991/p/7809156.html
https://blog.csdn.net/qq_15175765/article/details/78862797(log4j*錯誤)
重啓:
ps -ef | grep elastic
kill -9 3250
elasticsearch -d
(cd 'usr/local',去nodejs官網查看linux二進制包地址)
wget https://nodejs.org/dist/v10.14.1/node-v10.14.1-linux-x64.tar.xz
tar -xvJf node-v10.14.1-linux-x64.tar.xz
tar -xvf node-v10.14.1-linux-x64.tar
ln -s /usr/local/node-v10.14.1-linux-x64/bin/node /usr/local/bin/node
ln -s /usr/local/node-v10.14.1-linux-x64/bin/npm /usr/local/bin/npm
npm install -g n
ln -s /usr/local/node-v10.14.1-linux-x64/bin/n /usr/local/bin/n
https://www.jb51.net/article/98153.htm(若是不生效,Linux切換node版本)
vi ~/.bashrc(設置環境變量,添加下面這行:)
export PATH=/usr/local/node/bin:$PATH(linux添加環境變量)
提高缺乏 libXcomposite 等依賴:
## 經常使用終端命令
Mac查看端口占用 lsof -i tcp:port
Mac殺掉進程 kill Pid
如:/root/restartPM2.sh
#!/bin/bash
ENABLE_NODE_LOG=YES pm2 restart all
設權限:chmod 755 restartPM2.sh
vi /etc/crontab
SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * user-name command to be executed 30 * * * * root /root/shell/restartPM2.sh
service crond restart
"cron_restart": "30 * * * *", "instances" : 1, "exec_mode" : "cluster"
yum install -y nginx
systemctl start nginx.service
啓動:nginx
中止:nginx -s stop
重啓:nginx -s reload
配置文件地址:/etc/nginx/nginx.conf( 檢測:nginx -t )
默認網站地址:/usr/share/nginx/html