linux deployment of the whole process (unfinished)

First, set up the environment

1.jdk

2.tomcat

3.nginx

4.redis

Recommended tools: winSCP (used to transfer files), SecureCRT (used to execute commands)

1.jdk

Download: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html?ssSourceSiteId=otncn

Check agree to download

The downloaded tar.gz package onto a Linux server, here on the / home / software in

carried out

cd /home/software

In the current folder performs decompression command

tar -zxvf jdk-8u191-linux-x64.tar.gz

 

Extraction is completed, configure the environment variables, execute vim / etc / profile

In the end:

export JAVA_HOME=/usr/local/java/jdk1.8.0_191 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATH

 

jdk version of the installation is complete, view the installation after

java -version

 

Successful installation is displayed java version:

2.tomcat

Download: https://tomcat.apache.org/download-80.cgi

Select the linux version

It is recommended that the same level position into the software, and then execute the command unzip

tar -zxvf apache-tomcat-8.5.35.tar.gz

After pressing, copy the deployment package to the war tomcat directory under the webapps, modification war called ROOT.war

The need to modify the configuration files tomcat conf / service.xml, generally only need to modify the http port (intermediate position)

Then go to the bin directory under tomcat

cd /home/apache-tomcat-8.5.35/bin

Start tomcat execution startup.sh

./startup.sh

At this point if Permission denied or appear This file is needed to run this program, indicates insufficient permissions, you need to perform

chmod +x *.sh

Then again ./startup.sh can perform, such as starting abnormal, or need to troubleshoot other reasons, you can see catalina.out output files in tomcat / logs in

If you need real-time tracking can be executed from the command line

-f catalina.out tail   // can be added behind the "-n 100", it represents the latest display of 100 lines

Close tomcat can be performed in the bin directory

./shutdown.sh

Here is a note that point, shutdown and sometimes can not be completely shut down tomcat, and occasionally perform error occurs, you can view tomcat operation after executing shutdown.sh, command line execution

-aux PS | grep Tomcat   // Tomcat after grep fuzzy search can be used to query into other processes, such as grep nginx

See if there is tomcat just executed, after -Dcatalina is tomcat directories, if tomcat is still running, you need to manually kill the process

kill -9 23035 // wherein -9 complete kill process, 23035 for the process id, the position as shown in FIG.

3.nginx

Download: http://nginx.org/en/download.html

Select the latest version

Download the tar package into the software, execute the same command unzip

tar -zxvf nginx-1.17.0.tar.gz

Time to not install nginx, yum to install the required software dependent nginx use, if execution errors, self Baidu solution according to the error code

-Y GCC zlib zlib the install yum-devel-devel PCRE OpenSSL OpenSSL-devel  // a four-dependent key installation

After installation dependent, enter nginx extract directory, start the installation nginx

cd ./nginx-1.17.0

Perform the initialization command

./configure // For the custom directory prefix = installation directory can be added, no skip --prefix = ./configure / Home / nginx 
// Further, if the start nginx ssl error message (e.g. nginx: [emerg ] the "ssl" parameter requires ngx_http_ssl_module ), if necessary, after adding ssl configuration ./configure reinstall
./configure --prefix = / home / nginx --with -http_stub_status_module --with-http_ssl_module./configure

The installation method

make & make install

Finished, enter nginx directory, configuration nginx.conf

./nginx/conf cd   // default the current directory

Modify the file recommended winSCP, of course, can command, but personally feel awkward, accustomed to watching yourself

nginx configuration of some more things, there are several points to note, so open a single file storage, not go into here, then nginx has been installed.

4.redis

Download: https://www.redis.net.cn/

Click to download the latest stable version

Also into the software, unzip command execution

takes -zxvf Redis-5.0.4.tar.gz

Into the extracted directory, execute make method

cd ./redis-5.0.4 make

After machining, the method of installing the install redis

There is also a directory make install // make PREFIX = / home / redis install can specify the installation

 

Guess you like

Origin www.cnblogs.com/nvsky/p/11084089.html