Tuesday, November 22, 2011

WebOS: Ubuntu chroot on virtual partition

  1. Install Preware 
  2. Install Xecutah, Xserver and Xterm (from Preware on device)
  3. Start Xecutah, then Xterm from Xecutah
  4. In Xterm create image for virtual partition with command:

    dd if=/dev/zero of=/media/internal/ubuntu.img bs=1M count=2048
    
    
  5. Create ext3 file system for image:

    mkfs.ext3  /media/internal/ubuntu.img

  6. Make mount folder

    mount -o remount,rw /
    mkdir -p /media/ext3fs

  7. Mount image

    mount /media/internal/ubuntu.img   /media/ext3fs

  8. Now install Ubuntu chroot from Preware
  9. Start Xecutah, then Ubuntu chroot from Xecutah
Nice tutorial how to get most of Ubuntu chroot on WebOS:

http://www.overclock.net/t/1103959/tutorial-for-overclocking-your-hp-touchpad-and-installing-linux


    Tuesday, June 7, 2011

    Opensolaris: Firefox After Update


    After update Firefox report this error:

    “Could not initialize the application’s security component. The most likely cause is problems with files in your application’s profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features.”

    To resolve this just delete file cert8.db in Firefox profile folder (/export/home/username/.mozilla/firefox/something.default, replace username with username and something with profile folder name)

    MSSQL: Optimize Table(s) (Like in MySQL)

    To optimize one table in database:

    ALTER INDEX all ON [table name] REORGANIZE
    exp.:
    ALTER INDEX all ON people REORGANIZE

    To optimize all tables in entire database:
    USE [databaseName]
    EXEC sp_MSforeachtable @command1="ALTER INDEX all ON ? REORGANIZE"
    

    or

    EXEC [databaseName].dbo.sp_MSforeachtable @command1="ALTER INDEX all ON ? REORGANIZE"

    This works only in MSSQL 2005 and later.

    It is not the same as MySQL optimize.

    Friday, March 4, 2011

    VSFTPD CentOS

    1. Install vsftpd:
      # yum install vsftpd
    2. To start after reboot:
      # chkconfig vsftpd on
    3. Edit /etc/vsftpd/vsftpd.conf:
      anonymous_enable=NO
      chroot_local_user=YES
      userlist_deny=NO
      userlist_enable=YES
      userlist_file=/etc/vsftpd/vsftpd.user_list
    4. Edit or create /etc/vsftpd/vsftpd.user_list and add usernames with read write permissions
      user1
      user2
    5. Add ftp user:
       # /usr/sbin/useradd -g 50 -p password -s /bin/false -d /var/www/html/folder/ user1
    6. Set folder owner:
       # chown -R user1.apache /var/www/html/folder/
    7. Set shell:
       # chsh -s /sbin/nologin user1
    8. Configure SELinux:
       # /usr/sbin/setsebool -P ftp_home_dir 1
       # /usr/sbin/setsebool -P allow_ftpd_full_access 1
    9. Configure iptables to open port 21
    This will prevent errors if permissions of folders sets correctly (530 login incorrect, 553 Could not create file, 500...) 

    Friday, January 14, 2011

    OpenSolaris 2009.06 update to 134b Virtual Box problem

    If you see this message after reboot:

    failed to update state of instance svc:/application/ x11/xfs:default in repository

    just login in terminal mode and remove VBox guest addon package:

    #pkgrm SUNWvboxguest

    Reboot, and install VBox guest addon again.