Installing latest VMware Tools on CentOS

You can find all VMware Tools packages on

https://packages.vmware.com/tools/esx/index.html

They provide an .exe and .iso file for windows and package repositories for different linux distributions like RHEL, CentOS, SuSE or Ubuntu.

Here an example how to setup a package repository for ESXi 4.1 and CentOS5:

  • create a repo file
    # touch /etc/yum.repos.d/vmware-tools.repo
  • then open it
    # vim /etc/yum.repos.d/vmware-tools.repo
  • and paste following text inside:
    [VMWare-tools]
    name=VMWare Tools Packages for Enterprise Linux 5 – $basearch
    baseurl=https://packages.vmware.com/tools/esx/4.1latest/rhel5/$basearch
    enabled=1
    gpgcheck=0
  • save it and close the file.
  • now you can install the vmware-tools (desktop) or vmware-tools-nox (server) package.
  • after install reboot the computer

​replace inside the baseurl "4.1latest" with your esxi version and "rhel5" with your os version.

Test SMTP AUTH using Telnet

Here is how to test SMTP authentication with telnet using terminal and openssl in Darwin or Linux:

  1. Get your user and password in base64 encoded strings (you need them in base64 because the server wants them to be like that)
    # echo 'myuser' | openssl base64
    # echo 'mypassword' | openssl base64
  2. Open a telnet conneciton susing port 25:
    # telnet myserver.domain.com 25
  3. Greet the server
    # EHLO myserver.domain.com
  4. Tell the server you want to authenticate
    # AUTH LOGIN
  5. The server now asks you in a base64 encoded string to enter user. Enter the encoded string you received for 'myuser' in point 1
  6. The server now asks you for the password, again in a base64 encoded string. Enter the encoded password received from point 1
  7. You should see a message now with authentication succeeded or authentication failed

Ensim 10.x/CentOS 5.10: upgrade MySQL 5.0 to 5.5

Hello,

as you may have noticed, CentOS 5.10 has stopped upstream updates for its stock MySQL version which is stuck at version 5.0.95. They have added MySQL 5.5 now to their repository but these packages are installed in different locations and have other startup-scripts then the default stock version, so that they can be run at the same time, but that's not very compatible with Ensim and its database management. Therefore I wrote a small upgrade script which removes MySQL 5.0 and installs 5.5, taking care of Ensim's database structure. Here are some script requirements:

  • python 2.4+ installed
  • EPEL and IUS repositories installed
  • all stock mysql55 packages excluded in yum (found in /etc/yum.repos.d/CentOS-Base.repo)

Here how to do the upgrade:

  1. download my script and place it wherever you want and unzip it
  2. check if all requirements above are fulfilled
  3. launch my script with: python /path/to/upgrade_ensim_mysql.py
  4. edit /etc/virtualhosting/filelists/mysql.sh and add following lines to it:
    N:S,rpm:mysql55
    N:S,rpm:mysql55-server
    N:S,rpm:mysql55-libs
    N:S,rpm:mysqlclient15
  5. edit /etc/init.d/mysqld and remove the parameters –skip-bdb and –skip-innodb
  6. now restart your mysql server as usual and do an ensim maintenance

For all the admins who are sceptic about user programmed scripts, here is what it basically does:

  • backup old needed files
    /etc/my.cnf
    /etc/init.d/mysqld_app_init
    complete mysql dump to /root/mysql_backup.sql
  • removes mysql5.0 packages without their dependencies
  • installs needed mysql55 packages
  • unlinks all symlinks and relinks the databases
    this step is needed because mysql50 supported database names with "-" in it, mysql55 doesn't, thus the "-" is replaced by "@002d" in the symbolic link
  • upgrades all database using mysql_upgrade
Ensim MySQL Upgrader (739 downloads )