//

2009/07/24

Change Terminal Server's Listening Port (Windows)

Run Regedt32 and go to this key:

HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Find the "PortNumber" subkey and notice the value of 00000D3D, hex for (3389). Modify the port number in Hex and save the new value.

To Alter the Port on the Client Side Open Client connection Manager.

On the File menu, click New Connection , and then create the new connection. After running the wizard, you should have a new connection listed there.

Making sure that the new connection is highlighted, on the File menu, click Export . Save it as name .cns.

Edit the .cns file using Notepad changing "Server Port=3389" to "Server Port= xxxx " where xxxx is the new port that you specified on Terminal Server.

Now import the file back into Client Connection Manager. You may be prompted to overwrite the current one, if it has the same name. Go ahead and overwrite it. You now have a client that has the correct port settings to match your change Terminal Server settings.

2009/07/14

How to Install Chromium (Google chrome) in Ubuntu

First you need to download .deb package from here using the following command
$ wget http://media.codeweavers.com/pub/crossover/chromium/cxchromium_0.9.0-1_i386.deb

Now you have cxchromium_0.9.0-1_i386.deb package install this package using the following command
$ sudo dpkg -i cxchromium_0.9.0-1_i386.deb

Using Ubuntu PPA
First you need edit /etc/apt/sources.list file
sudo gedit /etc/apt/sources.list

Add the following two lines
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main

save and exit the file

Now add the GPG key using the following command
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5

Update source list
$ sudo apt-get update

Install chromium browser using the following command
$ sudo apt-get install chromium-browser

This will complete the installation.

If you want to open chromium go to Applications->CrossOver Chromium->Chromium web browser in action

2009/07/10

Common Linux log files

* /var/log/message: General message and system related stuff
* /var/log/auth.log: Authenication logs
* /var/log/kern.log: Kernel logs
* /var/log/cron.log: Crond logs (cron job)
* /var/log/maillog: Mail server logs
* /var/log/qmail/ : Qmail log directory (more files inside this directory)
* /var/log/httpd/: Apache access and error logs directory
* /var/log/lighttpd: Lighttpd access and error logs directory
* /var/log/boot.log : System boot log
* /var/log/mysqld.log: MySQL database server log file
* /var/log/secure: Authentication log
* /var/log/utmp or /var/log/wtmp : Login records file
* /var/log/yum.log: Yum log files


View common log file /var/log/messages using any one of the following command:

# tail -f /var/log/messages
# less /var/log/messages
# more -f /var/log/messages
# vi /var/log/messages

2009/07/09

Setup a website in Linux

1. Create the website user (usually the domain name is the user)
# /usr/sbin/useradd yourdomain.com

Give a password to the user. This password will be used as the ftp password.
# passwd yourdomain.com
Changing password for user yourdomain.com.
New UNIX password:
*****
Retype new UNIX password:
*****
passwd: all authentication tokens updated successfully.

2. Create the website directory.
# mkdir /home/yourdomain.com/www

3. Create log directory.
# mkdir /home/yourdomain.com/logs

4. Configure the vhost for virtual hosting:
# nano /usr/local/apache2/conf/extra/httpd-vhosts.conf

For each domain, need a directive as below:

<'virtualhost *:80'>
ServerAdmin admin@yourdomain.com.my
ServerName yourdomain.com
ServerAlias www.yourdomain.com
<'directory'>
Options FollowSymLinks
AllowOverride All
Order deny,allow
allow from all
<'/directory'>
DocumentRoot "/home/yourdomain.com/www"
ErrorLog "/home/yourdomain.com/logs/yourdomain.com-error_log"
CustomLog "/home/yourdomain.com/logs/yourdomain.com-access_log" common
<'/virtualhost'>

5. Check apache configuration:
# /usr/local/apache2/bin/apachectl configtest

6. Stop and start the apache:
# /usr/local/apache2/bin/apachectl stop
# /usr/local/apache2/bin/apachectl start

7. Check the ownership of /home/domain_name if getting 403 forbidden error:
Set the permission of /home/domain_name
# chmod -R 755 /home/yourdomain.com/
# chown -R yourdomain.com:yourdomain.com /home/yourdomain.com/

2009/07/07

Enable zip module in Windows PHP

Configuration File (php.ini) Path C:\WINDOWS\php.ini

uncomment this line

extension=php_zip.dll


restart service.

2009/07/06

php_value upload_max_filesize

Check the .htaccess file.

CODE:

# BEGIN SUGARCRM RESTRICTIONS
php_value upload_max_filesize "20M"
RedirectMatch /sugarcrm.log.* http://yourdomain.com/log_file_restricted.html
RedirectMatch /install.log http://yourdomain.com/log_file_restricted.html
RedirectMatch /upgradeWizard.log http://yourdomain.com/log_file_restricted.html
RedirectMatch /emailman.log http://yourdomain.com/log_file_restricted.html
RedirectMatch /not_imported_(.*).txt http://yourdomain.com/log_file_restricted.html
RedirectMatch /XTemplate/(.*)/(.*).php http://yourdomain.com/index.php
RedirectMatch /data/(.*).php http://yourdomain.com/index.php
RedirectMatch /examples/(.*).php http://yourdomain.com/index.php
RedirectMatch /include/(.*).php http://yourdomain.com/index.php
RedirectMatch /include/(.*)/(.*).php http://yourdomain.com/index.php
RedirectMatch /log4php/(.*).php http://yourdomain.com/index.php
RedirectMatch /log4php/(.*)/(.*).php http://yourdomain.com/index.php
RedirectMatch /metadata/(.*)/(.*).php http://yourdomain.com/index.php
RedirectMatch /modules/(.*)/(.*).php http://yourdomain.com/index.php
RedirectMatch /soap/(.*).php http://yourdomain.com/index.php
RedirectMatch /emailmandelivery.php http://yourdomain.com/index.php
# END SUGARCRM RESTRICTIONS

2009/07/02

火龙果酵素

1. 洗净鉆板、刀,汤匙还有几个装水果的碗还有一个玻璃瓶,风干备用。必须确保没有水分及油迹

2. 将火龙果去皮、切小磈。

3. 将柠檬切片,把它的上部和底部的丁切掉、必须切成薄片,还有种子也要去除,免得酵素有苦涩的味道。

4. 把火龙果一磈磈放进玻璃瓶,平铺成一层,过后加入柠檬,也照样平铺成一层把火龙果覆盖,再把有机冰糖或黄糖,平铺在上面,重复这个动作,铺到大 约3/4瓶。最高一层必定是有机冰糖。

5. 把玻璃瓶密封起来,放在荫凉的地方,让水果发酵。

6. 发酵期间的第叁、四天,将瓶子拿起来揺一揺,让发酵均匀。

7. 两个星期後,水果发酵成功,便可食用。
IP address