手记

非root用户用指定配置文件启动apache服务(不改变系统配置)

  1. 查看系统是否自带apache
  2. 普通用户新建apache配置
    (1)普通用户新建apache服务目录,并创建相关目录
    mkdir -p /gpfs1/work/zhangnaiqiang/CDP_WORK/programes/apache
    cp /etc/httpd/conf /gpfs1/work/zhangnaiqiang/CDP_WORK/programes/apache/ -ap
    cp /etc/httpd/logs /gpfs1/work/zhangnaiqiang/CDP_WORK/programes/apache/ -ap
    cp /etc/httpd/htdocs /gpfs1/work/zhangnaiqiang/CDP_WORK/programes/apache/ -ap

(2)修改普通用户的apache服务端口号,防止和其他apache服务端口号一样
cd /gpfs1/work/zhangnaiqiang/CDP_WORK/programes/apache/conf/
grep -i listen httpd.conf
sed -i 's/Listen 80/Listen 4000/g' httpd.conf
grep -i listen httpd.conf

0人推荐
随时随地看视频
慕课网APP