博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
局域网内,在Linux 安装MySQL,部署Java Web应用(一)
阅读量:4030 次
发布时间:2019-05-24

本文共 8990 字,大约阅读时间需要 29 分钟。

趁记忆还热,还是把他download下来吧。

1.拿到远程服务器的Ip,和ssh端口号,以及一个账号和密码。
2.打开Putty,登录过去。
3.此时已经连过去了,当前局域网内,我连接的主机IP尾号为101.我的Tomcat需要装在这一台上。但是我的MySQL需要装在Ip尾号为102的这台机子。
4.安装Tomcat还折腾了很久,主要原因是不能启动。后来才知道,当前环境内,已经有几个tomcat了。所以需要该端口,需要端口影射,这个我的确不会,由他们的Administrator代劳,我后续在研究。
5.准备MySQL相关文件。可以到这里下载自己需要的。
6.开始上传。我用SSHSecureShellClient直接拖过去的。这个安装以后,图形化操作,很方便。
7.此时我连接的服务器主机,就是101这台机子就已经准备好文件了。这个过程,出现了很多accident。想都没想就直接Transfer 32位的rpm软件包。后来发现安装不上。所以.
8.用下列的命令查看当前的机子的机器位数:

getconf LONG_BIT 或者 file /bin/ls

9.然后开始scp文件。scp 命令用来在局域网内传送文件,很方便。

 

scp MySQL-5.5.36-1.el6.x86_64.rpm-bundle.tar root@192.168.10.102:~(这里是home目录)

10.文件传过去以后,想办法访问局域网内102那太机子。找人指点以后,用ssh命令。

ssh root@192.168.10.102 (输入root密码,这里是root账号)

 

11.先上一张图。看看我目前的102机子。

12.进入相应目录,开始安装。命令

rpm -ivh MySQL-server*.rpm

 

rpm -ivh MySQL-client*.rpm

13.麻烦来了,出现一大堆错误。

 rpm -ivh MySQL-server-5.5.36-1.el6.x86_64.rpm

Preparing...                ########################################### [100%]

        file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.5.36-1.el6.x86                                  _64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.5.36-1.el6.x86_                                  64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.5.36-1.el6.x86_64 c                                  onflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.5.36-1.el6.x86_                                  64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.5.36-1.el6.x86                                  _64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64 c                                  onflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64 c                                  onflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64 c                                  onflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_                                  64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x                                  86_64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_                                  64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86                                  _64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_6                                  4 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_64                                   conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

        file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.5.36-1.el6.x86_                                  64 conflicts with file from package mysql-libs-5.1.67-1.el6_3.x86_64

 

大概意思是,我安装的MySQL与机器上的MySQL冲突了。可是我刚刚试过了,找不到该机器上的MySQL。所以

 rpm -qa | grep mysql

[root@mz2 x86_64]# rmp -ev mysql-libs-5.1.67-1.e16_3.x86_64

-bash: rmp: command not found

[root@mz2 x86_64]# rpm  -ev mysql-libs-5.1.67-1.e16_3.x86_64

error: package mysql-libs-5.1.67-1.e16_3.x86_64 is not installed

[root@mz2 x86_64]# rpm  -ev MySQL-devel-5.5.36-1.el6.x86_64.rpm

error: package MySQL-devel-5.5.36-1.el6.x86_64.rpm is not installed

 

找到了该rpm,但是又不能卸载。
14.Yum试试看。

yum remove mysql-libs-5.1.67-1.el6_3.x86_64

yum能够删除。过程中,出现一个对话选择,输入y。然后就删除了。

再次 rpm -qa | grep mysql 就已经没有了。
再次删除系统上残留的相关mysql文件。
删除残留的MySQL配置文件
rm -rf /etc/init.d/mysql
15.然后开始安装,几乎坦途。一张图说明一切。
16.启动mysql服务,测试MySQL
service mysql start
mysql -uroot -p
17.终于此....

 

 

 

 

你可能感兴趣的文章
PaperDownloader——文献命名6起来
查看>>
PaperDownloader 1.5.1——更加人性化的文献下载命名解决方案
查看>>
如何将PaperDownloader下载的文献存放到任意位置
查看>>
C/C++中关于动态生成一维数组和二维数组的学习
查看>>
系统架构:Web应用架构的新趋势---前端和后端分离的一点想法
查看>>
JVM最简生存指南
查看>>
漂亮的代码,糟糕的行为——解决Java运行时的内存问题
查看>>
Java的对象驻留
查看>>
自己动手写GC
查看>>
Java 8新特性终极指南
查看>>
logback高级特性使用(二) 自定义Pattern模板
查看>>
JVM并发机制探讨—内存模型、内存可见性和指令重排序
查看>>
可扩展、高可用服务网络设计方案
查看>>
如何构建高扩展性网站
查看>>
微服务架构的设计模式
查看>>
持续可用与CAP理论 – 一个系统开发者的观点
查看>>
nginx+tomcat+memcached (msm)实现 session同步复制
查看>>
c++指针常量与常量指针详解
查看>>
c++字符数组和字符指针区别以及str***函数
查看>>
c++的string类初始化及其常用函数
查看>>