Tag Info

New answers tagged

2

What I ended up doing was using mknod like @derobert suggested to create the devices that mdadm was looking for. I tried the major/minor numbers mdadm was telling me it couldn't find with the different drive letters I was trying to remove until it worked. mknod /dev/sde1 b 8 17 Then I had to use the --force option to get it remove the component. mdadm ...


3

It's because the device nodes no longer exist on your system (probably udev removed them when the drive died). You should be able to remove them by using the keyword failed or detached instead: mdadm -r /dev/md0 failed # all failed devices mdadm -r /dev/md0 detached # failed ones that aren't in /dev anymore If your version of mdadm is too old to do ...


1

OK, I found myself in exactly the same position. It seems CentOS creates a small root volume by default and fills the remainder of your space with /home. I even tested my setup first in a VM but with the smaller disk CentOS didn't create the home volume. I picked up on this problem before becoming space constrained tho' and also figured how not to have to ...


1

Please realize this problem has nothing to do with xinitrc, or your XOrg Setup. I stand by my statement that you can: Either freeze the NVIDIA driver at 3.11.x, as this is the last driver to support the 2.6 series kernel, or: Update the kernel in your environment to at least 3.11. See justification below. This entry is in my changelog: 05 Sep ...


0

Order of operations. You need your excludes first, then your includes. This example excludes everything, then includes certain folders, then excludes files within those folders that were included. mirror --exclude '.*' --exclude '.*/' --include 'v*-stable/' -X '*.src.rpm' in your case mirror --continue --only-newer --delete --verbose=3 --no-perms ...


0

I've solved this problem after two weeks of unlucky attempts, i found that there is bug in rpc.mountd, and just tried to install a recent version of nfs-utils: yum update nfs-utils


5

For your -name version, instead of ! -name '*[done]*' you need ! -name '*\[done\]*' - otherwise it's taking the letters in brackets as a character set, and thus excluding anything that includes the letter "d" or "o" or "n" or "e" (and all of your filenames contain "e"). You were then negating that condition a second time, so that rather than excluding all ...


1

The reason the code is failing to run properly is the mismatch of AND and OR groups in the initial find command: find * \( -name '*.mkv' -o -name '*avi' -o -name '*mp4' -o -name '*flv' -o -name '*ogg' -o -name '*mov' ! -name '*-[900p-by-ZiriusPH].mkv' \) -print The binding for the parameters is to print the files matched for Name *.mkv OR Name *.avi OR ...


4

Instead of piping find into the loop, you could go through an intermediate file. That will ensure that the finding step and the looping step happen in sequence, with no overlap. Something like the following (I altered your expression for brevity): find \( -name '*.mkv' -o -name '*avi' \) >files <files while IFS= read file do ffmpeg -i "$file" ...


3

brandbot: tool to write branding to /etc/os-release When you start it1, it looks for /var/lib/rhsm/branded_name and adds in /etc/os-release: PRETTY_NAME=first_line_from_branded_name 1Path-based activation — System services that support path-based activation can be started on-demand when a particular file or directory changes its state. Systemd uses path ...


1

It is a tool that write branding to /etc/os-release which in turn contain operating system identification data.


0

You commented out the proxy listening on port 8080 in your above example. Is there a (reverse)proxy configured and still listening on the front end? In that case you should enable ssl on the front-end server and uncomment listening on 8080 as per your above example. If there is no front-end proxy listening yet/at all: Make sure to to have ssl.conf ...


0

I found this page, which directed me to hack up my initrd. Once I did that, things began to work. Not sure I understand exactly why I needed to do that, but it's working now. Question... what filesystem(s) should not be mounted with journalling enabled? tmp? swap? others?


2

In CentOS7, you have systemctl that will pretty much do most of this for you. If Apache is installed via the standard packages, this should work for you out-of-the-box: echo -n $(date +"%s %F %T"): \ if systemctl is-active httpd; then \ systemctl stop httpd && echo "httpd stopped"; \ elif systemctl enable httpd; then \ systemctl start httpd ...


1

Here is my onliner: ( if service httpd status; then echo 'stop'; service httpd stop; else echo 'check installed'; if ! rpm -qa | grep -q '^httpd-'; then echo 'install'; yum -y install httpd; fi; echo 'start'; service httpd start; fi ) &> /tmp/temp.log; cat /tmp/temp.log >> /log/httpd/some.log; cat /tmp/temp.log >> ...


0

I had the same issue with a virtual CD. The installer looks up the drive based on the label that contains spaces (\x20). In my case, the installer could not find the virtual CD. I changed the command line (press TAB) to DRIVE=hd:/dev/sr0


4

This is actually quite a difficult problem. One of the major difficulties is that the places where one most often wants to do this are the places where it's quite likely that one will be in the middle of installing or changing stuff. Another is that there's a subtle but very important difference between the system management toolset that is installed, the ...


0

From a program, you can also use the defined APIs for that. Systemd comes with libsystemd, which can check whether it can successfully connect to the running systemd instance.


2

Remove the '{}' from in the 'for file' part. It should be like this instead: for file in *.mkv; do height=$(mediainfo "$file" | grep -E 'Height'); echo $height; height=${height//[!0-9]/}; echo $height; done In your code the "*.{mkv}" is expanding to all files ending in '.{mkv}' of which, I presume, there aren't any, so the list in the for statement comes ...


4

You wrote *.{mkv} instead of *.mkv. Therefore the loop will only loop about the one "file" *.{mkv} which does not exist. In this case the output of mediainfo is simply empty. Add something like echo "$file" in your loop to verify.


11

The init process is always assigned PID 1. The /proc filesystem provides a way to obtain the path to an executable given a PID. In other words: nathan@nathan-desktop:~$ sudo stat /proc/1/exe File: '/proc/1/exe' -> '/sbin/upstart' As you can see, the init process on my Ubuntu 14.10 box is Upstart. Ubuntu 15.04 uses systemd, so running that command ...


0

AFAIK, you need to use the same domain as the cert is registered with when accessing a site. So the IP address will always fail on the certificate check by the browser, since the IP is not part of the Certificate.


8

On RPM-based systems, you can query the RPM database to see what package provides /sbin/init. For example: fedora:~$ rpm -qf /sbin/init systemd-216-24.fc21.x86_64 centos:~$ rpm -qf /sbin/init upstart-0.6.5-12.el6_4.1.x86_64 opensuse:~$ rpm -qf /sbin/init systemd-sysvinit-44-10.1.1.i586 If you just want the package name, and not version, you could add ...


0

If the file system is mounted as type ext3, file system journaling is turned on by default, no need to specify it explicitly. The ext3 file system type can be specified explicitly with the '-t ext3' option to the mount command or in the type column in /etc/fstab. Normally, you should not removed the 'defaults' option for the the root file system in ...


4

You can poke around the system to find indicators. One way is to check for the existence of three directories: /usr/lib/systemd tells you you're on a systemd based system. /usr/share/upstart is a pretty good indicator that you're on an Upstart-based system. /etc/init.d tells you the box has SysV init in its history The thing is, these are heuristics that ...


1

Set the hostname with: hostnamectl --static set-hostname host.domain


0

What you are seeing There's a terminal emulator program built into the Linux kernel. It doesn't manifest as a running process with open file handles. It's layered on top of the framebuffer and the input event subsystem, which it uses internal kernel interfaces to access. It presents itself to application-mode systems as a series of kernel virtual terminal ...


1

The Linux console itself does not support displaying Chinese, but you can run some alternative console(such as kmscon) to display Chinese without starting X.


0

I think it is caused by PackageKit. You have to check for PackageKit and disable it (I assume it is CentOS with systemctl, otherwise you can use service and chkconfig): systemctl stop packagekitd systemctl disable packagekitd Another approach is to open /etc/yum/pluginconf.d/refresh-packagekit.conf with a text editor, and change enabled=1 to enabled=0. ...


0

Use localectl command to set. Following is an example localectl status # to display locale settings localectl set-locale LANG=en_GB.utf8 # to set the Language localectl list-locales # to lists locales locale list-keymaps # list keyboard mappings locale set-keymap uk # sets the key map


1

They are in /usr/lib/kbd/consolefonts which is owned by the kbd-misc package.


0

To have possibility to run virt-manager correctly on the same machine as you'd like to control it (locally), you'll need to install the following packages: qemu-kvm qemu-img virt-manager libvirt libvirt-python python-virtinst libvirt-client virt-install virt-viewer Re-check if they are all correctly installed on your server, or simply run the following ...


0

It took about 10 seconds to start mc. Running strace -r -tt -o mc.strace mc I got: ... 0.000023 pipe([7, 8]) = 0 0.000028 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fcad000fa50) = 3332 0.000247 write(5, " PROMPT_COMMAND=${PROMPT_COMMAND"..., 75) = 75 0.000050 rt_sigaction(SIGINT, {0x449960, ...


-1

I have a set up of Adapter 1 = NAT = eth0 Adapter 2 = Bridged Adapter = eth1 Under Oracle Linux (RHEL/ CentOS) I run the Network Connections application and set eth0 to a fixed IP address and set eth1 to Automatic DHCP When you do a ifconfig I see that both eth0 and eth1 have inet addresses set and communication from the HOST to GUEST work and from ...


1

In RHEL 7, you'll have to use nmcli command for permanent change. nmcli command uses /etc/sysconfig/network-scripts/ifcfg-con_name file first, also when you modify connection properties with nmcli it will write to ifcfg-con_name file. So, to automatically start connection, you need to use following: nmcli con mod enp0s3 connection.autoconnect yes It will ...


0

This page suggests you need BIOS or a more recent version of CentOS 6: http://wiki.centos.org/HowTos/UEFI.


3

Try this with GNU find: echo "File Name,Modified Date"; find . -name '*.csv' -printf "%f,%TY-%Tm-%Td %TI:%TM\n"


0

Hawing googled a bit, I noticed that the most common answers on your question are - "yes, you can, using the .rpm file for CentOS/EL7". Following, for example this guide, you may really download package for CentOS 7 and use is. If you'd like to find any alternative way, you may follow this page and search the best one for your usecase. For example, you may ...


0

If it's just a package, you should be ok. It's generally not advised to install Fedora packages on CentOS because of the risk of unmet dependencies, since Fedora typically has more recent versions of libraries etc. This is less likely to be the case (but still possible) if you are installing a CentOS package on Fedora. If on the other hand it's a package to ...


1

As I am not sure it is possible in the 'Requires' part of the script to specify a repo as a dependency, it may be better to include the repo file in the package you are building, or add as a dependency a RPM that provides it. A existing solution for including the repo file is the one used in the Google Chrome package, which is to add the repo file and GPG ...


1

ifup enp0s3 should bring up the interface and configure it. You might want to review the Network Interfaces chapter of the RHEL manual. §10.3. “Interface Control Scripts” mentions using ifup. ifconfig enp0s3 up should not load any configuration from ifcfg-enp0s3, by the way. See e.g., What is the difference between 'ifconfig up eth0' and 'ifup eth0'? on ...


0

I think the issue is that you used useradd not adduser sudo adduser username Please check this http://ubuntuforums.org/showthread.php?t=2240340


1

You can use the ciopfs stackable filesystem, which implements a case-insensitive filesystem on top of a case-sensitive one. mkdir /tmp/case-sensitive /tmp/case-insensitive ciopfs /tmp/case-sensitive /tmp/case-insensitive TMPDIR=/tmp/case-insensitive myapp fusermount -u /tmp/case-insensitive Ciopfs is a FUSE filesystem, which is available on most Unix ...


0

You may want to put the following systemctl disable avahi-daemon.socket avahi-daemon.service into a cron script, as updating avahi may annoyingly reenable it. Why, oh why do vendors build packages that force dependencies on avahi?


3

You can try the following to create a case insensitive filesystem in /tmp: truncate -s 100M /tmp/vfat losetup /dev/loop0 /tmp/vfat mkfs.vfat /dev/loop0 mkdir /mnt/vfat mount /dev/loop0 /mnt/vfat If you don't want to use tmpfs but ramfs instead, create a RAM mount first: mkdir /mnt/ramfs mount -t ramfs -o size=110M ramfs /mnt/ramfs Then follow the steps ...


0

This is the exact same issue as the one I opened on ModSecurity repo. FYI, I've been in touch with spyderlabs for a professional paid contract for supporting nginx and I havn't heard of them since they started looking into the nginx support... I've stopped all the mod_security modules in nginx for the moment as I have other pending bugs without solutions ...


0

Your happy hacky solution is something along these lines (as root): export NOW=$(date); watch -n1 date --set=\"$NOW\" But it's probably not a grand idea :)


3

Simple answer. More complex code poses more security threats. Therefore for servers you should have as minimalistic installation as possible. So no X. I would recommend writing some scripts for users that are not that used to command line.


0

There'a a very neat tool called warp that makes it possible to adjust how the time for a given process is to be adjusted in arbitrary ways - e.g. shifted and even scaled! - while the global system time is unaffected. The time adjustment formula is time = time + warp + (time - base) * (factor - 1). Details are described on the warp manpage. The method it uses ...


1

The /var/spool/mail/ is the folder that mail is saved as a file as /var/spool/mail/$USER. when you call mail it will by default read that file. all read mails will be stored in mbox file and you can access them using mail -f ~/mbox.



Top 50 recent answers are included