Linux Stress Test

TL;DR

Debian/Ubuntu

apt-get -y install stress
stress

In this guide, example.com will be your domain and 111.111.111.111 will be your IP

Prerequisites

DNS

You will need this DNS records:

example.com. IN A 111.111.111.111
mail.example.com. IN A 111.111.111.111
example.com. IN MX 0 mail.example.com.
example.com. IN TXT “v=spf1 mx a ~all”

You can use http://www.spfwizard.net/ to generate needed SPF record.

Hostname

It’s important for postfix and other mail services to have set good hostname.

Here is my article how to change linux hostname

Do it and restart your server before continuing

Installing

Downloading and installing ~280 packages may take some time, better grab some drink.

CentOS 6.x

Make sure that system is up to date

yum update

Add extra packages and Kolab repo, add Kolab repo keys and finally install kolab package

yum install epel-release
cd /etc/yum.repos.d/
wget http://obs.kolabsys.com/repositories/Kolab:/3.3/CentOS_6/Kolab:3.3.repo
wget http://obs.kolabsys.com/repositories/Kolab:/3.3:/Updates/CentOS_6/Kolab:3.3:Updates.repo
gpg --keyserver pgp.mit.edu --recv-key 0x446D5A45
gpg --export --armor devel@lists.kolab.org > devel.asc
rpm --import devel.asc
rm -f devel.asc
yum install kolab

Debian 7 Wheezy

Before installing, make sure to make your system up to date

apt-get update
apt-get upgrade --yes

I don’t recomend using Debian for Kolab, it has some problems with SMTP auth.

Update 2015-02-03

Thanks to Tovok7, I realized that everything is working OK with Debian, all you have to do is select “Internet Site” when installing postfix package. SMTP error 250 or 454 is not a problem after this step.

echo "deb http://obs.kolabsys.com/repositories/Kolab:/3.3/Debian_7.0/ ./" >> /etc/apt/sources.list.d/kolab.list
echo "deb http://obs.kolabsys.com/repositories/Kolab:/3.3:/Updates/Debian_7.0/ ./" >> /etc/apt/sources.list.d/kolab.list
wget -O - http://obs.kolabsys.com:82/Kolab:/3.3/Debian_7.0/Release.key  | apt-key add -
cat > /etc/apt/preferences.d/kolab << EOF
Package: *
Pin: origin obs.kolabsys.com
Pin-Priority: 501
EOF
apt-get update 
apt-get install kolab

Configuring

setup-kolab

We need to answer setup questions with 7 different passwords :o

  • LDAP admin password
  • LDAP admin password confirmation
  • LDAP manager password
  • LDAP manager password confirmation
  • System user to run directory, default is dirsrv on Debian, nobody on CentOS
  • System group to run directory, default is dirsrv on Debian, nobody on CentOS
  • Domain
  • Root dn confirm, dc=example,dc=com
  • Cyrus Administrator password
  • Kolab Service password
  • MySQL server init or existing with root password already set
  • MySQL kolab password
  • Timezone ID for eg. Europe/Berlin
  • MySQL roundcube password

After setup I recommend to reboot your system.

Usage

Webadmin

Go to http://example.com/kolab-webadmin/ and login with:

Login: cn=Directory Manager
Password LDAP manager password

Now you can add users to your domain. Rembember to set type of user “Kolab user”, default is “Contact” and it prevents user from using webpanel

Roundcube on steroids

http://example.com/roundcubemail

Looks pretty awesome, huh ? :)

Mobile sync

There are few options to sync mobile devices.
All iOS devices have native support for Exchange and CalDAV, CardDAV.
Most Android phones have Exchange account provider named as Corporate
For CalDAV and CardDAV your URL will be http://example.com/iRony/.

E-mail

  • Exchange
  • Any IMAP/POP3 and SMTP client

Decent Android IMAP client K-9 Mail - Google Play

Calendar

  • Exchange
  • OS CalDAV account provider (iOS, many Android devices)
  • External CalDAV account provider, for example DAVdroid for Android

Contacts

  • Exchange
  • OS CardDAV account provider (iOS, many Android devices)
  • External CardDAV account provider, for example DAVdroid for Android

Files

You will need some WebDAV client, point it to http://example.com/iRony/files/

iOS WebDAV Navigator
Android WebDAV File Manager

Tasks

WiP and only for Android

Mirakel app for Android + modified version of DAVdroid
Mirakel FAQ

Just install this
http://mirakel.azapps.de/davdroid.apk
and this
https://play.google.com/store/apps/details?id=de.azapps.mirakelandroid

Notes

Not available yet

SSL

https://gist.github.com/dhoffend/7008915

Resources

Linux hostname may be used in a lot of apps, mainly in email services.

CentOS 6

We need to change HOSTNAME value in /etc/sysconfig/network and add new hostname to /etc/hosts

CentOS 7

hostnamectl set-hostname <your new hostname>

Debian 7 Wheezy

Update /etc/hostname and /etc/hosts

vim /etc/hostname
vim /etc/hosts

Reboot

All distros should be rebooted after new hostname have been changed. You can restart services but that will take probably longer.

Resources

Photoshop is a great multitool when it comes to do something with graphics, GIFs, short movies or even 3D renders.
Creative Cloud version is cheap enough to forget about crappy gimp. Unfortunately Adobe don’t support Linux distros. Luckily Wine 1.7 is good enough to handle this.

Prerequisites

This guide is for Ubuntu 14.04 and similar like Linux Mint Rebecca 17.1. It may work on Ubuntu 12.04, let me know if you need guide for other distro in comments :)

First, we need to install wine 1.7 from PPA.

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7 winetricks

Code below will delete current wine prefix and create new 32bit prefix, 64bit version of PS don’t work as I know.

rm -r ~/.wine
WINEARCH=win32 WINEPREFIX=~/.wine winecfg #choose windows 7 from list
winetricks atmlib gdiplus msxml3 msxml6 vcrun2005 vcrun2005sp1 vcrun2008 ie6 fontsmooth-rgb

When winecfg window appears, choose Windows 7 from list and press OK.
Winetricks will ask you to manualy download 2 files and place them in folder.

Ok, so this is almost end of preparing environment. We need gecko in few versions, this script do everything for us.

cd ~/
wget http://winezeug.googlecode.com/svn/trunk/install-addons.sh
chmod +x install-addons.sh
./install-addons.sh

Installing Photoshop

Finally we can install PS, but don’t use CC installer. It will download 64bit version which doesn’t work and CC sync app which doesn’t work either. We will use link to directly download PS CC 2014 installer which surprisingly let us choose the language of PS. As I remember, standard installer doesn’t have this option.

On prodesigntools.com we can find direct links to download CC apps

For Adobe Photoshop CC 2014 we need this link: http://download.adobe.com/pub/adobe/photoshop/win/cc/AdobePhotoshop2014-32bit-mul.zip

After unpacking .zip archive we can run setup in console to see eventual errors (useful for debugging). Few errors may pop up when installing but it should install successfully.

wine Set-up.exe

Enjoying

Adobe Photoshop CC 2014 running on Linux Ubuntu 14.04

Tweaks

No graphic on workspace

Just go to Edit -> Preferences -> Performance and uncheck “Use Graphics Processor”.
Photoshop CC 2014 GPU settings
Restart PS, problem should go away.

Alt + mouse click moves window instead of taking sample of color

AKA eyedropper problem.

Your window manager must have alt shortcut for moving windows. Just replace alt with other key. That will do:

gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"

Laggy mouse clicks

Removing this bug isn’t easy. As far I know, this problem is less annoying with graphic tablet. This bug is known:

With wacom tablet, lines apear after ~1 second after first click.

I’m working on method which will cut the lag from using mouse clicks. It will probably require to use own compiled version of wine 1.7.15 with patch applied, stay tuned for this article updates.

Ghost vulnerability logo

Checking if your system is vulnerable

wget https://gist.githubusercontent.com/koelling/ef9b2b9d0be6d6dbab63/raw/de1730049198c64eaf8f8ab015a3c8b23b63fd34/gistfile1.c
gcc gistfile1.c -o CVE-2015-0235
./CVE-2015-0235

Updating

CentOS 6

yum update

If your mirror don’t have yet newest packages, just download them manually

mkdir ~/tmp_ghost/
cd ~/tmp_ghost/
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-devel-2.12-1.149.el6_6.5.x86_64.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-common-2.12-1.149.el6_6.5.x86_64.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/nscd-2.12-1.149.el6_6.5.x86_64.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-static-2.12-1.149.el6_6.5.x86_64.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-headers-2.12-1.149.el6_6.5.x86_64.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-utils-2.12-1.149.el6_6.5.x86_64.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-2.12-1.149.el6_6.5.x86_64.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-static-2.12-1.149.el6_6.5.i686.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-devel-2.12-1.149.el6_6.5.i686.rpm
wget http://mirror.centos.org/centos/6.6/updates/x86_64/Packages/glibc-2.12-1.149.el6_6.5.i686.rpm
yum localinstall *.rpm

Debian 7

apt-get update && apt-get upgrade -y

Ubuntu 12.04

sudo apt-get update && sudo apt-get upgrade -y