yum/rpm包卸载和安装

JDK example:

0. Remove jdk1.4.2 if exist
rpm -qa | grep jdk
rpm -qa | grep gcj (list the installed jdk)
yum -y remove java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
1. Download jdk-6u45-linux-i586.bin from http://www.oracle.com/technetwork/java/javasebusiness/downloads
2. mkdir /usr/developer, copy bin file to this folder
3. Go to jdk folder path in terminal
4. chmod 755 jdk-6u45-linux-i586.bin
5. ./jdk-6u45-linux-i586.bin
6. vim /etc/profile
#set java environment
JAVA_HOME=/usr/developer/jdk1.6.0_45
CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
export JAVA_HOME CLASSPATH PATH
7. source /etc/profile

Mysql example:
1. 检查是否有已经安装的mysql的rpm
rpm -qa | grep -i mysql
2. 如果有的话, 删除已经安装的mysql的rpm, xxx为第一步中搜到的.
rpm -e --nodeps xxx
3. Download server and client RPMs from http://dev.mysql.com/downloads/mysql/#downloads
包含server和client两个,注意支持的操作系统版本, 下面是支持CentOS6 32bit的.
MySQL-server-5.6.14-1.el6.i686.rpm
MySQL-client-5.6.14-1.el6.i686.rpm
4. Install MySQL server and client
rpm -ivh MySQL-server-5.6.14-1.el6.i686.rpm
rpm -ivh MySQL-client-5.6.14-1.el6.i686.rpm
5. Start MySQL service
service mysql start
5.1 Check mysql status
netstat -natpl
3306 port is listed, means it starts successfully.
6. Log in MySQL by client
get the password in /root/.mysql_secret
mysql -uroot -p
input the temp password in /root/.mysql_secret, xxx为新密码.
set password=password('xxx');
set password before execute other statement.
7. Add remote access, 看情况而定这部的设置
GRANT ALL PRIVILEGES ON *.* to root@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
FLUSH PRIVILEGES;
*.* means all databases and the tables, the first root is the user name, the second root is the password, % means all remote client can access.
select Host,User from user
check the % is listed in Host for user root.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值