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