Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

How to install MySQL server

5.6 on Debian 7 and 8


Debian provides MySQL server 5.5 with both wheezy and jessie but some the latest
stable version is 5.6 which supports InnoDB Full-text search.
Heres how to install MySQL server 5.6:
1. Download the MySQL APT repository config tool (you can see more details here:
http://dev.mysql.com/downloads/repo/apt/)
For Debian 8 (make sure you are logged in as root):
wget http://dev.mysql.com/get/mysql-apt-config_0.3.5-1debian8_all.deb

For Debian 7 (make sure you are logged in as root):


wget http://dev.mysql.com/get/mysql-apt-config_0.3.5-1debian7_all.deb

2. Install the MySQL APT repository config tool


dpkg -i mysql-apt-config_0.3.5-1debian7_all.deb

You will be asked to select product and version that you want to install. In the first
step, select Serverand next select mysql-5.6. Then click Apply.
3. Update APT
apt-get update

4. Install the server


apt-get install mysql-community-server

Thats all!

Add a second hard disk


Notice
This tutorial is for older Debian versions and may not work for current versions.
Please refer to the links below to find a newer tutorial.

How to add a new hard disk or partition using UUID and ext4 filesystem

Adding a additional hard disk to your workstation or server is easy and often
required. Heres well step through the process of identifing the newly attached drive,
prepare and mount it.

If you have just added a virtual disk to a virtual machine, make sure you restart the
virtual machine before mounting the new disk.
1. Figure out the device name for the new device
fdisk -l

This will give you output similar to this:


Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 * 1 2517 20217771 83 Linux
/dev/sda2 2518 2610 747022+ 5 Extended
/dev/sda5 2518 2610 746991 82 Linux swap / Solaris

Disk /dev/sdb: 32.2 GB, 32212254720 bytes


255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

2. Next well partion the new disk using the following command:
cfdisk /dev/sdb

> New -> Primary -> Specify size in MB


> Write
> Quit

3. Format the new disk using the ext3 filessystem


mkfs.ext3 /dev/sdb1

4. Mounting the drive to a new folder


mkdir /disk2
mount -t ext3 /dev/sdb1 /disk2

You can name the folder whatever your want and place it in a subfolder of another
mounting point, for example /var/disk2
5. Add the new drive to fstab so that it will automatically mount when we reboot the
machine. Add the following line to your fstab file (pico /etc/fstab)
/dev/sdb1 /disk2 ext3 defaults,errors=remount-ro 0 1

Now your new hard disk is mounted and ready to use.

Installing ionCube
ionCube protects software written using the PHP programming language from being
viewed, changed, and run on unlicensed computers.
1. Download ionCube loaders
wget
http://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.
gz

2. Extract
tar zxvf ioncube_loaders_lin_x86.tar.gz

3. Move to a permanent location


mv ioncube /usr/local/

4. Add reference to your php.ini file (pico /etc/php5/apache2/php.ini)


zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.2.so

There are a few versions of the loader in the tar archive and you can choose the one
that suites your needs
5. Restart apache
/etc/init.d/apache2 restart

Installing and using the IPMI


tool
The Intelligent Platform Management Interface (IPMI) is a standardized computer
system interface used by system administrators to manage a computer system and
monitor its operation.
The development of this interface specification was led by Intel Corporation and is
supported by more than two hundred computer systems vendors including Dell,
Hewlett-Packard, Intel, and NEC Corporation.
1. Install the ipmitool which is used to send commands and receive information from
the management interface.
apt-get install ipmitool

2. Use this command to send and receive information to a remote server


ipmitool -H {ip_address} -U {username} -a {ipmi_command}

You can also skip the -a parameter (which makes ipmitool prompt for a password
everytime) and add -P {password} to avoid the password prompt.
Here are some examples of useful commands
Get hardware status (including hardware failures and power status)
ipmitool -H {ip_address} -U {username} -a chassis status

List all sensor values (including temperature, fan speed, voltage and more)
ipmitool -H {ip_address} -U {username} -a sensor list

Print system event log


ipmitool -H {ip_address} -U {username} -a sel list

Check if your server is on or off


ipmitool -H {ip_address} -U {username} -a chassis power status

Power off the server (soft shutdown via ACPI)


ipmitool -H {ip_address} -U {username} -a chassis power soft

Power off the server (hard)


ipmitool -H {ip_address} -U {username} -a chassis power off

Start the server


ipmitool -H {ip_address} -U {username} -a chassis power on

Restart server (hard)


ipmitool -H {ip_address} -U {username} -a chassis power reset

How to add a new hard disk or


partition using UUID and ext4
filesystem
Adding a additional hard disk to your workstation or server is easy and often
required. Heres well step through the process of identifing the newly attached drive,
prepare and mount it by referencing UUID which is a preferred method today.
If you have just added a virtual disk to a virtual machine, make sure you restart the
virtual machine before mounting the new disk.
1. Figure out the device name for the new device
fdisk -l

This will give you output similar to this:


Disk /dev/sda: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000299d1

Device Boot Start End Blocks Id System

/dev/sda1 * 2048 32088063 16043008 83 Linux


/dev/sda2 32090110 33552383 731137 5 Extended
/dev/sda5 32090112 33552383 731136 82 Linux swap / Solaris

Disk /dev/sdb: 17.2 GB, 17179869184 bytes


255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

2. Next well partion the new disk using the following command:
cfdisk /dev/sdb

> New -> Primary -> Specify size in MB


> Write -> yes
> Quit

3. Format the new disk using the ext4 filessystem


mkfs.ext4 /dev/sdb1

4. You need to create a new directory where the disk will be mounted in the
filesystem
mkdir /disk2

You can name the folder whatever your want and place it in a subfolder of another
mounting point, for example /var/disk2
5. Its preferred to use the device UUID (Universally Unique Identifier) instead of
directly linking to the device path because while UUID always stays the same, the
device path may change. This is how we find the UUID:
blkid

Which shows a list of all partitions and the assigned UUID. The list should look
similar to this:
/dev/sda5: UUID="180cab2a-300a-4e3d-8c8e-0e1df46b9bf7" TYPE="swap"
/dev/sda1: UUID="cd0c7b2c-bf50-4557-bc01-0048764a41d2" TYPE="ext4"
/dev/sdb1: UUID="359d90df-f17a-42f6-ab13-df13bf356de7" TYPE="ext4"

6. Add the new disk/partition to fstab to automatically mount it on boot

echo "UUID=359d90df-f17a-42f6-ab13-df13bf356de7 /disk2 ext4


errors=remount-ro 0 1" >> /etc/fstab

Replace the UDID value to the UDID displayed in step 5 for the new disk and replace
/disk2 with the path where you want to mount the disk in the filesystem as specified
in step 4
7. Manually mount the disk (you can also reboot the machine and it will be
automatically mounted)
mount /disk2

/disk2 is the directory created in step 4


Now your new hard disk is mounted and ready to use.

How to install ffmpeg with


H.264/MPEG-4 AVC
H.264/MPEG-4 Part 10 or AVC (Advanced Video Coding) is a standard for video
compression, and is currently one of the most commonly used formats for the
recording, compression, and distribution of high definition video.

The ffmpeg package provided by Debian repositories doesnt support H.264 due to
patent restrictions. Luckily deb-multimedia.org provides a ffmpeg package compiled
with H.264 support and its very easy to install.
1. Add the deb-multimedia.org to apt sources
echo "deb http://www.deb-multimedia.org squeeze main non-free" >>
/etc/apt/sources.list

2. Update apt and install deb-multimedia keyring


apt-get update
apt-get install deb-multimedia-keyring
apt-get update

3. Remove the Debian ffmpeg package if you have already installed it


apt-get remove ffmpeg

4. Install ffmpeg and x264


apt-get install ffmpeg x264

5. To check if ffmpeg was correctly installed run this command


ffmpeg -version

The output should be similar to this. If you can see enable-libx264, you have
H.264 support.
ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers
built on Jun 13 2012 14:14:09 with gcc 4.4.5
configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g '
--cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl -enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid -enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora -enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 -enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter -enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enablelibschroedinger --disable-encoder=libschroedinger --enable-version3 -enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt
--disable-altivec --disable-armv5te --disable-armv6 --disable-vis
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0

libavfilter 1. 80. 0 / 1. 80. 0


libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
ffmpeg 0.7.13
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0

How to install Open Virtual


Machine Tools (open-vmtools) on squeeze/wheezy
The Open Virtual Machine Tools (open-vm-tools) are the open source
implementation of VMware Tools. They are a set of guest operating system
virtualization components that enhance performance and user experience of virtual
machines.
wheezy
Installing open-vm-tools is very easy on wheezy, just install the package using aptget and reboot the machine when completed.
apt-get install open-vm-tools

squeeze
Heres how to install open-vm-tools on squeeze:
1. Add the contrib area to the apt sources (pico /etc/apt/sources.list)
For example, change:

deb http://ftp.uk.debian.org/debian/ squeeze main

to
deb http://ftp.uk.debian.org/debian/ squeeze main contrib

2. Run apt-get update


apt-get update

3. Install open-vm-tools
apt-get install open-vm-tools

4. Restart the machine


reboot

You might also like