Tag Info

New answers tagged

0

When looking at your PATH, it seems that somewhere in your start-up scripts an application tries to add itself to PATH but does it incorrectly. The reason for that is that your PATH contains the string $PATH, which should have expanded to the actual path, but was included literally as the string $PATH. The fact that the Java path follows $PATH in your path ...


2

You can execute the following command to add /bin, or whichever directory you need, to PATH. export PATH="$PATH:/bin" You can then add that line to .profile or .bashrc (if you use bash) to make sure that directory is included in your path each time you log in.


0

You can rename the device using the ip command: /sbin/ip link set eth1 down /sbin/ip link set eth1 name eth123 /sbin/ip link set eth123 up You may also want to make sure that you configure a udev rule, so that this will work on the next reboot too. The path for udev moved in CentOS 7 to /usr/lib/udev/rules.d/60-net.rules but you are still able to manage ...


0

Finally figured it our myself. I went with trying to build the library, and discovered a couple issues with libGL. One, my libGL.so was pointing to a folder that didn't exist. Two, being on a 64 bit machine, libGL.la was referencing /usr/lib, when my libraries are in /usr/lib64. So, I changed the last line to lib64, and tried ./configure. Bam. It worked. ...


0

Here's a simple sample script for you to try. It will search for user's aliases from the common /etc/aliases -file. #!/bin/bash # # Arguments: # $1 = user name to be searched for # $2 = location for e-mail log file # # First, let's create a temporary working directory. WORKDIR=$(mktemp -d) cd ${WORKDIR} # # Create a file for user's user name and all ...


1

the code pgrep -P $(pgrep supervisord) | xargs ps -o %mem,%cpu,cmd -p | awk '{memory+=$1;cpu+=$2} END {print memory,cpu}' will get only one child layer if u want to search for all processes that were derived from a main pid, use this code .. ps -o pid,ppid,pgid,comm,%cpu,%mem -u {user name} | {grep PID_PRINCIPAL} The pid of main processe is the PGID ...


0

This is a known issue. See here: apps-menu: Exception: can't convert event.get_time() to an integer #7 A fix is to change line 77 of /usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js from: this._app.open_new_window(event.get_time()); to: this._app.open_new_window(-1);


0

Edit your /boot/grub2/grub.cfg configuration file. This is the file which contains the configurations for GRUB BootLoader. Add a Menu entry in grub menu to boot from your OS reside in P3. /etc/grub.d/custom_entry the menu entry will look something like this (Update with your disk number, partition number, linux image path, initrd path) (Follow the already ...


-1

Add in ~/.bashrc export PS1='\[\e[31;1m\]\h\w # \[\e[0m\]'


1

When you are getting permission denied errors on file access etc. for unknown reason, it might be related to SELinux. Especially when you see a period following permissions like drwxr-xr-x. shown by ls -l for the file/dir in question, they could be mislabeled (you can see it by ls -Z) and cause the problem. You should first check current SELinux mode by ...


0

Easy: just turn off swap, create a file with the swap size you want, turn swap back on: swapoff fallocate --length 20G /swapfile swapon As I use a swap partition, I can't test this under the exact same conditions as you, but the above should work. Actually, if you're starting to use this kind of swap size, you should look into using a swap partition ...


0

You need to import the schema for inetOrgPerson into slapd. I have no idea about OpenLDAP installation on CentOS 7, but if you have a file /etc/ldap/schema/inetorgperson.ldif and dynamic slapd configuration (/etc/ldap/slapd.d/), it might accept the following command (run as root). ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif


0

If your requirements permit you to have the subdomain be a different cPanel account, I'd recommend using CloudLinux and its PHP Selector for this. I think you can do an in-place upgrade of CentOS to CloudLinux and it also integrates with cPanel. This is especially recommended if you're going to be running PHP versions which no longer receive security ...


1

Black Chrome windows are often, but not always, a symptom of a version mismatch between the X11 video driver and the kernel video driver. I've found that, amongst the programs I use regularly, Chrome was by far the most sensitive to such mismatches. Such a mismatch usually happens after doing a partial system upgrade. Finishing the upgrade and rebooting (to ...


0

RHEL/CentOS 6 is not supported by Chrome since v28. It could be all sorts of problems. You could try alternative install scripts, like the one from http://chrome.richardlloyd.org.uk/ to be sure everything is in place, but on the long run I don't think you will get happier.


2

Systemd is working with services and targets. Targets is the equivalent of runlevels, services is the equivalent of init scripts. Most of systemd configuration is located in /usr/lib/systemd, while standard init are in /etc/{init.d,rc*.d,inittab}. When an issue kicks in during the boot process (default are getty.target or graphical.target, you can get them ...


0

IT IS NOT A COMPLICATED PROCESS I downloaded the package from python's website, put it in a folder I created for that purpose, then extracted it there. It is VERY simple ... read the README file... it will tell you to run ./configure ... I'm a noob , too, so all we need to do then is run make or make install and it will do everything it needs to do ( or at ...


0

I ran make and make install after installing all of the recommended stuff to no avail. Started getting this message Python build finished, but the necessary bits needed to build these modules were not found: bsddb185 sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. I was going to give ...


0

Try install these packages: tk, tk-devel, tcl, tcl-devel, then reinstall python.


0

Yet another solution is to update packages. Todo on fresh centos installation (mysql is not installed yet): yum check-update yum update yum install mysql mysql-server


1

You can use sendmail directly to send the email. Using custom shell script would make it "cleaner". make crontab execute custom script @reboot .../reboot-notify make the script use sendmail directly simple script (e.g. you can make it check that IP address has changed) #!/bin/sh HOSTNAME=`hostname` /usr/sbin/sendmail -i example@example.com ...


1

The error simply means that the mail package is not installed or the mail script is not present on the system. To resolve the issue, install the mailx or mailutils package depending on your distro. As you have tagged CentOS in the question, so you need to install the mailx package. $ sudo yum install mailx Mailx is an enhanced mail command, which ...


1

On Debian/Ubuntu you need bsd-mailx package installed to send emails. Where did you added the above command? There are 3 possible reasons the mails aren't send: this command isn't executed at all (add it to /etc/rc.local to make sure it will be executed) bsd-mailx package isn't installed you tried to install some MTA which broke bsd-mailx configuration


-1

Install KDE Desktop Environment on here. yum -y groups install "KDE Plasma Workspaces" echo "exec startkde" >> ~/.xinitrc startx


2

iptables comes with the utilities which might be useful to update iptables configuration safely: iptables-save,iptables-restore, iptables-apply. To temporarily change and test running configuration, you could do like this: $ sudo iptables-save > rules.v4 $ vi rules.v4 $ sudo iptables-restore < rules.v4 If you want to change configuration on remote ...


0

First, make sure to disable IPTABLES service as Both the FirewallD and IPTABLES service cannot co-exist at the same time. To disable IPTABLES, execute # systemctl stop iptables Next make sure to enable and start FirewallD service; # systemctl start firewalld && systemctl enable firewalld Now you need to assign each of available interfaces (in ...


0

Sorry, forgot to answer with my own solution to this problem. Turns out CentOS 6 disables this line in its /etc/screenrc script: termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l I was able to restore the functionality by putting this line into my local ~/.screenrc file. Here is the content of my ~/.screenrc file in its ...


0

You may use VSFTP instead of SFTP, in VSFTP you can customize your root dir without any change in the /etc/passwd. If you modified in the passwd file, it will also affect when login. If you got permission denied when change your home dir to /, you need to check the permission of / first. Make sure others have read permission like below: # ls -ld / ...


0

In my situation the proper format of grub.cfg should be the following: menuentry "to install CentOS-7.0-1406-x86_64-DVD" { insmod part_msdos insmod ext2 insmod ntfs set isofile='(hd0)/centos-7.1/CentOS-7-x86_64-DVD-1503-01.iso' loopback loop $isofile linux (loop)/isolinux/vmlinuz noeject ...


0

Sure. Download the RPMs from http://mirror.centos.org/centos-7/7/os/x86_64/Packages/ and install those with yum. Either mirror the whole thing (easiest, really!) or pull down the various dependencies as needed. You could replicate your secure system on a machine that can access the net, yum install gcc (or yum groupinstall the development group), and then ...


0

Sometimes you need to do echo "- - -" > /sys/class/scsi_host/host<n>/scan It depends on whether you're creating a new disk or extending an existing one as to which type of rescan is required.


1

You are using the Linux Logical volume manager (LVM). This is a layer between your physical disks and your filesystems that introduces the concepts of 'physical volumes' (PV), 'volume groups' (VG), and 'logical volumes' (LV). In your setup, /dev/sdb1 and /dev/sda2, the partitions of type "Linux LVM" are both physical volumes. On top of these PV you will ...


1

At several points in rc.sysinit, rcS-emergency will be run when there's a problem requiring administrator intervention, such as: echo $"*** An error occurred during the file system check." echo $"*** Dropping you to a shell; the system will reboot" echo $"*** when you leave the shell." str=$"(Repair filesystem)" PS1="$str \# # "; export PS1 [ ...


1

When you reference where the vmlinuz file is you reference from the ISO's root, so your centos-7.1 directory is wrong. To boot from an official ISO which has been marked as a live CD you will have to do some hacking. First to identify what vmlinuz and initrd I would mount the iso image, and find the directory where the vmlinuz and initrd are. THAT is the ...


0

The CentOS wiki has a guide to installing from USB that covers 6.5 and later (including 7.x). Have you tried those steps? Basically, it involves writing the ISO image to a USB drive and booting from it. So, something like: dd if=CentOS-7-x86_64-DVD-1503-01.iso of=/dev/sdb Where /dev/sdb is your flash drive. That's slightly different from your Debian ...


0

When I had the following issue then we checked the two lines. -bash-4.1# service named start Starting named: Error in named configuration: zone localhost.localdomain/IN: loaded serial 0 zone localhost/IN: loaded serial 0 zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0 zone 1.0.0.127.in-addr.arpa/IN: loaded ...


0

$ tar -tzf x.tgz |grep -v '/$' | xargs -n1 -d '\n' echo rm Remove the echo if it looks good. Explanation: tar -tzf x.tgz -- list the contents grep -v '/$' -- skip directories xargs -n1 -d '\n' echo rm -- for each one (-n1) line (-d '\n') of input, run echo rm


0

May be something like this will help you rm -rf `find . -name '*.tgz' -exec tar -tzf '{}' \;` not sure how it will work with so many files.


2

You would need to be at the directory from which the tar file was created, for instance $HOME. Then if you had a tgz of your Documents directory located safely in /backup/Documents.tgz you would do this: $ for file in $(tar -tzf /backup/Documents.tgz); do \ [[ -f $file ]] && rm $file || echo "$file does not exist"; done If you want to also ...


0

There are many answers to this on the internet, and none of them helped solve the issue I had. I'd like to add this solution in the hope that it will save someone a lot of wasted time and frustration. sudo yum install tigervnc-server


-2

The method I used to follow for bypassing the root password and reach the root shell is by editing the init in grub (kernel line). init=/bin/bash I don't have much reputation to add a comment. But thought this might be handy.


0

Here are steps to setup a user and allow the user access only via FTP (i.e. no SSH) and also limit access to a specific (user home) directory on proftpd: Add new user: adduser newusername Set password: passwd newusername Modify user home directory from default to a new folder: usermod -d /target/directory username Edit shells file: vi /etc/shells and add ...


0

Most likely, init sequence in screen's terminal description includes an explicit request to set 80-column mode -- \033 [ ? 3 l. Check contents of is/is2 sequences in terminfo string when running screen -- either echo $TERMINFO or infocmp should show that.


1

tar -cj --newer-mtime 2015-07-07 directory | tar -tj | less works If -N is used, tar works on files whose data modification or status change times are newer than the date given. While --newer-mtime only checks mtime and disregards ctime


0

You would need to make a simple script (say "setup"). Just type text_editor_of_choice setup and then add these lines: #!/bin/bash yum groupinstall Desktop yum install tigervnc-server yum install vnc yum install firefox Et cetera... Then save the file and type chmod +x setup to make it executable. Now all you have to do is run it with bash setup. Cheers, ...


2

The reason why you're getting the Device or resource busy error is because the device that you're trying to create the swap on is already mounted. You can see that in your mount output: /dev/mapper/vg_01hw800724vm4-swap 30965628 176048 29221764 1% /swap Swap is not mounted on a mountpoint (you won't see it in the output of mount). To fix the issue, ...


2

The error is pretty clear from yum: http://repo.mongodb.org/yum/redhat/%24releaserver/mongodb-org/3.0/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" There isn't a file at the other end of that URL for yum to download, hence the 404. Put that URL in your browser and start to navigate to see ...


0

Run this command: $ doveconf disable_plaintext_auth


0

Resolved this for Redis 3.0.2 on RHEL-6.6 as follows: From the Redis install directory, Run ./deps/update-jemalloc.sh 3.6.0 (where 3.6.0 is the latest version of jemalloc that works with Redis 3.0.2 as of this writing) Run make distclean && make


0

A storage pool of type dir is a directory path. The only meaningful value is the directory path itself so all other parameters are ignored. In your example, /var/lib/libvirt/rhpol_virsh is a location in your filesystem that will be mapped to the storage pool rhpol_virsh. Another way of viewing this command, which I prefer, is by named parameter rather than ...



Top 50 recent answers are included