Archive for the ‘Linux’ Category

mbstring PHP extension was not found

I was getting an error message when I accessed phpMyAdmin. The error was:

"The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
"

This error means that mbstring PHP extension is not enabled or installed. In my case it was not enabled.

To resolve this I had to enable it in my php.ini file. Open your php.ini file and un-comment these lines:

  • extension=php_mbstring.dll
  • extension=php_mysql.dll
  • extension=php_mysqli.dll

Restart your Linux server and this error will go away.

CentOS supported on Hyper-V

Microsoft officially supports CentOS on Hyper-V now. This is great news because CentOS is the flavor of Linux i prefer to use. I will go back to running this instead of SUSE on Hyper-V. Here is a great blog post about installing the integration for CentOS running on Hyper-V: http://www.ms4u.info/2011/05/centos-added-as-supported-guest.html

Here is a link on Microsoft of support Linux flavors in Hyper-V (CentOS is not added to this list yet.):

http://www.microsoft.com/windowsserver2008/en/us/hyperv-supported-guest-os.aspx

How to Install Skype on CentOS

I am currently studying for the Linux + certification. I work with Linux alot becuase of my web site work. This is typically all command shell through SSH, Webmin, or WHM. I am forcing myself to use Linux on a daily basis as my workstation so I will learn it even more. The flavor of Linux I am using is CentOS. One of the tools I use is Skype. Skype does not have a RPM package for CentOS. This application has to be installed manually. I had to figure out how to get this installed. Here are the steps I took to install this and configure it.

INSTALL:

Skype only comes in 32 bit so if you have a 64 bit machine you need to run the following to install 32 bit libraries. This is required to run the 32 bit Skype application.

yum install glib2.i386 qt4.i386 zlib.i386 alsa-lib.i386 libX11.i386 \ libXv.i386 libXScrnSaver.i386

Read the rest of this entry »

Automatically backup MySQL database

I needed to backup a couple of MySQL databaes automatically. Here is what I did to accomplish this.

I created a folder called mysqlbackup. I then created a script called ”mysqldbbackup.sh” and put this script file in the mysqlbackup folder.

It contains “rm /mysqlbackup/DBNAME_backup.sql
mysqldump -u USERNAME -pPASSWORD DBNAME > /mysqlbackup/DBNAME_backup.sql

I used the “rm” command to remove the last database backup before the new backup runs. For one of my old blogs on mysqldump command click here.

You have to make the script executable. To do this use the following command

chmod +x  /mysqlbackup/mysqldbbackup.sh

Now test your script to make sure it works. CD to the mysqlbackup directory and run the script using by typing “mysqldbbackup.sh

Ok after it works you need to now schedule it. Use cron to schedule it. I set it to run ever Tuseday at 3am. Use this command to set it via cron  “0 3 * * 2 /mysqlbackup/mysqldbbackup.sh

For more on cron visit ABOUT CRONJOBS . For more about Linux Shell scripst visit LINUX BASH SHELL SCRIPT

CP Omitting Linux Command Error

So I was trying to copy one folder to another location and kept getting this error:

cp: omitting directory

and it would not copy the directory over. This is the command I was running

 cp FOLDER /root/DRIVE

I am fairly new to Linux so I did not know what I was doing wrong.  After looking at the man page and some searching I found that I needed to put a -r after CP. Here is the syntax:

 cp -r FOLDER /root/DRIVE

the -r is copying the folder recursively.

Setup VNC Server on CentOS

I recently had the task of setting up VNC Server on CentOS for a client of mine. VNC is very much like remote desktop in windows. You can even use VNC on Windows servers. I found VNC to be a little bit slower then remote desktop and it kept kicking me out every once in a while. Here are the steps I took to set it up:

First I opened the necessary ports.

Path to access the firewall:

Read the rest of this entry »

Buchatech.com RSS Feed
Favorite Forums
  • myITforums
  • SCDPM Online
  • Tech Exams
  • TechNet DPM Forums