[root@h105 mysql]# cd /var/www/html/
[root@h105 html]# cat >index.php <<EOF
> <?php
> phpinfo();
> ?>
> EOF
[root@h105 html]# cat index.php
<?php
phpinfo();
?>
[root@h105 html]# getenforce
Enforcing
[root@h105 html]# setenforce 0
[root@h105 html]# getenforce
Permissive
[root@h105 html]#
要关掉 SElinux ,否则它会捣乱
加载新环境,重启httpd 服务
[root@h105 html]# su - root
[root@h105 ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.100.105 for ServerName
[ OK ]
[root@h105 ~]#
再次访问主页
其实系统已经自带了
[root@h105 ~]# rpm -qa | grep rsyslog
rsyslog-5.8.10-8.el6.x86_64
[root@h105 ~]#
因为数据最后是写到 mysql 里,所以要安装 rsyslog 操作 mysql 的模块
[root@h105 ~]# yum -y install rsyslog-mysql
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: ftp.cuhk.edu.hk
* extras: mirror.bit.edu.cn
* updates: mirrors.pubyun.com
Resolving Dependencies
--> Running transaction check
---> Package rsyslog-mysql.x86_64 0:5.8.10-8.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
rsyslog-mysql x86_64 5.8.10-8.el6 base 21 k
Transaction Summary
====================================================================================================================================
Install 1 Package(s)
Total download size: 21 k
Installed size: 15 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : rsyslog-mysql-5.8.10-8.el6.x86_64 1/1
Verifying : rsyslog-mysql-5.8.10-8.el6.x86_64 1/1
Installed:
rsyslog-mysql.x86_64 0:5.8.10-8.el6
Complete!
[root@h105 ~]#
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。