我已经inheritance了一个CentOS服务器,从epel仓库安装nodejs。 然而,我需要一个特定的版本,所以我已经安装了nodejs存储库,但是我不能从新的存储库更新它,因为它告诉我以下内容: Loaded plugins: fastestmirror nodesource | 2.5 kB 00:00:00 nodesource/x86_64/primary_db | 38 kB 00:00:00 Loading mirror speeds from cached hostfile * base: ftp.freepark.org * epel: mirror.imt-systems.com * extras: ftp.freepark.org * remi: mirror.23media.de * remi-php56: mirror.23media.de * remi-safe: mirror.23media.de * updates: ftp.freepark.org Resolving Dependencies –> Running transaction check —> Package npm.x86_64 1:3.10.10-1.6.9.4.2.el7 will be updated […]
我有Centos 6.6 vps服务器。 当我使用命令: yum update get error: Error: Cannot find a valid baseurl for repo: base 当我检查ping和使用命令: ping -c4 google.com得到错误: ping: unknown host google.com 或者用ping -c4 62.212.252.84命令得到: 4 packets transmitted, 0 received, 100% packet loss, time 12999ms 和/ etc / sysconfig / network-scripts / ifcfg-eth0是: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes IPADDR=***.***.***.72 NETMASK=255.255.255.255 / etc / sysconfig […]
我找不到任何适合我的问题,所以我希望这不是重复的,但我有一些相当奇怪的行为。 我有这个相同的设置运行在Oracle Solaris(SPARC)没有这个问题,只是我的箱子。 CentOS盒子有3个NICS: P2P1: 192.168.1.2/24 Default Gateway 192.168.1.1 [MAC A] P2P2: 192.168.2.2/24 No default gateway (isolated network and switches) [MAC B] P2P3: 192.168.3.2/24 No default gateway (isolated network and switches) [MAC C] 我的netstat -rn Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 p2p3 192.168.2.0 0.0.0.0 255.255.255.0 U […]
我有一台用作数据库(mysql)和应用程序服务器的CentOS 6机器。 最近我已经注意到,KSMD正在醒来,在几分钟到几个小时的时间内使用半个核心。 据我所知,KSMD只用于为虚拟机执行内存重复数据删除。 该操作系统的文档中提到:“当所有qemu-kvm进程的总和增加了thres值时,KSM周期就会被触发RSZ超过系统总内存。 我已经检查过,没有虚拟机在这台机器上运行。 有任何想法吗?
有没有办法指定一个可执行文件的自定义dynamic库searchpath? 我想要/ usr / bin / python引用/usr/lib64/libpython2.7.so和/usr/local/bin/python2.7来使用/usr/local/lib/libpython2.7.so。 目前,我已经将Python 2.7.5作为/usr/bin/python(旧的,由CentOS使用)和Python 2.7.13作为/usr/local/bin/python2.7(新的用于开发)。 但是,这两个可执行文件都给我Python 2.7.13。 $ /usr/bin/python2.7 –version#Python 2.7.5 Python 2.7.13 ←错误! $ /usr/local/bin/python2.7 –version#Python 2.7.13 Python 2.7.13 他们绝对是独立的可执行文件。 -rwxr-xr-x. 1 root root 7136 Nov 5 2016 /usr/bin/python2.7 -rwxr-xr-x. 1 root root 11368 May 13 18:21 /usr/local/bin/python2.7 这是令人困惑的,直到我意识到它们都dynamic链接到libpython2.7.so,并且都在/ usr / local / lib中search它。 这是使用ldd确认的。 我可以通过修改/etc/ld.so.conf或$ LD_LIBRARY_PATH来得到旧的Python。 $ LD_LIBRARY_PATH […]
我在CentOS 7上运行MySQL,似乎无法远程连接MySQL。 我有: bind-address=0.0.0.0 当然不是#skip-networking但是如果我绑定到实际的公共/本地IP地址,则无关紧要。 我禁用了SELinux: [root@hostname ~]# sestatus SELinux status: disabled 并输出为iptables -L -v : Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 103K 21M ACCEPT all — any any anywhere anywhere ctstate RELATED,ESTABLISHED 13 880 ACCEPT all — lo any anywhere anywhere 21423 3952K […]
我的sites-available有以下configuration文件sites-available <VirtualHost *:80> ServerName my.domain RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] </VirtualHost> <VirtualHost *:443> ServerName my.domain DocumentRoot /var/www/html ErrorLog /var/www/logs/error.log CustomLog /var/www/logs/access.log combined SSLEngine on SSLCertificateFile /var/www/certs/certificate.pem SSLCertificateKeyFile /var/www/certs/private.key SSLCertificateChainFile /var/www/certs/ca_bundle.pem <Directory /var/www/html> Options -Indexes AllowOverride All Require all granted </Directory> <Directory /var/www/html/nav> DirectoryIndex nav.exe AllowOverride All Require all granted </Directory> </VirtualHost> […]
我在我的Centos 6专用服务器上设置了KVM主机。 我设法让VPS /客人build立和运行,但他们没有连接。 IP已经在客人身上提出来了,他们在KVM上使用我的桥(br0),但是IP没有被ping通,并且不能ping通外部。 KVM和guest虚拟机能够互相ping通,但guest虚拟机无法连接到KVM之外。 100%的数据包丢失。 KVM能够build立和接收外部连接。 正在用来创build客人的命令是: virt-install –name=vps2 –disk path=/var/lib/libvirt/images/vps2.img,size=8 –ram=512 –os-type=linux –network bridge:br0 –nographics –extra-args='console=tty0 console=ttyS0,115200n8 serial' –location '/tmp/CentOS-6.9-x86_64-minimal.iso' –boot cdrom 这是我的KVM主机的networking设置: /etc/sysconfig.network NETWORKING=yes HOSTNAME=**** NOZEROCONF=yes GATEWAY="91.***.***.254" virsh网表 Name State Autostart Persistent ————————————————– default active yes yes 使用ifconfig ifconfig br0 Link encap:Ethernet HWaddr D0:***:***:7C inet addr:91.***.***.216 Bcast:91.***.***.255 Mask:255.255.254.0 inet6 addr: fe80::d267:***:***:47c/64 […]
我想在一个VirtualHost authnz_external模块中为系统用户使用,而mpm-itk模块在另一个用户下运行它。 我的VirtualHost的configuration文件看起来类似这样: <VirtualHost *:8081> AddExternalAuth pwauth /usr/bin/pwauth SetExternalAuthMethod pwauth pipe <IfModule mpm_itk_module> AssignUserId user1 apache </IfModule> <Directory /var/www/user1_folder/> AuthType Basic AuthUserFile /var/www/user1_folder/apache.users AuthName "private area" AuthBasicProvider external AuthExternal pwauth require valid-user </Directory> </VirtualHost> 但是,如果我使用这种configuration,我不能login到networking。 在Apache的error_log文件中是这样的: [Wed Jun 14 15:43:04.449652 2017] [unixd:alert] [pid 17150] (1)Operation not permitted: AH02156: setgid: unable to set group id to […]
我今天醒来发现我的CentOS服务器的文件系统已经设置为只读模式。 我正在这台服务器上运行RAID 1。 # mkdir test mkdir: cannot create directory `test': Read-only file system 我做了一些研究,发现这通常是由硬件问题引起的,即硬盘即将失效。 我如何确定这是硬件问题而不是软件问题? 如果是硬件问题:如何找出两个驱动器中哪一个发生故障,需要更换? Smartctl为两个驱动器显示“PASSED”,尽pipe显示了678个重新分配的扇区,另一个显示了33个重新分配的扇区。 (我再次使用RAID 1) dmesg输出 ata2.00: exception Emask 0x0 SAct 0x4000000 SErr 0x0 action 0x0 ata2.00: irq_stat 0x40000008 ata2.00: failed command: READ FPDMA QUEUED ata2.00: cmd 60/08:d0:58:11:38/00:00:01:00:00/40 tag 26 ncq 4096 in res 51/40:02:5e:11:38/00:00:01:00:00/40 Emask 0x409 (media error) <F> […]