海上月明

          editer by sun
          posts - 162, comments - 51, trackbacks - 0, articles - 8
             :: 首頁 :: 新隨筆 ::  :: 聚合  :: 管理

          apache 2.2 中的命令行啟動服務幫助

          Posted on 2007-01-13 11:35 pts 閱讀(4292) 評論(0)  編輯  收藏

          You can install Apache as a Windows NT service as follows from the command prompt at the Apache bin subdirectory:

          httpd -k install

          If you need to specify the name of the service you want to install, use the following command. You have to do this if you have several different service installations of Apache on your computer.

          httpd -k install -n "MyServiceName"

          If you need to have specifically named configuration files for different services, you must use this:

          httpd -k install -n "MyServiceName" -f "c:\files\my.conf"

          If you use the first command without any special parameters except -k install, the service will be called Apache2 and the configuration will be assumed to be conf\httpd.conf.

          Removing an Apache service is easy. Just use:

          httpd -k uninstall

          The specific Apache service to be uninstalled can be specified by using:

          httpd -k uninstall -n "MyServiceName"

          Normal starting, restarting and shutting down of an Apache service is usually done via the Apache Service Monitor, by using commands like NET START Apache2 and NET STOP Apache2 or via normal Windows service management. Before starting Apache as a service by any means, you should test the service's configuration file by using:

          httpd -n "MyServiceName" -t

          You can control an Apache service by its command line switches, too. To start an installed Apache service you'll use this:

          httpd -k start

          To stop an Apache service via the command line switches, use this:

          httpd -k stop

          or

          httpd -k shutdown

          You can also restart a running service and force it to reread its configuration file by using:

          httpd -k restart

          By default, all Apache services are registered to run as the system user (the LocalSystem account). The LocalSystem account has no privileges to your network via any Windows-secured mechanism, including the file system, named pipes, DCOM, or secure RPC. It has, however, wide privileges locally.


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 巴东县| 新密市| 革吉县| 襄樊市| 光山县| 庆安县| 富民县| 九江市| 三江| 盘锦市| 江油市| 江北区| 四子王旗| 汝南县| 同德县| 彰化市| 鄂托克旗| 临沂市| 湘潭市| 临沭县| 南丰县| 霍林郭勒市| 靖西县| 齐齐哈尔市| 汨罗市| 东乌珠穆沁旗| 景德镇市| 平度市| 拜城县| 普格县| 沈阳市| 安仁县| 西乌珠穆沁旗| 乌鲁木齐市| 陕西省| 奉新县| 翁源县| 乐都县| 宁晋县| 莱西市| 上高县|