linux centos6.5 相关服务部署文档

jdk  安装

wget http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.rpm

sudo mkdir /usr/local/java

mv jdk-7u45-linux-x64.tar.gz /usr/local/java

sudo tar xvf jdk-7u45-linux-x64.tar.gz  

sudo rm jdk-7u45-linux-x64.tar.gz


/etc/profile文件追加如下文件

# jdk7 settings

JAVA_HOME=/opt/jdk1.7.0_67

JRE_HOME=$JAVA_HOME/jre

PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib

export JAVA_HOME JRE_HOME PATH CLASSPATH


source /etc/profile


echo $PATH  //查看环境变量


java -version


mysql   安装

yum check-update mysql-server  //检查可用的安装包

yum update mysql-community-release  //检查yum安装库是最新的


# wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

# rpm -ivh mysql-community-release-el6-5.noarch.rpm

# yum list | grep mysql

更新的MySQL安装包


yum install mysql-server

chkconfig mysqld on   

service mysqld start

mysql -u root

set password for root@localhost=password('root');  


mysql -u root -p   


GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'wine8888' WITH GRANT OPTION;

FLUSH PRIVILEGES;

 

mysql 升级

mysql --version 查看当前版本


# wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

# rpm -ivh mysql-community-release-el6-5.noarch.rpm

# yum list | grep mysql

跟新yum内mysql的版本

yum update mysql-community-release  保证yum源是最新的

yum check-update mysql-server   //检查可用的安装包

yum remove mysql mysql-*  卸载mysql干净

yum install mysql-server  安装

service mysqld restart

mysql_upgrade -uroot -p   升级数据库及表


Redis    安装  /usr/local/redis

$ wget http://download.redis.io/releases/redis-3.0.0.tar.gz

$ tar xzf redis-3.0.0.tar.gz

$ cd redis-3.0.0

$ make


$ src/redis-server


$ src/redis-cli

redis> set foo bar

OK

redis> get foo

"bar"


你可能感兴趣的:(redis,jdk,mysql,mysql,升级)