
linux下安装apache错误!Permission denied
[fang@helenhttpd-2.2.8]$/Apache2/bin/Apachetlstart>>/etc/rc.d/rc.local-bash:/etc/rc.d...
[fang@helen httpd-2.2.8]$ /Apache2/bin/Apachetl start>>/etc/rc.d/rc.local
-bash: /etc/rc.d/rc.local: Permission denied
如何解决??
[root@helen ~]# /Apache2/bin/apachectl start >>/etc/rc.d/rc.local
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName 展开
-bash: /etc/rc.d/rc.local: Permission denied
如何解决??
[root@helen ~]# /Apache2/bin/apachectl start >>/etc/rc.d/rc.local
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName 展开
展开全部
/Apache2/bin/Apachetl 应该是启动脚本,
start是参数表示启动,
>>/etc/rc.d/rc.local 表示将输出显示添加到/etc/rc.d/rc.local这个文件。
所以第一次普通用户执行时(提示符$)没有写入rc.local的权限,所以提示Permission denied。
其实rc.local 是系统启动时自动执行的脚本文件,不应该向这里添加不相关的输出内容,我估计应该是下面的指令。
echo /Apache2/bin/Apachetl start>>/etc/rc.d/rc.local
意思是在rc.local文件 中添加/Apache2/bin/Apachetl start命令,使系统启动是自动执行/Apache2/bin/Apachetl start命令启动apache。
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName应该是说apache没有设置服务器名。这在配置文件中默认是封着的如果没有修改过配置都会有这个错误。
start是参数表示启动,
>>/etc/rc.d/rc.local 表示将输出显示添加到/etc/rc.d/rc.local这个文件。
所以第一次普通用户执行时(提示符$)没有写入rc.local的权限,所以提示Permission denied。
其实rc.local 是系统启动时自动执行的脚本文件,不应该向这里添加不相关的输出内容,我估计应该是下面的指令。
echo /Apache2/bin/Apachetl start>>/etc/rc.d/rc.local
意思是在rc.local文件 中添加/Apache2/bin/Apachetl start命令,使系统启动是自动执行/Apache2/bin/Apachetl start命令启动apache。
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName应该是说apache没有设置服务器名。这在配置文件中默认是封着的如果没有修改过配置都会有这个错误。
展开全部
你用的是什么linux,centos,ubuntu下的在命令前面加sudo,其他的加su
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
拒绝访问!以root身份启动apache就可以了!
追问
成了其他错误了,是什么意思啊??
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |