tomcat的wget链接_Linux下wget下载软件小技巧以及安装jdk、tomcat与ftp服务器

一。ftp的安装

装个ftp搞了一下午,感觉以前没那么麻烦的呀,结果到晚上才发现是实验室网的问题,换连手机的热点马上可以了,真是尴尬,把基本安装步骤记录一下:

1、检查安装vsftpd软件

使用如下命令#rpm -qa |grep vsftpd可以检测出是否安装了vsftpd软件,

如果没有安装,使用YUM命令进行安装。

2、启动服务

使用vsftpd软件,主要包括如下几个命令:

启动ftp命令#service vsftpd start

停止ftp命令#service vsftpd stop

重启ftp命令#service vsftpd restart

3、vsftpd的配置

ftp的配置文件主要有三个,位于/etc/vsftpd/目录下,分别是:

ftpusers    该文件用来指定那些用户不能访问ftp服务器。

user_list   该文件用来指示的默认账户在默认情况下也不能访问ftp

vsftpd.conf   vsftpd的主配置文件

4、以匿名用户为例,我们去掉配置文件vsftpd.conf 里面以下

anon_upload_enable=YES

anon_mkdir_write_enable=YES

两项前面的#号,就可以完成匿名用户的配置,此时匿名用户既可以登录上传、下载文件。记得修改配置文件后需要重启服务。

5、非匿名账户的创建与使用

vsftpd服务与系统用户是相互关联的,例如我们创建一个名为test 的系统用户,那么此用户在默认配置的情况下就可以实现登录,如图

登录后在页面创建名为“aa”的文件夹,同样我们在服务器test用户 的home目录里也可以看到相同的文件。

二。jdk的安装与wget小技巧

本来以为在centos下(其他Linux也行,ubantu不用这么麻烦)用wget直接加下载地址就可以下载想要的软件,没想到有的链接做了封装,具体细节不清楚,所以有些链接直接复制进去不行,下载下来的是乱七八糟的文档,例如oracle的jdk。

后来找到了解决方法,如下:

wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz

把后面的链接改为你要下载的文件的版本。即可。

三。配置

[root@bogon jre]# rpm -qa|grep jdk

java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64

java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64

java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.3.el7.x86_64

java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64

卸载命令

[root@bogon jre]# yum -y remove java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64

卸载完成之后Java命令不被识别

[root@bogon lib]# java -version

bash: java: command not found...

下载好之后把文件移动到/usr/lib/jvm下(习惯),然后进行解压:

解压到安装目录

[root@bogon software]# tar -zxvf jdk-8u101-linux-x64.tar.gz -C /usr/local/java/

安装完毕之后在/etc/profile文件末尾添加

[root@bogon software]# vim /etc/profile

export JAVA_HOME=/usr/local/java/jdk1.8.0_101

export JRE_HOME=${JAVA_HOME}/jre

export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

export PATH=${JAVA_HOME}/bin:$PATH

使/etc/profile生效

[root@bogon jdk1.8.0_101]# source /etc/profile

检测安装是否成功

[root@bogon jdk1.8.0_101]# java -version

java version "1.8.0_101"

Java(TM) SE Runtime Environment (build 1.8.0_101-b13)

Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

[root@bogon jdk1.8.0_101]# javac

Usage: javac

where possible options include:

-g Generate all debugging info

-g:none Generate no debugging info

-g:{lines,vars,source} Generate only some debugging info

-nowarn Generate no warnings

-verbose Output messages about what the compiler is doing

-deprecation Output source locations where deprecated APIs are used

-classpath Specify where to find user class files and annotation processors

-cp Specify where to find user class files and annotation processors

-sourcepath Specify where to find input source files

-bootclasspath Override location of bootstrap class files

-extdirs Override location of installed extensions

-endorseddirs Override location of endorsed standards path

-proc:{none,only} Control whether annotation processing and/or compilation is done.

-processor [,,...] Names of the annotation processors to run; bypasses default discovery process

-processorpath Specify where to find annotation processors

-parameters Generate metadata for reflection on method parameters

-d Specify where to place generated class files

-s Specify where to place generated source files

-h Specify where to place generated native header files

-implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files

-encoding Specify character encoding used by source files

-source Provide source compatibility with specified release

-target Generate class files for specific VM version

-profile Check that API used is available in the specified profile

-version Version information

-help Print a synopsis of standard options

-Akey[=value] Options to pass to annotation processors

-X Print a synopsis of nonstandard options

-J Pass directly to the runtime system

-Werror Terminate compilation if warnings occur

@ Read options and filenames from file

四。tomcat的安装

直接用wget +tomcat的官方镜像网站就可以下载,把下载好的文件移动到/usr/local目录下。进入其中的bin目录 运行./startup.sh即可。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值