Posts

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 example.com #</Location> To <Location /server-status>     SetHandler server-status     Order deny,allow     Deny from all     Allow from localhost 127.0.0.1 </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. [root@dlp ~]# ln -s /bin/bash /opt/rbash [2] Add a user that his default shell is rbash and set he can execute only 'ping'. [root@dlp ~]# useradd cern -s /opt/rbash [root@dlp ~]# passwd cern [root@dlp ~]# mkdir /home/cern/bin [root@dlp ~]# ln -s /bin/ping /home/cern/bin/ping [root@dlp ~]# chown root. /home/cern/.bash_profile [root@dlp ~]# chmod 755 /home/cern/.bash_profile [root@dlp ~]# vi /home/cern/.bash_profile # change PATH like follows PATH= $HOME/bin [3] Login with the test user. [cern@dlp ~]$ cd -rbash: cd: restricted # denied [cern@dlp ~]$ ls -rbash: ls: command not found # none [cern@dlp ~]$ ping localhost PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): 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