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