Articles of centos

在CentOS 7中安装Google V8,缺less一些文件

我正在按照以下步骤在CentOS 7中编译用于v8js扩展的Google V8: cd /tmp git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git export PATH=`pwd`/depot_tools:"$PATH" fetch v8 cd v8 make native library=shared -j2 chrpath -r '$ORIGIN' out/native/lib.target/libv8.so sudo mkdir -p /tmp/v8-install/lib /tmp/v8-install/include sudo cp out/native/lib.target/lib*.so /tmp/v8-install/lib/ sudo cp -R include/* /tmp/v8-install/include echo -e "create /tmp/v8-install/lib/libv8_libplatform.a\naddlib out/native/obj.target/tools/gyp/libv8_libplatform.a\nsave\nend" | sudo ar -M 问题是, make native library=shared缺less整个文件夹/tools/gyp/ libv8_libplatform.a /tools/gyp/ libv8_libplatform.a ,所以我坚持在这一步 echo -e […]

错误的PID:带软件集合Python的supervisord程序

我有一个Python服务器,必须由启用了软件集合的环境来执行。 supervisordconfiguration文件看起来像这样: [program:xxx] command=/usr/bin/scl enable rh-python35 — /myenv/bin/python server.py stdout_logfile=/var/log/xxx.log redirect_stderr=true 程序启动正常,但是supervisord认为scl进程是实际进程,但是Python服务器有不同的PID 。 SIGTERM(停止,重新启动等)的时间到了, scl进程终止,但Python服务器继续运行。 我可以让我的服务器写一个PID文件,然后使用pidproxy提供的pidproxy程序,如下所述: http://supervisord.org/subprocess.html#pidproxy-program 然后,如上所述, supervisord会发送信号到正确的PID。 但是,如果可能,我宁愿避免更改服务器代码来创buildPID文件。 问题:有没有其他的方法来设置它? 请注意,直接执行软件集合内的python可执行文件不起作用: [user@xxx gpsengine]$ /opt/rh/rh-python35/root/bin/python -V /opt/rh/rh-python35/root/bin/python: error while loading shared libraries: libpython3.5m.so.rh-python35-1.0: cannot open shared object file: No such file or directory 其他详情: Centos 7 编辑:除了涉及中间shell脚本的pidproxy还有一个额外的方法。 这个邮件列表条目描述了一个enable 脚本 (与scl enable 命令相反): https://www.redhat.com/archives/sclorg/2016-June/msg00008.html 这可以在shell脚本中使用,如下所示: exec […]

CentOS – 网卡突然无法与本地子网外的设备通信

我有一个CentOS 7(以前是CentOS 6)的HP DL385p服务器,它通过一个NIC(使用SFP转换器连接到铜线)连接到本地LAN。 最重要的是,它使用F5 VPN客户端来轮询来自安全远程位置的信息。 它也有一个用PHP运行Nginx的docker容器。 我看到的问题如下。 服务器启动,连接到networking,并且能够与互联网上的设备以及在允许的内部LAN内进行通信。 然后我们连接F5 VPN,当然还是可以达到与设备一样的效果,但通过vpn添加了远程安全设备。 这将保持运行一段时间,突然间,服务器发现自己无法与其所连接的本地子网之外的其他任何设备进行通信。 检查消息,dmesg和journalctl( journalctl –this-boot –all –no-pager )除了f5 vpn使用的tun0接口被“删除”以外没有任何明显的相关性。 NetworkManager[1047]: <info> (tun0): device state change: activated -> unmanaged (reason 'removed') [100 10 36] 然而,F5 vpn(f5fpc)报告没有改变(它正在等待重新连接),虽然这是唯一的日志显示(与问题的任何明显的关系),我相信这不是原因,而只是一个症状问题。 我的意思是,我相信F5的VPN是断开的,因为底层的要求已经消失 – 在本地子网(包括远程BIG-IP设备)之外进行通信的能力。 如果我检查服务器的路由表,路由显示正常 – 有一个默认路由到一个有效的网关设备(它仍然可以到达)。 接口也显示为在iproute2和net-tools中正确解决和运行。 临时解决问题的最快解决scheme是,在运行systemctl restart networking同时,在连接恢复后重新连接F5 VPN。 我有点难倒了,下一步该怎么看,以及我怎么可能会增加journalctl中的冗长度或从NetworkManager中发生的事情。 注意:我之前提到过使用CentOS 6(不使用NetworkManager),同样的事情发生在那里,我升级认为它可能是2.6内核或者更老的驱动程序。 CentOS 7似乎在lsmod中包含了足够的be2net网卡驱动程序。 为了提供尽可能多的细节(我允许的程度),我也提到docker工人。 编辑:我已经张贴在devcentral的情况下,该问题是与F5的VPN客户端 – https://devcentral.f5.com/questions/linux-big-ip-vpn-client-disconnecting-but-potentially-taking-潜本地网卡function于它的过程-47920 […]

虚拟主机具有与hostnamectl设置的系统主机名相同的ServerName时出现错误Http 404

所以,我试图在我的Centos 7 Cloud VPS中为phpMyAdmin创build一个虚拟主机,但是当我尝试查看它时,出现错误http 404,如果NameServer与hostnamectl set-hostname webserver.exampledomain.tld 这里是configuration文件: /etc/httpd/conf/httpd.conf中: # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. # In particular, see # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> # for a discussion of each configuration directive. # # Do NOT […]

节点不响应来自不同子网的端口5000

所以我有两个子网,负载均衡器和后端。 BE1正在运行节点服务器,因为我们试图让套接字工作: BE1可以请求本地主机:5000 /testingBE2可以请求BE1:5000 /testing LB1可以请求BE1:80 LB1 – 不能请求BE1:5000 /testing [root@lb1 ~]# curl be1:5000/test curl: (7) couldn't connect to host 从我得到的任何其他服务器 [root@be1 ~]# curl be1:5000/test Hello world 任何想法将是有益的 – 只是试图找出:(

我应该在我的Unix套接字上应用什么样的SELinuxtypes?

我有一个/opt/rtd/gunicorn/run.sock套接字文件: /opt/rtd/gunicorn/run.sock 。 我需要nginx能够打开此套接字并写入它。 当我运行sesearch –allow -s httpd_t | grep unix_stream_socket sesearch –allow -s httpd_t | grep unix_stream_socket我注意到httpd_t被允许连接到types为httpd_t的套接字。 但是当我尝试申请时,我得到: # semanage fcontext -a -t httpd_t "/opt/rtd/gunicorn/run.sock" ValueError: Type httpd_t is invalid, must be a file or device type 我尝试过从sesearch中find的其他types,例如httpd_sys_script_t甚至是passenger_t 。 同样的结果。 我应该怎么设置types? 我宁愿不必制定额外的政策,以允许超过必要的。 必须有一种方法允许httpd_t从CentOS 7.2中的现有策略的文件套接字读取,对吧?

在OpenVZ节点上logging根用户的SSH命令

有没有办法在OpenVZ节点上从SSHlogin根命令? 我试过史努比,我无法排除一切,只留下SSH命令。 @edit我想只login从远程主机通过SSH / SFTP发送的命令,因为我的openvz节点root用来在本地运行许多其他命令。 例如,史努比正在logging在系统上发生的一切(这是很多垃圾..),但我想通过SSH / SFTP看到任何人在根上做了什么。

挂在CentOS 5.8的证书链上的openssl 0.9.8e握手

我们有一些运行CentOS 5.8的服务器和OpenSSL 0.9.8e openssl version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 当试图从这些服务器(我们的服务器在这里是SSL客户端)build立到端口636上的LDAPS的连接时,远程服务器提供证书链时ssl交换机挂起: openssl s_client -connect 192.168.127.18:636 -state -nbio CONNECTED(00000003) turning on non blocking io SSL_connect:before/connect initialization SSL_connect:SSLv2/v3 write client hello A SSL_connect:error in SSLv2/v3 read server hello A write R BLOCK SSL_connect:error in SSLv3 read server hello A SSL_connect:error in SSLv3 read server hello A read […]

Centos 7:Dropbox服务随机失败

我们有一个通过官方非官方的方式安装Dropbox服务的Centos 7虚拟机 – DropboxWiki 。 唯一的区别是他们创build服务的脚本根本不起作用。 经过一番search,我们发现了一个工作脚本,现在看起来像这样: [user@server ~]# nano /etc/systemd/system/dropbox.service [Unit] Description=Dropbox is a filesyncing sevice provided by dropbox.com. This service starts up the dropbox daemon. After=network.target syslog.target [Service] Environment=LC_ALL=en_US.UTF-8 Environment=LANG=en_US.UTF-8 EnvironmentFile=-/etc/sysconfig/dropbox ExecStart=/bin/dropbox start ExecReload=/bin/dropbox restart ExecStop=/bin/dropbox stop Type=forking [Install] WantedBy=multi-user.target 一切工作一天或几天,然后,显然随机给我们,服务失败: [user@server ~]# systemctl status dropbox â dropbox.service – Dropbox is a filesyncing […]

smtpd_recipient_restrictions:一些RBL工作,但SBL不是

我正在尝试设置postfix,以便它使用阻止列表来阻止垃圾邮件。 这是我在main.cf中的限制设置: smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_rbl_client zen.spamhaus.org,reject_rbl_client b.barracudacentral.org,check_policy_service unix:private/spfpolicy 我通过向crynwr.com服务发送电子邮件来testing限制,该服务使用来自阻止的IP的电子邮件进行回复。 maillog在交付时显示了这一点: Aug 23 12:06:27 srv2 postfix/smtpd[23321]: NOQUEUE: reject: RCPT from ns1.crynwr.com[192.203.178.14]: 454 4.7.1 Service unavailable; Client host [192.203.178.14] blocked using b.barracudacentral.org; Client host blocked using Barracuda Reputation, see http://www.barracudanetworks.com/reputation/?r=1&ip=192.203.178.14; from=<[email protected]> to=<MYEMAILADDRESS(REDACTED)> proto=SMTP helo=<pdam.crynwr.com> 所以它表明某些东西被postfix拒绝了,但是这封电子邮件从另一个IP到达,并在我的收件箱中显示出来:邮件图片 我真的迷路了,甚至不知道从哪里开始看,所以我会更新这个更多的信息,如果需要的话。 我使用Centos Web Panel运行Centos 6.8。 编辑:更新,以适应发现梭子鱼阻止列表工作,但zen.spamhaus.org不是