问题标签 [centos6.5]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ssh - 在 Centos 6.5 中无法 ssh 进入新创建的用户
我正在使用织物(python)执行此操作:
- 从 linode.com 以 root 身份登录到全新的 Centos 6.5 机器
- 运行以下脚本
剧本:
问题:
我无法使用给定用户名(shortfellow)的新服务器登录服务器几次尝试。我已将 ssh 密钥添加到 ssh-agent。在我尝试多次登录后它可以工作,但我不明白为什么会这样。
任何帮助表示赞赏。
smtp - Sendmail Postfix 长时间延迟
我正在使用 PHP 的邮件功能向应用程序的用户发送消息。但我收到报告说有些人没有收到,而其他人则在几个小时后到达。
所以我正在查看 /var/log/maillog,我经常在其中看到这条消息:
日志中有很多超过 1000 秒的延迟。
我检查了防火墙设置,没有规则阻止25端口,这个问题是不一致的,有的邮件正常,有的邮件延迟很长,有的根本没有发送。
关于下一步尝试什么的任何建议?
在 CentOS 6.5 上运行。
nginx - php-fpm 池设置在使用 Nginx 的 Plesk 12 服务器中被忽略
我正在使用最新版本的 Plesk (12) 设置 Centos 6.5 服务器,它最终支持 php-fpm。我已启用它并将 nginx 设置为使用 phpfpm,这一切都很好。
我无法解决的是如何更改设置。默认情况下,加载到的虚拟主机设置;
是;
我想将其更改为动态并增加服务器(我正在运行 php-fpm 5.3.3,所以我可能无论如何都在动态模式下运行,但只有 1 个服务器)。
从我找到的非常有限的文档中,我在这里创建了一个 php.ini 文件;
在这个文件中,我添加了这些测试设置;
在 Plesk 中,如果我在域控制面板上创建并保存自定义 php 指令,它会重新编译 .conf 文件,所以现在它有了;
但是,当我在 SSH 中运行 top 时,我没有运行任何池 fpm 服务。如果我去访问该网站,它会生成一个 php-fpm 服务,但我希望看到一些池准备就绪并等待为用户服务。
我错过了什么?
php - every minute cron job sometimes not running
I have several cron jobs executing php scripts. The php scripts sometimes do some heavy jobs like updating hundreds of records at a time in a mysql table.
The problem is that the job should run every minute. However, it randomly misses and as a result does not execute every minute. Sometimes, it executes every 4-6 minutes, then back to every 1 minute, misses 2-3 times more and then normal again.
I am on centos 6.5
Please note that the php runs correctly and there is no problem whatsoever concerning the php scripts themselves since on the time it runs, I get the expected results and that there are about 10 more other similar scripts running at the same time (every minute or every 5 minutes for the other scripts)
Job:
My take is that it is maybe a problem with too many simultaneous scripts running concurrently, accessing the database at the same time.
Last information: No error in the /var/log/cron
file or in the phpScriptLog.log
file.
php - 使用 PHP LINUX 计算 DOC 和 DOCX 中的字符数
补充:我发现最接近的计算行数的方法是对 DOC 文件使用 linux 命令“antiword”,antiword 会返回 DOC 的文本版本;而对于 DOCX,使用将从 DOCX 检索内容并通过与 antiword 相同的文本函数推送数据的调用。
现在问题来了,当您在文件中有表格时,antiword 添加了很多空格。
===
我有一个脚本可以计算 DOCX 文件中的字符数:
如果我有 doc 文件,我基本上使用 LibreOffice 命令行将文件转换为 docx,然后运行上面的脚本。
问题是我无法找出“HEADER”和“FOOTER”区域中有多少单词文件。如何实现?
我的服务器运行:PHP 5.3 LibreOffice CentOS 6.5
我不确定我需要提供哪些其他信息,谢谢您的回答。
ps
我曾尝试将 doc 和 docx 转换为 txt,但结果“HEADER”和“FOOTER”区域没有保存在 txt 文档中
此外,我找到的最接近的解决方案是: https ://github.com/nagilum/DOCx
图书馆分解了整个 docx 文件,你有纯文本的页眉、内容和页脚,我可以尝试从他们那里锻炼字数。但是,libreoffice 有时似乎很难将文件转换为 docx,转换后 1 页的 doc 文件在 docx 中可能有 2 页。
php - CentOS 6.6 上的内存缓存
我正在尝试让 memcached 在 Laravel (PHP) 中的 CentOS 6.6 服务器上工作。看起来我正确安装了 memcached,因为当我输入“ps aux | grep memcached”时,我得到一个显示它正在运行的响应。
当我运行 phpinfo 时,我得到以下信息:
当我输入“php test.php”时,我什至有一个可以通过命令行工作的小脚本,但是当我尝试从浏览器访问它时它不起作用。这是脚本:
因此,此脚本在从命令行运行时成功缓存,但在我从浏览器运行时不缓存。有什么建议么?
php - 干预/图像需要 FileInfo
我在干预/图像方面遇到问题,Laravel#composer install
我知道它正在尝试检索扩展,fileinfo
但是我在加载扩展方面运气不佳。
我相信从 PHP 5.4fileinfo
开始自动启用扩展,但是它没有出现在#php -m
模块中。
#pecl install fileinfo
也不起作用,因为我的 php 版本不适合任何fileinfo
.
我的 PHP 版本是:
操作系统:
我试过添加
到php.ini但是没有运气,它什么也不做。
注意:我设法让 php 5.4 的 windows 版本的扩展工作......就在我将我的网站上传到我的服务器时,我无法让它加载,那么让那个库(干预/图像)到加载。
其他详情:
- 服务器是一个可以访问WHM和cPanel的VPS
- 网站工作。除了干预/图像之外的一切
apache - 在 apache 2.4 中将 Error_Log 设置为 VirtualHost Root
我的 httpd.conf 中有这个:
当我执行 sudo service httpd restart 我得到:
有没有办法将错误日志设置到虚拟主机的文档根目录?谢谢。
git - 使用匿名用户设置 GIT 服务器
我已经在我的 VPS 上设置了 gitolite,目前每次我想推/拉我都需要包含 git 用户名。例如:
无论如何我可以排除用户名来执行 git 命令 shell 之类的
如果有人可以帮助我设置我的 git 配置,我真的很感激。这是我的 vps 信息,以备不时之需:
- 森托斯 6.5
- 1.7.1
- Gitolite3 v3.6-1-g8b7c50a
java - 如何在 CentOS 6.5 上安装 Java
我正在尝试在 CentOS6.5 上从 oracle 下载并安装 Java,但出现错误。我正在使用的命令是:
wget --no-check-certificate --no-cookies --header "Cookie:gpw_e24=http%3A%2F%2Fwww.oracle.com"" http://download.oracle.com/otn-pub/java/ jdk/7u17-b02/jdk-7u17-linux-x64.rpm "
有谁可以帮我离开这里吗?