常见的shell指令

来源:互联网 发布:淘宝客服昵称怎么改 编辑:程序博客网 时间:2024/04/30 15:18

查看操作系统信息

lsb_release -a

查询apache版本

apachectl -v

nginx重启

nginx -c /usr/local/etc/nginx/nginx.conf

查看apache配置文件位置

httpd -V

#httpd -VServer version: Apache/2.2.21 (Unix)Server built:   Feb  9 2012 17:33:51Server’s Module Magic Number: 20051115:30Server loaded:  APR 1.4.2, APR-Util 1.3.10Compiled using: APR 1.4.2, APR-Util 1.3.10Architecture:   64-bitServer MPM:     Preforkthreaded:     noforked:     yes (variable process count)Server compiled with….-D APACHE_MPM_DIR=”server/mpm/prefork”-D APR_HAS_SENDFILE-D APR_HAS_MMAP-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)-D APR_USE_FLOCK_SERIALIZE-D APR_USE_PTHREAD_SERIALIZE-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT-D APR_HAS_OTHER_CHILD-D AP_HAVE_RELIABLE_PIPED_LOGS-D DYNAMIC_MODULE_LIMIT=128-D HTTPD_ROOT=”/usr/local/httpd2.2.21-D SUEXEC_BIN=”/usr/local/httpd2.2.21/bin/suexec”-D DEFAULT_PIDLOG=”logs/httpd.pid”-D DEFAULT_SCOREBOARD=”logs/apache_runtime_status”-D DEFAULT_LOCKFILE=”logs/accept.lock”-D DEFAULT_ERRORLOG=”logs/error_log”-D AP_TYPES_CONFIG_FILE=”conf/mime.types”-D SERVER_CONFIG_FILE=”conf/httpd.conf”

其中HTTPD_ROOT和SERVER_CONFIG_FILE 就可以确定httpd.conf的路径了

0 0