0

mysql changing to utf8 and converting DB to utf8

by default mysql is installed as latin1 and sometimes it causes problems when your data is not always latin1. Follow the steps to change mysql to utf and also convert existing databases to UTF8 #1 backup your databases and convert it to UTF8 mysqldump -uusername -ppassword -c -e –default-character-set=utf8 –single-transaction –skip-set-charset –add-drop-database -B dbname -r dbname.utf8.dump.sql do this for each of your databases. #2 shutdown mysql service mysqld stop #3 edit /etc/my.cnf ADD to [mysqld] section # init_connect=’SET collation_connection = utf8_unicode_ci’ init_connect=’SET NAMES utf8′ character-set-server=utf8 collation-server=utf8_unicode_ci skip-character-set-client-handshake also [client] default-character-set=utf8 #4 restart mysqld service mysqld start #5 import your databases… Continue Reading

0

PCI compliance and backporting

Due to the complex and sensitive environments of today world many groups of servers will require to get quarterly or annual security audits especially if they are part of PCI. Unfortunately for Sysadmin’s most security scanning tools are blind to backports done by both redhat and novell. backporting is where the security patches are applied to the older (current) versions of the packages that was shipped with a particular version of the operating system. So while you can have 1 major version of the package installed it will have many different versions of backports applied to it. The process itself… Continue Reading

0

wget stuff

Many times when downloading via command line large files you might want to run it in the background and forget about it. you can run this is screen however its also good to use wget options. one quicky is to do wget -bqc url -b is to background as soon as starting -c is to resume broken downloads -q is to quiet wget

0

VirtualBox – how to create and share disks to setup/test clusters

Once in a while you will want to setup clusters with shared disks to test and play around with various clusters. while this is easy to do in kvm/xen/etc its not so easy with virtualbox. There is a way via command line tools to create disks and attaching it so that it is shared. For me I have windows 7 64bit and I am running virtualbox 64bit 4.xxxxx. It is most likely easier if you include the path for “c:Program FilesOracleVirtualBox” however if you do not its ok. We will need to run the command VBoxManage or “c:Program FilesOracleVirtualBoxVBoxManage.exe” if… Continue Reading

0

cleaning old kernels the easy way

There is a built in tool to remove old unused kernels thats installed onto the system. You can just as easily remove it and clean grub entries but this is an automated method and you can even set an option to keep x amounts. step 1 – install the yum utils package yum install yum-utils step 2 – run the package-cleanup to clean up old kernels package-cleanup –oldkernels –count=2 step 3 – if you want to set it so that you only keep X number of revisions on your system then edit /etc/yum.conf and add the following installonly_limit=2 enjoy!

0

is it safe to use epel and rpmforge at the same time ?

There are many repositories that you can add onto your RHEL/CENTOS/FEDORA OS to install additional software. full list of repos can be found here http://wiki.centos.org/AdditionalResources/Repositories however is it safe to just add the repos and start installing packages? yes and no. We will configure priorities to setup the repos to keep packages from conflicting. Also you will want to protect the base OS installation so that there is less corruption/conflicts later on. step 1 – install the plugin if its not installed already yum install -y yum-plugin-priorities yum-plugin-protectbase step 2 – setup priorities for *-Base.repo that came with your OS… Continue Reading

0

Samba as a Primary Domain Controller on Centos/RHEL

I wanted to setup a PDC via samba for my home network since I am wanting a common login onto all of the machines at home and also since I already share files via samba why not just add this. This is a very novice basic setup of PDC. Several items are needed espcially host entries/dns records to make this work. lets assume several items Domain : testdomain.local PDC Hostname : pdc PDC IP : 192.168.1.1 User : thisisyou Client Hostname : testdesktop 1. Install Samba. yum groupinstall “CIFS file server” or yum install samba 2. Network testing from your… Continue Reading

0

How to rollback YUM UPDATES

Once in a while you might have problems after running “yum update.” There is an intermediate solution by rollback feature included in YUM. THIS OPTION IS NOT ENABLED BY DEFAULT. 1. To enable rollback edit /etc/yum.conf and add tsflags=repackage 2. Add the following line into /etc/rpm/macros file if it doesn’t exist and add %_repackage_all_erasures 1 now you are all set and can use the following examples to rollback rpm -Uvh –rollback ’22:00′ rpm -Uvh –rollback ‘3 hours ago’ rpm -Uvh –rollback ‘june 13’ rpm -Uvh –rollback ‘yesterday’ All previous repackaged software will be stored onto /var/spool/repackage

0

hponcfg with selinux

Today I went to run hponcfg and found the following error # hponcfg HP Lights-Out Online Configuration utility Version 4.0.0 Date 12/08/2011 (c) Hewlett-Packard Company, 2011 Error opening libcpqci.so: libcpqci.so: cannot open shared object file: No such file or directory Problem running hponcfg on the machine Run hponcfg after doing one of the following Temporarily disable enforcement on a running system by /usr/sbin/setenforce 0 OR Permanently disable enforcement during a system startup change “enforcing” to “disabled” in “/etc/selinux/config” and reboot Error Loading the library libcpqci.so or libhponcfg.so quick google search did not return much so dug in deeper and found… Continue Reading

0

whose using my ports ?

When troubleshooting applications you will sometimes need to find out what process is using your ports so that you can isolate it or kill it or readjust it so that it will work better with other applications on the same server. lsof is always the best method to see what is running on various ports however there is also an alternative. lets do lsof first lets say you want to find out what is running on port 8400 since it states that the port is open via netstat netstat -an | grep 8400 tcp 0 0 0.0.0.0:8400 0.0.0.0:* LISTEN so… Continue Reading