Linux下常用工具问题解答

Apache

1. apache启动错误; apachectl start,报错:Unable to change directory to /root

解决方案:

Its SELinux.

because you have it enabled, you need to starte service using

service httpd start

edit your SELinux config and either disable it or set it to permissive:

nano /etc/sysconfig/selinux

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
( # service httpd start/stop/restart )

Once chenged then you will be able to start httpd using: /etc/init.d/httpd start

If you need to keep SELinux enabled, then just use the service script to start/stop/restart the service. 

2. linux下如何找到apache的安装目录

解决方案:

find  /  -name  httpd.conf

一般apache日志也在该目录下

PHP


MySql

1. MySql 默认安装后的启停

/etc/init.d/mysqld  start/stop/restart


Crond

定时执行工具 crond。

问题: 脚本在shell命令行下执行正常,crond执行无效

解决方案: 启动crond的用户环境变量在crond执行时全无效。 crond执行时不会调用执行本地的.bash_profile。 将脚本的需要的环境变量都加上;或执行程序使用全路径
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值