linux 编译apache,在Linux下编译安装Apache2(2)

\subsection{Service}

在/usr/local/apache2/conf/httpd.conf中设置ServerName后,接下来可以使用apachectl来启动httpd。

\begin{lstlisting}[language=bash]

$ sudo /usr/local/apache2/bin/apachectl start

$ ps aux | grep httpd

root      1001  0.0  0.0  71280  3700 ?        Ss   00:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon    1002  0.0  0.1 427868  4100 ?        Sl   00:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon    1003  0.0  0.0 427868  3852 ?        Sl   00:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon    1004  0.0  0.0 427868  3852 ?        Sl   00:18   0:00 /usr/local/apache2/bin/httpd -k start

daemon    1089  0.0  0.0 427868  3856 ?        Sl   00:18   0:00 /usr/local/apache2/bin/httpd -k start

test      1120  0.0  0.0 113000  2304 pts/1    S+   00:20   0:00 grep --color=auto httpd

\end{lstlisting}

修改httpd.conf并添加新的Apache的用户和用户组:

\begin{lstlisting}[language=bash]

$ sudo useradd apache

$ sudo groupadd apache

$ sudo /usr/local/apache2/bin/apachectl stop

$ ps aux | grep httpd

$ sudo /usr/local/apache2/bin/apachectl start

$ ps aux | grep httpd

\end{lstlisting}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值