最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】CentOS中直接安装rpm或deb文件

CentOS crifan 10984浏览 0评论

折腾:

【未解决】CentOS 7中安装TDengine的服务器端

期间,此处CentOS7中,希望直接安装rpm文件或deb文件。

CentOS是否支持,从rpm或deb文件

install from deb file

software installation – How to install a deb file, by dpkg -i or by apt? – Unix & Linux Stack Exchange

deb的话:

sudo dpkg -i /path/to/deb/file
sudo apt-get install -f

或:

sudo apt install ./name.deb

3 Ways to Install Deb Files on Ubuntu & Remove Them Later

software installation – How do I install a .deb file via the command line? – Ask Ubuntu

dpkg –> apt-get, aptitude –> Synaptic, Software Center

[root@lin-16core3 ~]# which dpkg
/usr/bin/which: no dpkg in (/usr/lib64/qt-3.3/bin:/usr/local/java/jdk1.8.0_11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin:/root/bin)
[root@lin-16core3 ~]# which apt
/usr/bin/which: no apt in (/usr/lib64/qt-3.3/bin:/usr/local/java/jdk1.8.0_11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin:/root/bin)
[root@lin-16core3 ~]# which apt-get
/usr/bin/which: no apt-get in (/usr/lib64/qt-3.3/bin:/usr/local/java/jdk1.8.0_11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin:/root/bin)

此处CentOS 7中没有dpkg或apt

centos install from rpm file

How To Install an RPM File on Linux (CentOS/RHEL & Fedora)

sudo rpm –i sample_file.rpm
sudo yum localinstall sample_file.rpm

How to Install .rpm File on CentOS/RHEL and Fedora

rpm -i package-1.2.3.rpm
yum localinstall package-1.2.3.rpm        ## CentOS, RHEL systems
dnf localinstall package-1.2.3.rpm        ## Fedora systems 

所以去用rpm或yum即可

[root@lin-16core3 ~]# which rpm
/usr/bin/rpm
[root@lin-16core3 ~]# which yum
/usr/bin/yum
[root@lin-16core3 ~]# which dnf
/usr/bin/which: no dnf in (/usr/lib64/qt-3.3/bin:/usr/local/java/jdk1.8.0_11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin:/root/bin)
[root@lin-16core3 ~]# rpm --version
RPM version 4.11.1
[root@lin-16core3 ~]# yum --version
3.4.3
  Installed: rpm-4.11.1-16.el7.x86_64 at 2017-10-20 08:52
  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2014-06-09 18:59
  Committed: Panu Matilainen <[email protected]> at 2014-03-24

  Installed: yum-3.4.3-118.el7.centos.noarch at 2017-10-20 08:53

  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2014-06-27 11:07

  Committed: Karanbir Singh <[email protected]> at 2014-06-27

  Installed: yum-plugin-fastestmirror-1.1.31-24.el7.noarch at 2017-10-20 08:53

  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2014-06-10 07:49

  Committed: Valentina Mukhamedzhanova <[email protected]> at 2014-02-14

有rpm和yum,没有dnf

[root@lin-16core3 tdengine]# ls -lh
total 5.2M
-rw-r--r-- 1 root root 5.2M Feb 28 21:27 TDengine-server-1.6.5.5-Linux-x64.rpm
[root@lin-16core3 tdengine]# yum localinstall TDengine-server-1.6.5.5-Linux-x64.rpm 
Loaded plugins: fastestmirror
Examining TDengine-server-1.6.5.5-Linux-x64.rpm: TDengine-1.6.5.5-3.x86_64
Marking TDengine-server-1.6.5.5-Linux-x64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package TDengine.x86_64 0:1.6.5.5-3 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================

Package          Arch           Version            Repository                                  Size

=====================================================================================================

Installing:

TDengine         x86_64         1.6.5.5-3          /TDengine-server-1.6.5.5-Linux-x64          13 M

Transaction Summary

=====================================================================================================

Install  1 Package

Total size: 13 M

Installed size: 13 M

Is this ok [y/d/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : TDengine-1.6.5.5-3.x86_64                                                         1/1

Start to install TDEngine…

Created symlink from /etc/systemd/system/multi-user.target.wants/taosd.service to /etc/systemd/system/taosd.service.

TDengine is installed successfully!

To configure TDengine : edit /etc/taos/taos.cfg

To start TDengine     : sudo systemctl start taosd

To access TDengine    : use taos in shell

TDengine is installed successfully!

  Verifying  : TDengine-1.6.5.5-3.x86_64                                                         1/1

Installed:

  TDengine.x86_64 0:1.6.5.5-3                                                                        

Complete!

[root@lin-16core3 tdengine]#

貌似就安装好了。

【总结】

此处CentOS,支持rpm,不支持(Ubuntu/Debian的)deb

安装方式:

yum localinstall your_install_file.rpm

或:

rpm –i your_install_file.rpm

即可。

转载请注明:在路上 » 【已解决】CentOS中直接安装rpm或deb文件

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.189 seconds, using 22.07MB memory