Tomcat
What’s Tomcat
Tomcat is an application server from the Apache Software Foundation that executes Java servlets and renders Web pages that include Java Server Page coding. Described as a “reference implementation” of the Java Servlet and the Java Server Page specifications, Tomcat is the result of an open collaboration of developers and is available from the Apache Web site in both binary and source versions. Tomcat can be used as either a standalone product with its own internal Web server or together with other Web servers, including Apache, Netscape Enterprise Server, Microsoft Internet Information Server (IIS), and Microsoft Personal Web Server. Tomcat requires a Java Runtime Enterprise Environment that conforms to JRE 1.1 or later. Tomcat is one of several open source collaborations that are collectively known as Jakarta.
Install Tomcat
- Go to official website, download Tomcat you need.
- Config Environment Variables
- Go to desktop, find Computer or This PC, right click, then choose Properties
- Choose Advanced system settings on the left, pop up System Properties window, then choose Environment Variables.
- Add new System Variable named:
CATALINA_HMEand Variable value is the Tomacat path you made. - Edit
Pathin System Variables, add%CATALINA_HME%\bin(if needed, you need to add semicolon at the end of the variable you added)
- Navigate to Tomcat/bin folder, open cmd as Administrator, exec
service.bat installcommand to install Tomcat. - The last thing you need to do is start Tomcat service
- Also navigate to Tomcat/bin folder, double click
startup.batorcatalina.batortomcat*.exe, etc.
- Also navigate to Tomcat/bin folder, double click
- You can navigate to Tomcat/conf folder find
server.xmlto update http port (default port is 8080) - open browser input
localhost://[your http port]to browser Tomcat default page, also you can put your project underTomcat/webapps. - put your project under
Tomcat/webapps, then you need to configureserver.xml. add<Context path="/[visit path]" docBase="[relative path,default current path is webapps ]" reloadable="true"/>under<Host>
start Tomcat
if you successfully installed Tomcat, every time you want to use Tomcat is only need to start Tomcat service(navigate to Tomcat/bin folder, double click startup.bat or catalina.bat or tomcat*.exe, etc.)
references
https://blog.csdn.net/weixin_42109012/article/details/94383001
JDK
What’s JDK
JDK include JRE
Install JDK
- Go to official website, download JDK you need.
- Double click JDK package you downloaded,click next to install(you can customize your install path)
- Config Environment Variables
- Go to desktop, find Computer or This PC, right click, then choose Properties
- Choose Advanced system settings on the left, pop up System Properties window, then choose Environment Variables.
- Add new System Variable named:
JAVA_HOMEand Variable value is the Tomacat path you made. - Edit
Pathin System Variables, add%JAVA_HOME%\bin(if needed, you need to add semicolon at the end of the variable you added)
- Run cmd, input
java -versionorjavac -versionto valify java install successfully or not and check java version.
Uninstall JDK
- open control panel, uninstall Java
- also you may need to delete regedit.
Redis
What’s Redis
Install redis
- Go to website download redis you need(ps: different environment need different redis,like linux, window)
- extract zip file you download, navigate to root path, run
cmd->redis-server.exestart redis service.if you see redis login in the window, it shows redis install successfully. - run another cmd, input
redis-cli.exethen you can get connect to server. - if you close the cmd window, the redis service will closed, hence if you want to put redis service into window service, then you can:
cmd->redis-server.exe --service-install redis.windows.conf --loglevel verbose, the last parameter--loglevel verbosemeans log level. after run this cmd, you will see redis service in window services list(Window+R->services.msc)redis-server --service-install redis.windows.conf --loglevel verbose
Issue in redis
Invalid argument during startup: Failed to open the .conf file: verbose CWD=C:\developer\redis….
Solve:redis-server --service-install redis.windows.conf --loglevel verbose
creating server tcp listening socket *:6379: listen: unknown error.
Solve: configureredis.windows.conf, remove ‘#’ beforebind 127.0.0.1uninsatll redis
redis-server --service-uninstall.cmd->redis->\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\, deleteredis.
common cmd in redis
- uninstall service:
redis-server --service-uninstall - start service:
redis-server --service-start - stop service:
redis-server --service-stop redis-cli shutdown- rename sercie:
redis-server --service-name name
easy pattern: redis-cli.exe
specified pattern: redis-cli.exe -h 127.0.0.1 -p 6379 -a requirepass (also, you can re-change password in redis.windows.conf)
Redis Desktop Manager
https://redisdesktop.com/download
references
https://blog.csdn.net/u011277123/article/details/78692603/ https://blog.csdn.net/weixin_43953753/article/details/86019883 https://www.cnblogs.com/dingguofeng/p/8709476.html https://blog.csdn.net/wu_zongwen/article/details/80318916