我正在使用新安装的CentOS 6.4(x86-64)和EPEL库。 $ yum install nodejs … $ node -v v0.10.5 到目前为止,这么好,但是当我尝试安装npm ,我会得到这个错误消息: $ yum install npm Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: ftp.halifax.rwth-aachen.de * epel: mirror.fraunhofer.de * extras: centos.psw.net * updates: centos.psw.net Setting up Install Process Resolving Dependencies –> Running transaction check —> Package npm.noarch 0:1.2.17-5.el6 will […]
在CentOS 6.4 / 64位 – 如何find用户“无人”的限制? 因为我不能只是su – nobody打电话ulimit -a : # id nobody uid=99(nobody) gid=99(nobody) groups=99(nobody) # su – nobody This account is currently not available. 更新: 我在问:如何为CentOS用户nobody调用ulimit -a ,这样我就可以调整/etc/security/limits.conf关于该用户打开文件的最大数量。 更多的细节: 我有一个由init (我为它创build了一个文件: /etc/init/my_card_game.conf )启动的perl脚本(一个基于非基于TCP-sockets的纸牌游戏守护进程),但是然后丢弃超级用户privilleges和nobody运行: sub drop_privs { my ($uid, $gid) = (getpwnam('nobody'))[2, 3]; die "User nobody not found\n" unless $uid && $gid; umask(0); […]
在Centos 6.4上,我想阻塞除了22,80和443之外的所有传入端口。80(外部)应该被redirect8080(内部)。 443(外部)应该被redirect到8181(内部)。 我使用了以下命令: service iptables stop iptables -A INPUT -i eth0 -p tcp –dport 80 -j ACCEPT iptables -A INPUT -i eth0 -p tcp –dport 443 -j ACCEPT iptables -A INPUT -i eth0 -p tcp –dport 22 -j ACCEPT iptables -A PREROUTING -t nat -i eth0 -p tcp –dport 80 -j REDIRECT –to-port 8080 […]
所以我已经在Linux服务器上安装了Solr,我想从另一个Web服务器和/或我的电脑访问它。 从Solar Server,我可以看到它正在运行 [root@solr ~]# wget -qO- http://localhost:8983/solr <html> <head> <link rel="stylesheet" type="text/css" href="solr-admin.css"> <link rel="icon" href="favicon.ico" type="image/ico"></link> <link rel="shortcut icon" href="favicon.ico" type="image/ico"></link> <title>Welcome to Solr</title> </head> <body> <h1>Welcome to Solr!</h1> <a href="."><img border="0" align="right" height="78" width="142" src="admin/solr_small.png" alt="Solr"/></a> <a href="admin/">Solr Admin</a> </body> </html> 然而,将http://192.168.1.19:8983/solr/插入我的浏览器,或从我的Web服务器ping,无法连接。 如何让我的networking上的其他设备可以访问Solr? # netstat -anp | grep :8983 tcp 0 0 […]
我试图强制执行一个特定的一套dir的777文件权限。 我使用“setfacl -md:o :: rwx”,并得到什么似乎是正确的权限 $ getfacl . # file: . # owner: blah # group: blah # flags: -s- user::rwx group::rwx other::rwx default:user::rwx default:group::rwx default:other::rwx 当我运行mkdir时,我得到一个带有正确的烫发的目录。 $ mkdir test $ ll -d test drwxrwsrwx+ 2 blah blah 4096 Oct 28 10:26 test 当我运行“mkdir -p”时,我得到与umask相匹配的perms,而不是acl。 $ mkdir -p test1 $ ll -d test1 drwxrwsr-x+ 2 […]
我已经安装了Cent Os 6.4 -Final Version,并为PHP Web开发设置了环境。 我的应用程序使用.htaccess的URL重写&否认直接访问文件。 我的configuration文件httpd – /etc/httpd/conf/httpd.conf如下, <Directory "/var/www/html"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* — "Options All" # doesn't give it to you. # # […]
我是新来的这个负载平衡的情况下,我负责找出如何使这个负载平衡的作品。 我的环境: Centos 6.4 64 Bit Webserver: Lighttpd All running in ESXI virtual IP: 192.168.1.6 LB1: 192.168.1.4 LB2: 192.168.1.5 Webserver 1: 192.168.1.12 Webserver 2: 192.168.1.13 Gateway: 192.168.1.1 尝试在HAproxy生产之前在实验室中运行testing并保持活动状态。 以下是我在Keepalived设置中的内容: ! configuration文件keepalived global_defs { notification_email { [email protected] } notification_email_from [email protected] smtp_server 192.168.1.4 smtp_connect_timeout 30 router_id 192.168.1.1 } vrrp_script chk_haproxy { script "killall -0 haproxy" interval 1 […]
我试图configuration桑巴服务器的内部共享的目的。 我可以访问全球环境,但是当我尝试访问目录环境时,它是失败的。 我检查了桑巴日志文件,我发现下面的错误,我试图用Googlesearch,但不幸的是没有find任何解决scheme的迹象。 [2014/02/25 16:59:43.905575, 0] lib/util_sock.c:628(open_socket_in) open_socket_in(): setsockopt: SO_REUSEPORT = true on port 139 failed with error = Protocol not available [2014/02/25 17:04:14.386298, 0] lib/util_sock.c:628(open_socket_in) open_socket_in(): setsockopt: SO_REUSEPORT = true on port 445 failed with error = Protocol not available 你对这个错误有什么想法或build议吗? 我在CentOS 6.4上使用Samba 3.6.9-167.el6_5。
我正试图让一个现代的GCC在Centos 6.4上编译。 问题是,Centos没有现代的glibc,GCC 4.8.x和4.7.x不断给我下面的编译错误: … -DL_gcov -c ../../.././libgcc/libgcov.c In file included from /usr/include/features.h:385:0, from /usr/include/stdio.h:28, from ../../.././libgcc/../gcc/tsystem.h:88, from ../../.././libgcc/libgcov.c:29: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory 这里的问题是gnu/stubs-32.h是现代glibc一部分,而Centos 6.4似乎没有这个function。 我已经尝试构build我自己的glibc但是一旦安装完成,并且在我的本地LD_LIBRARY_PATH我无法运行任何其他程序,因为系统上的所有现有可执行文件都会尝试链接到它并导致失败。 我想使用新的编译器,因为它具有更好的C ++ STL代码处理能力,并且因为GCC 4.8中的优化器使得我的代码在1/2时间内运行,就像CentOS附带的GCC 4.4.7编译器一样。 任何build议如何做到这一点?
重新启动后,我使用init.d脚本从挂载的networking共享(autofs)执行应用程序。 该脚本在尝试执行命令之前等待30秒,以等待networking/挂载点处于启动状态。 在执行命令之前,我想以某种方式检测networking是否已经完全挂起,挂载是否已经确定挂载。 你有什么build议如何用这个脚本实现这个(在CentOS 6.4中)? 这是我现在所拥有的: #!/bin/bash # # chkconfig: 3 95 5 # description: My app # processname: my-app # # Sleep for 30 seconds before attempting to execute command sleep 30s # Get function from functions library . /etc/init.d/functions # Start the service my-app from autofs mount start() { echo -n "Starting my-app: […]