LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » Development Forums » General Development » [TEST] Install HyperVM + Kloxo on Centos 64bit VPS(httpd 2.2.19 - lighttpd 1.4.26 - mysql 5.1.53 - php 5.2.17)
[TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #83781] Fri, 20 May 2011 17:48 Go to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Don't install on "Production" server, instead "Testing"

I am finishing to try HyperVM + Kloxo on CentOS 64bit VPS. Exclamation

-------------------

If you can't access above links that mean server just reinstall for testing again!


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Wed, 26 October 2011 17:08] by Moderator

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #83795 is a reply to message #83781] Fri, 20 May 2011 21:17 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

1. Prepare Centos 64bit

1.a. rebuilt centos 64bit - standard (not minimal or development version)

1.b. and then run (from ssh):
# update centos to latest version (5.6)
yum update
# install some packages like package-cleanup, etc
yum install yum-utils yum-priorities
# to make sure vi installed
yum groupinstall "Development Tools"
yum groupinstall "Development Libraries"

# enable access access via ssh --> use empty passphrase
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
service sshd restart


1.c. make lxcenter.repo and lxlabs.repo --> doesn't need now because lxcenter erase mysql latest version

1.c.1. /etc/yum.repos.d/lxcenter.repo:
#
#LxCenter RPM Repository
#
[lxcenter-updates]
name=centos-5-$releasever - LxCenter Updates
baseurl=http://download.lxcenter.org/download/update/centos-5/$basearch/
gpgcheck=0
enabled=1
#protect=1
### excluding mysql because still problem until this test ###
exclude=mysql*

#packages used/produced in the build but not released
[lxcenter-extra]
name=centos-5- $releasever - LxCenter Extra
baseurl=http://download.lxcenter.org/download/update/lxgeneral
gpgcheck=0
enabled=1

#
##################################################
# Do not use/enable this on production servers!
# You are be warned.
#
[lxcenter-testing]
name=centos-5-$releasever - LxCenter Testing
baseurl=http://download.lxcenter.org/download/test/centos-5/$basearch/
gpgcheck=0
enabled=0
#protect=0
#
#
##################################################


1.c.2. /etc/yum.repos.d/lxlabs.repo (blank content):


then run (from ssh):
# inhibited overwrite by lxcenter installer
chattr +i /etc/yum.repos.d/lxcenter.repo
chattr +i /etc/yum.repos.d/lxlabs.repo


1.d. to make sure, install selinux:
yum install libselinux selinux-policy selinux-policy-targeted
genhomedircon
touch /.autorelabel
reboot


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Sun, 05 June 2011 09:10]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #83796 is a reply to message #83795] Fri, 20 May 2011 21:17 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

2. Install HyperVM

2.a. Install (run from ssh):
#may conflict if exist, so
yum remove libmcrypt

#install...
setenforce 0
mkdir -p /tmp/hypervm
cd /tmp/hypervm
wget http://download.lxcenter.org/download/hypervm/production/hypervm-install-master.sh

# just select NONE(because testing on openvz vps), alternative openvz or xen
sh ./hypervm-install-master.sh --virtualization-type=NONE

# sometimes mysql can not start because missing .sock file
mksock /var/lib/mysql/mysql.sock


2.b. Then (run from ssh):
# may deleted by kloxo so backuping --> doesn't needed for hypervm next release (2.1.0+)

# for centos 32bit enough with "cp -Rf /usr/local/lxlabs/ext /usr/local/lxlabs/ext-hypervm"
# but doesn't work for 64bit. And vice versa
yes | cp -R /usr/local/lxlabs/ext/* /usr/local/lxlabs/ext-hypervm
yes | cp -R /script/* /script-hypervm

# sometimes hypervm can't started or wait too long, so
reboot


2.c. After reboot:

2.c.1. change mysql root password

Go to hypervm and then change mysql root password or read http://forum.lxcenter.org/index.php?t=msg&th=15560

2.c.2. add skip-innodb on /etc/my.cnf then become (taken from mysql 5.1 on next step):
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

skip-innodb
# no more then 100 for ram <= 512mb
max_connections=100

# To enable the InnoDB Plugin, uncomment the 2 next lines
#ignore-builtin-innodb
#plugin-load=innodb=ha_innodb_plugin.so

# To enable InnoDB-related INFORMATION_SCHEMA tables
# Join the following options to above directive
  ;innodb_trx=ha_innodb_plugin.so
  ;innodb_locks=ha_innodb_plugin.so
  ;innodb_cmp=ha_innodb_plugin.so
  ;innodb_cmp_reset=ha_innodb_plugin.so
  ;innodb_cmpmem=ha_innodb_plugin.so
  ;innodb_cmpmem_reset=ha_innodb_plugin.so

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

then (run from ssh):
# reinstall may overwrite so copying
cp /etc/my.cnf /etc/my.cnf.bck
service mysqld restart

#update and clean up hypervm
sh /script/upcp

# doesn't needed by hypervm, so
service httpd stop
service named stop


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Mon, 13 June 2011 04:53]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #83804 is a reply to message #83796] Sat, 21 May 2011 01:42 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

3. Install Kloxo

3.a. Install (from ssh)

3.a.1. make /etc/yum.repos.d/rpmforge.repo
### Name: RPMforge RPM Repository for RHEL 5 - dag
### URL: [url]http://rpmforge.net/[/url]
[rpmforge]
name=RHEL $releasever - RPMforge.net - dag
baseurl=[url]http://apt.sw.be/redhat/el5/en/$basearch/rpmforge[/url]
#mirrorlist = [url]http://apt.sw.be/redhat/el5/en/mirrors-rpmforge[/url]
enabled=1
gpgcheck=0

[rpmforge-extras]
name=RHEL $releasever - RPMforge.net - extras
baseurl=[url]http://apt.sw.be/redhat/el5/en/$basearch/extras[/url]
#mirrorlist=[url]http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-extras[/url]
enabled=1
gpgcheck=0


3.a.2 Install Kloxo
setenforce 0
mkdir -p /tmp/kloxo
cd /tmp/kloxo
wget http://download.lxcenter.org/download/kloxo/production/kloxo-install-master.sh

# look at hypervm that why we need --db-rootpassword=
sh ./kloxo-install-master.sh --db-rootpassword=mysqlrootpswdhere

# sometimes mysql can not start because missing .sock file
# then... install again kloxo because installing failed.
mksock /var/lib/mysql/mysql.sock


3.b. Install lua (needed because kloxo can not change to lighhtpd from apache)

3.b.1. make /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
gpgcheck=0
includepkgs=lua* p7zip* mysqltuner* mod_*


3.b.2. install lua:
yum install lua p7zip mysqltuner mod_fcgid


3.b.3. then:
# change ownership from root to lxlabs
chown -R lxlabs:lxlabs /usr/local/lxlabs/ext

# may erase/overwrite by kloxo/hypervm when reinstall so
yes | cp -R /usr/local/lxlabs/ext/* /usr/local/lxlabs/ext-kloxo
yes | cp -R /script/* /script-kloxo

# kloxo doesn't include zend but needed by hypervm
# so copy from hypervm 'backup'
yes | cp -R /usr/local/lxlabs/ext-hypervm/* /usr/local/lxlabs/ext
chown -R lxlabs:lxlabs /usr/local/lxlabs/ext

# kloxo show smtp error, so
reboot


3.c. Change bind to djbdns

- for saving memory, change bind to djbdns in Kloxo ('switch program', especially hypervm not as 'dns roles').

3.d. Installing kloxophp 64bit (this step needed until lxcenter release this package):
# because conflict with install subversion, so
rpm -e apr apr-util --nodeps

# install for take from svn, including apr apr-util
yum install openssl-devel sudo
yum remove subversion
yum install subversion

# temp location
mkdir -p /tmp/kloxo/kloxophp64
chmod -R 777 /tmp/kloxo/kloxophp64
cd /tmp/kloxo/kloxophp64

# get ioncube and zend from svn
sudo -H -u lxlabs svn checkout http://svn.lxcenter.org/svn/kloxo/trunk/kloxo/other-thirdparty/ioncube-64/ioncube
sudo -H -u lxlabs svn checkout http://svn.lxcenter.org/svn/kloxo/trunk/kloxo/other-thirdparty/zend-64/zend

# remove .svn dirs
rm -rf `find . -type d -name .svn`

# rename kloxophp 32bit
mv /usr/lib/kloxophp /usr/lib/kloxophp.old

# make kloxophp 64bit then copy content from tmp
mkdir /usr/lib64/kloxophp
yes | cp -R  ./* /usr/lib64/kloxophp

# make symlink
ln -s /usr/lib64/kloxophp /usr/lib/kloxophp
ln -s /usr/lib64/php /usr/lib/php
ln -s /usr/lib64/httpd /usr/lib/httpd


3.e. Installing Mysql 5.1 and httpd 2.2.19

- Mysql from Centos too old (obsolete) but 5.0.x latest version (5.0.92) from lxcenter and other repos may have big problem (can't start until can't install/destroy data). Mysql 5.1.x seems like ok.

- httpd from CentALT is latest version (2.2.19). From lxcenter only 2.2.17.

3.e.1. make /etc/yum.repos.d/utterramblings.repo --> too hard to intall php 5.3 that use mysql other then 5.0.77. So, by-pass this step.
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=0
includepkgs=mysql*

# tricky for to make sure update mysql i386 too
[utterramblings32]
name=Jason's Utter Ramblings Repo - i386
baseurl=http://www.jasonlitka.com/media/EL$releasever/i386/
enabled=1
gpgcheck=0
includepkgs=mysql*


3.e.2. make centalt.repo --> install httpd latest version

/etc/yum.repos.d/centalt.repo
[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enable=1
gpgcheck=0
includepkgs=nginx* httpd* lighttpd* mod_*


3.e.3. then (run from ssh):
# this step will be update httpd and or mysql to 5.1 version
yum update

- go to Kloxo and then reset mysql root password --> must be the same as password on HyperVM steps (step 2) because Kloxo forget understand mysql root password, or:
sh /script/fix-program-mysql master yourmysqlrootpassword


then:

- Go to PHPMyAdmin on Kloxo. Open 'mysql' database and on 'SQL' paste this code (and then click 'go') --> mysql update to 5.1.x doesn't update 'mysql' database
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
COMMENT='MySQL Foreign Servers table'


and:
# update and cleanup Kloxo (also make horde and roundcube database if not exist)
sh /script/upcp

# kloxo doesn't make database for roundcube and horde, so
sh /script/fixmail
sh /script/fixwebmail
sh /script/fixhorde

# copy back my.cnf with skip-innodb then restart
yes | cp -R  /etc/my.cnf.bck/* /etc/my.cnf
service mysqld restart


3.e.4. The same step everytime after kloxo update (until hypervm next version release) if want hypervm still running well

yes | cp -R /usr/local/lxlabs/ext-hypervm/* /usr/local/lxlabs/ext


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Tue, 09 August 2011 05:20]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #84060 is a reply to message #83804] Wed, 25 May 2011 11:06 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

4. Combine step --> HyperVM and Kloxo work together

4.1. Copy to /script:

yes | cp -R /script-hypervm/* /script
yes | cp -R /script-kloxo/* /script


4.2. Modified /etc/directory (not perfect but work in ssh):

#!/bin/bash

if [ "$1" == "--for=hypervm" ] || [ "$1" == "-4=h" ]; then
	# echo "/usr/local/lxlabs/hypervm/httpdocs"
	cd /usr/local/lxlabs/hypervm/httpdocs
elif [ "$1" == "--for=kloxo" ] || [ "$1" == "-4=k" ]; then
	# echo "/usr/local/lxlabs/kloxo/httpdocs"
	cd /usr/local/lxlabs/kloxo/httpdocs
else
	echo
	echo "--------------------------------------------------"
	echo " format: sh $0 --for=hypervm/kloxo"
	echo " --- or ---"
	echo " format: sh $0 -4=h/k"
	echo "--------------------------------------------------"
	# echo " execute from '/usr/local/lxlabs/hypervm' or"
	# echo "    '/usr/local/lxlabs/kloxo' no need above format"
	# echo

	exit;
fi

# cd /usr/local/lxlabs/`cat /script/programname`/httpdocs



============================

Need helping from members that 'how to know' this script execute from where! --> something like $_SERVER['HTTP_REFERER'] in PHP


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Sun, 05 June 2011 12:01]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #84084 is a reply to message #84060] Wed, 25 May 2011 23:00 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Error on Roundcube:

A fatal error has occurred
Auth_imp: Required IMAP extension not found.
Details have been logged for the administrator.


and

IMAP Error in /home/kloxo/httpd/webmail/roundcube/program/include/rcube_imap.php (192)


Sad

Alternative --> use GoogleApps ('Gmail for domain') as mail server

-------------------------------

Ok, all possibilities seems like ok. But, IMAP problem still on all version of php/mysql/httpd.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Thu, 02 June 2011 07:55]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #84190 is a reply to message #84084] Fri, 27 May 2011 11:58 Go to previous messageGo to next message
semir is currently offline semir  Hungary
Messages: 985
Registered: January 2011
Location: Hungary
Senior Master
Forum Administrator
LxCenter Evangelist
cp -R /script-hypervm /script
cp -R /script-kloxo /script

Are you sure? On the earlier post you were affraid that kloxo overwrites the /script (yes, it does), then you overwrite it by yourself...
Why dont you leave them in their directories, change the /script-XY/directory file, and change the scripts with awk to use the good /script-XY dir?

I have it running (in production) for two months now this way.


ProfiVPS.com Cheap VPS hosting! Buy it from me Smile
ProfiVPS.hu Megbízható, Olcsó VPS bérlés, Virtuális szerver bérlés

If I helped you, please consider putting my link on your site/blog! Thank you in advance Smile

Do not forget: HyperVM and Kloxo are open source projects. As such, they need your contribution: if you were helped, add your 50 cents, and try to help others with their problems later.
Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #84192 is a reply to message #84190] Fri, 27 May 2011 12:28 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

semir wrote on Fri, 27 May 2011 22:58
cp -R /script-hypervm /script
cp -R /script-kloxo /script

Are you sure? On the earlier post you were affraid that kloxo overwrites the /script (yes, it does), then you overwrite it by yourself...
Why dont you leave them in their directories, change the /script-XY/directory file, and change the scripts with awk to use the good /script-XY dir?

I have it running (in production) for two months now this way.

Sorry, I think deleted and not only overwrite. So, I will be correct it.

Yes, we can use script from /script-hypervm (for hypervm) and /script-kloxo (for kloxo). But, I don't like it.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Fri, 27 May 2011 12:51]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #84379 is a reply to message #84192] Tue, 31 May 2011 10:55 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

No simple procedure for install PHP 5.3. So, pending/stop this 'test'.

The next 'project' will be begin.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Fri, 03 June 2011 04:17]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #85082 is a reply to message #84379] Mon, 13 June 2011 16:39 Go to previous messageGo to next message
Spacedust is currently offline Spacedust  Poland
Messages: 1233
Registered: October 2007
Location: Poland
Senior Master
We use PHP 5.3 without any problems.

Linux www 2.6.38.2-xxxx-std-ipv6-64 #1 SMP Tue Apr 12 17:19:35 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
quan lot khe do boi nam ca tinh xe day loai khac chan vay cong so nu thoi trang cong so nu cho thue trang phuc bieu dien
php -v
PHP 5.3.6 (cli) (built: May 16 2011 19:18:05)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with XCache v1.3.1, Copyright (c) 2005-2010, by mOo
with the ionCube PHP Loader v4.0.2, Copyright (c) 2002-2010, by ionCube Ltd., and
with TrueBug PHP Loader v1.2.0, Copyright (c) 2006-2010, by TrueBug Software

[Updated on: Fri, 03 May 2013 14:48]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #85088 is a reply to message #85082] Mon, 13 June 2011 20:00 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Yes, I am success too for PHP 5.3 on centos 64bit. But, no easy procedure to upgrade to 5.3 in many situations.

Are you sure that you run centos 64bit?. Xen VPS 32bit on Dedi 64bit will appear 'x86_64' when running command 'uname -a'.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Fri, 17 June 2011 21:29]

Report message to a moderator

Re: [TEST] Install HyperVM + Kloxo on Centos 64bit VPS [message #94781 is a reply to message #85088] Thu, 02 February 2012 15:00 Go to previous message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2073
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

I tried php 5.4 but just for 2 minutes Smile I opened a website and a lot went wrong so did fast a yum downgrade php* Smile




LxCenter - System Operations
Previous Topic:file uploading problem
Next Topic:Help Tab
Goto Forum:
  


Current Time: Wed Jun 19 16:37:39 EDT 2013

Total time taken to generate the page: 0.07359 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software