LINUX命令大全软件安装命令
linux:linux软件安装命令
[root@test /root]# md5sum [-bct] filename
[root@test /root]# md5sum [--status|--warn] --check filename
参数说明:
-b :使用 binary 的读档方式,预设为 Windows/DOS 档案型态的读取方式;
-c :检验 md5sum 档案指纹;
-t :以文字型态来读取 md5sum 的档案指纹。
范例:
[root@test /root]# md5sum grep-2.5.1-7.8.i386.rpm
5a0c3fcfcd4c3f937644b8cd71a0cf89 grep-2.5.1-7.8.i386.rpm
# 看!显示的编码是否与上面相同呢?!赶紧测试看看!
tar.gz源代码包安装方式
#1. 解压缩,并阅读一下 ntp 底下的 README 与 INSTALL:
[root@test root]# cd /usr/local/src
[root@test src]# tar -zxvf /root/ntp-4.1.2.tar.gz
# 这个步骤会让原始码解开成为 /usr/local/src/ntp-4.1.2 这个目录
# 2. 进入原始码所在目录,并且查阅如何安装的技巧:
[root@test src]# cd ntp-4.1.2
[root@test ntp-4.1.2]# vi INSTALL ( 或 vi README)
# 3. 开始设定参数、编译与安装:
[root@test ntp-4.1.2]# ./configure --help | more
# 上面这个动作可以察看一下可用的参数!
[root@test ntp-4.1.2]# ./configure --prefix=/usr/local/ntp \
> --enable-all-clocks --enable-parse-clocks
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
(略)
configure: creating ./config.status
config.status: creating Makefile
# 一般来说 configure 设定参数较重要的就是那个 --prefix=/path 了,
# --prefix 后面接的路径就是『这个软件未来要安装到那个目录去?』
# 如果您没有指定 --prefix=/path 这个参数,通常预设参数就是 /usr/local
# 至于其它的参数意义就得要参考 ./configure --help 了!
# 这个动作完成之后会产生 makefile 或 Makefile 这个档案
# 当然啦,这个侦测检查的过程会显示在屏幕上,特别留意关于 gcc 的检查,
# 还有最重要的是最后需要成功的建立起 Makefile 才行!(上面最后一行)
[root@test ntp-4.1.2]# make clean ; make
[root@test ntp-4.1.2]# make check
[root@test ntp-4.1.2]# make install
# 将数据给他安装在 /usr/local/ntp 底下
[root@test ntp-4.1.2]# make uninstall
# 卸载软件.
有些软件包的源代码编译安装后可以用make uninstall命令卸载。如果不提供此功能,则软件的卸载必须手动删除。由于软件可能将文件分散地安装在系统的多个目录中,往往很难把它删除干净,应该在编译前进行配置。
RPM包安装方式
xxxxxxxxx.rpm <==RPM 的格式,已经经过编译且包装完成的 rpm 档案;
xxxxx.src.rpm <==SRPM的格式,包含未编译的原始码信息。
rp-pppoe - 3.1 - 5 . i386 .rpm
软件名称 版本信息 编译的次数 适合的硬件平台 附文件名
[root@test root]# rpm -ivh rp-pppoe-3.1-5.i386.rpm
Preparing... ####################################