linux随笔

ip a

查ip;

fdish -l

df -h

查硬盘;

free

查内存;

top

按M切换;

ps aux | grep java

ps ef | grep java

搜索进程;

lsof -i:端口号;

find / -name 'deploy_markavip-app2.sh'

查找文件;

cd /usr/local/bin/data

[root@localhost bin]# cat setenv.sh

获取tomcat配置文件;

cd /usr/local/apache-maven-3.3.3/

获取maven目录;

cd

cd ../..

退出目录;

cd /bin/whole51/deploy_markavip-app2.sh

sh deploy_markavip-app2.sh

手动启动服务;

kill -9 [PID]

-9 表示强迫进程立即停止;

rm -rf markavipapp

删除文件;

mv weekiy-app2/ weekly-app2/

重命名文件;

vi deploy_weekly.sh

yy复制,dd剪切,p粘贴,u撤销操作

i进入编辑模式,esc退出编辑模式

输入:然后wq退出保存,q退出不保存,q!强制退出;


pwd

显示路径;

cd /usr/local/weekly-app2

cd bin/

tail -f /usr/local/weekly-app2/logs/catalina.out

tail -100f catalina.out

/usr/local/app/bin/shutdown.sh -force

[ -x `ps -ef | grep /usr/local/weekly-app2/conf | grep -v grep | awk '{print $2}'` ] || kill -9 `ps -ef | grep /usr/local/weekly-app2/conf | grep -v grep | awk '{print $2}'`

杀进程;

cd /usr/local/weekly-app2/bin/setclasspath.bat

杀进程要用的文件;

cd /data/apache-tomcat-7.0.54/bin/

cat setenv.sh

获取tomcat配置;

reboot

重启;

history

查看操作历史;

mv weekly-app2/ weekly-app2.bak

备份;

/usr/local/app2/webapps/ jollychic_app2

http://172.31.0.117:8080/jollychic_app2/

/usr/local/app2/webapps/ROOT

http://172.31.0.117:8080

cd /usr/local/cart-version/

ll

cd webapps/

ls

cd ROOT/

ls

vi index.jsp

查看端口欢迎配置;

hostnamectl set-hostname share-center

修改主机名;

export JAVA_HOME=/usr/local/jdk1.8.0_71

export MAVEN_HOME=/usr/local/apache-maven-3.3.3

export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH

环境声明;

/bin/setenv.sh

CATALINA_OPTS="-Xms768M -Xmx768M -Xmn128M -Xss512k -XX:PermSize=128M -XX:MaxPermSize=256M"

  546  netstat

  547  netstat  -anp | grep 80

  548  ps aux | grep nginx

  549  whereis nginx

  550  cd /usr/local/nginx/

  551  ll

  552  cd conf/

  553  ll

  554  vi nginx.conf

修改服务器DNS

vi /etc/resolv.conf

nameserver 114.114.114.114

nameserver 8.8.8.8

  176  vi package.json

  197  npm install

  198  vi /etc/resolv.conf

  199  npm install

  337  rm -rf node_modules/

  340  npm run pack-test

  341  npm run build-test


  376  vi webpack.prod.conf.js

你可能感兴趣的:(linux随笔)