rpm安装
1rpm不需要指定位置
/etc/
/usr/bin/
/usr/lib/:程序需要的函数库
/usr/share/doc/:基本使用手册
/usr/share/man/:帮助文件
解决依赖问题:http://www.rpmfind.net/
rpm
-h, --hash
Print 50 hash marks as the package archive is unpacked. Use with -v|--verbose for a nicer display.
-U,Upgrate
-e,erase
-q,query
-f 查询系统文件属于那个rpm包
-i,information
-p,package
-l,list
-R,requires
#> rpm -Uvh httpd.X86_64.rpm#> rpm -ql vim-enhanced //where is rpm installed/etc/profile.d/vim.csh/etc/profile.d/vim.sh/usr/bin/rvim/usr/bin/vim/usr/bin/vimdiff/usr/bin/vimtutor# rpm -qf /bin/ls //find which rpm belonging to softwarecoreutils-8.22-18.el7.x86_64#> rpm -qR vim-enhanced //which is installed/bin/shconfig(vim-enhanced) = 2:7.4.160-2.el7libacl.so.1()(64bit)libacl.so.1(ACL_1.0)(64bit)libc.so.6()(64bit)libc.so.6(GLIBC_2.11)(64bit)libc.so.6(GLIBC_2.14)(64bit)libc.so.6(GLIBC_2.15)(64bit)libc.so.6(GLIBC_2.2.5)(64bit)libc.so.6(GLIBC_2.3)(64bit)libc.so.6(GLIBC_2.3.4)(64bit)libc.so.6(GLIBC_2.4)(64bit)libc.so.6(GLIBC_2.7)(64bit)libdl.so.2()(64bit)libdl.so.2(GLIBC_2.2.5)(64bit)libgpm.so.2()(64bit)libm.so.6()(64bit)libm.so.6(GLIBC_2.2.5)(64bit)libperl.so()(64bit)libpthread.so.0()(64bit)libpthread.so.0(GLIBC_2.2.5)(64bit)libselinux.so.1()(64bit)libtinfo.so.5()(64bit)perl(:MODULE_COMPAT_5.16.3)rpmlib(CompressedFileNames) <= 3.0.4-1rpmlib(FileDigests) <= 4.6.0-1rpmlib(PayloadFilesHavePrefix) <= 4.0-1rtld(GNU_HASH)vim-common = 2:7.4.160-2.el7whichrpmlib(PayloadIsXz) <= 5.2-1
yum安装
1.网络yum源
#> vi /etc/yum.repos.d/CentOS-Base.repo //只要是repo就是yum源#> yum list //list avaliable#> yum update httpd -y //update httpd//dangerous#> yum update -y //all rpm update#> yum remove -y //even erase, don't use yum remove(use rpm -e
2.本地光盘yum
#> mount /dev/cdrom /mnt/cdrom#> mv CentOS-*.repo CentOS-*.repo.back#> mv CentOS-Medio.repo.back CentOS-Media.repo#> vi CentOS-Media.repo //改成下面的内容baesurl=file:///mnt/cdrom#file:///media/cdrom/#file:///media/cdromcorder/gpgcheck=1enablle=1#> yum list
源码包
1安装C语言编辑器
#> yum install -y gcc2.下载——wget
-b, --background
Go to background immediately after startup. If no output file is specified via the -o, output is redirected to wget-log.
-O --output-document=file
The documents will not be written to the appropriate files, but all will be concatenated together and written to file. If - is used as file, documents will be printed to standard output, disabling link conversion. (Use ./- to print to a file literally named -.)
Use of -O is not intended to mean simply "use the name file instead of the one in the URL;" rather, it is analogous to shell redirection: wget -O file http://foo is intended to work like wget -O - http://foo > file; file will be truncated immediately, and all downloaded content will be written there.
For this reason, -N (for timestamp-checking) is not supported in combination with -O: since file is always newly created, it will always have a very new timestamp. A warning will be issued if this combination is used.
Similarly, using -r or -p with -O may not work as you expect: Wget won't just download the first file to file and then download the rest to their normal names: all downloaded content will be placed in file. This was disabled in version 1.11, but has been reinstated (with a warning) in 1.11.2, as there are some cases where this behavior can actually have some use.
Note that a combination with -k is only permitted when downloading a single document, as in that case it will just convert all relative URIs to external ones; -k makes no sense for multiple URIs when they're all being downloaded to a single file; -k can be used only when the output is a regular file.
3.安装
安装之前看INSTALL(安装说明)和README(使用文档)
#> ./configuare //软件配置与检查#> make //用gcc编译成机器语言//只要不执行 make install 用下面的可以清除一切#> make clean#> make install //编译安装
本文是我根据在自学过程中的经验总结出来的,如果有建议和看法,可以在文末留言,谢谢。
夜雨聆风