阿里云
操作系统:centos 6.5
JDK
1.下载jdk
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/xxxx/xxx.rpm
由于oracle页面下载是需要cookie,所以wget下载是需要加上
--no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"
2.安装
rpm -ivh *.rpm
3.设置环境变量
JAVA_HOME=/usr/java/jdk1.8.0_91
CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
export PATH CLASSPATH JAVA_HOME
mysql
安装、启动
1.yum安装
centos6 更新yum
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
install
yum install mysql-server
安装默认路径
/var/lib/mysql
2.启动
service mysqld start
登录mysql
mysql -uroot -p
修改root密码
set password for 'root'@'localhost'=password('xxxx');
创建数据库
CREATE DATABASE IF NOT EXISTS xxxx_db DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
创建用户
create user 'xxxxms'@'localhost' identified by 'xxxx';
更新远程访问
user mysql;
update user set host='%' where user='xxxxms';
授权
赋予任何主机访问数据的权限
grant all privileges on *.* to 'xxxxms'@'%'with grant option;
赋予任何主机访问数据的权限和密码
grant all privileges on *.* to 'xxxxms'@'%'identified by 'xxxx' with grant option;
生效
flush privileges;
设置表名是否区分大小写
1.修改mysql配置文件
vi /etc/my.conf
2.添加lower_case_table_names=1
3.重启
mysql: service mysql restart
注意:lower_case_table_names=1需加在socket=/var/lib/mysql/mysql.sock之后
1.导出sql脚本
使用工具导出sql脚本
2.导入sql脚本
运行脚本
提示:如果提示ON UPDATE错误,则检查sql中的date字段默认为当前时间。例如NULL UPDATE
tomcat
1.tomcat下载
tomcat各版本下载地址
http://archive.apache.org/dist/tomcat/
下载
wget http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.65/bin/apache-tomcat-7.0.65.tar.gz
2.解压
tar -xvf apache-tomcat-7.0.65.tar.gz
3.修改文件名
mv apache-tomcat-7.0.65 tomcat_xxx