首页 > Web开发 > 详细

在Linux下编译安装Apache2(2)

时间:2015-08-12 09:04:51      阅读:203      评论:0      收藏:0      [点我收藏+]


\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}


在Linux下编译安装Apache2(2)

原文:http://my.oschina.net/u/2433296/blog/490991

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!