mysql安装
版本: 5.7.11
1.下载地址
2.解压
tarzxvf mysql-5.7.11-linux-glibc2.5-x86_64.tar
mvmysql-5.7.11-linux-glibc2.5-x86_64 /usr/local/mysql
mkdirdata
groupaddmysql
useradd-r -g mysql mysql
chown-R mysql:mysql ./
cpmysql.server /etc/rc.d/init.d/mysql
cp my-default.cnf /etc/my.cnf
3.配置数据库文件
vi /etc/my.cnf
socket = /tmp/mysql.sock
skip-grant-tables
basedir=/usr/local/mysql
4.初始化数据库
./mysqld --initialize --user=mysql --basedir=/usr/local/mysql
5.启动数据库进程
./mysqld_safe --user=mysql &
6.添加环境变量
vi /etc/profile
exportPATH=/etc/init.d:$PATH
exportPATH=/usr/local/mysql:$PATH
exportPATH=/usr/local/mysql/bin:$PATH
exportPATH=/usr/local/mysql/data:$PATH
source /etc/profile
7.登录数据库
mysql -u root
mysql>use mysql
mysql>flush privileges;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "123456";
mysql>flush privileges;
Redis安装
版本:3.2.3
1.下载地址
wget http://download.redis.io/releases/redis-3.2.3.tar.gz
2.解压
$ tar -zxvf redis-3.2.3.tar.gz
3.安装
$ cd redis-3.2.3
$ make
$ make install
4.启动
$ cd src
$ redis-server &
Tomcat安装
版本:8.5.6
1.下载tomcat
2.解压
tar -zxvf apache-tomcat-8.5.6.tar.gz
3.启动
mv apache-tomcat-8.5.6.tar.gz /tomcat
cd /tomcat/bin/
4.运行tomcat
./startup.sh
jdk安装
版本:1.8
1.下载jdk
http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-downloads-1880260.html
2.解压
tar -zxvf jdk-8u65-linux-x64.gz
3.添加环境变量
vi /etc/profile
4.在最后添加如下
export JAVA_HOME=/usr/local/src/jdk1.8.0_65
exportJRE_HOME=/usr/local/src/jdk1.8.0_65/jre
exportPATH=$PATH:/usr/local/src/jdk1.8.0_65/bin
exportCLASSPATH=./:/usr/local/src/jdk1.8.0_65/lib:/usr/local/src/jdk1.8.0_65/jre/lib
war包部署tomcat
cp xxx.war到/tomcat/webapps/路径下即可。
网友评论