Monthly Archives: September 2012

Install SSO and upgrade from 5.0 to 5.1 vCenter,Inventory,vSphere,vSphere Update Manager

Starting …..

Step 1 : What is SSO and Installing SSO

SSO is shortly enables authorized vCenter Server users to access multiple vCenter Server-related systems with a single login.

I created a new VM for install SSO.

Need  a database, if you don’t have central one or standalone database server then SSO installation package come with mssql express one and you can use it

No need to do something from GUI just change the path of mdf/ndf/ldf and execute such sql commands, no need to create a sql user, i will use windows auth 😉

CREATE DATABASE RSA ON PRIMARY(
NAME=’RSA_DATA’,
FILENAME=’C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\RSA_DATA.mdf’,
SIZE=10MB,
MAXSIZE=UNLIMITED,
FILEGROWTH=10%),
FILEGROUP RSA_INDEX(
NAME=’RSA_INDEX’,
FILENAME=’C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\RSA_INDEX.ndf’,
SIZE=10MB,
MAXSIZE=UNLIMITED,
FILEGROWTH=10%)
LOG ON(
NAME=’translog’,
FILENAME=’C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\translog.ldf’,
SIZE=10MB,
MAXSIZE=UNLIMITED,
FILEGROWTH=10% )
GO

To whom interest jdbc out “jdbc:sqlserver://;serverName=10.110.1.61;port=1433;databaseName=RSA;integratedSecurity=true”

Now, mount the vCenter 5.1 cd iso to sso server and start installation, without sso installed you can not upgrade inventory service and vCenter 5.1  also check .Net 3.5 SP1 installed or not !

I do not have AD environment for SSO will join because of that you can get warning message, click OK and continue

Now, you have a option to install SSO high available but i will not do this, SSO virtual machine run on cluster and i’m backing it with veeam also without sso just only loose management 🙂 but all cluster functionality and vm activity will continue to work

For high availability pls  fallow http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&externalId=2033588&sliceId=2&docTypeID=DT_KB_1_1&dialogID=433530793&stateId=1%200%20433554690

I selected basic one

Password for admin@System-Domain and –> Next

Did you decide to which MSSQL will you use , i will choose existing one –> Next

Set related db informations like below and –> Next

Give the sso server  ip address or FQDN –> Next

No need to change installation folder –> Next

SSO service port described, its 7444, no need to change until you used this port for other service –> Next

Click Install and wait installation finish, perfect first round over.

Step 2  : Upgrade Inventory Service

On vCenter 5.0 there is no option at the installation time but service was there after installation over, you have to read related pdf  on links section end of the article to understand why such service created but shortly its helping vCenter to reducing direct access clients to vCenter, working like a cache or something like that.

Start installation, it will inform you replace SSL Certificate (i did not use special one before) , agree the term , Choose Do not overwrite existing database, vCenter hostname should be come automatically, leave the ports default, if you also need to increase number of VM and host what vCenter will handle change the “Inventory Size”  .

Now time to enter SSO user and test it , enter SSO user/pass and SSO server hostname, if you see the Certificate Installation window then its okay SSO is working

Click Install certificates and Install !

Step 3  : Upgrade vCenter 5 to 5.1

Start installation, my vCenter db is on central database server , its asking database user name and password, pls set correct one.
Installation will detect if you have old components like Update Manager, you have to upgrade it after vCenter upgrade.
Be sure you backed up vCenter database and related  SSL folder and go !

Leave automatic vCenter Agent Upgrade option and click next
I was running vCenter Server with SYSTEM Account and keep continue with it
leave the ports default, if you also need to increase number of VM and host what vCenter will handle change the “Inventory Size”
Enter SSO user/pass and SSO server hostname , installation will pop up a warning like below, i want to keep users and clicked “Yes”

deleted_vc_users.txt which is under %temp%

Resgiter vCenter Server administrator with SSO

Register vCenter and Inventory, for me leave how installer prepared the values and next
Set intallation folder next and click install .

After instalaltion of course next step will be upgrade vCenter client but you will get a permisson error and you have to give permission to SSO admin user to connect,manage and maintain on vCenter Server 🙂

Step 4 : Upgrade vCenter Client

Run vSphere Client installation and go !

Step 5  : Upgrade the vCenter Upgrade Manager

Start installation, old version will be detected , continue

I tried without use sso user and still its working

Next, database user pass will be requested , set it and click next
Select upgrade database option next and verify update manager ip address and ports and next
Click install ,installation will stop the running process of update manager and start to update system

Back to the vCenter Server and from Plug-ins tab select Manage Plugins and from Available Plug-ins click Download and Install and fallow the instraction accept new certificate and its there ….

Control your baseline and configurations and if you will upgrade ESXi5.0 to 5.1 then upload the image from ESXi Images tab of update manager, create a new base line for it

Let me show you the upgrade ESXi from Update Manager

Choose the host and go to Update Manager tab, you can see that one incompatible/Upgrades are waiting. I guess you can not see that because you have to attach a new baseline to host which you created before upload the image

Click “Remediate” and choose UpgradeBaseline and related option from right site and next and accept the agreement ,Remove 3th party incompatible softwares ,enter description and related settings on next screens and go !

Links

http://derek858.blogspot.com/2012/09/vmware-vcenter-51-installation-part-1.html
Reset SSO Password – http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2034608
Inventory Service – http://www.vmware.com/files/pdf/techpaper/Whats-New-VMware-vCenter-Server-51-Technical-Whitepaper.pdf

Advertisements

After Redhat/Centos come to Debian, hey where are all my known commands,apps and files ….. Round2

Round 2, need to be install ngix and apache together and side effects (sorry this is very long article,pls do not lost inside)

Need to be check the apt index means repository update, second one show the which software have a update

apt-get update

apt-get upgrade –show-upgraded

apt-get -u upgrade (this command also have same result like –show-upgraded)

To see whats inside repository pls execute such command like below with what you would like to search

apt-cache search apache | less

Now switch to better command then apt-get 🙂 its another api use apt-get http://wiki.debian.org/Aptitude

root@WebApp02:~# aptitude search apache2-mpm

v apache2-mpm –
p apache2-mpm-event – Apache HTTP Server – event driven model
p apache2-mpm-itk – multiuser MPM for Apache 2.2
p apache2-mpm-prefork – Apache HTTP Server – traditional non-threaded model
p apache2-mpm-worker – Apache HTTP Server – high speed threaded model

if you see any <i< on first column instead of <p< then its means that related software already installed

apache2ctl -l

the command on the top is another way to understand core files which apache compiled

I’m installing apache-mpm-event software, for worker or pre fork replace after mpm- with required one …
Be aware that if you are using event or worker you can not install php5 later 🙂 heheh you should install php fast cgi because of compatibility between php5 software and apache-mpm, actually  you can install but package manager apt will remove event or worker one and install pre fork when you install the php5 not php fast cgi

root@WebApp02:~# aptitude install apache2-mpm-event

The following NEW packages will be installed:

apache2-mpm-event apache2-utils{a} apache2.2-bin{a} apache2.2-common{a} libapr1{a} libaprutil1{a}

libaprutil1-dbd-sqlite3{a} libaprutil1-ldap{a} ssl-cert{a}

0 packages upgraded, 9 newly installed, 0 to remove and 0 not upgraded.

Need to get 2,170 kB of archives. After unpacking 7,385 kB will be used.

Do you want to continue? [Y/n/?] y

installed and running, very fast to me 😀

Apache config files are under /etc/apache2, very interesting for me because i’m very familiar apache on redhat/centos almost one file and go but okay, go
i found some new folders like site-enabled or site-available, meanings ? find good explanation from this link http://www.debian-administration.org/articles/207

This is from end of the apache2.conf

# Include the virtual host configurations: Include sites-enabled/

This is the folder inside, all request redirected to default site , but we will change it shortly

root@WebApp02:/etc/apache2# cd sites-enabled/
root@WebApp02:/etc/apache2/sites-enabled# ls -al total
8 drwxr-xr-x 2 root root 4096 Sep 3 00:25 .
drwxr-xr-x 7 root root 4096 Sep 3 00:34 ..
lrwxrwxrwx 1 root root 26 Sep 3 00:25 000-default -> ../sites-available/default

Before installation of ngix i went to ports.conf and 000-default files , on ports.conf changed listen and NameVirtualHost to 8080, and same on 000-default
Restarted apache2 with /etc/init.d/apache2 stop and /etc/init.d/apache2 start and i can access the working page with server ip and port 8080

For nginx, no any result when i search it

root@WebApp02:~# aptitude search ngix
root@WebApp02:~#

i need to learn Debian version, pls expect that i don’t know what version of installed, very closer file on Debain like Redhat heheheh

root@WebApp02:~# cat /etc/debian_version
6.0.5

Add such lines in apt repo source file , first edit it

root@WebApp02:~# vi /etc/apt/sources.list

second add such lines and save the file

## For Ngix
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx

Related Nginx repo need to be update with apt-get update but you will get an error to fix it do like below

root@WebApp02:~# gpg –keyserver keyserver.ubuntu.com –recv-key ABF5BD827BD9BF62
gpg: requesting key 7BD9BF62 from hkp server keyserver.ubuntu.com
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 7BD9BF62: public key “nginx signing key <signing-key@nginx.com>” imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1)

root@WebApp02:~# gpg -a –export ABF5BD827BD9BF62 | apt-key add – OK

if you don’t know what is gig pls read this http://www.gnupg.org/

You got it !

root@WebApp02:~# aptitude search nginx p nginx – HTTP and reverse proxy server, as well as a mail proxy server p nginx-common – small, powerful, scalable web/proxy server – common files p nginx-dbg – Debugging symbols for nginx p nginx-debug – not stripped version of nginx build with the debugging log p nginx-doc – small, powerful, scalable web/proxy server – documentation p nginx-extras – nginx web/proxy server (extended version) p nginx-extras-dbg – nginx web/proxy server (extended version) – debugging symbols p nginx-full – nginx web/proxy server (standard version) p nginx-full-dbg – nginx web/proxy server (standard version) – debugging symbols p nginx-light – nginx web/proxy server (basic version) p nginx-light-dbg – nginx web/proxy server (basic version) – debugging symbols p nginx-naxsi – nginx web/proxy server (version with naxsi) p nginx-naxsi-dbg – nginx web/proxy server (version with naxsi) – debugging symbols p nginx-naxsi-ui – nginx web/proxy server – naxsi configuration front-end

You will see that nginx is on list :), go install it, after install nginx will run with default configuration

root@WebApp02:~# apt-get install nginx

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following NEW packages will be installed:

nginx

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 483 kB of archives.

After this operation, 1,061 kB of additional disk space will be used.

Get:1 http://nginx.org/packages/debian/ squeeze/nginx nginx amd64 1.2.3-1~squeeze [483 kB]

Fetched 483 kB in 2s (177 kB/s)

Selecting previously deselected package nginx.

(Reading database … 34219 files and directories currently installed.)

Unpacking nginx (from …/nginx_1.2.3-1~squeeze_amd64.deb) …

———————————————————————-

Thanks for using NGINX!

Check out our community web site:

* http://nginx.org/en/support.html

If you have questions about commercial support for NGINX please visit:

* http://www.nginx.com/support.html

———————————————————————-

Setting up nginx (1.2.3-1~squeeze) …

Check the processes, you should see the nginx processes

root@WebApp02:~# ps -fe

root 12253 1 0 01:12 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 12254 12253 0 01:12 ? 00:00:00 nginx: worker process
root 12255 10647 0 01:14 pts/3 00:00:00 ps -fe

See whats listening

root@WebApp02:~# netstat -an

Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:54476 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 213.155.101.195:22 212.58.13.11:59474 ESTABLISHED tcp 0 0 213.155.101.195:22 212.58.13.11:60528 ESTABLISHED tcp 0 0 213.155.101.195:22 212.58.13.11:64825 ESTABLISHED tcp6 0 0 :::8080 :::* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:25 :::* LISTEN udp 0 0 0.0.0.0:38324 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* udp 0 0 0.0.0.0:654 0.0.0.0:*

After request you will see that nginx is working , okay back to the apache again

Install php scripting language and module for apache2 modules(do not execute something before read next paragraph )

root@WebApp02:~# aptitude install php5 libapache2-mod-php5

This installation will inform you to remove mpm-event and install mpm-prefork, if you want to use mpm-event use fastcgi instead of mod-php5

After i install all i saw that i need more new version php then installed , on centos we generally use atomic, need to be learn same thing available on debian or not. Of course, some guys working on it for example i used http://www.dotdeb.org/

From this link you can get related lines need to be added apt source list http://www.dotdeb.org/instructions/
Very import an pls read the dot deb before install because maybe you should not install php5 before add dot deb repo, on my installation i do not have a chance but its worked.
My colleague Salih said that another possibility too, maybe you can need https://launchpad.net/~ondrej/+archive/php5

How i told you if you installed php5 before add dot deb to source list debian package manager do not upgrade the php5 to last version or what dot deb provide
Here need to be use different command which is below . Read the change log installation time very important for developers of site also because of compatibility issue  read what will be removed. From change log you can quit with type <q< key (hope i remember well,sorry)

root@WebApp02:~# apt-get dist-upgrade

Reading package lists… Done

Building dependency tree

Reading state information… Done

Calculating upgrade… Done

The following packages will be REMOVED:

php5-suhosin

The following packages will be upgraded:

libapache2-mod-php5 php5 php5-cli php5-common php5-mysql

5 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.

Need to get 6,158 kB of archives.

After this operation, 1,079 kB of additional disk space will be used.

Do you want to continue [Y/n]? y

Get:1 http://packages.dotdeb.org/ squeeze-php54/all php5-cli amd64 5.4.6-1~dotdeb.0 [2,695 kB]

Get:2 http://packages.dotdeb.org/ squeeze-php54/all php5-mysql amd64 5.4.6-1~dotdeb.0 [79.6 kB]

Get:3 http://packages.dotdeb.org/ squeeze-php54/all libapache2-mod-php5 amd64 5.4.6-1~dotdeb.0 [2,802 kB]

Get:4 http://packages.dotdeb.org/ squeeze-php54/all php5-common amd64 5.4.6-1~dotdeb.0 [580 kB]

Get:5 http://packages.dotdeb.org/ squeeze-php54/all php5 all 5.4.6-1~dotdeb.0 [1,012 B]

Fetched 6,158 kB in 8s (716 kB/s)

Reading changelogs… Done

You can add mysql client support on php5

root@WebApp02:~# apt-get install php5-mysql

Now,remove the old default redirection

root@WebApp02:~# a2dissite default
Site default disabled.
Run ‘/etc/init.d/apache2 reload’ to activate new configuration!

root@WebApp02:~# /etc/init.d/apache2 reload
Reloading web server config: apache2apache2: Could not reliably determine the server’s fully qualified domain name, using xxx.xxx.xxx.xxx for ServerName
[Mon Sep 03 17:55:55 2012] [warn] NameVirtualHost *:8080 has no VirtualHosts
.

Do you remember default000, its gone

root@WebApp02:/etc/apache2/sites-enabled# ls -al
total 8
drwxr-xr-x 2 root root 4096 Sep 3 17:55 .
drwxr-xr-x 7 root root 4096 Sep 3 00:51 ..

Go to /etc/apache2/sites-available folder and create a file name with what domain you will host, for example example.net

<VirtualHost *:8080>

ServerAdmin webmaster@example.net

ServerName example.net

ServerAlias http://www.example.net

DocumentRoot /srv/www/example.net/public_html/

ErrorLog /srv/www/example.net/logs/error.log

CustomLog /srv/www/example.net/logs/access.log combined

</VirtualHost>

Create related folders

mkdir -p /srv/www/example.net/public_html

mkdir /srv/www/example.net/logs

Enable domain for hosting , execute such line on console

a2ensite example.net

and restart apache , for test upload your test content in related folder

One note to you, i couldn’t find out module and php handlers informations, i feel like junior , go to /etc/apache2/mods-enabled folder , .load files what red hat/centos users familiar in httpd.conf module loads rows , confs are again configs for such modules for example after install php5.conf you will see the handlers.

root@WebApp02:/etc/apache2# cd mods-enabled/

root@WebApp02:/etc/apache2/mods-enabled# ls -al

total 8

drwxr-xr-x 2 root root 4096 Sep  3 22:55 .

drwxr-xr-x 7 root root 4096 Sep  3 23:23 ..

lrwxrwxrwx 1 root root   28 Sep  3 00:25 alias.conf -> ../mods-available/alias.conf

lrwxrwxrwx 1 root root   28 Sep  3 00:25 alias.load -> ../mods-available/alias.load

lrwxrwxrwx 1 root root   33 Sep  3 00:25 auth_basic.load -> ../mods-available/auth_basic.load

lrwxrwxrwx 1 root root   33 Sep  3 00:25 authn_file.load -> ../mods-available/authn_file.load

lrwxrwxrwx 1 root root   36 Sep  3 00:25 authz_default.load -> ../mods-available/authz_default.load

lrwxrwxrwx 1 root root   38 Sep  3 00:25 authz_groupfile.load -> ../mods-available/authz_groupfile.load

Last thing, configure nginx quickly and without complex config , go to /etc/nginx/conf.d , copy the content of default somewhere and replace it with below and restart nginx service , thats it everything should be work

server {

listen 80;

server_name _;

proxy_set_header Host $http_host;

proxy_set_header  X-Real-IP  $remote_addr;

proxy_connect_timeout 6000;

location ~ .+$ {

proxy_set_header  X-Real-IP  $remote_addr;

proxy_set_header Host $http_host;

proxy_pass   http://127.0.0.1:8080;

}

}

Good Links

http://articles.slicehost.com/2010/5/20/configuring-the-apache-mpm-on-debian
http://kb.parallels.com/en/113007
http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-debian-lenny-lamp (LAMP)
http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-debian-lenny (Fast-Cgi)
http://www.hardened-php.net/suhosin/