阿里云部署前端
nginx https://blog.csdn.net/liubangbo/article/details/127556918 https://blog.csdn.net/qq_42700109/article/details/120464161 https://blog.csdn.net/weixin_42480196/article/details/100600274 vi /usr/local/nginx/conf/nginx.conf /usr/local/nginx/sbin/nginx -s reload unzip dist.zip rm -rf dist.zip mysql https://blog.csdn.net/weixin_43954455/article/details/127809763 部署java mvn install -Dmaven.test.skip=true java -jar -Dspring.config.location=./application.yml springboot-0.0.1-SNAPSHOT.jar & 或者 nohup java -jar -Dspring.config.location=./application.yml springboot-0.0.1-SNAPSHOT.jar & tail -f nohup.out lsof -i:6060 杀掉端口 kill -9 名字 关防火墙 systemctl stop firewalld.service netstat -tlnup | grep nginx 部署前端 vi /usr/local/nginx/conf/nginx.conf /usr/local/nginx/sbin/nginx -s reload 启动nginx /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf server { listen 70; #server_name localhost; server_name 121.43.171.66; #charset koi8-r; #access_log logs/host.access.log main; location / { root /usr/local/nginx/html/home; try_files $uri $uri/ @router; index index.html index.htm; } location @router { rewrite ^.*$ /index.html last; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } 5.4 CentOS7服务器JDK8安装实战 简介:演练JDK8环境的安装 下载jdk官网: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 全局环境变量的配置文件:vi /etc/profile export JAVA_HOME=/usr/local/jdk1.8 #这个路径要改,其余不需要改 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH 加载环境变量:source /etc/profile java -version java version "1.8.0_211" Java(TM) SE Runtime Environment (build 1.8.0_211-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode) 5.5 CentOS7 实战部署tomcat网站服务器 简介:实战演练tomcat网站服务器的搭建 Tomcat:是一个开源免费的Web应用服务器,性能稳定,是目前比较流行的Web应用服务器 tomcat官网下载: https://tomcat.apache.org/download-80.cgi 下载: yum install -y wget wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.43/bin/apache-tomcat-8.5.43.tar.gz 解压:tar -xf apache-tomcat-8.5.43.tar.gz mv apache-tomcat-8.5.43 /usr/local/tomcat8 检查java环境:java -version tomcat重要目录介绍 [root@localhost tomcat8]# ls -lrt /usr/local/tomcat8 total 132 drwxr-x---. 7 root root 76 Jul 5 04:53 webapps -rw-r-----. 1 root root 16262 Jul 5 04:56 RUNNING.txt -rw-r-----. 1 root root 7139 Jul 5 04:56 RELEASE-NOTES -rw-r-----. 1 root root 3255 Jul 5 04:56 README.md -rw-r-----. 1 root root 1726 Jul 5 04:56 NOTICE -rw-r-----. 1 root root 57011 Jul 5 04:56 LICENSE -rw-r-----. 1 root root 5407 Jul 5 04:56 CONTRIBUTING.md -rw-r-----. 1 root root 19534 Jul 5 04:56 BUILDING.txt drwxr-x---. 2 root root 4096 Aug 1 23:33 lib drwxr-x---. 2 root root 29 Aug 1 23:33 temp drwxr-x---. 2 root root 4096 Aug 1 23:33 bin drwx------. 3 root root 4096 Aug 1 23:43 conf drwxr-x---. 2 root root 4096 Aug 1 23:43 logs drwxr-x---. 3 root root 21 Aug 1 23:43 work bin:存放可执行命令,比如开启和关闭; conf:配置文件; Context.xml:Tomcat公用的环境配置,tomcat 服务器会定时去扫描这个文件 web.xml:Web应用程序描述文件,都是关于是Web应用程序的配置文件 server.xml:可以设置tomcat的端口号,添加虚拟机这些的,是对服务器的设置 tomcat-users.xml:用户配置文件 webapps:发布web应用; lib:库文件; 关闭防火墙 systemctl stop firewalld.service 启动tomcat sh startup.sh 查看是否监听tomcat [root@localhost bin]# ps -ef | grep tomcat root 68135 1 4 23:43 pts/0 00:00:25 /usr/local/jdk1.8/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat8 -Dcatalina.home=/usr/local/tomcat8 -Djava.io.tmpdir=/usr/local/tomcat8/temp org.apache.catalina.startup.Bootstrap start [root@localhost bin]# netstat -tunlp | grep 68135 tcp6 0 0 127.0.0.1:8005 :::* LISTEN 68135/java tcp6 0 0 :::8009 :::* LISTEN 68135/java tcp6 0 0 :::8080 :::* LISTEN 68135/java 测试能否访问测试页面: IP地址:8080
本文来自博客园,作者:zjxgdq,转载请注明原文链接:https://www.cnblogs.com/zjxzhj/p/17778585.html