r00t.gr

Programming and more

Entries for the ‘System Administration’ Category

Fix “Metadata file does not match checksum” on yum (centOS)

Today I tried to install some new programs, in CentOS, with yum install program, and i got this error: http://mirror.xfes.ru/openvz/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum Trying other mirror.http://mirror.xfes.ru/openvz/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum Trying other mirror. I don’t know why that happened, but I found the solution to the […]

Install Pear Log package (and others) in CentOS

I used some code, that needed Pear Package Log. The way to install a Pear Package in CentOS is: yum install php-pear php-pear-Log php-pear-MDB2yum install php-pear php-pear-Log php-pear-MDB2 Don’t use pear’s internal package installer, that doesn’t work so well on CentOS

Delete all subfolders with specific filename in linux, recursively

I used Subversion for a project I did, they I stopped developing that, then after a long time, I found that folder and i wanted to copy it locally. There was one problem, Subversion, created a folder named .svn in all the subfolders, and this had some more more folders in it (3-4 folder). I […]

How to avoid: No activity within 1440 seconds; please log in again phpmyadmin

I you, like me, use phpmyadmin, you might have seen that error:   How to avoid: No activity within 1440 seconds; please log in again phpmyadminHow to avoid: No activity within 1440 seconds; please log in again phpmyadmin If you want to change that, browse to your phpmyadmin folder (if you didn’t install it your […]

Enable sudo for a user (CentOS)

Today i wanted to run a command, as root. I am not logged in as root for security reasons, everybody says it’s a bad idea, so I stopped loggin in as root. Then i wanted to run something as root. I remembered the sudo command so I typed sudo chmod +x runsudo chmod +x run […]

Install json (and pcre) for php (CentOS Linux 5.5)

Today I tried to run a script that was using json and got the following error: Fatal error: Call to undefined function json_encode()Fatal error: Call to undefined function json_encode() The problem was that the json library wasn’t installed. I researched google a little and I found how to install it and configure php to use […]

How to change user’s folder in linux (Ubuntu, CentOS, all unix)

To change the default user directory in linux, you have to run: usermod -d /path/to/new/homedir/ usernameusermod -d /path/to/new/homedir/ username You have to run this as root. If you don’t have root access, you can do that: Login with the user you want to change the folder. Then edit .bashrc file: vi ~/.bashrcvi ~/.bashrc And add […]

OpenVZ VPS and ip from another subnet

I didn’t know that one and like many great things i learned it from one of my ISP’s. When you have OpenVZ and an ip from another subnet, you can use it, but you have to make a change in openvz configuration for everything to work fine. So the fix is: vi /etc/vz/vz.confvi /etc/vz/vz.conf Find […]

Installing nginx 1.0.0 On a fresh Centos 5.5 System from source

[I wrote this, and then i found rpm for nginx 1.0.0 see the whole article to setup a complete CentOS system with nginx + php +mysql + eaccelerator + ftp + php caching here: http://www.r00t.gr/2011/04/installing-nginx-php-mysql-ftp-disk-memory-ram-caching-on-centos-5-5/] After my little adventure where i tried to install a complete nginx, php, eaccelerator, mysql, ftp, file + memory php […]

How to fix: PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0

I setup an Ubuntu system with nginx and php, but i noticed a strange error. Every time i run something php related in the console i get this strange error: PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0PHP Deprecated: Comments starting with ‘#’ are deprecated […]