Articles of ubuntu 16.04的

后缀发送邮件为root @ example而不是[email protected]

我试图从我的服务器发送邮件使用postfix ,除了一件事情,它完美的作品; 它以root@example而不是[email protected]发送邮件。 这是我的configuration文件,我错过了什么? # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending […]

PHP的错误500:时区数据库已损坏 – 这应该*永远不会发生

我有一个新的Ubuntu服务器16.04 amd64与Apache 2.4.18和PHP 7.0的安装。 我已经在/etc/apache2/apache2.conf中使用mod_env和ChrootDir / var / www chrooted Apache ,据我所知在这里是这个问题。 我想要做一个NexctCloud 11安装,但是一开始运行时会运行一个500错误。 Apache错误日志: [Fri Mar 17 08:21:22.262901 2017] [:error] [pid 31480] [client 193.175.51.226:55749] PHP Notice: date_default_timezone_set(): Timezone ID 'UTC' is invalid in /html/sub.example.com/public_html/lib/base.php on line 637, referer: https://sub.example.com/ [Fri Mar 17 08:21:22.266581 2017] [:error] [pid 31480] [client 193.175.51.226:55749] PHP Warning: DateTime::createFromFormat(): Invalid date.timezone […]

Linux存储库。 Ubuntu apt-get和centOS yum

我是VPS的新手,当我想在Ubuntu16.04或者CentOS7上安装某些东西时,我需要谷歌地址,并且希望它能够写入某个地方,通过apt-get或者yum来安装它,然后希望它是一个很好的存储库。 然后,即使同一个项目之间的差异2。例如,你有httpd在yum和apache2在apt-get(这不只是他们的名字是不同的)。 有什么github我可以检查存储库的声誉,官方文档如何安装等? 还是我需要通过反复试验来学习?

Postfix作为智能主机? 这可能吗

我们在3个独立的公共静态IP上有3个SMTP服务器。 我们在一个静态IP上有一个辅助故障转移连接。 我想将所有3个SMTP服务器放在路由器后面,并closures公共IP,使用postfix接受主互联网连接和故障转移中的邮件,然后将所有电子邮件路由到现在的内部SMTP服务器。 这些是3个不同的电子邮件域。 我如何设置Postfix cnfg来实现这个function? 我GOOGLE了这个,没有find一个合适的解决scheme。 我有一个现有的Ubuntu 16.04盒子当前充当SSH网关,并将lkike利用这台机器的smtp网关/智能主机。

Linux服务器有时不会回答TCP连接或者延迟

我有Linux服务器(Ubuntu 16.04),其中每个服务器似乎都很好,除了它有时候非常慢地(例如,10-20秒)回答TCP连接或根本不回答。 服务器没有负载,这发生在所有的TCP服务(HTTP,SMTP,VOIP)上。 大多数连接的回答都很快,而且在发生这种减速的时候,似乎是随机的。 我的猜测是,这是在networking堆栈。 任何想法如何debugging呢? 我做了2个TCP转储。 不工作: 15:10:07.281993 IP p4FC4B365.dip0.t-ipconnect.de.3237 > hetzner3.1740: Flags [S], seq 3664811831, win 8192, options [mss 1452,nop,wscale 8,nop,nop,sackOK], length 0 15:10:10.281742 IP p4FC4B365.dip0.t-ipconnect.de.3237 > hetzner3.1740: Flags [S], seq 3664811831, win 8192, options [mss 1452,nop,wscale 8,nop,nop,sackOK], length 0 15:10:16.282033 IP p4FC4B365.dip0.t-ipconnect.de.3237 > hetzner3.1740: Flags [S], seq 3664811831, win 8192, options [mss […]

每个工作日Ubuntu的cron工作

在Ubuntu 16上,我试着在工作日上午8:00触发cron工作,这是我迄今为止所尝试的 0 8 * * 1-5 /path/to/command 和 0 8 * * MON-FRI /path/to/command 不起作用

Ubuntu 16.04和Elasticsearch 1.7 – 启动错误

我最近通过dpkg添加了一个新节点(通过dpkg进行全新安装),随机的一台服务器在重新启动时不会启动elasticsearch。 手动尝试启动时出现以下错误: sudo systemctl status elasticsearch elasticsearch.service – Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2017-06-16 12:32:28 UTC; 3s ago Docs: http://www.elastic.co Process: 1437 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=$PID_DIR/elasticsearch.pid -Des.default.path.home=$ES_HOME -Des.default.p Main PID: 1437 (code=exited, status=3) Jun 16 12:32:28 els02.xyz.net elasticsearch[1437]: java.io.FileNotFoundException: /var/run/elasticsearch/elasticsearch.pid (No such file or directory) Jun 16 12:32:28 […]

Python脚本仅在作为服务运行时才会失败

我有一个我写的python脚本。 当我运行./myscript.py并且没有错误时,它完全按照预期工作,继续工作几天,直到我手动closures。 我还创build了一个为我的python脚本编写的SystemD服务。 但是,在运行服务时,会在每一轮中途出错。 SystemD重新启动脚本,它完美的工作1轮和一半的错误。 这是来自journalctl -xe -f的错误: Jul 05 16:04:35 glas-dev systemd[1]: magewelk.service: Start operation timed out. Terminating. Jul 05 16:04:35 glas-dev magewelk.py[9685]: Jul 05 16:04:35 glas-dev systemd[1]: magewelk.service: Main process exited, code=dumped, status=3/QUIT Jul 05 16:04:35 glas-dev systemd[1]: Failed to start Data collector Magewell to Elasticsearch. — Subject: Unit magewelk.service has failed — […]

Amazon EC2 Ubuntu 16.04 telnet适用于某些端口,不适用于其他端口

我在新安装的Amazon EC2 ubuntu 16.04 LTS服务器上遇到一个奇怪的问题。 我有一台VPC服务器(IP地址为10.129.29.46),其中有80,443,11300和9000端口打开。端口80和443通过亚马逊安全组向公众开放,而端口9000和11300接受来自本地只有networking。 同一个VPC子网中有大约20台服务器。 子网中的大多数服务器都能够ping通和远程login telnet 10.129.29.46 11300 Trying 10.129.29.46… Connected to 10.129.29.46. Escape character is '^]'. 现在,当我从新创build的Ubuntu 16.04实例中ping同一台服务器时,我能够通过端口22进行远程login ubuntu@ip-10-129-29-50:~$ telnet 10.129.29.46 22 Trying 10.129.29.46… Connected to 10.129.29.46. Escape character is '^]'. SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.4 但是,当我telnet端口11300和9000,他们不会回应。 以下是输出: ubuntu@ip-10-129-29-50:~$ telnet 10.129.29.46 11300 Trying 10.129.29.46… telnet: Unable to connect to remote host: Connection timed out […]

为什么我不能使用密钥或密码login? 我该如何阻止?

我刚刚发现我可以login到我的服务器,只要我提供一个缺less的文件到SSH客户端! 我可以检查什么来找出为什么,我可以改变什么来阻止这种情况的发生? 使用缺less的文件login $ ssh -i ~/.ssh/x [email protected] Warning: Identity file /c/Users/G/.ssh/x not accessible: No such file or directory. Last login: Wed Aug 9 20:20:49 2017 from 192.168.15.250 user@server:~$ 未能使用无效的证书login $ ssh -i ~/.ssh/invalid.pem user@server Permission denied (publickey). 成功login $ ssh -i ~/.ssh/valid.pem user@server Last login: Wed Aug 9 20:21:07 2017 from 192.168.15.250 user@server:~$ 这些是我的/ […]