Linux--基础0413作业--源码安装

1.源码安装httpd

首先要下载并上传httpd-2.4.12.tar.gz这个安装包,然后进行解压,配置,编译,安装;

[root@bogon ~]# tar xf httpd-2.4.12.tar.gz 
[root@bogon ~]# cd httpd-2.4.12/
[root@bogon httpd-2.4.12]# ./configure --prefix=/usr/local/httpd24 --enable-so --enable-rewrite --enable-ssl
[root@bogon httpd-2.4.12]# make && make install

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

[root@rhcsa ~]# ps -e

显示所有进程

[root@rhcsa ~]# ps aux

ps -aux和ps aux的区别查找正在运行的sshd进程

[root@rhcsa ~]# ps aux | grep sshd
root       1070  0.0  0.2 106164  4132 ?        Ss   16:05   0:00 /usr/sbin/sshd -D
root       1477  0.0  0.2 145868  5208 ?        Ss   16:42   0:00sshd: root@pts/0
root       3173  0.0  0.2 145868  5212 ?        Ss   17:13   0:00sshd: root@pts/3
root       4977  0.0  0.2 145868  5212 ?        Ss   17:39   0:00sshd: root@pts/1
root       5304  0.0  0.3 148040  7444 ?        Ss   17:54   0:00sshd: root@pts/2
root       6088  0.0  0.0 112660   972 pts/1    R+   19:08   0:00 grep --color=auto sshd
[root@rhcsa ~]# 
[root@rhcsa ~]# ps -aux | grep sshd
root       1070  0.0  0.2 106164  4132 ?        Ss   16:05   0:00 /usr/sbin/sshd -D
root       1477  0.0  0.2 145868  5208 ?        Ss   16:42   0:00sshd: root@pts/0
root       3173  0.0  0.2 145868  5212 ?        Ss   17:13   0:00sshd: root@pts/3
root       4977  0.0  0.2 145868  5212 ?        Ss   17:39   0:00sshd: root@pts/1
root       5304  0.0  0.3 148040  7444 ?        Ss   17:54   0:00sshd: root@pts/2
root       6090  0.0  0.0 112660   968 pts/1    R+   19:09   0:00 grep --color=auto sshd
[root@rhcsa ~]# 

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

[root@rhcsa ~]# sleep 300 &
[1] 6095
[root@rhcsa ~]# jobs
[1]+  Running                 sleep 300 &
[root@rhcsa ~]# kill %1
[root@rhcsa ~]# jobs
[1]+  Terminated              sleep 300
[root@rhcsa ~]# 

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

[root@rhcsa ~]# sleep 300 &
[1] 6102
[root@rhcsa ~]# fg
sleep 300

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值