12_04_Linux软件管理之四yum

RPM安装:

            二进制格式:

            源程序--》编译--》二进制格式

                        有些特性是编译时选定的,如果编译时未选定此特性,将无法使用;

                        rpm包的版本会落后于源码包,甚至落后很多:

定制:手动编译安装

编译环境,开发环境

开发库,开发工具

Linux:C

GUN:C

c环境,C++,

gcc:编译C语言用的工具

g++:编译C++语言的工具

make :项目管理工具

            makefile:定义了make(调用gcc,g++)按何种次序去编译这些源程序文件中的源程序

            automake,--》makefile.in-->makefile

            autoconf,  -->configure(配置源程序如何编译的)

make  install

编译安装的三个步骤:

前提:准备开发环境(编译环境)

安装  “Development  Tools” 和 “Development lib”

tar

cd

./configure

--help

--prefix=/path/to/somewhere

--sysconfdir=/path/to/conffile_path

功能:1、让用户选定编译特性,2、检查编译环境

make

make  install

eg:

tar  -xf  tengine....gz

cd   tengine

./configure    --prefix=/usr/local/tengine    --conf--path=/etc/tengine/tengine.conf

make

make    install

/usr/local/tengine/sbin/nginx

注意:

1、修改path环境变量,以能够识别此程序的二进制文件路径;

            修改/etc/profile文件

            在/etc/profile.d/目录建立一个以.sh为名称后缀的文件,在里面定义  export  PATH=$PATH:/PATH/TO/SOMEWHERE

2、默认情况下,系统搜索库文件的路径/lib,   /usr/lib;要增添额外搜寻路径;

            在/etc/ld.so.conf.d/中创建以.conf为后缀名的文件,而后把要增添的路径直接写至此文件中;

            ldconfig   通知系统重新搜寻库文件

                    -v   :显示重新搜寻库的过程

3、头文件:输出给系统

        默认:/usr/include

        增添头文件搜寻路径,使用连接进行:

            /usr/local/tengine/include/            /usr/include/

            ln   -s    /usr/local/tengine/include/*    /usr/include/   或

            ln   -s   /usr/local/tengine/include/    /usr/include/tengine

4、man文件路径:安装在--prefix指定的目录下的man目录:/usr/share/man

            1、man   -M   /path/to/man_dir   command

            2、在/etc/man.config中添加一条manpath

netstat命令:

            -r:显示路由表
            -n:以数字的方式显示

            -t:建立的tcp的连接
            -u:显示udp连接
            -l:显示监听状态的连接
            -p:显示监听指定的套接字的进程的进程号及进程名

perl,java,python

评论

暂无评论