Archive for category linux

Enable USB Camera in Virtualbox

Due to some IM need camera in my virtualbox. get the result from ubuntu
if [ "`grep vboxusers /etc/group|grep $USER`" == "" ] ; then sudo usermod -G vboxusers -a $USER ; fi
restart the virtualbox. and follow the following instructions
DO NOT add the line to /etc/fstab, or you may meet some issue :)
none /proc/bus/usb usbfs devgid=groupid,devmode=664 0 0
Details

https://help.ubuntu.com/community/VirtualBox/USB

Also: furiusisomount can mount .bin file that can be mount as cd-rom in Windows.

,

No Comments

some tips

1. disable SSH host key checking, means skip the (yes/no) question when ssh
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
Details
2. generate random password for account
dd if=/dev/random bs=1024 count=1 2> /dev/null |base64
3. autologin
expect-lite is very useful.
4. dos2unix missing (Ubuntu 10.04)
$sudo aptitude install tofrodos
$sudo ln -s fromdos dos2unix
$sudo ln -s todos unix2dos

No Comments

Volume group “VolGroup00″ not found

Met a problem when try to copy virtualbox vdi file directly from Windows virtualbox to Linux

“Error: Volume group “VolGroup00″ not found
……
Kernel panic – not syncing: Attempted to kill init!”

Solution:
First, boot up in rescue mode, using the CentOS cd, type “linux rescue” on the first boot prompt.

Now chroot to you actual system:
#chroot /mnt/sysimage

Then, backup your initrd:
#cd /boot
#mv initrd-2.6.18-164.el5.img initrd.backup

(use the last version, or the one you are trying to boot, on the “2.6.18-92.el5.img” part)
Now rebuild your initrd:

#mkinitrd /boot/initrd-2.6.18-164.el5.img 2.6.18-164.el5
(Same thing about the versions)

#reboot

,

No Comments

Alfresco installation Guides

Alfresco offers true Open Source Enterprise Content Management (ECM) – Document Management, Collaboration, Records Management, Knowledge Management, Web Content Management and Imaging.

Installation guides with snapshots, clear to follow

http://www.linuxdict.com/books/Alfresco.pdf

PS: The Alfresco installer also support console, so we can install minimal system. and install the Alfresco. no X is needed.
Details: http://wiki.alfresco.com/wiki/Main_Page

No Comments

/var/log/lastlog file is too large?

In Short:
/var/log/lastlog is a sparse file. A sparse file is a file that contains unallocated blocks or “empty space”, as it implies, it does not actually take up filesystem space.

The size of the file /var/log/lastlog can appear to be overly large on some systems, most especially in 64 bit architectures.

ls -la /var/log/lastlog
-r——– 1 root root 1254130450140 Jul 27 08:25 /var/log/lastlog

Read the rest of this entry »

No Comments

Nginx+php with fpm repository

Glad to announce we got nginx php fpm packaged.

Version: PHP 5.2.13 with Suhosin-Patch 0.9.7 + Nginx 0.7.65

Details: http://www.linuxdict.com/lemp/readme.txt

Any advice/questions would be appericated

, ,

No Comments

Yum Repo problem : primary.sqlite.bz2: [Errno -1]

This proble happened a lot recently, no idea what’s wrong with CentOS.

updates/primary_db | 687 kB 00:02
http://mirror.nus.edu.sg/centos/5/updates/x86_64/repodata/primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum

I try to clean the cache, but still doesn’t work

Solution: Remove the following lines in /var/cache/yum/updates/repomd.xml

<data type=”primary_db”>

<location href=”repodata/primary.sqlite.bz2″/>

<checksum type=”sha”>d36796c21c77035e68c2ae2e7dc486d75d4659cd</checksum>

<timestamp>1269791791</timestamp>

<open-checksum type=”sha”>5c914da1b9b979b2097ff69062ca21783d5190d7</open-checksum>

<database_version>10</database_version>

</data>

No Comments

Edit and create deb package

1. Unpack the Deb with the following line
mkdir temp; dpkg-deb –extract mypack.deb temp

What is being done to the left of the, is to create a directory
where temporary unpacking the deb. On the right, is specified
that unpacking the deb in the directory you created earlier.

2. Now extracting control package temporary / DEBIAN with the following line:
dpkg-deb –control mypack.deb temp/DEBIAN

3. Now edit the temporary file / DEBIAN / control changes fights that we want.

4. The repackaging. Deb with the following line:
dpkg –build temp; get your new pack.deb

5. Now we can install our new package with the command
sudo dpkg -i mypack.deb

No Comments

Install and set up Adobe Flex SDK on linux

1. Install JDK

2. Download Adobe Flex SDK (Free Adobe Flex SDK)

http://opensource.adobe.com/wiki/display/flexsdk/Downloads

3. if run as root, you can create directory in /opt/flexsdk or other places
cd /opt/flexsdk
unzip ~/flex_sdk_4.0.0.14159.zip
if work as normal user
mkdir ~/flexsdk
cd ~/flexsdk
unzip ~/flex_sdk_4.0.0.14159.zip

4. change the variables
vi ~/.bashrc
#add the following lines
export PATH=$PATH:/opt/flexsdk/bin:~/flexsdk/bin
. ~/.bashrc

5. Test
$mxmlc –help
Adobe Flex Compiler (mxmlc)
Version 4.0.0 build 14159
Copyright (c) 2004-2009 Adobe Systems, Inc. All rights reserved.

No Comments

Nagios Tools for Desktop

If you monitor your system with Nagios, then I’d like to share a good desktop tool with you.

Nagstamon is a Nagios status monitor which takes place in systray or on desktop (GNOME, KDE, Windows) as floating statusbar to inform you in realtime about the status of your Nagios monitored network. It allows to connect to multiple Nagios servers.

http://sourceforge.net/projects/nagstamon/

Install the necessary tools firstly on Ubuntu 9.10
$sudo apt-get install -y python-lxml python-gnome2-extras python-gtkmozembed python-eggtrayicon python-gtkspell python-gksu2 python-gdl python-gda python2.5 libgdl-1-3 libgda-4.0-4 python2.5-minimal libdb4.6 libgdl-1-common libgda-4.0-common
$wget http://kent.dl.sourceforge.net/project/nagstamon/nagstamon/nagstamon%200.8.2/nagstamon_0.8.2_all.deb
$sudo dpkg -i nagstamon_0.8.2_all.deb

Enjoy the good tool.

No Comments