HOW TO force VirtualCenter to load after SQL Server on the same system

http://support.microsoft.com/kb/193888

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<Service name>

<Service name> = vpxd for VirtualCenter
modify the DependOnService key and add MSSQLSERVER

SQL 2005 setup notes for VirtualCenter 2.5

create user:
http://msdn2.microsoft.com/en-us/library/aa337562.aspx
(add sysadmin under security)
as stated here: http://kb.vmware.com/kb/1003346

create db and make the user the owner
consideration on recovery mode of DB: http://kb.vmware.com/kb/1001046
how to make changes: http://msdn2.microsoft.com/en-us/library/ms190203.aspx

install native client on VC server
http://www.microsoft.com/downloads/deta … n#filelist
http://download.microsoft.com/download/ … qlncli.msi

When creating ODBC connection, if you get “Not associated with a trusted SQL Server connection”, change authentication mode
http://support.microsoft.com/kb/889615

Other SQL links:
http://support.microsoft.com/kb/889615

http://msdn2.microsoft.com/en-us/library/aa337562.aspx
(add sysadmin under security)
as stated here: http://kb.vmware.com/kb/1003346

create db and make the user the owner
consideration on recovery mode of DB: http://kb.vmware.com/kb/1001046
how to make changes: http://msdn2.microsoft.com/en-us/library/ms190203.aspx

install native client on VC server
http://www.microsoft.com/downloads/deta … n#filelist
http://download.microsoft.com/download/ … qlncli.msi

When creating ODBC connection, if you get “Not associated with a trusted SQL Server connection”, change authentication mode
http://support.microsoft.com/kb/889615

Other SQL links:
http://support.microsoft.com/kb/889615]]–>

recently did this – ran:

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … x86_64.rpm

wget http://mirror.stanford.edu/yum/pub/cent … x86_64.rpm

wget http://mirror.stanford.edu/yum/pub/cent … x86_64.rpm

wget http://mirror.stanford.edu/yum/pub/cent … x86_64.rpm

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … x86_64.rpm

wget http://mirror.stanford.edu/yum/pub/cent … x86_64.rpm

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://vault.centos.org/4.3/os/x86_64/C … noarch.rpm

reset root password in mysql

DBS” wrote:

> I have a problem, It’s been months since I used MySQL and (I believe) I had

> set it up with a root password. Now I can’t log on to MySQL as root MySQL

> user and create a new user or manage an existing user (I can log onto server

Familiar situation. :)

Do so:

service mysql stop

wait until MySQL shuts down. Then run

mysqld_safe –skip-grant-tables &

then you will be able to login as root with no password.

mysql -uroot mysql

In MySQL command line prompt issue the following command:

UPDATE user SET password=PASSWORD(“abcd”) WHERE user=”root”;

FLUSH PRIVILEGES;

At this time your root password is reset to “abcd” and MySQL will now

know the privileges and you’ll be able to login with your new password:

mysql -uroot -pabcd mysql

Postfix SASL w/ Cyrus / LDAP

testsaslauthd -u alton -p If that’s not working, you may need to set the configuration file – probably /etc/sasl/saslauthd.conf You can use strace to see what it’s looking for. /usr/lib/sasl/smtpd.conf or /usr/lib/sasl2/smtpd.conf strace -o /tmp/postfix.txt -fael -p 1765
1765 is the process id for master. Oct 5 17:35:20 chunli postfix/smtpd[17574]: fatal: no SASL authentication mechanisms
Oct 5 17:35:21 chunli postfix/master[1765]: warning: process /usr/lib/postfix/smtpd pid 17574 exit status 1
Oct 5 17:35:21 chunli postfix/master[1765]: warning: /usr/lib/postfix/smtpd: bad command startup — throttling
Oct 5 17:37:37 chunli postfix/smtpd[17620]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechan
isms
Oct 5 18:17:04 chunli postfix/smtpd[20694]: unable to dlopen /usr/lib/sasl2/libdigestmd5.so.2: /usr/lib/sasl2/libdigestmd5.so.2: cannot open shared object file: No such file or directory
Oct 5 18:17:04 chunli postfix/smtpd[20694]: unable to dlopen /usr/lib/sasl2/libotp.so.2: /usr/lib/sasl2/libotp.so.2: cannot open shared object file: No such file or directory
Oct 5 18:17:04 chunli postfix/smtpd[20694]: unable to dlopen /usr/lib/sasl2/libsql.so.2: /usr/lib/sasl2/libsql.so.2: cannot open shared object file: No such file or directory Found the ones I needed in cyrus-sasl-plain-2.1.20-16tr.]]>

Virtual Center 2.0 DB settings

[2006-04-27 11:54:37.236 ‘App’ 1160 error] Failed to intialize VMware VirtualCenter. Shutting down… You need to make the change in your registry in:
HKEY_LOCAL_MACHINE\Software\VMware\VirtualCenter\DB
the third one should be your password in a hash. You can just reset it to and then reset the password to on the SQL server as well to get VC started up. You then go into Admin / System Settings to change your password after that.]]>

How to convert Redhat Enterprise Linux to CentOS and use yum

Why do you want to do this?

Well, this is for those who don’t need support, but happen to have the install cds for RHEL and do need updates.

Centos pretty much is the same as Redhat except that they are compiled on different machines and possible are compiled with different compilers. You can get more information at http://www.centos.org.

I think the way the versioning works is like this:

Redhat 3 update 7: CentOS 3.7

Redhat 4 update 2: CentOS 4.2

Redhat 4 update 3: CentOS 4.3

You get the drift.

Here’s the list of RPMs you’ll need. I just run wget for each of them.

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … 4.i386.rpm

wget http://mirror.stanford.edu/yum/pub/cent … 1.i386.rpm

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … 2.i386.rpm

wget http://mirror.stanford.edu/yum/pub/cent … 1.i386.rpm

After grabbing them all, I just install all of them:

Make sure you don’t have other rpms in the directory and run:

rpm –force -ivh *.rpm

Reason for the force is because it conflicts with redhat-release-4ES-5.4. I don’t care too much about that.

Now, you’re on CentOS. To upgrade packages now, just run:

yum update

Another thing that’s cool about this is that you don’t have to bother resolving dependencies cause YUM does it for you. To install a package for example, gcc, just run:

yum install gcc

up2date does the same, but you’ll need Redhat’s subscription.

How to allow ssh into a machine w/o a password

First thing you need to do is give your public key to the server that you’ll be allowed into:

To generate the keys I run (on the client):

ssh-keygen -t dsa

Here’s the output:

Generating public/private dsa key pair.

Enter file in which to save the key (/home/alton/.ssh/id_dsa):

Created directory ‘/home/alton/.ssh’.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/alton/.ssh/id_dsa.

Your public key has been saved in /home/alton/.ssh/id_dsa.pub.

The key fingerprint is:

9b:e8:24:89:34:78:ab:fd:85:93:97:df:10:9c:c8:16 alton@streetfighter

Now you’ve got to move your public key to the other machine (the server). I just take a look at the contents of the file:

[alton@streetfighter ~]$ cat /home/alton/.ssh/id_dsa.pub

ssh-dss AAAAB3NzaC1kc3MAAACBASC1tnxqkSqdGswZkp1P0o6Xn93N9XB5VpenK4k/bV2g7ojywh83CAhjhM5gKlCJ2XI+gM+XD12t+M3+Gxlre79ltiH+L86A33trW6PmUR9cQOp9cLHEzC5bjfs3esqWuuFxC4ObpHbJXakNmSQlSsNzE8ZnGG6emHJUVkNyTcjXAAAAFQD1+ZD6LG2PlwPRHLYmVxGWOm3woQAAAIAHR88SB2dnnjE2a9fQAydR2pbMOrh4X7CISuCnGtPp0lFwAIm5WAMS2oQ8Mh9HG8ou9wjhPgGSlCe4jvZEZyqlOADTZLX8hzno8LMHMTBbNxKji3qGOzJZJBbdhwg9GwitWbrHrXfZS7p2+HAIvDKINleapgrXwrInEJ6zWPYDewAAAIAo4Nud2c06/3A9LqIGeB64Nvecb2MOBOaBSeiXHqOSE/c1a9gmTCb5im3qIcrWs+cgUXbCxyHWaYQYTWUWsLh79TaLIe/rXOMr58aXQ34k1rcXaOgw3nb45YxcEIbAcqO85zc+clpfhTVzM8Aqkh5hv1b9/1pBkz75oC5KsYYkrPQ== alton@streetfighter

Then I go to the other machine and copy the contents into ~/ssh/authorizedkeys

So in the file, I add a new line if it exists and:

ssh-dss AAAAB3NzaC1kc3MAAACBASC1tnxqkSqdGswZkp1P0o6Xn93N9XB5VpenK4k/bV2g7ojywh83CAhjhM5gKlCJ2XI+gM+XD12t+M3+Gxlre79ltiH+L86A33trW6PmUR9cQOp9cLHEzC5bjfs3esqWuuFxC4ObpHbJXakNmSQlSsNzE8ZnGG6emHJUVkNyTcjXAAAAFQD1+ZD6LG2PlwPRHLYmVxGWOm3woQAAAIAHR88SB2dnnjE2a9fQAydR2pbMOrh4X7CISuCnGtPp0lFwAIm5WAMS2oQ8Mh9HG8ou9wjhPgGSlCe4jvZEZyqlOADTZLX8hzno8LMHMTBbNxKji3qGOzJZJBbdhwg9GwitWbrHrXfZS7p2+HAIvDKINleapgrXwrInEJ6zWPYDewAAAIAo4Nud2c06/3A9LqIGeB64Nvecb2MOBOaBSeiXHqOSE/c1a9gmTCb5im3qIcrWs+cgUXbCxyHWaYQYTWUWsLh79TaLIe/rXOMr58aXQ34k1rcXaOgw3nb45YxcEIbAcqO85zc+clpfhTVzM8Aqkh5hv1b9/1pBkz75oC5KsYYkrPQ== alton@streetfighter

That’s all.

mysql commands – create database / set permissions

/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h chunli.shocknetwork.com password ‘new-password’

mysql -u root -p -e “create database <dbname>”
mysql -u root -p -e “grant all on <dbname>.* to <user>@localhost identified by ‘<password>'”

DSPAM install notes

with-mysql-includes=/usr/local/include/mysql –with-mysql-libraries=/usr/local/lib/mysql
./configure –bindir=/usr/bin –sbindir=/usr/sbin –enable-whitelist –enable-source-address-tracking\
–with-userdir=/var/dspam –with-logdir=/var –sysconfdir=/etc –prefix=/usr –localstatedir=/var\
–with-userdir-owner=amavisd –mandir=/usr/share/man –libexecdir=/usr/libexec –datadir=/usr/share\
–with-userdir-group=amavisd \
–with-dspam-owner=amavisd \
–with-dspam-group=amavisd \
–with-dspam-mode=4510 \
–with-local-delivery-agent=/usr/sbin/sendmail \
–with-storage-driver=mysql_drv \
–with-mysql-includes=/usr/include/mysql \
–with-mysql-libraries=/usr/lib/mysql \
–enable-alternative-bayesian \
–disable-trusted-user-security \
–enable-opt-in \
–enable-large-scale \
–enable-virtual-users \
–enable-long-usernames \
–enable-debug –enable-robinson –enable-robinson-pvalues –enable-neural-networking
./configure –with-ldap –bindir=/usr/bin –mandir=/usr/share/man –includedir=/usr/include –sbindir=/usr/sbin –sysconfdir=/etc –localstatedir=/var –prefix=/usr –with-group=amavisd –with-user=amavisd –with-dbdir=/var/clamav/
mkdir /var/dspam/opt-in
chown -R amavisd:amavisd /var/dspam/opt-in 1028 mkdir /var/dspam
1029 chown -R amavisd:amavisd /var/dspam/
1030 ls -l /var/dspam/
1031 ls -ld /var/dspam/
1032 service mysqld start
1033 service mysql start
1034 ps -ef
1035 mysql -e “create database dspam”
1036 mysql -e “grant all on dspam.* to dspam@localhost identified by ‘DSPAMPASS'”
1037 ls
1038 cd dspam-3.2.1/tools.mysql_drv/
1039 mysql dspam < mysql_objects-4.1.sql
1040 mysql dspam < mysql dspam < virtual_users.sql
1041 mysql dspam < mysql dspam < virtual_users.sql
1042 mysql dspam < virtual_users.sql
1043 vi /var/dspam/mysql.data
1044 chown amavisd:amavisd /var/dspam/mysql.data
1045 chmod 440 /var/dspam/mysql.data
1046 tail -f /var/log/mail/info
1047 bg
1048 service amavisd restart
1049 service amavisd stop
1050 amavisd debug
1051 service amavisd start
1052 dspam_stats
1053 vi /etc/dspam.conf
1054 dspam_stats
1055 netstat -apn | grep mysql
1056 vi /etc/dspam.conf
1057 dspam_stats]]>