标签:linux部署
1.买云主机(亿速云xxx)1.export?JAVA_HOME=/usr/java/jdk1.8.0_171?
2.export?JRE_HOME=$JAVA_HOME/jre??
3.export?PATH=$PATH:$JAVA_HOME/bin??
4.export?CLASSPATH=./:$JAVA_HOME/lib:$JAVA_HOME/jre/lib??
只配置这个即可
export PATH="/usr/local/src/java/bin:$PATH"
使配置文件生效
?source /etc/profile
(2)安装Mysql,并且启动
检查是否安装MySQL rpm -qa | grep mysql
查看可安装的MySQL版本 yum list | grep mysql
安装MySQL yum install -y mysql-server mysql mysql-devel
Mysql首次启动 service mysqld start
设置新密码 mysqladmin -u root password
重启mysql service mysqld restart
进入mysql mysql -u root -p
设置mysql允许远程连接 GRANT ALL PRIVILEGES ON . TO root@‘%‘ IDENTIFIED BY ‘xxxxxxx‘ WITH GRANT OPTION;
自启动
chkconfig mysql on
数据库的不区别大小写设置
/etc/my.cnf中的[mysqld]后添加添加lower_case_table_names=1,重启MYSQL服务
发现中文查询数据库有问题,数据库设置没配好
修改my.cnf?
(3)利用putty的pspc上传文件
下载pscp.exe https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
cmd运行:pscp C:\Users\lenovo\Downloads\Compressed\apache-tomcat-7.0.86.tar.gzbr/>root@xxxx:/
(4)安装tomcat
下载tomcat
新建目录: mkdir /usr/local/tomcat
拷贝tomcat cp apache-tomcat-7.0.86.tar.gz /usr/local/tomcat/
解压 cd /usr/local/tomcat/
tar -zxvf apache-tomcat-7.0.86.tar.gz
启动 cd /usr/local/tomcat/apache-tomcat-7.0.86/bin/
./startup.sh
编辑 catalina.sh
JAVA_OPTS="-Xms512m -Xmx1024m -Xss1024K -XX:PermSize=512m -XX:MaxPermSize=1024m"
export TOMCAT_HOME=/usr/local/tomcat/apache-tomcat-7.0.86/
export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-7.0.86/
export JAVA_HOME=/usr/java/jdk1.8.0_171
export PATH=$PATH:$JAVA_HOME/bin?
export CLASSPATH=$JAVA_HOME/lib?
开机自启动
export CATALINA_HOME case "$1" in start) echo "Starting Tomcat..." $CATALANA_HOME/bin/startup.sh ;; stop) echo "Stopping Tomcat..." $CATALANA_HOME/bin/shutdown.sh ;; restart) echo "Stopping Tomcat..." $CATALANA_HOME/bin/shutdown.sh sleep 2 echo echo "Starting Tomcat..." $CATALANA_HOME/bin/startup.sh ;; *) echo "Usage: $prog {start|stop|restart}" ;; esac exit 0
chkconfig --add tomcat
chkconfig tomcat on
标签:linux部署
原文地址:http://blog.51cto.com/10913595/2112853