Linux软件包安装(rpm、yum、apt-get)

时间:2020-12-12 13:33:24

Linux软件包安装(rpm、yum、apt-get)

Linux软件包安装(rpm、yum、apt-get)


http://m.blog.csdn.net/suixin788/article/details/52555558   Linux的发行版之间的联系和区别

http://m.blog.csdn.net/wanghui499917270/article/details/7265961   几种linux发行版的使用经验之谈

http://m.blog.csdn.net/u013752202/article/details/53648823   图解Android和Linux发行版的区别


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 *.rpm
yum install oracle-validated


配置yum源

mount /dev/cdrom /mnt
mount
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 .

Linux软件包源码下载:
http://download.chinaunix.net/    

升级gcc 4.4.7
http://blog.csdn.net/force_eagle/article/details/5203578