部署web项目到Linux上
2021-04-13 07:27
标签:dea site 进入 base ice eth0 内容 tomcat 测试 配置环境变量 JAVA_HOME=/opt/jdk1.8.0 测试 部署web项目到Linux上 标签:dea site 进入 base ice eth0 内容 tomcat 测试 原文地址:https://www.cnblogs.com/KSea/p/12391420.htmlcentos部署web
部署内容
修改ip地址出现问题
/etc/sysconfig/network-scripts/ifcfg-eth0
内容/etc/udev/rules.d/70-persisitent-net.rules
,删除或备注原有eth0,修改eth1网卡名字为eth0,并且记录其ATTR地址。/etc/sysconfig/network-scripts/ifcfg-eth0
,修改其HWADDR为刚才eht1中复制来的ATTR地址配置jdk
jdk1.8.0.tar
包/opt
tar -zxvf jdk.tar
vim /etc/profile
PATH=/opt/jdkjdk1.8.0/bin:$PATH
export JAVA_HOME PATHjava -version
配置tomcat
tomcat.tar
包/opt
tar -zxvf tomcat.tar
cd tomct/bin/
,./startup.bat
vim /etc/sysconfig/iptables
service iptables restart
http://ip:8080
配置mysql
msyql.tar
包/opt
tar -zxvf mysql.tar
mv mysql /usr/local
ln -s mysql-5.7.22-linux-glibc2.12-x86_64 mysql
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
cd /usr/local/mysql
chown -R mysql:mysql ./
./bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --initialize
./support-files/mysql.server start
cp support-files/mysql.server /etc/init.d/mysqld
service mysqld restart
vi /etc/profile
export PATH=$PATH:/usr/local/mysql/bin
source /etc/profile
mysql -u root -p
alter user ‘root‘@‘localhost‘ identified by ‘root‘;
use mysql
update user set user.Host=‘%‘ where user.User=‘root‘;
flush privileges;
vim /etc/sysconfig/iptables
service iptables restart
idea打包war包
上一篇:jQuery的核心函数