总结:软件编译及自制Linux

软件编译

1、./configure
(1) 通过选项传递参数,指定启用特性、安装路径等;执行时会参考用户的指定以及Makefile.in文件生成Makefile
(2) 检查依赖到的外部环境,如依赖的软件包
2、make -j 16 16为CPU核数,根据自身CPU变化
3、make install 复制文件到相应路径
安装前查看INSTALL,README

[root@localhost ~]#yum install gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel zlib-devel flex libmcrypt-devel glibc-static ncurses-devel bison elfutils-libelf-devel
###### 安装环境
[root@localhost /data]#file tree-1.8.0.tgz 
tree-1.8.0.tgz: gzip compressed data, from Unix, last modified: Fri Nov 16 23:12:22 2018
[root@localhost /data]#gunzip tree-1.8.0.tgz   #解压
[root@localhost /data]#ls
bak.sh  etc.tar  tree-1.8.0.tar
[root@localhost /data]#tar xf tree-1.8.0.tar     #解包
[root@localhost /data]#ls
bak.sh  etc.tar  tree-1.8.0  tree-1.8.0.tar
[root@localhost /data]#cd tree-1.8.0/      #切换目录
[root@localhost /data/tree-1.8.0]#ls       #tree太简单,已生成Makefile,直接第二步
CHANGES  color.c  doc  file.c  hash.c  html.c  INSTALL  json.c  LICENSE  Makefile  README  strverscmp.c  TODO  tree.c  tree.h  unix.c  xml.c
[root@localhost /data/tree-1.8.0]#make -j 4
[root@localhost /data/tree-1.8.0]#ls    #生成tree文件,已可以使用tree
CHANGES  color.o  file.c  hash.c  html.c  INSTALL  json.o   Makefile  strverscmp.c  tree    tree.h  unix.c  xml.c
color.c  doc      file.o  hash.o  html.o  json.c   LICENSE  README    TODO          tree.c  tree.o  unix.o  xml.o
[root@localhost /data/tree-1.8.0]#make install     #安装


内核编译

config配置文件
[root@localhost ~]#cat /boot/config-3.10.0-1062.el7.x86_64
CONFIG_64BIT=y    #=y表示为包含在内核(/boot/vmlinuz-3.10.0-1062.el7.x86_64)中
CONFIG_X86_64=y
CONFIG_OPROFILE=m    #=m表示为模块,存放在/lib/modules/
CONFIG_X86_MCE_INJECT=m
# CONFIG_LOCALVERSION_AUTO is not set  #is not set没有启用,表示为N
# CONFIG_KERNEL_BZIP2 is not set
................................
[root@localhost ~]#cat /boot/config-3.10.0-1062.el7.x86_64  |grep NTFS
# CONFIG_NTFS_FS is not set   #NTFS 不支持,没有启用

lsmod

显示由核心已经装载的内核模块
显示的内容来自于: /proc/modules文件

[root@localhost ~]#lsmod
Module                  Size  Used by
xt_CHECKSUM            163
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值