在RedHat上安装gcc,java 和 eclipse-rcp
本文全是如何用rpm包在红帽子54上安装gcc,automake,java和eclipse等,不是源代码编译,请大家不要误会了。
其实通过rpm包安装东西很简单,麻烦的是有很多rpm是要根据顺序进行先后安装的,你找半天才能追溯到要先装哪一个rpm包,非常繁琐。
所以这篇文章就是我在实际中记录了正确的先后顺序,跟着安装就可以了,免去了不断查找依赖rpm的麻烦。
废话不说,这是我的实践帖,没有太多时间整理,当中也不免废话,放在这里权当做个笔记吧。
1 Install gcc and automake:
1) For gcc-4.1.2.44:
rpm -ivh libgomp-4.3.2-7.el5.x86_64.rpm
rpm -ivh kernel-headers-2.6.18-128.el5.x86_64.rpm
rpm -ivh glibc-headers-2.5-34.x86_64.rpm
rpm -ivh glibc-devel-2.5-34.x86_64.rpm
rpm -ivh gcc-4.1.2-44.el5.x86_64.rpm
2) After step 1, for gcc-c++-4.1.2.44
rpm -ivh libstdc++-devel-4.1.2-44.el5.x86_64.rpm
rpm -ivh gcc-c++-4.1.2-44.el5.x86_64.rpm
3. After step 2, for automake-1.9.6-2.1.noarch.rpm
rpm -ivh imake-1.0.2-3.x86_64.rpm
rpm -ivh autoconf-2.59-12.noarch.rpm
rpm -ivh automake-1.9.6-2.1.noarch.rpm
2 java && mysql:
红帽子光盘里面有如下的java RPM包:
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64.rpm
java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115.i386.rpm
java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115.x86_64.rpm
java-1.4.2-gcj-compat-javadoc-1.4.2.0-40jpp.115.x86_64.rpm
java-1.4.2-gcj-compat-src-1.4.2.0-40jpp.115.x86_64.rpm
java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5.x86_64.rpm
java-1.6.0-openjdk-demo-1.6.0.0-1.2.b09.el5.x86_64.rpm
java-1.6.0-openjdk-devel-1.6.0.0-1.2.b09.el5.x86_64.rpm
java-1.6.0-openjdk-javadoc-1.6.0.0-1.2.b09.el5.x86_64.rpm
java-1.6.0-openjdk-src-1.6.0.0-1.2.b09.el5.x86_64.rpm
javacc-4.0-3jpp.3.x86_64.rpm
javacc-demo-4.0-3jpp.3.x86_64.rpm
javacc-manual-4.0-3jpp.3.x86_64.rpm
java_cup-0.10-0.k.6jpp.1.x86_64.rpm
java_cup-javadoc-0.10-0.k.6jpp.1.x86_64.rpm
java_cup-manual-0.10-0.k.6jpp.1.x86_64.rpm
红帽子光盘里面有如下的MySQL RPM包:
mysql-5.0.77-3.el5.i386.rpm
mysql-5.0.77-3.el5.x86_64.rpm
mysql-bench-5.0.77-3.el5.x86_64.rpm
mysql-connector-odbc-3.51.26r1127-1.el5.x86_64.rpm
mysql-devel-5.0.77-3.el5.i386.rpm
mysql-devel-5.0.77-3.el5.x86_64.rpm
mysql-server-5.0.77-3.el5.x86_64.rpm
mysql-test-5.0.77-3.el5.x86_64.rpm
2.1 to install mysql-server-5.0.77-3.el5.x86_64.rpm:
=====================================================================
如果是MySQL-server-community-5.1.53-1.rhel5.x86_64.rpm(即community版本),就不需要后面那些prerequisite,连mysql-5.****都不需要,安装MySQL-server-community-5.1.53-1.rhel5.x86_64.rpm后,有提示为:
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
Starting MySQL.[ OK ]
Giving mysqld 2 seconds to start
=====================================================================
perl-DBD-MySQL and mysql is needed by mysql-server-5.0.77-3.el5.x86_64
first:
[root@localhost Server]# rpm -ivh mysql-5.0.77-3.el5.x86_64.rpm
warning: mysql-5.0.77-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
perl(DBI) is needed by mysql-5.0.77-3.el5.x86_64
then install rpm -ivh perl-DBI-1.52-2.el5.x86_64.rpm,
then mysql-5.0.77-3.el5.x86_64.rpm is ok.
Second:
rpm -ivh perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm
then mysql-server-5.0.77-3.el5.x86_64.rpm is ok.
3 Get eclipse-rcp-3.2.1-19.el5.x86_64.rpm and eclipse-rcp-sdk-3.2.1-19.el5.x86_64.rpm
About rcp: http://www.enet.com.cn/article/2007/1023/A20071023879905.shtml ,http://derekop.javaeye.com/blog/609087 ,http://www.enet.com.cn/article/2007/0320/A20070320492442.shtml
3.1 [root@localhost Server]# rpm -ivh eclipse-rcp-3.2.1-19.el5.x86_64.rpm
warning: eclipse-rcp-3.2.1-19.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
/usr/bin/rebuild-gcj-db is needed by eclipse-rcp-3.2.1-19.el5.x86_64
/usr/lib64/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64_3.2.1.v3235.jar is needed by eclipse-rcp-3.2.1-19.el5.x86_64
java-gcj-compat >= 1.0.64 is needed by eclipse-rcp-3.2.1-19.el5.x86_64
libgcj >= 4.0.2 is needed by eclipse-rcp-3.2.1-19.el5.x86_64
libgcj_bc.so.1()(64bit) is needed by eclipse-rcp-3.2.1-19.el5.x86_64
libswt3-gtk2 = 1:3.2.1-19.el5 is needed by eclipse-rcp-3.2.1-19.el5.x86_64
rebuild-gcj-db is in gcj (GNU compiler for Java), then you need:
about gcj: http://blogs.gaixie.org/tommy/?p=46 andhttp://wenku.baidu.com/view/b8941223192e45361066f5b0.html
3.2 get gcc-java-4.1.2-46.el5.x86_64.rpm:
3.2.1 [root@localhost Server]# rpm -ivh gcc-java-4.1.2-46.el5.x86_64.rpm
warning: gcc-java-4.1.2-46.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
libgcj = 4.1.2-46.el5 is needed by gcc-java-4.1.2-46.el5.x86_64
libgcj-devel = 4.1.2-46.el5 is needed by gcc-java-4.1.2-46.el5.x86_64
libgcj-tools.so.7rh()(64bit) is needed by gcc-java-4.1.2-46.el5.x86_64
libgcj.so.7rh()(64bit) is needed by gcc-java-4.1.2-46.el5.x86_64
libgij.so.7rh()(64bit) is needed by gcc-java-4.1.2-46.el5.x86_64
then
3.2.2 [root@localhost Server]# rpm -ivh libgcj-4.1.2-46.el5.x86_64.rpm
warning: libgcj-4.1.2-46.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libgcj ########################################### [100%]
3.2.3 [root@localhost Server]# rpm -ivh libgcj-devel-4.1.2-46.el5.x86_64.rpm
warning: libgcj-devel-4.1.2-46.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
zlib-devel is needed by libgcj-devel-4.1.2-46.el5.x86_64
/usr/lib64/libz.so is needed by libgcj-devel-4.1.2-46.el5.x86_64
[root@localhost Server]# rpm -ivh zlib-devel-1.2.3-3.x86_64.rpm
warning: zlib-devel-1.2.3-3.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:zlib-devel ########################################### [100%]
[root@localhost Server]#
[root@localhost Server]# rpm -ivh libgcj-devel-4.1.2-46.el5.x86_64.rpm
warning: libgcj-devel-4.1.2-46.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libgcj-devel ########################################### [100%]
Then gcc-java-4.1.2-46.el5.x86_64.rpm is ok.
3.3 Get libswt3-gtk2-3.2.1-19.el5.x86_64.rpm
[root@localhost Server]# rpm -ivh libswt3-gtk2-3.2.1-19.el5.x86_64.rpm
warning: libswt3-gtk2-3.2.1-19.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
/usr/bin/rebuild-gcj-db is needed by libswt3-gtk2-3.2.1-19.el5.x86_64
java-gcj-compat >= 1.0.64 is needed by libswt3-gtk2-3.2.1-19.el5.x86_64
in rh5.4 dvd, there only java-1.4.2-gcj-* packages, no for java-1.6.0.
and java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64.rpm need jpackage-utils in dvd.
too many to do in a cycle.
So you should use –nodeps option now.
Follow my steps:
3.3.1 [root@localhost Server]# rpm -ivh java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64.rpm
warning: java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
gjdoc is needed by java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64
now you use:
rpm -ihv --nodeps antlr-2.7.6-4jpp.2.x86_64.rpm (antlr need by gjdoc)
rpm -ivh --nodeps gjdoc-0.7.7-12.el5.x86_64.rpm
now java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64.rpm is ok.
Then rpm -ivh libswt3-gtk2-3.2.1-19.el5.x86_64.rpm is ok.
Then rpm -ivh eclipse-rcp-3.2.1-19.el5.x86_64.rpm is ok J
Also, then eclipse-rcp-sdk-3.2.1-19.el5.x86_64.rpm can be installed.
在RedHat上安装gcc,java 和 eclipse-rcp的更多相关文章
- CentOS 5.6 安装Oracle Java 和 Eclipse
1.卸载原有OpenJDK 1. 使用java -version查看当前Java版本信息 2. 使用rpm -qa | grep java 列出所有被安装的java rpm package ...
- windows上搭建svn 、 Eclipse上安装svn插件 、 eclipse中如何使用svn
折腾了许久终于搞出来了. svn搭建 一.svn概述 SVN就是用于多个人共同开发同一个项目,共用资源的目的,该文描述了把svn搭建在本地上,和搭建在Eclipse4.5.2上. 二.svn分类 分为 ...
- 在centos7上安装gcc、node.js(源码下载)
一.在centos7中安装node.js https://www.cnblogs.com/lpbottle/p/7733397.html 1.从源码下载Nodejs cd /usr/local/src ...
- windows上安装gcc/g++环境(MinGW,msys64等)
1 前言 经过折腾安装gcc环境,记录一下 2 工具 MinGW安装器: 下载地址1:MinGW官网 下载地址2:SourceForge (MinGW w64) 下载地址3:win-builds-1 ...
- MAC上安装GCC失败
问题 在用brew安装GCC时, 报了如下错误. ➜ ~ brew install gcc ==> Installing dependencies for gcc: isl, mpfr and ...
- centos上安装配置java WEB环境_java(转)
趁着十一期间,好好的写写随笔来记录自己所学.所践和所得,不足之处,欢迎各位拍砖~~~ 工具:Xftp 5.Xshell 5 一.安装jdk 1. 使用Xftp 5把jdk-8u65-linux-x64 ...
- Ubuntu上安装配置Java环境
参考文献:在Ubuntu 14.04中安装JDK 方法一: @ 安装 1. 添加PPA repository系统 PPA repository介绍 $sudo add-apt-repository p ...
- Mac 上安装 GCC
https://www.zhihu.com/question/20588567 安装 添加bin路径到$PATH变量
- 在centos和redhat上安装docker
前置条件 64-bit 系统 kernel 3.10+一.检查内核版本,返回的值大于3.10即可 $ uname -r 二.使用 sudo 或 root 权限的用户登入终端 三.卸载旧版本(如果安装过 ...
随机推荐
- qt-creator astyle Peizhi
--style=ansi -s4 --pad-oper -S -N -L -m0 --add-brackets -M40 --suffix=none --convert-tabs %{CurrentD ...
- Effective Scala
Effective Scala Marius Eriksen, Twitter Inc.marius@twitter.com (@marius)[translated by hongjiang(@ho ...
- MongoDB aggregate 运用篇 个人总结
最近一直在用mongodb,有时候会需要用到统计,在网上查了一些资料,最适合用的就是用aggregate,以下介绍一下自己运用的心得.. 别人写过的我就不过多描述了,大家一搜能搜索到N多一样的,我写一 ...
- Git 配置
在 windows 上安装完 Git 会右键菜单中看到 Git 的快捷打开选项, 点 Git Bash Here 就可以在当前目录下打开 Git 的命令行 Git shell,初次使用 Git 先配置 ...
- 【Python②】python之首秀
第一个python程序 再次说明:后面所有代码均为Python 3.3.2版本(运行环境:Windows7)编写. 安装配置好python后,我们先来写第一个python程序.打开IDLE (P ...
- Bootstrap <基础十八>面包屑导航(Breadcrumbs)
面包屑导航(Breadcrumbs)是一种基于网站层次信息的显示方式.以博客为例,面包屑导航可以显示发布日期.类别或标签.它们表示当前页面在导航层次结构内的位置. Bootstrap 中的面包屑导航( ...
- 机器学习相关的Awesome系列
Index Awesome 备注 1 Awesome Machine Learning 机器学习资源大全中文版 2 Awesome Artificial Intelligence 人工智能 3 Awe ...
- 5、jvm内存回收——算法
判定垃圾方法: 1.引用计数法:相互循环应用解决不了 2.根搜索算法: 垃圾搜集算法 1.标记--清除算法 2.复制算法 3.标记--整理算法 4.分代算法
- java 抓取网页图片
import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.Out ...
- 开源一个网络图片浏览器HooPhotoBrowser
在公司开发项目中需要弹出展示从网络上下载的图片,并提供滑动展示功能.目前采用同事开发的图片浏览器,后期有时间想优化一下.所以重温了下以前开发的类似微博的项目中的图片浏览器代码,并抽取出来封装成了现在这 ...