项目上线部署(Linux系统配置):
笔记整理:
安装jdk:
root@ubuntu-server:/home/ubuntu-server/java# mkdir jdk
root@ubuntu-server:/home/ubuntu-server/java# cd jdk
root@ubuntu-server:/home/ubuntu-server/java/jdk#
----Tomcat文件拖拽到xshell中
root@ubuntu-server:/home/ubuntu-server/java/jdk# ls
解压文件:
root@ubuntu-server:/home/ubuntu-server/java/tomcat# tar xf jdk-8u111-linux-x64.tar.gz
root@ubuntu-server:/home/ubuntu-server/java/jdk# ls
配置环境:
root@ubuntu-server:~# sudo vi /etc/profile
添加代码:
export JAVA_HOME=/home/ubuntu-server/java/jdk/jdk1.8.0_111
export PATH=$PATH:$JAVA_HOME/bin
:wq保存退出
//按A键进入编辑
//:q退出
//:q!强制退出
使环境变量生效:
root@ubuntu-server:~#source/etc/profile
查看是否安装成功:
root@ubuntu-server: /home/ubuntu-server/java# java -version
------------------------------------------------------------------------------------------------------------------------------
安装Tomcat:
root@ubuntu-server:/home/ubuntu-server/java# mkdir tomcat
root@ubuntu-server:/home/ubuntu-server/java# cd tomcat
root@ubuntu-server:/home/ubuntu-server/java/tomcat#
Tomcat文件拖拽到xshell中
root@ubuntu-server:/home/ubuntu-server/java/tomcat# ls
解压文件:
root@ubuntu-server:/home/ubuntu-server/java/tomcat# tar xf apache-tomcat-8.5.9.tar.gz
查看:
root@ubuntu-server:/home/ubuntu-server/java/tomcat# ls
root@ubuntu-server:/home/ubuntu-server/java/tomcat# cd apache-tomcat-8.5.9/
//root@ubuntu-server:/home/ubuntu-server/java/tomcat/apache-tomcat-8.5.9# ll
//root@ubuntu-server:/home/ubuntu-server/java/tomcat/apache-tomcat-8.5.9# cd bin
//root@ubuntu-server:/home/ubuntu-server/java/tomcat/apache-tomcat-8.5.9/bin# ll
配置环境变量:
sudo vi ./bin/startup.sh
root@ubuntu-server:/home/ubuntu-server/java/tomcat/apache-tomcat-8.5.9/bin# vi ./startup.sh
开启:
root@ubuntu-server:~# cd /home/ubuntu-server/java/tomcat/apache-tomcat-8.5.9/bin
root@ubuntu-server:/home/ubuntu-server/java/tomcat/apache-tomcat-8.5.9/bin# ls
启动命令:
root@ubuntu-server:/home/ubuntu-server/java/tomcat/apache-tomcat-8.5.9/bin# ./startup.sh
在页面中输入:Ubuntu主机地址:8080如:http://192.168.22.136:8080/
关闭:
root@ubuntu-server:/home/ubuntu-server/java/tomcat/apache-tomcat-8.5.9/bin# ./ shutdown.sh
---------------------------------------------------------------------------------------------------------------------------------------
安装mysql:
root@ubuntu-server:~# sudo apt-get install mysql-server mysql-client
root@ubuntu-server: /etc# ./init.d/mysql start
root@ubuntu-server: /etc# mysql -uroot -p111111
mysql> show databases;
mysql> show tables;
更多推荐
所有评论(0)