1.源码安装:httpd(httpd依赖于两个软件)

源代码安装步骤:

确认源代码编译环境

需安装支持 C/C++程序语言的 编译器

解包 —— tar

解包、释放出源代码文件

配置 —— ./configure

针对当前系统、软件环境,配置好安装参数

编译 —— make

将源代码文件变为二进制的可执行程序

安装 —— make install

将编译好的程序文件复制到系统中

先通过sftp命令在windows命令上将文件传到linux中

将文件解压缩至指定目录

先创建一个目录(路径为/user/local/sourcesoftware)

 再将文件解压缩至指定目录中

其他文件同理解压缩

可查看软件已经解压至指定目录

 执行 ./configure

可见报错说明缺少C语言编译器,所以需要安装软件

由于本地挂载点是临时的,所以需要重新启用上次的过载点

通过yum下载软件

[root@good yum.repos.d]# yum install gcc-c++.x86_64 -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
上次元数据过期检查:0:00:09 前,执行于 2022年04月16日 星期六 00时34分19秒。
依赖关系解决。
==========================================================================================================软件包                      架构               版本                          仓库                   大小
==========================================================================================================
安装:gcc-c++                     x86_64             8.3.1-4.5.el8                 AppStream              12 M
安装依赖关系:glibc-devel                 x86_64             2.28-72.el8                   BaseOS                1.0 Mglibc-headers               x86_64             2.28-72.el8                   BaseOS                469 kkernel-headers              x86_64             4.18.0-147.el8                BaseOS                2.7 Mlibxcrypt-devel             x86_64             4.1.1-4.el8                   BaseOS                 25 kcpp                         x86_64             8.3.1-4.5.el8                 AppStream              10 Mgcc                         x86_64             8.3.1-4.5.el8                 AppStream              23 Misl                         x86_64             0.16.1-6.el8                  AppStream             841 klibstdc++-devel             x86_64             8.3.1-4.5.el8                 AppStream             2.0 M事务概要
==========================================================================================================
安装  9 软件包总计:53 M
安装大小:140 M
下载软件包:
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务准备中  :                                                                                           1/1 安装    : libstdc++-devel-8.3.1-4.5.el8.x86_64                                                      1/9 安装    : isl-0.16.1-6.el8.x86_64                                                                   2/9 运行脚本: isl-0.16.1-6.el8.x86_64                                                                   2/9 安装    : cpp-8.3.1-4.5.el8.x86_64                                                                  3/9 运行脚本: cpp-8.3.1-4.5.el8.x86_64                                                                  3/9 安装    : kernel-headers-4.18.0-147.el8.x86_64                                                      4/9 运行脚本: glibc-headers-2.28-72.el8.x86_64                                                          5/9 安装    : glibc-headers-2.28-72.el8.x86_64                                                          5/9 安装    : libxcrypt-devel-4.1.1-4.el8.x86_64                                                        6/9 安装    : glibc-devel-2.28-72.el8.x86_64                                                            7/9 运行脚本: glibc-devel-2.28-72.el8.x86_64                                                            7/9 安装    : gcc-8.3.1-4.5.el8.x86_64                                                                  8/9 运行脚本: gcc-8.3.1-4.5.el8.x86_64                                                                  8/9 安装    : gcc-c++-8.3.1-4.5.el8.x86_64                                                              9/9 运行脚本: gcc-c++-8.3.1-4.5.el8.x86_64                                                              9/9 验证    : glibc-devel-2.28-72.el8.x86_64                                                            1/9 验证    : glibc-headers-2.28-72.el8.x86_64                                                          2/9 验证    : kernel-headers-4.18.0-147.el8.x86_64                                                      3/9 验证    : libxcrypt-devel-4.1.1-4.el8.x86_64                                                        4/9 验证    : cpp-8.3.1-4.5.el8.x86_64                                                                  5/9 验证    : gcc-8.3.1-4.5.el8.x86_64                                                                  6/9 验证    : gcc-c++-8.3.1-4.5.el8.x86_64                                                              7/9 验证    : isl-0.16.1-6.el8.x86_64                                                                   8/9 验证    : libstdc++-devel-8.3.1-4.5.el8.x86_64                                                      9/9
Installed products updated.已安装:gcc-c++-8.3.1-4.5.el8.x86_64                        glibc-devel-2.28-72.el8.x86_64                     glibc-headers-2.28-72.el8.x86_64                    kernel-headers-4.18.0-147.el8.x86_64               libxcrypt-devel-4.1.1-4.el8.x86_64                  cpp-8.3.1-4.5.el8.x86_64                           gcc-8.3.1-4.5.el8.x86_64                            isl-0.16.1-6.el8.x86_64                            libstdc++-devel-8.3.1-4.5.el8.x86_64               完毕!
[root@good yum.repos.d]#

 进行第一个软件的配置

make编译时出现报错执行以下操作

  然后重新执行make

最后安装软件

 安装第二个软件

因为apr-util依赖于apr所以安装util时需要再加一条命令--with 【apr安装的目录】

[root@good sourcesoftware]# cd apr-util-1.6.1/
[root@good apr-util-1.6.1]# ./configure --prefix=/usr/local/apr --with-apr=/usr/local/apr
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
APR-util Version: 1.6.1
checking for chosen layout... apr-util
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Applying apr-util hints file rules for x86_64-pc-linux-gnu
checking for APR... yessetting CPP to "gcc -E"adding "-pthread" to CFLAGSsetting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE"
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for ldap support...
checking for default DBM... sdbm (default)
checking for pg_config... no
checking libpq-fe.h usability... no
checking libpq-fe.h presence... no
checking for libpq-fe.h... no
checking postgresql/libpq-fe.h usability... no
checking postgresql/libpq-fe.h presence... no
checking for postgresql/libpq-fe.h... no
checking sqlite3.h usability... no
checking sqlite3.h presence... no
checking for sqlite3.h... no
checking sqlite.h usability... no
checking sqlite.h presence... no
checking for sqlite.h... no
checking for odbc_config... no
checking sql.h usability... no
checking sql.h presence... no
checking for sql.h... no
checking odbc/sql.h usability... no
checking odbc/sql.h presence... no
checking for odbc/sql.h... no
checking Expat 1.95.x... no
checking old Debian-packaged expat... no
checking old FreeBSD-packaged expat... no
checking Expat 1.0/1.1... nosetting LDFLAGS to "-L/usr/local/lib"adding "-I/usr/local/include" to CPPFLAGS
checking Expat 1.95.x in /usr/local... nonulling LDFLAGSremoved "-I/usr/local/include" from CPPFLAGSsetting APRUTIL_EXPORT_LIBS to ""setting APRUTIL_LIBS to ""
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for type of inbuf parameter to iconv... char **
checking for iconv.h... (cached) yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking for nl_langinfo... yes
checking for CODESET in langinfo.h... yes
checking whether APR has DSO support... yes
checking for library containing crypt... -lcrypt
checking if system crypt() function is threadsafe... no
checking for crypt_r... yes
checking style of crypt_r... struct_crypt_data
checking whether the compiler handles weak symbols... yes
checking for memset_s support... no
checking for explicit_bzero support... yessetting APRUTIL_LIBS to " /usr/local/apr/lib/libapr-1.la -lrt -lcrypt  -lpthread -ldl"
configure: creating ./config.status
config.status: creating Makefile
config.status: creating export_vars.sh
config.status: creating build/pkg/pkginfo
config.status: creating apr-util.pc
config.status: creating apu-1-config
config.status: creating include/private/apu_select_dbm.h
config.status: creating include/apr_ldap.h
config.status: creating include/apu.h
config.status: creating include/apu_want.h
config.status: creating test/Makefile
config.status: creating include/private/apu_config.h
config.status: executing default commands

再使用make编译

 可见编译时出现致命错误,所以需要安装expat.软件

 再次编译:成功(没有报错)

然后安装

最终安装httpd软件

 可见缺少pcre软件,使用yum下载

 再下载openssl软件

 再make编译成功后下载

下载完成后启用httpd服务

 先停用一下然后再启用,通过ps命令查到httpd服务已经启用 

2.查看root用户带有终端的进程

显示没有终端的进程

  显示所有进程

 ps -aux和ps aux的区别 
POSIX 和 UNIX 标准
       要求“ps -aux”打印名为“x”的用户拥有的所有进程,以及作为打印将由 -a 选项选择的所有进程。 如果名为“x”的用户不存在,此ps可能会将命令解释为“ps aux”而是打印警告。 此行为旨在帮助转换旧的脚本和习惯。 它是脆弱的,可能会发生变化,并且因此,不应依赖。

查找正在运行的sshd进程

执行sleep 300 &,查看这个后台进程,并杀死它(使用%id)

 执行sleep 300 & , 将这个后台进程变成前台进程 

Linux中源代码安装及ps命令相关推荐

  1. Linux中软件安装使用的命令是,Linux软件安装命令

    1.tar tar命令用于把多个文件合并于一个档案文件中,并提供分解的合并后的档案文件的功能.它独立于压缩工具,因此可以选择在合并前是否压缩.tar命令的基本用法为: tar[选项]文件名 常用的选项 ...

  2. centos6.5 php5.2,Linux中PHP安装与配置(CentOS-6.5:php-5.2.13)

    1 PHP简介     PHP(PHP: Hypertext Preprocessor的缩写,中文名:"超文本预处理器")是一种通用开源脚本语言.语法吸收了C语言.Java和Per ...

  3. linux中常用的60个命令及作用详解

    Linux 必学的 60 个命令 Linux 提供了大量的命令,利用它可以有效地完成大量的工作,如磁盘操作.文件存 取.目录操作.进程管理.文件权限设定等.所以,在 Linux 系统上工作离不开使用系 ...

  4. Linux中_Ubuntu上_使用命令总结整理_02

    文章目录 目录: 1.操作系统操作 1.Linux 基础 2.系统信息 3.系统负载 -- top 4.程序开机自启动服务配置 5.重定向_管道_流 6.终端其他命令 2.文件与目录操作 1.文件和目 ...

  5. linux中怎么安装ded包_快速提示:如何在Linux中安装.deb和.tar文件 - push博客

    在本快速教程中,我将解释如何使用终端命令在Linux中安装程序.本教程使用LinuxMint 18(肉桂64位),但是下面提供的命令对于其他版本的Linux是通用的,比如Ubuntu.对于那些刚接触l ...

  6. qt打包rpm时候先安装其他软件_云计算学习路线图素材课件,Linux中软件安装的方式...

    很多初学者感觉云计算就是一个听起来比较高大上的名词,每次想要了解它的时候都像是雾里看花,迷迷糊糊看不真切,至于它是干什么的就更不了解了,其实云计算学起来在IT行业中还是比较容易上手的,接下来我给大家分 ...

  7. _云计算学习路线图素材课件,Linux中软件安装的方式

    很多初学者感觉云计算就是一个听起来比较高大上的名词,每次想要了解它的时候都像是雾里看花,迷迷糊糊看不真切,至于它是干什么的就更不了解了,其实云计算学起来在IT行业中还是比较容易上手的,接下来我给大家分 ...

  8. linux mv 递归拷贝,奇技淫巧 - 给Linux中的cp和mv命令中添加进度条的高级拷贝

    GNU cp和GNU mv命令用于在GNU/Linux操作系统中复制和移动文件和目录.这两个命令缺少的一个特性是它们不显示任何进度条.如果复制一个大文件或目录,您就不知道完成复制过程需要多长时间,也不 ...

  9. linux安装mysql图解,linux中怎么安装mysql5.6.12版本图解

    linux中怎么安装mysql5.6.12版本图解 更新时间:2019-08-10 07:16 最满意答案 首先检查环境: 输入命令:rpm -qa | grep -i mysql* 将查询到的包名: ...

最新文章

  1. 通俗易懂解释一下C++的构造函数是怎样的呢?
  2. ajax登录成功跳转页面_ODOO 登录后跳转到指定页面【仪表盘】而不是【讨论】模块...
  3. java中的位移运算符_Java 位移运算符
  4. codis codis-ha主从切换后服务器标记为offline
  5. Android应用开发以及设计思想深度剖析(2)
  6. 360浏览器通过访问插件管理界面启用flash实例演示,360浏览器启用Adobe Flash Player方法
  7. 全球首本 | 系统介绍深度学习计算机视觉方法
  8. Bug系列路径规划算法原理介绍(三)——Tangent BUG算法
  9. 208计算机领域,中医药大学-计算机基础208版-1-7次作业.doc
  10. 多项式拟合缺点_多项式拟合
  11. #{}ogl表达式_使用OGL制作程式化的鼠标轨迹
  12. 手机通过adb工具安装应用
  13. 4.1 人工智能的发展趋势
  14. 记码农十周年(20110214--20210214)
  15. Unity3D 中 Generic 动画导入设置和 Root Motion 之间的关系
  16. 摄影后期,教你如何塑造光影营造照片的氛围
  17. 讲完社区故事,网易云音乐这次要靠AI上位?
  18. 小学生作文评语的原则性和灵活性
  19. 中国电抗器行业深度调研及投资前景预测研究报告
  20. U盘exFAT格式转NTFS

热门文章

  1. HBuilder学习与使用
  2. c语言求素数用isprime,求素数和 isprime=1 完全没用上,请指点一下迷津?
  3. CAJ转WORD:高精准度还原转出可编辑的文档,每天免费使用
  4. 【计算机二级Python】模拟试卷第3套选择题
  5. ProGuard代码混淆器如何使用
  6. su root和su - root的区别
  7. 月影在天空飘浮,轻摇着大地的梦魇
  8. 你掌握运算符优先级了吗
  9. 2019.3运动手环识别篮球运球手势的算法工作进度
  10. uml图箭头各种含义