Articles of centos

无法让虚拟主机工作,请看我做错了什么(CentOS 6.0)

vhost.conf,位于etc / httpd / vhost.d / NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] ServerName localhost ServerAlias localhost.example.com DocumentRoot /var/www/html/example.com/public_html/ ErrorLog /var/www/html/example.com/logs/error.log CustomLog /var/www/html/example.com/logs/access.log combined </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] ServerName example.org ServerAlias www.example.org DocumentRoot /var/www/html/example.org/public_html/ ErrorLog /var/www/html/example.org/logs/error.log CustomLog /var/www/html/example.org/logs/access.log combined </VirtualHost> httpd.conf,默认设置,加到最后: Include /etc/httpd/vhosts.d/*.conf 根目录: DocumentRoot "/var/www/html" 上述文件夹中创build的虚拟主机的目录。 权限全部看起来是正确的。 每个public_html目录中的Index.php文件。 然而,当我冲进本地主机现在只需要我到默认的Apache 2页,我应该删除行Include /etc/httpd/vhosts.d/*.conf Web服务器工作需要从默认目录,服务任何索引文件我把那里。

从centosplus中有select地安装软件包

我如何有select地从centosplus资源库中安装CentOS 6.0的软件包? 如果我启用该回购和运行yum update ,它会安装其他软件包(较新的内核等)。 我只需要一个来自centosplus包,但是我想从基础库中获取所有其他的东西。

抓到SIGTERM,closurescentos服务器

我有一个centos服务器,当我启动Apache时,我在日志中得到以下内容: [Tue Dec 13 02:26:54 2011] [notice] caught SIGTERM, shutting down [Tue Dec 13 02:26:55 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Tue Dec 13 02:26:56 2011] [notice] ModSecurity for Apache/2.5.9 (http://www.modsecurity.org/) configured. [Tue Dec 13 02:26:56 2011] [notice] Original server signature: Apache/2.2.21 (EL) DAV/2 [Tue Dec 13 02:26:56 2011] [notice] Digest: generating secret for […]

与百胜冲突安装PHP和MySQL

我试图安装一个PHP扩展。 –> Running transaction check —> Package mysql.x86_64 0:5.5.18-1.el5.art set to be updated —> Package mysql-devel.x86_64 0:5.5.18-1.el5.art set to be updated —> Package mysql-server.x86_64 0:5.5.18-1.el5.art set to be updated –> Processing Conflict: mysql50 conflicts MySQL –> Restarting Dependency Resolution with new changes. –> Running transaction check —> Package mysql50.x86_64 0:5.0.92-1.ius.el5 set to be updated –> […]

如何使APC与PHP工作

我已经安装APC的PHP使用 yum install pcre-devel pecl install apc restorecon /usr/lib64/php/modules/apc.so 一切安装正确,但仍然看不到APC模块在phpinfo

如何给一个帐户权限来重新启动服务器?

我使用centOS 5.7,我需要一个帐户,我有在服务器上能够重新启动服务器。 我该怎么做呢? 我应该担心这个安全问题吗? 我需要它的原因…我想重新启动服务器每6或12小时…还没有决定。 但我不想在根上创build一个cronjob,因为我想在重启之前运行一些命令,并且我希望在命令运行完成之后重新启动。 基本上是一个倒计时,直到服务器停下来的游戏服务器。

要检查Centos服务器是否非常慢

我有Linux的VPS服务器2Gb内存,但是当我用ssh,那么它是非常缓慢的。 有时需要很长时间才能看到input的字符。 我试着free -m ,它说1670MB免费 我尝试了最高命令,没有高CPU使用率的命令。 只有sshd使用0.3%的CPU。

logrotate无法指示Apache重新打开Amazon Linux上的日志

我对logrotate有很好的使用经验,但最近在EC2上使用“Amazon Linux”(亚马逊部署的CentOS 6)进行安装时,logrotate无法使Apache重新打开其日志。 Apache的logrotateconfiguration与默认configuration略有不同 – 由于网站stream量高,保留旧日志的最低要求以及EC2实例存储中可用的less量空间,我们每天轮换日志,只保留2天的旧文件: # cat /etc/logrotate.d/httpd /var/log/httpd/*log { missingok notifempty sharedscripts daily rotate 2 compress postrotate /sbin/service httpd reload > /dev/null 2>/dev/null || true endscript } 旋转本身工作正常,旧的日志被压缩。 但是,在logrotate删除旧文件后,Apache实际上并没有重新打开这些日志文件,结果旧文件并没有真正被删除,而且Apache将pipe道数据保留在这些文件中 – 耗尽了可用空间,实际上丢失了日志数据,无障碍。 如果我从命令行(使用sudo或root)手动运行postrotate脚本,Apache将重新打开日志,并获得预期的行为。 日志中没有什么有趣的东西(cron日志中写着“logrotate started”,后面跟着“logrotate finished”),系统邮件没有关于cron作业问题的通知。 这个过程已经持续了几个星期(因为我们把生产服务器从基于Debian的安装移到了基于“Amazon Linux”的安装),而现在我对于如何解决这个问题感到无能为力。 任何帮助将不胜感激。

为什么在64位系统上安装i386软件包?

当我例如在x86_64 CentOS上安装MySQL时, yum想安装i386版本。 为什么这样做? 我可以只获得x86_64版本来节省磁盘空间吗? [root@rt ~]# yum install mysql-server mysql Resolving Dependencies –> Running transaction check —> Package mysql.i386 0:5.0.77-4.el5_6.6 set to be updated –> Processing Dependency: perl(DBI) for package: mysql —> Package mysql.x86_64 0:5.0.77-4.el5_6.6 set to be updated —> Package mysql-server.x86_64 0:5.0.77-4.el5_6.6 set to be updated –> Processing Dependency: perl-DBD-MySQL for package: mysql-server […]

哪里有centos 5.4服务器安全configuration和安装指南?

哪里有centos 5.4服务器安全configuration和安装指南(中文教程)? 我现在戴尔电脑,我想用它研究如何configurationcentos服务器。 那么你能给我一些build议吗? 谢谢 。