Cloudfuse to mount the Cloud Object Storage on Linux

Cloudfuse is a FUSE application which provides access to Cloud Files (Object Store). Object Store is a remote storage system which is similar to Amazon S3. It provides a simple RESTful interface to storing and retrieving objects.Use the following steps on your Centos/Redhat environment.

Install packages as the root user:

#yum install gcc make fuse-devel curl-devel libxml2-devel openssl-devel git

Download the cloudfuse files:

#cd /tmp/
#git clone https://github.com/redbo/cloudfuse.git

Go in to the cloudfuse directory and build the cloudfuse binary:

#cd cloudfuse/
#./configure
#make
#make install

Then create the credentials file in:

#vi /root/.cloudfuse

Copy the lines below and fill in the blanks:

username= ‘Your User Name’
api_key=’API Key from your Service Provider’
authurl=’URL from your Service Provider’

You can use SSL if you want

verify_ssl=True

Set the correct permissions:

#chmod 600 /root/.cloudfuse

Now you can mount the directory on your filesystem:

#cloudfuse /path/to/mount

Reset ‘root’ password in Ubuntu

Use the steps below to reset “root” password in Ubuntu

  • You need to reboot your system
  • Hold Shift during boot to start GRUB menu
  • Highlight your image and press E to edit
  • Find the line starting with “linux” and append rw init=/bin/bash at the end of that line
  • Press Ctrl + X to boot
  • In console type command #passwd root
  • Now type your new password
  • Reboot the system again

How to reset admin password for vCenter

For vCenter Single Sign-On 5.1
To reset the admin@system-domain password on the vCenter Server Appliance:
  1. Log in as root to the vCenter server Appliance;
  2. From the command line, navigate to /usr/lib/vmware-sso/utils directory;
  3. Run the following command:
    ./rsautil reset-admin-password
  4. Enter the master password when prompted (By default, this is the root password)
  5. Enter the SSO administrator name for which you want to reset the password. For example, admin;
  6. Enter the new password for the user and then confirm it a second time;You should see the message Password reset successfully.
For vCenter Single Sign-On 5.5
To reset the [email protected] password on the vCenter Server Appliance:
Connect to the vCenter Server Appliance through SSH;
  1. Run the following command:
    /usr/lib/vmware-vmdir/bin/vdcadmintool
    This console loads:
    ================================
    Please select:
    0. exit
    1. Test LDAP connectivity
    2. Force start replication cycle
    3. Reset account password
    4. Set log level and mask
    5. Set vmdir state
    ================================
  2. Press 3 to enter the Reset account password option;
  3. When prompted for the Account DN, enter
    cn=administrator,cn=users,dc=vSphere,dc=local
  4. Use the generated password to log in to the [email protected] account.
For VMware Platform Services Controller 6.0
To reset the [email protected] password on the Platform Services Controller or vCenter Server with Embedded Platform Services Controller Appliance:
  1. Log in to the vCenter Server Appliance via SSH;
  2. Run this command to enable access the Bash shell;
    shell.set –enabled true
  3. Type shell and press Enter;
  4. Run the following command:
    /usr/lib/vmware-vmdir/bin/vdcadmintool
    This console loads:
    ================================
    Please select:
    0. exit
    1. Test LDAP connectivity
    2. Force start replication cycle
    3. Reset account password
    4. Set log level and mask
    5. Set vmdir state
    ================================
  1. Press 3 to enter the Reset account password option;
  2. When prompted for the Account UPN, enter:
    administrator@vSphere_Domain_Name.local
    By default, this is:
    [email protected]
    A new password is generated.
  1. Use the generated password to log in to the [email protected] account.

Limit CPU Usage Per Process in Linux

You can use “cpulimit” program that can limit the CPU usage for a particular process. Follow the process below to set a limit for CPU usage.

Install cpulimit

Type the following commands to install “cpulimit”:

# cd /tmp
# wget ‘http://downloads.sourceforge.net/cpulimit/cpulimit-1.1.tar.gz’
# tar -zxvf cpulimit-1.1.tar.gz
# cd cpulimit-1.1
# make
# cp cpulimit /usr/local/sbin/
# rm -rf cpulimit*

Debian / Ubuntu Linux users

Type the following command to install “cpulimit”:

$ sudo apt-get update
$ sudo apt-get install cpulimit

How do I use cpulimit?

To limit CPU usage of the process called firefox to 30%, enter:

# cpulimit -e gzip -l 30

To limit CPU usage of the process to 30% by using its PID, enter:

# cpulimit -p 1313 -l 30

To find out PID of the process use any of the following:

# ps aux | less
# ps aux | grep gzip
# pgrep -u php php-cgi
# pgrep gzip

You can also use absolute path name of the executable, enter:

# cpulimit -P /bin/gzip -l 30

Parameter:

  • -p : Process PID.
  • -e : Process name.
  • -l : percentage of CPU allowed from 0 to 100.
  • -P: absolute path name of the executable program file.

Zimbra – How to change web access port

If you need to change Zimbra web-port like 80 or 443, you can use following command to change it.

#su – zimbra
#zmprov ms server.hostname zimbra MailPort port
#tomcat stop
#tomcat start

or

#su zimbra
#zmprov mcf zimbraMailPort port
#tomcat stop
#tomcat start
#zmprov gcf zimbraMailPort  //to show the existing listening port

Zimbra 32bit to 64bit Migration – mailboxd can’t start

During migration of Zimbra from 32 to 64 bit,
If zimbra mailbox (mailboxd) could not get to start. It turned out
to be a set of borked certificates.
You may check “/opt/zimbra/log/zmmailboxd.out” file. If you find any error like bellow,
Fatal error: exception while binding to ports
java.net.SocketException: Unbound server sockets not implemented
Then can execute following command to resolve the issue.
#mv /opt/zimbra/mailboxd/etc/keystore /opt/zimbra/mailboxd/etc/keystore.borked
#sudo /opt/zimbra/bin/zmcertmgr deploycrt self
Then re-deploy your certificates using the Admin GUI after restarting Zimbra.