Install TeamViewer 10 on Peppermint OS 5

My new laptop has arrived. Its a HP Pavilion Laptop Computer Silver plus 4GB more memory. I choose it over my old laptop that powered by Acer due its processor. 332 bit limitation force me to walk in place. Maximum 4GB memory limitation and unable to test server software that available in 64 bit. Lucky me that I still able to use cheap cloud provider that cost me $5/month that allow me to install many operating system as many as I want. Very helpful in many case but I still have problem when I have to show a demo server where no internet connection available.

I install Peppermint OS 5 for my new laptop. I choose it simply for the name and since this distro use Lubuntu that more familiar for me.

Installation is very smooth and my wife even like it. She want me to install it for her netbook (I’m in process download iso for 32 bit architecture).

During this holiday season a call is coming and I need to see client monitor. The answer is teamviewer and I decide to use latest version (teamviewer 10).

Here the steps for install teamviewer 10 on peppermint os 5 :

1. Download 64 bit version from here

$ wget -c http://download.teamviewer.com/download/teamviewer_amd64.deb

2. Install it from command line

Yes, if you use gui you’ll get this error screen

teamviewer10_peppermint errror when you choose 64 bit

Yes. lib32asound2 needed for installation. In fact I can’t find it in repository.

$ sudo dpkg -i teamviewer_10.0.36281_amd64.deb

[sudo] password for alamsyah:
Selecting previously unselected package teamviewer.
(Reading database … 186532 files and directories currently installed.)
Preparing to unpack teamviewer_10.0.36281_amd64.deb …
Unpacking teamviewer (10.0.36281) …
dpkg: dependency problems prevent configuration of teamviewer:
teamviewer depends on lib32asound2; however:
Package lib32asound2 is not installed.
teamviewer depends on ia32-libs; however:
Package ia32-libs is not installed.

dpkg: error processing package teamviewer (–install):
dependency problems – leaving unconfigured
Errors were encountered while processing:
teamviewer.

Check it

$ sudo dpkg --get-selections | grep teamviewer
teamviewer install

Yes, its installed.

Fix anything related.

$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
lib32z1 libc6-i386
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
teamviewer
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 120 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Well. Looks like 64bit is not welcome at the moment.

I need 32/64 bit multi architecture.

$ wget -c http://download.teamviewer.com/download/teamviewer_i386.deb

Uninstall ‘half baked’ teamviewer I install previously.

$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
lib32z1 libc6-i386
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
teamviewer
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 120 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 186778 files and directories currently installed.)
Removing teamviewer (10.0.36281) …

Back to install

$ sudo dpkg --add-architecture i386

$ sudo dpkg -i teamviewer_i386.deb
Selecting previously unselected package teamviewer.
(Reading database … 186532 files and directories currently installed.)
Preparing to unpack teamviewer_i386.deb …
Unpacking teamviewer (10.0.36281) …
dpkg: dependency problems prevent configuration of teamviewer:
teamviewer depends on libjpeg62.
teamviewer depends on libxtst6.

dpkg: error processing package teamviewer (–install):
dependency problems – leaving unconfigured
Errors were encountered while processing:
teamviewer

Ups, another dependency problem.

Let apt-get fix it.

$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
lib32z1 libc6-i386
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
libjpeg62:i386 libxtst6:i386
The following NEW packages will be installed:
libjpeg62:i386 libxtst6:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 89,7 kB of archives.
After this operation, 266 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

Get:1 http://id.archive.ubuntu.com/ubuntu/ trusty/main libjpeg62 i386 6b1-4ubuntu1 [75,8 kB]
Get:2 http://id.archive.ubuntu.com/ubuntu/ trusty/main libxtst6 i386 2:1.2.2-1 [13,8 kB]
Fetched 89,7 kB in 3s (29,1 kB/s)
Selecting previously unselected package libjpeg62:i386.
(Reading database … 186778 files and directories currently installed.)
Preparing to unpack …/libjpeg62_6b1-4ubuntu1_i386.deb …
Unpacking libjpeg62:i386 (6b1-4ubuntu1) …
Selecting previously unselected package libxtst6:i386.
Preparing to unpack …/libxtst6_2%3a1.2.2-1_i386.deb …
Unpacking libxtst6:i386 (2:1.2.2-1) …
Setting up libjpeg62:i386 (6b1-4ubuntu1) …
Setting up libxtst6:i386 (2:1.2.2-1) …
Setting up teamviewer (10.0.36281) …
Processing triggers for libc-bin (2.19-0ubuntu6.4) …

Try again

$ sudo dpkg -i teamviewer_i386.deb
(Reading database … 186787 files and directories currently installed.)
Preparing to unpack teamviewer_i386.deb …
Unpacking teamviewer (10.0.36281) over (10.0.36281) …
Setting up teamviewer (10.0.36281) …

Looks fine.

Access it from Menu -> Internet -> Team Viewer 10

teamviewer10 installed successfully on pepermintos 5 64 bit

Conclusion for Teamviewer 10 on Peppermint OS 5 64 bit is : use 32bit or you’ll get nothing 🙂

Happy new year 2015 everyone.

Using multiple php inside one Ubuntu machine

programmer plus gamerAnother challenge came. One of our application finally updated. The application development use php 5.3 + and already pass with php 5.5+ version. Time for migration schedule and the requirement is obvious : the machine able to run 2 different php (php 5.2.17 is a must and other php version is at least 5.3+). The machine I use is Ubuntu 12.04 32 bit ( I prefer to use old supported version due to lower memory consumption than 14.04).

Quick google give me reference to phpfarm and other resources. As I said in previous post, php 5.2.17 successfully installed after applied a patch (installed on Ubuntu 14.04). For reference purpose I share my experience here. Target php extensions are standard like support for mysql, pdo and gd extension.

Note : if you want to to try / apply it using vps then You’ll need memory minimal 1GB. My box show this memory utilization (32 bit). Click here for hourly cheap vps.

# free -m
total       used       free     shared    buffers     cached
Mem:           873        786         87          0         78        569
-/+ buffers/cache:        138        734
Swap:          890          0        890

Disable php5 module (optional)

In case you already install php5 as apache module you must disable it first.

#a2dismod php5

Fixing locale

Locale error are pop up everywhere first time I install. I need to get rid from this error.

# locale

locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=”en_US.UTF-8″
LC_NUMERIC=id_ID.UTF-8
LC_TIME=id_ID.UTF-8
LC_COLLATE=”en_US.UTF-8″
LC_MONETARY=id_ID.UTF-8
LC_MESSAGES=”en_US.UTF-8″
LC_PAPER=id_ID.UTF-8
LC_NAME=id_ID.UTF-8
LC_ADDRESS=id_ID.UTF-8
LC_TELEPHONE=id_ID.UTF-8
LC_MEASUREMENT=id_ID.UTF-8
LC_IDENTIFICATION=id_ID.UTF-8
LC_ALL=

# nano /etc/environment

Continue reading

Compile PHP 5.2.17 using phpfarm

In general phpfarm is working well in case you need multiple php environment in single machine. Special case is for PHP 5.2.17 (latest version of 5.2 generation), I got this error when compile :

opt/phpfarm/src/php-5.2.17/ext/dom/node.c: In function ‘zim_domnode_getNodePath’:
/opt/phpfarm/src/php-5.2.17/ext/dom/node.c:2002:8: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
value = xmlGetNodePath(nodep);
^
make: *** [ext/dom/node.lo] Error 1
make failed.

Google suggest me for apply patch.

php programmer

$cd php-5.2.17

$sudo curl -o php-5.2.17.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100  1817  100  1817    0     0    722      0  0:00:02  0:00:02 –:–:–   722

run the patch ::

$sudo patch -p0 -b < php-5.2.17.patch

patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).

$cd ..

$ sudo ./compile.sh 5.2.17

and finally get this :

Build complete.
Don’t forget to run ‘make test’.

Installing PHP SAPI module:       cgi
Installing PHP CGI binary: /opt/phpfarm/inst/php-5.2.17/bin/
Installing PHP CLI binary:        /opt/phpfarm/inst/php-5.2.17/bin/
Installing PHP CLI man page:      /opt/phpfarm/inst/php-5.2.17/man/man1/
Installing build environment:     /opt/phpfarm/inst/php-5.2.17/lib/php/build/
Installing header files:          /opt/phpfarm/inst/php-5.2.17/include/php/
Installing helper programs:       /opt/phpfarm/inst/php-5.2.17/bin/
program: phpize
program: php-config
Installing man pages:             /opt/phpfarm/inst/php-5.2.17/man/man1/
page: phpize.1
page: php-config.1
Installing PDO headers:          /opt/phpfarm/inst/php-5.2.17/include/php/ext/pdo/

yay.

check version now ::

$ /opt/phpfarm/inst/php-5.2.17/bin/php -v

PHP 5.2.17 (cli) (built: Sep 24 2014 16:53:53) (DEBUG)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

Archive patch for backup (php5.2.17.patch.txt)

Quick DNS Server for Centos 5.10

dns settingI used to use Bind as dns server. The server itself is not for complex task such master or slave dns server. Only for authoritative and local dns cache (optional). As I love copy and paste I often post my experience here at least for my future reference in case I have problem.

Today, my copy and paste method in Centos server (running 5.10) not work anymore. Googling around don’t help either. So I choose other dns software that work for my case. Tinydns is my other choice but I think its time to try something new and I found marands.

Installation process is straightforward and working well, here’s the steps :

 

# yum install gcc

# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –enable-shared –enable-threads=posix –enable-checking=release –with-system-zlib –enable-__cxa_atexit –disable-libunwind-exceptions –enable-libgcj-multifile –enable-languages=c,c++,objc,obj-c++,java,fortran,ada –enable-java-awt=gtk –disable-dssi –disable-plugin –with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre –with-cpu=generic –host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)

Downloaad latest marands (at the time of writing its 2.0.09)

# wget -c http://maradns.samiam.org/download/2.0/2.0.09/maradns-2.0.09.tar.bz2

# tar xvjf maradns-2.0.09.tar.bz2

# cd maradns-2.0.09
# make
# make install
VERSION=2.0.09 ./build/install.sh
Installing MaraDNS, placing programs in /usr/local//bin/ and /usr/local//sbin/,
man pages in /usr/local//share/man/man1, /usr/local//share/man/man5,
and /usr/local//share/man/man8, and documents in /usr/local//doc/maradns-2.0.09
Adding MaraDNS startup scripts
Starting up MaraDNS at runlevel 3
starting up MaraDNS at runlevel 5

# service maradns start

# chkconfig maradns on

Edit mararc to change bind address, I use 192.168.1.100 as lan address.

# nano /etc/mararc
looking for ipv4_bind_address line and change it into :

ipv4_bind_addresses = “192.168.1.100, 127.0.0.1”

save.

Edit content of zone (db.example.net)

# nano /etc/maradns/db.example.net

Use this lines :

test.example.net.      +14400    soa    ns1.example.net. [email protected] 2012010117 14400 3600 604800 14400 ~
example.net.      +14400    ns     ns1.example.net. ~
example.net.      +14400    ns     ns2.example.net. ~
ns1.example.net.  +14400    a      192.168.1.100 ~
ns2.example.net.  +14400    a      192.168.1.100 ~
example.net.      +14400    a      127.0.0.1 ~
www.example.net.  +14400    a      127.0.0.1 ~
example.net.      +14400    mx     10 mail.example.net. ~
test.example.net. +14400    a      192.168.1.100 ~

Save.

restart maradns service

# service maradns restart

dig test ::

Try query dns from other computer that exist on lan.

# dig @192.168.1.100 test.example.net

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6 <<>> @192.168.1.100 test.example.net
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19886
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;test.example.net.        IN    A

;; ANSWER SECTION:
test.example.net.    14400    IN    A    192.168.1.100

;; Query time: 0 msec
;; SERVER: 192.168.1.100#53(192.168.1.100)
;; WHEN: Fri Sep 26 19:41:51 2014
;; MSG SIZE  rcvd: 53

ok.

The rest is change /etc/resolv.conf and add 192.168.1.100 as nameserver.

In case of blocked port 53 :

# iptables -I INPUT -p udp -m udp --dport 53 -j ACCEPT
# service iptables save
# service iptables restart

How to install FTP Server (pureftp) on CentOS 5.10

Due to backup provider that we use is closing their service I decide to build simple ftp server for this purpose. The problem are I forgot which version of CentOS I use on the server and which ftp server that work well (easy to install).

Solution for 1st problem is using cat.

# cat /etc/redhat-release

CentOS release 5.10 (Final)

Solution for 2nd problem is pureftp.

# yum install pure-ftpd

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.availo.se
* extras: ftp.availo.se
* updates: ftp.availo.se
base                                                                                                                                             | 1.1 kB     00:00
extras                                                                                                                                           | 2.1 kB     00:00
updates                                                                                                                                          | 1.9 kB     00:00
utter-ramblings                                                                                                                                  | 2.3 kB     00:00
Setting up Install Process
No package pure-ftpd available.
Nothing to do

Continue reading