Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux install jdk and tomcat configure vsftp remote connection method

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

The knowledge points of this article "linux installation jdk and tomcat configure vsftp remote connection method" are not understood by most people, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "linux installation jdk and tomcat configuration vsftp remote connection method" article.

At the beginning, to download and install the virtual machine, I chose vmware, of course, you can also choose other virtual machines, such as virtualbox, the virtual machine is just a tool for installing the operating system, of course, vmware may be more powerful, but for what we are doing now, any tool is fine. Then go to the Internet to download the image file of the operating system you want to install, then create a new virtual machine on the virtual machine, and install your image file on it. Here do not describe how the virtual machine and image files are installed.

After the installation is done, I think about how to install jdk and tomcat on it, but because I am not familiar with the linux system, I do not know how to directly download the package on linux, but I think there should be corresponding commands, but I did not do that. What I want is to download the corresponding tar.gz package from windows and upload it to linux through ftp. Read a lot on the Internet, you should first check the linux system to see if the corresponding ftp software is installed, the command is rpm-qa | grep ftp, under normal circumstances, the linux system will automatically bring a ftp software, you can just start it up, through the following code you can see that the linux operating system comes with vsftp, the startup command is service vsftpd start, and the command to check the status of the ftp service is service vsftpd status.

[root@localhost ~] # rpm-qa | grep ftpreport-config-ftp-0.18-9.el6.i686report-plugin-ftp-0.18-9.el6.i686gvfs-obexftp-1.4.3-12.el6.i686vsftpd-2.2.2-6.el6_0.1.i686

According to reason, now that the ftp service is started, I should be able to upload files, so I used xshell4 to connect to the system, but I was told that I could not connect. I carefully reviewed the process of the previous operation and found a blog from the Internet. I found that the service used in the xshell remote connection was ssh, so I started the ssh service again, because I don't know what the tool xshell is for. So it's really funny to make such a big joke, but after the ssh service started, I found that only root users can log in remotely, and no other users can log in, so, continue Baidu google, see that you want to modify / etc/ssh/sshd_config, there are allowusers xxx xxx and allowgroups xxx xxx commands, you can add user name and group inside, xxx users can log in remotely, but it doesn't seem to work. Now that this problem has not been solved, let's explore it slowly. now that we have mentioned this, there are many posts on the Internet about root remote login is not safe, I also think so, root had better not log in remotely, so its corresponding way is to modify the option in / etc/ssh/sshd_config, there is a permitrootlogin yes | no, set it to no, but it cannot prevent ordinary users from su to root users. This is also a question that will be followed up later, and I will add this question to this article.

Now with root users can use xshell remote login to the linux system, click the new file transfer icon on the menu can use the ftp command, it is not necessary to use xshell, but our company uses this software, so I will use it, if not remote login, directly upload with ftp, then download a ftp may be a little easier than I am now.

Download windows for linux system jdk and tomcat compressed package to upload, and then extract it to the appropriate directory, the command is tar-zxvf jdk-xxx-xx, after decompression to configure environment variables, my environment variable file is / etc/profile, different system files will be different, add the following lines in this file, and be sure not to make mistakes, after errors, start tomcat will not be able to find the file error.

Export java_home=/home/java/jdk1.8.0_40export jre_home=$ {java_home} / jreexport classpath=.:$ {java_home} / lib:$ {jre_home} export path=$ {java_home} / bin:$path

Then restart linux and try java-version,javac-version to see if these messages appear

[root@localhost ~] # java-versionjava version "1.8.0y40" java (tm) se runtime environment (build 1.8.0_40-b26) java hotspot (tm) client vm (build 25.40-b25, mixed mode) [root@localhost ~] # javac-versionjavac 1.8.0y40

If you have this information, it means that the installation of jdk is successful, followed by the installation of tomcat, decompress it as above, and then configure the environment variables by adding the following:

Export catalina_home=/home/java/apache-tomcat-8.0.21export classpath=.:$ {java_home} / lib:$ {jre_home}: ${catalina_home} / lib

Then we can upload the project we wrote to tomcat webapps using the method of uploading jdk before, and then start tomcat.

The output of catalina.out can be viewed dynamically. The command is tail-f catalina.out.

If tomcat has been started without errors but cannot be accessed, it may be a problem with the firewall of the linux system.

The above is about "linux installation jdk and tomcat configuration vsftp remote connection method" this article content, I believe we all have a certain understanding, I hope the editor to share the content to help you, if you want to know more related knowledge content, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report