linux installation jdk tomcat configuration vsftp remote connection steps

  • 2020-05-13 04:08:07
  • OfStack

Imperceptibly into the line also has 1 years, this two days, work in a company free oneself with a vmware virtual machine, installed a red hat 6.1 command line operating system completely, wanting to build a company in a test environment now, I didn't expect to run into a lot of questions in the middle, but most are solved, can now reach to upload project and so on, this two days to study something here record 1, avoid the loss of memory.

You can also choose other virtual machines, such as virtualBox, etc. The virtual machine is just a tool to install the operating system. Of course, vmware may be more powerful. Then is to go online to download you want to install the operating system image file, and then in the virtual machine to create a new virtual machine, and put you under the image file installation up, here is not to describe the virtual machine and image file is how to install, encountered problems on baidu google cough up. Hey hey

Think of is how in the above after installation jdk and tomcat, but because I'm not familiar with linux system, don't know how to directly above linux download package directly, but think there should be a corresponding commands, but I didn't do that, I want to download from windows of good corresponding tar. gz package, then upload through ftp linux. The command is rpm-qa | grep ftp. Under normal circumstances, linux system will automatically bring with it one ftp software. You just need to start it up. It can be seen from the following code that linux operating system comes with vsftp. The command to start is service vsftpd start, and the command to check the service status of ftp is service vsftpd status.


[root@localhost ~]# rpm -qa | grep ftp
report-config-ftp-0.18-9.el6.i686
report-plugin-ftp-0.18-9.el6.i686
gvfs-obexftp-1.4.3-12.el6.i686
vsftpd-2.2.2-6.el6_0.1.i686

According to the principle that ftp services have also launched now, should be able to upload files, so I am using xshell4 connect the system, but is unable to connect to, tell I carefully reviewed 1 before operation, the process of blog and looked on the Internet, use service is ssh xshell remote connection, so the ssh services start up again, because this tool for xshell don't know why, so I get so big a joke, it is ridiculous, But after I found only root ssh service start up users can remote login and other users can not login, so continue to baidu google, saw say to modify/etc/ssh/sshd_config, there is a AllowUsers xxx xxx and AllowGroups xxx xxx command, can add the user and group, xxx users can remote login, but it is not working, now the problem is still not solved, Slowly groping, now that said, there are many online posts about root remote login is not safe, I also think so, root had better not remote login, so it is appropriate way is to modify/etc ssh/sshd_config options, inside a PermitRootLogin yes | no, it is set into no, but can't stop to ordinary users su root users, this also will follow behind the problem, I'll add that to this article later.

Use root users can now use on xshell remote login to linux system, click on the menu above New File Transfer icon can use ftp command, also is not to say that one must use xshell, only our company use the software, so I will make do with, if it's not remote login, direct use ftp upload, download a ftp would now so convenient 1 point than I am, but have to dear friends to try, hey hey

Will windows download good jdk fit linux system and tomcat package uploaded, then will it to the appropriate directory, command tar - zxvf jdk - xxx - xx, decompression after to configure the environment variables, my environment variable file for/etc/profile, different system files will not be 1 sample, add the following lines in the file, and 1 decide not to go wrong, wrong later, when they start tomcat could not find a file error, I made such a mistake, full of 1 not worth mentioning 1 small mistake, the time has been delayed, ah...


export JAVA_HOME=/home/java/jdk1.8.0_40
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}
export PATH=${JAVA_HOME}/bin:$PATH

Then restart linux and test 1 java-version, javac-version to see if this information appears


[root@localhost ~]# java -version
java version "1.8.0_40"
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 -version
javac 1.8.0_40

If there is such information, it means that the installation of jdk has been successful, and then the installation of tomcat is followed by the following:


export CATALINA_HOME=/home/java/apache-tomcat-8.0.21
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}:${CATALINA_HOME}/lib

Then we can upload our own project under tomcat webapps using the previous method of uploading jdk, and launch tomcat

You can view the output of catalina.out on the fly. The command is tail-f catalina.out

If tomcat has been started and there are no errors, but it cannot be accessed, it may be a problem with the firewall of Linux system. At this time, baidu google can be used again. I will not introduce it here


Related articles: