Showing posts from January, 2014

vmware player mounting /dev/vg_server/lv_root on /sysroot failed: No such device

If you got this problem after converting live Centos 6.5 into VMplayer image 1. Download minimal image of centos 2. mount this image at VMplayer 3. boot from minimal Centos image 4. go to Rescue mode 5. run bash 6. type  chroot /mnt/sysimage cd /boot 7.type   mkinitrd -v -f initrd and press TAB to autocomplete so command should looks like: mkinitrd -v -f initrd2.6.32-431.3.1.img 2.6.32-431.3.1   wait until finished. 8. type exit and again exit and from main menu choose reboot 9. boot from local drive  if still does not work follow again points 1-6 7. you have to recreate initramfs - at first create a backup copy of the current initramfs:  type: cp -p /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak 8. Now create the initramfs for the current kernel, type dracut -f ** If you need to build it for a specific kernel version (replace the version appropriately): dracut -f /boot/initramfs-2.6.32-431.3.1.el6.x86_64.img 2.6.32-431.3.1.el6.

apache server-status behind nginx

If you cannot access /server-status page on apache which is behind nginx 1. check if elinks are installed rpm -aq|grep elinks elinks-0.12-0.6.pre2.fc10.i386 (Checks if elinks is installed.  Do this before installing elinks.) yum install elinks ( IF elinks is NOT  installed) rpm -aq|grep elinks elinks-0.12-0.6.pre2.fc10.i386 (To verify installation worked)  2. Check if status is enabled in httpd.conf vi /etc/httpd/conf/httpd.conf Find and uncomment the line ExtendedStatus On (Remove # from start of line) Find and uncomment the following directives.  Change configuration From #<Location /server-status> #   SetHandler server-status #    Order deny,allow #    Deny from all #    Allow from #</Location> To <Location /server-status>     SetHandler server-status     Order deny,allow     Deny from all     Allow from localhost </Locati

CentOS 6 - user with limited commands and access - restricted bash

Add a user who can execute some specific commands.    [1] Create a link named 'rbash' from bash. [[email protected] ~]# ln -s /bin/bash /opt/rbash [2] Add a user that his default shell is rbash and set he can execute only 'ping'. [[email protected] ~]# useradd cern -s /opt/rbash [[email protected] ~]# passwd cern [[email protected] ~]# mkdir /home/cern/bin [[email protected] ~]# ln -s /bin/ping /home/cern/bin/ping [[email protected] ~]# chown root. /home/cern/.bash_profile [[email protected] ~]# chmod 755 /home/cern/.bash_profile [[email protected] ~]# vi /home/cern/.bash_profile # change PATH like follows PATH= $HOME/bin [3] Login with the test user. [[email protected] ~]$ cd -rbash: cd: restricted # denied [[email protected] ~]$ ls -rbash: ls: command not found # none [[email protected] ~]$ ping localhost PING localhost ( 56(84) bytes of data. 64 bytes from localhost ( icmp_seq=1 ttl=64 time=0.045 ms 64 bytes from localhost (12

[Solved] Magento - dbModel read resource does not implement Zend_Db_Adapter_Abstract or Magento install error - Exception printing is disabled

Magento - dbModel read resource does not implement Zend_Db_Adapter_Abstract  or   Magento install error - Exception printing is disabled If you enabled full page cache on Zend server this error shows up: dbModel read resource does not implement Zend_Db_Adapter_Abstract Trace : #0 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Mysql4\Collection\Abstract.php(68): Varien_Data_Collection_Db->setConnection(false) What you should do next: 1. try to clear cache - erase all files from MAGENTO_ROOT/var/cache/ directory 2. change settings  1. Navigate to the \"errors\" folder. 2. Change local.xml.sample to local.xml 3. You should now see a new list of crazy errors all over the Magento page - this is okay. 4. Open magento/lib/Zend/Cache/Backend/File.php and look for: protected  $_options  = array( \ 'cache_dir\'  =>  \ 'null\' , 5. Change it to: protected  $_options  = array( \ 'cache_dir\'  =>  \ 'tmp