WordPress的SSH升级问题

WordPress的错误

我一直得到同样的错误,有什么想法?

  1. 我使用ssh-keygen生成了一个没有密码的密钥
  2. 我将密钥的权限设置为600
  3. 我已经使用ssh -i /root/.ssh/id_rsa 1**.**.*8.128成功login
  4. 我已经尝试将主机名更改为localhost127.0.0.1

服务器正在运行CentOS 5.4。

这可能是因为您的Web服务器没有以root身份运行,因此无法访问/root/文件。 在主机上运行ps ,grep为服务器进程名称查看用户名。 这可能是nobody东西。 如果是这样的话,我会build议生成一个专门供Web服务器使用的密钥,然后将其作为服务器运行的用户。 希望这会解决你的问题:)

这是完整的解决scheme,感谢michaelmior的帮助,这让我有一半。

  1. 运行这个命令来生成密钥: ssh-keygen

    你会得到这个输出:

     Generating public/private rsa key pair. Enter file in which to save the key (/home/user1/.ssh/id_rsa): Created directory '/home/user1/.ssh'. Enter passphrase (empty for no passphrase): (just hit enter, no need for a password) Enter same passphrase again: (same thing, hit enter again) Your identification has been saved in /home/user1/.ssh/id_rsa. Your public key has been saved in /home/user1/.ssh/id_rsa.pub. The key fingerprint is: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx [email protected] 
  2. 将公钥添加到您的authorized_keys文件中

  3. id_rsaid_rsa.pub移到/usr/local

  4. 将文件分配chown你的web服务器相同的用户(在我的情况下,apache)

  5. chmod文件到600: chmod 600 id_rsa*

这现在应该工作。

不过,我的安装一直挂着,快速看一下httpd error_log文件show me:

 PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2966269 bytes) in /var/www/sites/.... 

将此代码添加到Wordpress wp-config.php文件中以暂时增加可用内存量:

 define('WP_MEMORY_LIMIT', '64M');