Articles of ubuntu 12.04

在Ubuntunetworking安装DHCP失败:DHCPDECLINE

我试图在Cisco UCS C240机架式服务器上使用Cobbler进行Ubuntu 12.04的networking安装。 Cobbler正在pipe理我的DHCP服务器(ISC),它被configuration为根据服务器的MAC地址分发固定的IP地址。 下面是一个来自/etc/dhcp/dhcpd.conf的相关部分,cobbler自动生成: group { host generic4 { hardware ethernet 2a:2c:b2:b4:f7:1a; fixed-address 10.10.0.153; option host-name "compute-3"; option subnet-mask 255.255.255.0; option routers 10.30.0.1; filename "/pxelinux.0"; next-server 10.10.0.131; } } 计算机(compute-3)能够成功进行PXE引导并启动Ubuntu安装过程。 但是,当安装程序到达尝试通过DHCP获取IP地址的部分时,将失败。 (此时,如果我使用相同的IP地址/networking掩码和网关手动configurationnetworking,则安装会成功完成)。 当我在运行DHCP服务器的cobbler节点上检查/ var / log / syslog时,发现服务器提供了一个IP地址,但是被客户端拒绝了: Mar 11 21:51:03 compute-1 dhcpd: DHCPDISCOVER from 2a:2c:b2:b4:f7:1a via eth2 Mar 11 21:51:03 compute-1 dhcpd: […]

无法远程访问CouchDB

请记住,我已经将此安装在运行最新版本的Ubuntu服务器的Amazon EC2实例上。 我已经将bind_address更改为0.0.0.0 。 netstat -an | grep 5984 netstat -an | grep 5984产生以下结果: tcp 0 0 0.0.0.0:5984 0.0.0.0:* LISTEN 从我读到的这个,一切似乎都是按顺序的。 但是,无论什么原因,当我远程导航到蒲团时,它不能解决。 当我尝试发送一个curl请求到数据库,我收到“无法连接到主机…” 当我从服务器本身发送它的时候,我得到了我期望从CouchDB得到的响应,所以我知道它被安装了,只是它或者我的防火墙configuration不正确。 任何帮助是极大的赞赏。 iptables -L返回以下内容: Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp — anywhere anywhere tcp dpt:5984 Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy […]

我的nginxredirect设置不起作用

我的网站有问题。 每当我尝试访问我的网站时,都不会redirect。 这意味着当我inputURL作为financenectar.com它打开我的网站在financenectar.com但不redirect到www.financenectar.com。 还有一件事,当我inputwww.financenectar.com时,它甚至没有工作。 当前的nginxconfiguration server { listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 default ipv6only=on; ## listen for ipv6 root /var/www/financenectar/; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name financenectar.com; location / { # First attempt to serve request as file, then # as […]

NGINX 301将带有参数的URLredirect到新的URL

我部署了一个网站,试图将一些原始urlredirect到新的url。 对于像这样的redirect,我对于NGINXconfiguration相当新颖。 这个工作: location /contactus.aspx { return 301 $scheme://$host/contacts; } 这些不起作用(url结果为404,不redirect): location /productcatalog.aspx?directoryid=11 { return 301 $scheme://$host/hard-drive-cases; } location /productdetails.aspx?productid=26* { return 301 $scheme://$host/lto-5-blue; } 我已经service nginx reload没有错误。 工作的redirect和不工作的redirect之间的最大区别是添加的参数。 redirect带参数的URL(最后是一个通配符)的最好方法是什么,以便它能正常工作?

在linux上转发linux日志到fluentd

在一个虚拟机上,我在/etc/rsyslog.d/50-default.conf有这个 *.* @192.168.29.1:42185 # Default rules for rsyslog. 在stream利的虚拟机上,我有这样的: 我在/etc/td-agent/td-agent.conf有这个 <source> type syslog port 42185 tag rsyslog </source> <match rsyslog.**> type copy <store> # for debug (see /var/log/td-agent.log) type stdout </store> <store> type elasticsearch logstash_format true flush_interval 10s # for testing. </store> </match> 但似乎没有任何东西发送到远程机器,因为我在/var/log/td-agent.log查看,我看到 2014-08-08 10:51:10 -0700 [info]: adding source type="syslog" 2014-08-08 10:51:10 -0700 [info]: […]

Ubuntu 12.04 LTS – apt-get更新无法find源代码

更新 : 运行sudo rm /var/lib/apt/lists/partial/*临时允许sudo apt-get update工作。 原文 : 我已经看到类似这样的问题的答案,但答案是“你的Ubuntu版本不再被支持”。 我们正在使用12.04服务器,这是一个LTS版本。 据我所知,这意味着精确的软件包应该存在,直到支持结束。 这些错误在一两周前才开始显现。 如果有帮助,服务器在Amazon EC2上。 我运行sudo apt-get update并得到以下错误: Hit http://repos.sensuapp.org sensu Release.gpg Hit http://repos.sensuapp.org sensu Release Hit http://security.ubuntu.com precise-security Release.gpg Hit http://packages.treasure-data.com precise Release.gpg Hit http://us-east-1.ec2.archive.ubuntu.com precise Release.gpg Hit http://packages.treasure-data.com precise Release Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates Release.gpg Hit http://security.ubuntu.com precise-security Release Hit http://repos.sensuapp.org sensu/main amd64 Packages […]

如何将子域指向不同的本地IP

我的问题是如何使用dynamicIP将子域指向本地服务器 。 区别在于我的ISP有一个静态IP,我想我不需要使用DynDNS对吧? 所以我可以用什么呢? 我的目标是将每个子域指向不同的Web服务器,如下所示: mydomain.com – > 192.168.1.100(主网页服务器) sub1.mydomain.com – > 192.168.1.101(networking服务器1) sub2.mydomain.com – > 192.168.1.102(networking服务器2) 我试过在这里使用Apache遵循指令的代理模块但是不成功。 当我通过浏览器访问sub1.mydomain.com时,它总是导致mydomain.com。 我可以这样做吗? 如果不是,请给我另一种方式。 我使用Ubuntu Server 12.04 [解决了] 解 设置DNS 公共IP的Alogging点: 1 @ public.ip 2 www public.ip CNAMElogging指向子域: 1 sub1 mydomain.com 2 sub2 mydomain.com 设置Apache。 将sub1和sub2添加到/etc/apache2/sites-available SUB1: <VirtualHost *:80> ServerName sub1.mydomain.com <Proxy *> Order deny,allow Allow from all […]

VMWare工具没有安装错误

VMWare工具不能在Ubuntu 12.04上安装。 我使用Chef来pipe理安装,但是如果手动运行,则Apt命令将失败。 我正在使用VMWare工具Debian repo。 例: $ cat /etc/apt/sources.list.d/vmware-tools-source.list deb http://packages.vmware.com/tools/esx/5.0u2/ubuntu precise main 当试图安装时,大多数软件包似乎都没问题,但是一个“vmware-tools-foundation”没有。 例: $ apt-get -q -y install vmware-tools-esx-nox=8.6.10-1.precise Reading package lists… Building dependency tree… Reading state information… You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: vmware-tools-esx-kmods-3.2.0-23-generic : Depends: vmware-tools-foundation (>= 8.6.10) but it […]

在Linux上高效地存储重复的文件

我托pipe了很多网站,我们的系统可以很容易地复制这些站点中的项目,这很方便,但会导致大量重复的(可能相当大的)文件。 我想知道,如果这些是Linux(尤其是Ubuntu)中的任何机制,其中文件系统将只存储一次文件,但链接到它的所有位置。 我需要这是透明的,也处理如果用户更改其中一个文件的情况下,它不会改变主文件的内容,但创build一个新的文件只是这个特定的文件实例。 练习的重点是减less重复文件使用的空间。

将OpenStack部署到单个节点是否有用?

由于一些基于Windows的专用服务器的局限性和昂贵的优惠,我考虑租用Linux服务器,甚至在该服务器上运行多个虚拟机。 我想过使用KVM,但是在命令行中设置和运行新的虚拟机并不是一件简单的事情(不难,只是点击次数不多)。 我可以访问一个OpenStack集群,部署新机器真的很容易,所以我的同事也可以做到这一点。 问题是,现在我们只有一个租用服务器,而这些服务器只有一个物理networking。 我find了一个脚本,可以在一台机器上build立所有的OpenStack服务( https://github.com/ilearnstack/cloudgear ),但这样做有用吗? 或者我应该直接坚持使用KVM,因为无论如何我只能在拥有5-10台虚拟机的第二台机器上使用最多1台,而OpenStack的开销会太大? 还是像virt-manager这样的在线工具? 这种创build和运行虚拟机的方式也将被简化。