我的一台电脑上安装了Gentoo Linux amd64。 我在/etc/conf.d/net中configuration了一个静态IP: auto_eth0="true" config_eth0="192.168.1.2/24" routes_eth0="default via 192.168.1.1" enable_ipv6_eth0="false" 我手动编辑/etc/resolv.conf并添加了谷歌DNS服务器。 问题是,每当我重新启动我的服务器/etc/resolv.conf被清除。 我厌倦了设置'chmod aw /etc/resolv.conf',但它不起作用,但我其实不太喜欢这种方法。 我怎么让gentoo知道我不想修改/etc/resolv.conf? 谢谢!
我在位于我的主目录的.bashrc文件中声明了一个别名。 PS1环境variables的导出也已经添加到这个文件中。 # /etc/skel/.bashrc # # This file is sourced by all *interactive* bash shells on startup, # including some apparently interactive shells such as scp and rcp # that can't tolerate any output. So make sure this doesn't display # anything or bad things will happen ! # Test for an interactive shell. There […]
所以,我的服务器是生活在未来,不幸的是我不能得到彩票号码,或select了它的股票。 它认为这是时间: Thu Nov 7 04:07:18 EST 2013 不正确,我尝试通过几种方式通过date手动设置时间 # date -s "06 NOV 2013 14:48:00" # date 110614482013 – 相同的输出,相同的问题 哪些产出Wed Nov 6 14:48:00 EST 2013 ,但当我再次检查date,它仍然设置为04年11月7日或任何其他。 我检查了我的系统消息,我经常看到这个消息: Nov 7 03:54:00 www ntpd[4482]: time correction of -47927 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time. 这是有道理的,我们离开了正确的时间。 但我似乎无法手动修复它。 那么现在怎么办? 此外,我想知道如果我的硬件时钟设置正确, […]
如何在nginx中发生500错误时让pipe理员注意到?
在更新我的gentoo linux盒子时,我设法弄糟了PAM。 现在我无法login! 这是我得到的消息 login: <I type my name, enter> /bin/login: error while loading shared libraries: libpam_misc.so.0: cannot open shared object file: No such file or directory login: <repeat> 我想我需要在单用户模式下启动,但我该怎么做? 不要担心PAM – 一旦我能够控制系统,我就会知道这一点。 如果我需要使用一个活CD,我将不得不等到明天,因为我没有任何方便。 更新:我尝试添加到grub的内核行 init=/bin/sh real_init=/bin/sh 这有帮助。 现在我很快就被扔到了一个壳里。 现在的问题是,我的键盘不工作! 这是USB … 更新:将这些添加到内核行也不起作用: init=/bin/bash real_init=/bin/bash (no keyboard) init=/bin/bb real_init=/bin/bb (kernel panic) single (no change–original problem […]
我正试图安装一个gentoo与PHP 5.2的APC在这里完整的命令我Lanched: mkdir /home/APC-php cd /home/APC-php wget http://pecl.php.net/get/APC tar -xzvf APC cd APC-3.1.9 /usr/local/php5/bin/phpize ./configure –enable-apc –enable-apc-mmap –with-php-config=/usr/local/php5/bin/php-config make make test (i think almost everything failed here) make install /etc/init.d/httpd restart make install命令显示 Installing shared extensions: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/ Installing header files: /usr/local/php5/include/php/ 当我做完后, make test输出是: ===================================================================== FAILED TEST SUMMARY ——————————————————————— APC: apc_store/fetch with strings [tests/apc_001.phpt] APC: […]
我们非常喜欢Portage和Gentoo上其他工具使用的ebegin , eend , eerror , eindent等命令的风格。 绿色 – 黄色 – 红色子弹和标准布局可以非常快地发现错误,否则将是非常灰色的命令行输出。 #!/bin/sh source /etc/init.d/functions.sh ebegin "Copying data" rsync …. eend $? 生产输出类似于: * Copying data… [ OK ] 因此,我们在一些常见的shell脚本中使用这些命令,这对于使用Ubuntu和其他Linux的人来说是一个问题。 (linuces?linuxen?linucae?其他发行版) 在Gentoo上,这些函数是由OpenRC提供的,并且导入了functions.sh文件(其确切位置似乎略有不同)。 但是在Ubuntu上获取这些命令有一个简单的方法吗? 从理论上讲,我们可以用沉闷的echo来代替它们,但我们宁愿不要?
我有两个相同的EC2实例(第二个是第一个副本),运行Gentoo。 一审具有监控单个进程的监控function,一些系统资源和function很好。 在第二种情况下,monit运行,但立即退出。 两个实例的configuration都是类似的,monit的版本也是如此。 monit.log显示: [GMT Oct 3 08:36:41] info : monit daemon with PID 5 awakened strace monit最后一行显示: write(2, "monit daemon with PID 5 awakened"…, 33monit daemon with PID 5 awakened ) = 33 time(NULL) = 1349252827 open("/etc/localtime", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=118, …}) = 0 fstat64(4, {st_mode=S_IFREG|0644, st_size=118, …}) = 0 mmap2(NULL, […]
我试图在Amazon EC2服务器(通过EngineYardpipe理)上的Gentoo 1.12.11.1中启用HAProxy日志logging。 我已经修改了syslog.conf文件,如下所示: local0.* -/var/log/haproxy.log 我也修改了haproxy.cfg文件来包含 log 127.0.0.1 local0 在全球范围内。 我已经重新启动这两个守护进程,并在指定的地方创build日志文件。 但是HAProxy仍然无法写入文件。 我认为这是因为Syslog没有configuration为接受TCP / UDP连接。 根据http://linuxadminzone.com/enable-or-fix-logging-for-haproxy-load-balancer/我需要通过-r标志来启用此function。 不幸的是,我无法弄清楚在这个发行版上设置该标志的位置。 提前致谢!
我在gentoo中绑定了两个nics,eth2和eth3绑定了bond0。 eth2连接到与eth3不同的交换机,备用eth2和主动模式eth3。 eth3运行正常,没有丢包,但eth2不断丢包。我更换了线缆并检查了没有错误的交换机端口。 我在eth2上做了一个TCPDUMP,所有我看到的都是arp请求。 eth2:flags = 6211 mtu 1500 ether 90:b1:1c:19:59:1e txqueuelen 1000(Ethernet)RX packets 32664867 bytes 2090551811(1.9 GiB)RX errors 0 dropped 32664913 overruns 0 frame 0 TX packets 0 bytes 0(0.0 B )TX错误0丢弃0超载0载波0碰撞0设备中断36内存0xd7000000-d77fffff eth3:flags = 6211 mtu 1500 ether 90:b1:1c:19:59:1e txqueuelen 1000(以太网)RX数据包3186342439字节683402238345(636.4 GiB)RX错误0丢弃0超出0帧0 TX数据包2465388994字节575317691871(535.8 GiB )TX错误0 丢弃0超限0载波0冲突0设备中断37内存0xd8000000-d87fffff 内核Linux 3.7.9-gentoo networkingconfiguration config_eth0 =“null”config_eth1 =“null” config_eth2="null" config_eth3="null" […]