Installation of web pages and Tomcat

1. Briefly describe the difference between static web pages and dynamic web pages

Static web pages: (static web pages do not have database configuration)

In website design, static web pages are the basis of website construction. Web pages in pure HTML format are usually called "static web pages". Static web pages are standard HTML files, and their file extensions are .htm, .html, and can contain text , images, sounds, FLASH animations, client-side scripts and ActiveX controls, etc. Static web pages, as opposed to dynamic web pages, refer to web pages that do not have a background database, do not contain programs, and cannot be interacted with. Static web pages are relatively cumbersome to update, and are suitable for display websites that are generally updated less.

Dynamic web pages: (Dynamic web pages require database configuration)

Dynamic web pages are the integration of basic HTML syntax specifications,  PHP , Java , Python  and other programming languages, databases and other technologies, in order to achieve efficient, dynamic and interactive management of website content and style. , although the page code has not changed, the displayed content can change with time, environment or the result of database operation.

2. Briefly describe the difference between web1.0 and web2.0

 web1.0: It is characterized by editing. The content provided by the website to users is provided by the website editor after editing and processing, and users read the content provided by the website. This process is a one-way behavior from the website to the user. The representative sites in the web1.0 era are the three major portals of Sina, Sohu and NetEase.

web2.0: Pay more attention to user interaction, users are not only consumers (browsers) of website content, but also producers of website content. (Weibo, Tianya Community, We Media) is to strengthen the interaction between the website and users. The content of the website is provided by users, and many functions of the website are also constructed by users, realizing two-way communication and participation between the website and users; users It has its own data in the web2.0 website system. And completely based on WEB, all functions can be completed through the browser.

web3.0:

① The information in the website can directly interact and exchange information with other websites, and the information of multiple websites can be integrated and used at the same time through the third-party information platform;

② Users have their own data on the Internet and can use it on different websites;

③ Completely based on WEB, the functions that complex system programs have can be realized with a browser, such as instant messaging and chatting, etc., can be completed directly on the web page without downloading any software.

Brief description:

The web1.0 network is an information provider, providing one-way and one-way understanding; the web2.0 network is a platform, users provide information, and other users obtain information through the network; web3.0 network becomes the understander and provider of user needs , The network knows the users well, knows what the users have, what they want, and their behavior habits, performs resource screening, intelligent matching, and directly gives users answers.

 3.Tomcat installation

It is recommended not to use yum installation in the production work environment, which is not safe. It is recommended to use the binary package to install

 Tomcat installation

1.安装jdk
[root@slave1 ~]# yum install -y jdk-8u261-linux-x64.rpm 
检查
[root@slave1 ~]# java -version

2.解压tomcat压缩包
[root@slave1 ~]# tar xf apache-tomcat-8.5.20.tar.gz -C /usr/local/
														(此目录为将来需要安装的指定目录)

软连接(快捷方式) 当安装包名字过长时,即可设置软连接
[root@slave1 ~]# ln -sv /usr/local/apache-tomcat-8.5.20/   /usr/local/tomcat

3.启动
开启:/usr/local/tomcat/bin/startup.sh
关闭:/usr/local/tomcat/bin/shutdown.sh

4. Configure the service startup script

1.写入脚本
[root@slave1 webapps]# vim /usr/lib/systemd/system/tomcat.service 
[Unit]
Description=Apache Tomcat
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=JAVA_HOME=/usr/java/jdk1.8.0_261-amd64 Environment=CATALINA_HOME=/usr/local/tomcat

ExecStart=/usr/local/tomcat/bin/startup.sh
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
User=tomcat      这两行看是否有该用户
Group=tomcat
PrivateTmp=true


2.使用systemctl 启动和关闭tomcat并且在/usr/local/tomcat/logs/catalina.out监控是否出现错误

5. Deploy the jpress application

1.安装配置数据库
yum -y install mariadb-server
systemctl start mariadb.service
2.配置用户
(root@localhost) [(none)] >create database jpress DEFAULT CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)
(root@localhost) [(none)] >grant all on jpress.* to jpress@'%' identified by '123456';
Query OK, 0 rows affected, 1 warning (0.01 sec)
3.将开发者的war拖拽到/usr/local/tomcat/webapps/目录下 (自动会解压)
[root@slave1 webapps]# ll
drwxr-x---.  6 root root       68 Apr 15 17:31 jpress-v4.2.0
-rw-r--r--.  1 root root 71018586 Apr 15 17:30 jpress-v4.2.0.war

Test: Enter the URL in the browser: 192.168.27.121:8080

Guess you like

Origin blog.csdn.net/weixin_62173637/article/details/130171928