rpm/yum适用于Redhat、CentOS、Suse等平台;apt-get/dpkg适用于Debian、Ubuntu等平台;zypper适合于Suse平台。
rpm常用命令
rpm -ivh 软件包名称
rpm -uvh 软件包名称
rpm -e 软件名称
rpm -qa | grep 软件名称
rpm -ql 软件名称
rpm -qf 文件绝对路径
http://rpmfind.net/
yum常用命令(Redhat安装rpm包)
yum repolist
yum install 软件名称 yum -q install /usr/bin/iostat
yum update
yum remove 软件名称
yum list
yum search 关键词
yum info package
yum localinstall *.rpmyum install oracle-validated配置yum源
mount /dev/cdrom /mntmount
vi /etc/yum.repos.d/oinstall.repo
[oracle-install]
name=oracle-install
baseurl=file:///mnt/Server
gpgcheck=0
enabled=1
然后执行yum makecache
apg-get常用命令(Ubantu安装deb包)
注释掉/etc/apt/apt.conf
修改/etc/apt/sources.list
apt-get update
apt-get install clang
apt-get remove package
apt-cache show package
apt-cache search filename
dpkg -l
dpkg -L package
zypper常用命令(Suse)
添加11.3的官方软件和升级源
zypper ar http://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/11.3/repo/oss/suse main
zypper ar http://download.opensuse.org/distribution/11.3/repo/non-oss/suse/ nonoss
zypper ar http://download.opensuse.org/update/11.3/suse update
zypper refresh
zypper install package_name
zypper remove package_name
zypper update package_name
设置proxy server:
export http_proxy="http://sam:xxx@proxycn.abc.com"
export https_proxy="https://sam:xxx@proxycn.abc.com"
export no_proxy=.abc.com
scp -r gmd@192.186.0.1:/opt/t1_dir .