centos6.8安装gcc
- 下载rpm包:rpm包地址连接
需要下载的包分别为:
ppl-0.10.2-11.el6.x86_64.rpm
cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
mpfr-2.4.1-6.el6.x86_64.rpm
cpp-4.4.7-17.el6.x86_64.rpm
kernel-headers-2.6.32-642.el6.x86_64.rpm
glibc-headers-2.12-1.192.el6.x86_64.rpm
glibc-devel-2.12-1.192.el6.x86_64.rpm
libgomp-4.4.7-17.el6.x86_64.rpm
gcc-4.4.7-17.el6.x86_64.rpm
libstdc++-devel-4.4.7-17.el6.x86_64.rpm
gcc-c++-4.4.7-17.el6.x86_64.rpm
- 按步骤安装对应的rpm包
rpm -ivh kernel-headers-2.6.32-642.el6.x86_64.rpm
rpm -ivh libgomp-4.4.7-17.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.7-17.el6.x86_64.rpm
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh cpp-4.4.7-17.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.192.el6.x86_64.rpm
rpm -ivh glibc-headers-2.12-1.192.el6.x86_64.rpm
rpm -ivh gcc-4.4.7-17.el6.x86_64.rpm
rpm -ivh gcc-c++-4.4.7-17.el6.x86_64.rpm
在安装的过程中如果遇到:
- file xxx from install of A_file conflicts with file from B_file
该问题表示该包冲突:yum -y remove B_file
- 检测安装改包需要依赖A_file:
该问题说明当前安装的的rpm缺少这个依赖A_file,需要先安装这个A_file在继续安装rpm包
centos安装jdk
- 查看系统已安装的openjdk包
rpm -qa|grep jdk
- 卸载响应的openjdk包
rpm -e --nodeps package_name
- 下载对应版本的jdk包
- 解压对应版本的jdk包到对应的目录:
tar -zxvf jdk_package -C /usr/java
- 配置环境变量
vim /etc/profile
export JAVA_HOME=/xxx/xxx/xxx
export CLASSPATH=.:$JAVA_HOME/lib/rt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
- 刷新环境变量
source /etc/profile
tomcat报错问题
1. java.lang.OutOfMemoryError: PermGen space
找到tomcat/bin目录下的catalina.sh文件并编辑在首行添加:
JAVA_OPTS="-server -Xms800m -Xmx800m -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128m -Djava.awt.headless=true "
2.validateJarFile-jar not loaded
出现这个问题则是由于对应的jar发生了冲突的问题:
删除发生冲突的jar,然后重新发布项目