Articles of ubuntu 12.04

/etc/init.d/iptables-persistent开始返回失败,但似乎工作

我想在Ubunutu服务器上激活iptables-persistent。 configuration文件位于 /etc/iptables/rules.v4 /etc/iptables/rules.v6 我已经安装了iptables-persistent包。 当尝试初始化/启动时,它会返回一个失败消息。 /etc/init.d/iptables-persistent start * Loading iptables rules… * IPv4… * IPv6… [fail] 我能做些什么来使iptables-persistent正确启动?

PostgreSQL复制滞后于Ubuntu 11.10 / 12.04

我有一个运行在Amazon AWS EC2实例上的PostgreSQL集群,启用stream式复制和“热备份”选项。 我现在正在逐渐将其从Ubuntu 11.10升级到Ubuntu 12.04 LTS,而我刚刚开始使用一些slave实例。 我不明白为什么,但从Ubuntu 11.10到12.04似乎复制滞后差异很大。 这些实例位于相同的区域,可用区域,相同的types,相同的EBS磁盘IOPS …. 这两个实例之间的差异是: Ubuntu发行版:从3.0.0-30到3.2.0-52精确到 – >内核 PostgreSQL包:相同的存储库(launchpad.net/~pitti/+archive/postgresql),相同的代码版本(9.2.4-0ppa1)只是不同的操作系统版本(oneiric到精确) 复制延迟的计算方法如下: SELECT EXTRACT(MILLISECONDS FROM now() – pg_last_xact_replay_timestamp()) 下面是过去12小时的图表(这里的趋势并不那么糟糕): http://i.imgur.com/vhHidMD.png http://i.imgur.com/aYiySFZ.png 有什么我不明白的吗?

由于ucf和文件acls,安装nagios失败

当安装Nagios给我这个错误,并因此在我的服务器上保留未configuration的包。 我寻求一些帮助,但他们没有告诉我确切的解决scheme。 有没有人有一个修复。 cp: preserving permissions for '/var/lib/ucf/hashfile.7': Operation not supported dpkg: error processing php5-common (–configure): subprocess installed post-installation script returned error exit status 1 Setting up nagios-plugins-basic (1.4.16-1ubuntu3) … 看起来像ucf的一些问题。

我该如何让www-data(消极地)改变Linux中进程的好处?

所以我使用Django运行一个网站,有时我通过在python中产生一个subprocess来调用位于服务器上的脚本。 当看着“顶部”的进程,我看到这些在用户“www-data”下调用。 因为我希望这个服务器充当计算服务器, 所以我希望能够改变正在运行的进程的好处,尤其是通过给予它们更高的优先级(负面的好)。 不幸的是,这似乎只允许根。 我已经尝试添加www数据到我的sudoers文件与所有,并将其添加到sudo和pipe理组,但这些似乎没有工作。 另外,我还有一个普遍的问题。 如果我的进程不是最大化的CPU将改变的好,即使做任何事情,如果我想能够运行“更快”?

绑定apache2到本地只有Ubuntu 12.04.3 LTS

试图将apache2绑定到本地主机上,在OpenVZ VPS上运行Ubuntu 12.04.3 LTS。 它失败了(见/var/log/apache2/error.log)。 默认configuration是: # cat /etc/hosts fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.0.1 localhost.localdomain localhost # Auto-generated hostname. Please do not remove this comment. <some-ext-ipv6-address> <some-hostname> ::1 localhost ip6-localhost ip6-loopback # netstat -lntup tcp6 0 0 :::80 :::* LISTEN 623/apache2 在/etc/apache2/ports.conf中将Listen 80更改为Listen 172.0.0.1:80。 Apache2出错了。 在端口80上没有其他服务监听,也没有其他(冲突)的监听声明,只是默认的ports.conf apache2附带了+所描述的单个变更。 # cat /var/log/apache2/error.log apache2: […]

无法在全新安装中设置nginx + php5-fpm获取404

我只是下载了nginx 1.4,马上就看到“Welcome to nginx!” 消息,那么我已经安装了php5-fpm ,所以我在/usr/share/nginx/html/demo.php上创build了一个php文件,只是用<?php echo "Hello World"; ?> <?php echo "Hello World"; ?>里面。 (我试着在ElementaryOS Ubuntu 12.04的基础上),并遵循本手册: http : //wiki.nginx.org/PHPFcgiExample 然后当我访问http://localhost/demo.php它不起作用,我给了一个404错误。 这是我的/etc/nginx/conf.d/default.conf文件: server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page […]

NGINX connect()unix:/var/run/php5-fpm/forums.socket失败

我最近用nginx,PHP-FPM重新设置了我的服务器。 我做了我一直做的,但现在的Nginx或PHP-FPM不处理PHP文件。 (我使用php phpinfo();)的最简单forms进行testing。 在我的VHOST的错误日志中,我得到: 2013/12/01 03:59:12 [crit] 1201#0: *5 connect() to unix:/var/run/php5-fpm/forums.socket failed (2: No such file or directory) while connecting to upstream, client: 173.245.53.199, server: forums.DOMAIN.DOM, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm/forums.socket:", host: "forums.DOMAIN.DOM", referrer: "http://forums.DOMAIN.DOM/" 有趣的是,在错误中提到的目录是在那里,但PHP的FPM或Nginx不生成在那里的套接字。 资源: http://paste.ubuntu.com/6502117/

kvm guest无法连接到主机外部,反之亦然

我有一个运行ubuntu 12.04服务器(名称= vmhost)的vmware虚拟机,具有networking桥接和完全访问互联网。 这个虚拟主机正在使用kvm虚拟机pipe理程序,并运行一个vm(centOS 6.4),networking桥接以及。 虚拟主机可以访问互联网,也可以访问虚拟主机,虚拟主机可以访问虚拟主机。 虚拟机不能访问互联网,也不能从我的子网上的另一台PC ping / ssh到它。 我有一个vmhost /它的VM的桥梁,并已检查iptables /路线,但没有发现任何东西。 另外我有ip_forwarding。 运行tcpdump我发现vmhost可以看到软件包,但是什么也不做。 我也尝试禁用ufw,但没有帮助。 Infor VHMOST路线: 内核IP路由表 Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.0.1 0.0.0.0 UG 100 0 0 virbr0 192.168.0.0 * 255.255.255.0 U 0 0 0 virbr0 The vmhouste Iptables -l Chain INPUT (policy ACCEPT) target prot opt source […]

使用Monit监视apache tomcat服务器的问题

我在Ubuntu Linux 12.04.1服务器中使用以下命令安装了Monit sudo apt-get install monit 我使用Monit的主要目标是在终止/停止时自动重启我的 – MySQL和Apache tomcat服务。 #Check and restart mysql service check process mysqld with pidfile "/run/mysqld/mysqld.pid" group database start program = "/etc/init.d/mysql start" stop program = "/etc/init.d/mysql stop" if failed host 127.0.0.1 port 3306 protocol mysql then restart if 5 restarts within 5 cycles then timeout 上面的代码完美工作,Monit重新启动MySQL服务(当它被杀死/停止)。 我已经实际configuration了tomcat,如下所示: – […]

更改ubuntu 12.04 ulimit永远不会工作

我正在使用hadoop,需要改变打开的文件ulimit -n 。 我已经看到了类似的问题在stackoverflow和其他地方,并试图在这些答案的一切,但它仍然无法正常工作。 我正在使用ubuntu 12.04 LTS 。 这是我所做的: 改变/etc/security/limits.conf限制,我已经把*和root设置。 我也改变了一些像10000和unlimited数量的限制。 * soft nofile 1513687 * hard nofile 1513687 root soft nofile 1513687 root hard nofile 1513687 我也试过以上的设置-而不是soft 。 经过这些更改之后,我对/etc/pam.d/文件进行了更改,例如: common-session common-session-noninterative login cron sshd su sudo 我已经添加session required pam_limits.so到每个文件的开头。 我重新启动了这个盒子,设置没有生效。 我还发现用户hbase mapred和hdfs在/etc/security/limits.d/目录中有文件。 我试图在这些单独的文件中更改限制也无济于事。 我已经尝试在/etc/profile放入ulimit -S -n unlimited 。 它不起作用。 最后,我已经尝试把limit nofile unlimited unlimited内/etc/init.d/hadoop*文件作为第一行。 不工作。 […]