往linux上部署项目

1、手动从window上传文件到linux,使用secureCRT上传文件,需要上传或者下载,需要使用rz和sz命令。如果linux上没有这两个命令工具,则需要先安装。可以使用yum安装。运行命令yum install lrzsz。

安装完成后就可以使用rz命令上传本地的文件到linux平台。运行rz命令,会弹出选择文件的对话框。

如何在SecureCRT中给linux上传和下载文件

 

 

选择需要上传的文件所在的文件夹,然后点击文件。然后再点击添加按钮,“发送的文件”框中就会显示需要上传的文件。点击确定按钮,就能完成上传。

如何在SecureCRT中给linux上传和下载文件

如何在SecureCRT中给linux上传和下载文件




2、上传完毕后,解压zip压缩文件; unzip  xxx.zip  完成解压,
3、然后启动tomcat  报错:

以root用户运行,linux提示权限不够。root用户难道不是最高的吗?如何解决这个问题呢?

 

其实这里面是有原因的,首先我们要这样做:

 

用#ls   -l   filename命令看看,如果显示类似如: 
-rw-rw-rw-     1   root   root     .... 
则表示任何用户都没有可执行权限(即使是root用户).



那么我就chmod  777 startup.sh

4、重新执行启动tomcat的命令 ./startup.sh,报错:

  1. 启动tomcat时报错  
  2. <strong>The BASEDIR environment variable is not defined correctly  
  3. This environment variable is needed to run this program</strong>  
  4.  这坑爹的中间件,害的我搞了半天 根据提示开始排查环境变量设置 

 

  1. 没啥错误,这害得我狠被动啊,无意中打了一个ls命了恍然大悟  
  2.   
  3.   
  4. [root@localhost bin]# ls -al   
  5. 总计 688  
  6. d-w------- 2 root root   4096 02-22 14:53 .  
  7. drwxr-xr-x 9 root root   4096 02-22 14:53 ..  
  8. --w------- 1 root root  22705 11-28 18:20 bootstrap.jar  
  9. --w------- 1 root root  11830 11-28 18:20 catalina.bat  
  10. --w------- 1 root root  17708 11-28 18:20 catalina.sh  
  11. --w------- 1 root root   2374 11-28 18:20 catalina-tasks.xml  
  12. --w------- 1 root root  24172 11-28 18:20 commons-daemon.jar  
  13. --w------- 1 root root 199623 11-28 18:20 commons-daemon-native.tar.gz  
  14. --w------- 1 root root   1342 11-28 18:20 cpappend.bat  
  15. --w------- 1 root root   2108 11-28 18:20 digest.bat  
  16. --w------- 1 root root   1689 11-28 18:20 digest.sh  
  17. --w------- 1 root root  55828 02-22 16:13 nohup.out  
  18. --w------- 1 root root   3150 11-28 18:20 setclasspath.bat  
  19. --w------- 1 root root   4114 11-28 18:20 setclasspath.sh  
  20. --w------- 1 root root   2108 11-28 18:20 shutdown.bat  
  21. --w------- 1 root root   1628 11-28 18:20 shutdown.sh  
  22. --w------- 1 root root   2109 11-28 18:20 startup.bat  
  23. --w------- 1 root root   2023 11-28 18:20 startup.sh  
  24. --w------- 1 root root  32277 11-28 18:20 tomcat-juli.jar  
  25. --w------- 1 root root 249259 11-28 18:20 tomcat-native.tar.gz  
  26. --w------- 1 root root   3479 11-28 18:20 tool-wrapper.bat  
  27. --w------- 1 root root   3472 11-28 18:20 tool-wrapper.sh  
  28. --w------- 1 root root   2113 11-28 18:20 version.bat  
  29. --w------- 1 root root   1632 11-28 18:20 version.sh  
  30.   
  31.   
  32. 全部没有执行权限,赶紧赋权限  
  33. # chmod  777 -R bin/ 


 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值