1.rpm包安装
rpm包:noarch(通用)搜索网址:http://rpm.pbone.net
1) 出现问题:
Header V3 RSA/HSA256 Signature key ID
Header V3 DSA signature: NOKEY, key ID
解决:rpm --import /etc/pki/rpm-gpg/RPM*
2) 出现问题:
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
解决:root目录
3)使用:
安装: rpm -ivh *.rpm
rpm -ivh /usr/src/regflag/RPMS/i386/Filename.rpm
--nodeps 不检查依赖性关系
--force 忽略软件包及文件的冲突make
搜索: rpm -qa | grep
更新: rpm –Uvh卸载: rpm –e
查看: rpm –qil
源包: rpm --rebuild Filename.src.rpm
2.yum包安装
1、先删掉自带的yum:
rpm -aq|grep yum|xargs rpm -e --nodeps2、下载需要的4个rpm(版本号可能会变动):
wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-3.2.22-37.el5.centos.noarch.rpmwget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.cen tos.i386.rpm
wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
3、安装:
rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpmrpm -ivh yum-metadata-parser-1.1.2-3.el5.
centos.i386.rpm
rpm -ivh yum-3.2.22-26.el5.centos.noarch.
rpm yum-fastestmirror-1.1.16-14.el5.
centos.1.noarch.rpm –nodeps(同时安装)
4、下载配置:
先备份系统自带的yum源:mv /etc/yum.repos.d/CentOS-Base.repo CentOS-Base.repo.bak
搜狐的yum源:
wget http://sudone.com/download/CentOS-Base.repo -O /etc/yum.repos.d/CentOS-Base.repo
网易镜像yum源:(http://mirrors.163.com/.help/centos.html)
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo -O /etc/yum.repos.d/CentOS-Base.repo
*文件中:$releasever全部替换为版本号5
5、生成缓存:
yum makecache6、设置本地yum源(/etc/yum.repos.d/*.repo文件中参加)
[rhel-debuginfo]name=Red Hat Enterprise Linux $releasever - $basearch – Debug
baseurl=file:///mnt/cdrom/XXXX)# 文件夹名仓库的位置
enabled=1 # 是否启用这个仓库,1为起用,0为禁用
gpgcheck=1 # 是否检查GPG签名(用来验证要安装的包是不是REDHAT官方的)
# rpm --import /etc/pki/rpm-gpg/RPM*
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
7、使用:
yum install package 安装指定的安装包yum update package 更新指定程序包
yum check-update package 检测升级软件包
yum remove package 检测升级软件包
yum list 列表
yum search keyword 查找软件包
yum info package 显示安装包信息
yum clean all 清除缓存header与rpm包
8、安装openoffice.org
yum groupinstall "Office/Productivity"yum list openoffice*
yum -y install openoffice.org-langpack-zh_CN
3.源代码/压缩包安装
1 .tar.gz解压缩:
tar -zxvf XXX.tar.gz2 简单安装:
./install.sh ./XXX.run3 编译安装:
./configure <=== 配置--prefix= 加目录
make <=== 编译
make install <=== 安装
make clean
make uninstall
4 gcc环境设置(安装以下文件包rpm)
kernel-headers,glibc-headers,glibc-devel,gcc-4,gcc-c++
libstdc++-devel,libgomp
5 软件包
http://sourceforge.net/