Skip to content

Archive for


Install iostat on CentOS 6.6 Linux

We want to see IOPS for our hard drive. For this purpose we will use iostat. But there’s no iostat package, so we must find out the package name that contains iostat utility:

yum whatprovides "*/iostat"
sysstat-9.0.4-27.el6.x86_64 : The sar and iostat system monitoring commands
Repo        : base
Matched from:
Filename    : /usr/bin/iostat

So we need to install sysstat:

yum install sysstat

To see iops run:

iostat 1

Install MySQL Client and Server on Centos6 Linux

This quick tutorial shows you how to install MySQL Server and Client on CentOS 6.6 Linux.

First we check if MySQL Server is installed or not:

yum list installed | grep mysql

Then we search for mysql-server on CentOS repositories we added to our machine:

yum search mysql-server

MySQL server is found:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * updates:
=== N/S Matched: mysql-server ===
mysql-server.x86_64 : The MySQL server and related files

Now we will install mysql-server:

yum install mysql-server

Let’s install mysql client too (in CentOS mysql package is in fact mysql client):

yum install mysql

At this point MySQL server is installed. Let’s start the server:

service mysqld start

We must add a password for MySQL root user (which is different from system root account):

/usr/bin/mysqladmin -u root password your-new-password

To change MySQL server password if you already configured one run (you need old password):

/usr/bin/mysqladmin -u root -p password your-new-password

To test if password was configured we will connect to our MySQL server using mysql client:

mysql -u root -p

We can also run mysql_secure_installation script which will remove test database and anonymous user created by default.


Share common apps from host to lxc container

To find app path use:

whereis app

In lxc container config file add mount points of app path:

# htop
lxc.mount.entry = /usr/bin/htop usr/bin/htop none bind,create=file 0 0
lxc.mount.entry = /usr/bin/X11/htop usr/bin/X11/htop none bind,create=file 0 0
# zip
lxc.mount.entry = /usr/bin/zip usr/bin/zip none bind,create=file 0 0
lxc.mount.entry = /usr/bin/X11/zip usr/bin/X11/zip none bind,create=file 0 0
# unzip
lxc.mount.entry = /usr/bin/unzip usr/bin/unzip none bind,create=file 0 0
lxc.mount.entry = /usr/bin/X11/unzip usr/bin/X11/unzip none bind,create=file 0 0