在红帽的VPS中安装服务

Posted on Mon 05 July 2010 in 我用(IT) • Tagged with centos, LimeServey, php-mbstring, RedHat, vps, yum

参考了一下这篇文章,安装得很顺利,有点儿扭转对红帽子的印象。

# yum -y install httpd php mysql mysql-server php-mysql Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. rhel-debuginfo | 2.1 kB 00:00 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package httpd.x86_64 0:2.2.3-31 ...


Continue reading

vps ssh失败的原因和解决方法

Posted on Thu 24 June 2010 in 我用(IT) • Tagged with ssh, vps

新阳给我看了一篇文章,说无法ssh的原因是内存不够了,重启可以解决。刚才重启vps后又能登录了,查了一下日志,apache的错误日志说的都是out of memory,可以作为旁证。

这篇文章提到,一个php-cgi进程要缓存20m内存,于是立刻决定修改一下配置,就分10个PHP进程吧。

vi /etc/php5/apache2/php.ini

这个配置非常的长,看了一遍,还是决定先不改了。

又搜到这篇文章,说ubuntu下头默认安装的apache是用的prefork模式,比较费内存,建议改成worker模式的。查了一下配置中prefork的相关配置

# prefork MPM

StartServers: number of server processes to start

MinSpareServers: minimum number of server processes which are kept spare

MaxSpareServers: maximum ...


Continue reading

sshd服务拒绝的解决办法

Posted on Tue 22 June 2010 in 我用(IT) • Tagged with sshd, vps

连接VPS,错误提示如下: ssh_exchange_identification: Connection closed by remote host

搜了一下,应该是设置了访问限制造成的:需要修改/etc/hosts.allow,加入 sshd: xxx.xxx.xxx.xxxsshd: ALL 改完之后需要重启一下sshd: service sshd restart或/etc/init.d/sshd restart

错误日志,可以看一下/var/log/syslog和/var/log/auth.log

另外还有一种改法:需要查看一下denyhosts是否安装 1) clear out the hosts.deny file ...


Continue reading