打包项目需要先把公共项目打包
再把聚合工程打包,再打war包
对springcloud项目打包
公网ip:47.106.125.185
打jar包:mvn clean install -Dmaven.test.skip=true
打war包:mvn clean package-Dmaven.test.skip=true
我是在opt文件夹下部署项目
查看是否有与mysql冲突的mariadb:rpm -qa| grep mariaadb
有的话用rpm -e来删除
启动mysql数据库:systemctl start mysql.service
查看表的编码格式是否为utf8:show variables like “%char%”;
设置访问授权
GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
重启mysql数据库
systemctl restart mysql.service
设置统一字符集
cp /usr/share/mysql/my-small.cnf /etc/my.cnf
vim /etc/my.cnf 增加一行 character-set-server=utf8
登录
mysql -u root -p
安装
yum install -y ruanjian
解压
tar -zxvf 压缩包
要到redis目录下
编译redis
cat makefile
vim src/Makefile 修改安装目录 PREFIX?=/usr/local/redis
make编译
make install
配置redis文件
cp /opt/softwore/redis/redis.conf /usr/local/redis
修改守护线程
daemonize YES
修改日志目录
logfile “/var/log/redis.log”
修改本地目录
dir /usr/local/redis
启动redis
/usr/local/redis/bin/redis-server /usr/local/redis/redis.conf
启动客户端
/usr/local/redis/bin/redis-cli
上传文件夹到云端
scp -v -r admin-webui-1.0-SNAPSHOT.war root@47.106.125.185:/opt
移动到tomcatwebapps目录下
mv admin-webui-1.0-SNAPSHOT.war /opt/software/apache-tomcat-7.0.75/webapps/
启动tomcat
/opt/software/apache-tomcat-7.0.75/bin/startup.sh
http://47.106.125.185:8080//admin-webui/admin/to/login/page.html
查看日志
opt/software/apache-tomcat-7.0.75/log/cate…out