Monthly Archives: March 2013

ownCloud v5.0 on Eucalyptus Cloud with Ubuntu 12.04 Server installation

Want to host your own DropBox clone? I’m going to go over our setup for hosting our own dropbox clone using owncloud and a server instance from our in house eucalyptus cloud.

Since we are hosting this inside ubuntu 12.04 server edition, most of the installation will be done in the command line.  Open up the command line from within your server and begin.

1. Install the package dependencies required inside ubuntu 12.04 server. (update to latest ubuntu packages first, might have to reboot after upgrade, open a new terminal after upgrade to check for restart messages)
sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoclean && sudo apt-get autoremove && sudo apt-get dist-upgrade
sudo apt-get install apache2 php5 php5-gd php-xml-parser php5-intl php5-sqlite php5-mysql smbclient curl libcurl3 php5-curl

2. Download owncloud (version 5 at this time of writing).
wget http://download.owncloud.org/community/owncloud-5.0.0.tar.bz2

3.  Unzip owncloud and move it to the hosted apache document root. Modify permissions to be accessible for your webserver (we are using apache)
tar xvf owncloud-5.0.0.tar.bz2
sudo mv owncloud /var/www/
sudo chown www-data:www-data -R /var/www/owncloud

4.  Modify apache configuration to host owncloud. (We want to host with SSL for security  so we will be using a self signing certificate).

apache config

sudo a2enmod rewrite headers ssl
openssl genrsa -des3 -out ip-172-31-254-122.key 1024
openssl req -new -newkey rsa:2048 -nodes -keyout ip-172-31-254-122.key -out ip-172-31-254-122.csr
openssl x509 -req -days 365 -in ip-172-31-254-122.csr -signkey ip-172-31-254-122.key -out ip-172-31-254-122.crt
sudo mv ip-172-31-254-122.crt /etc/ssl/certs/
sudo mv ip-172-31-254-122.key /etc/ssl/private

5.   Install mysql or percona database.  (We are using Percona-5.5 and we will be building percona from source.) [or use my script to install]
Because we are installing this on a eucalyptus cloud instance, which has limited hdd storage in root, I will move the mysql data directory to /var/lib/mysql/data

sudo apt-get install build-essential cmake bison ncurses-base ncurses-bin ncurses-runtime ncurses-dev
wget http://www.percona.com/redir/downloads/Percona-Server-5.5/LATEST/source/Percona-Server-5.5.30-rel30.1.tar.gz
cmake -L && cmake . && make && sudo make install
sudo addgroup –system mysql
sudo adduser –system mysql –no-create-home -ingroup mysql
cd /usr/local/mysql
sudo chown -R mysql:mysql .
sudo mkdir /var/lib/mysql
sudo ./scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql
sudo chown -R root .
sudo chown -R mysql data
sudo mkdir /var/run/mysqld
sudo chown -R mysql:mysql /var/run/mysqld
cd /usr/local/mysql/support-files
sudo cp my-large.cnf /etc/my.cnf
sudo chown mysql:mysql /etc/my.cnf

# modify mysql configuration file  using your own custom settings as they vary depending on hardware and preference.
sudo vim /etc/my.cnf 

sudo mkdir /var/log/mysql
sudo chown mysql /var/log/mysql
cd /usr/local/mysql/support-files
sudo cp mysql.server /etc/init.d/mysql
sudo chmod +x /etc/init.d/mysql
sudo update-rc.d mysql defaults
sudo /etc/init.d/mysql restart
mysqladmin -u root password
sudo ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
cd /usr/local/mysql
sudo ./bin/mysql_secure_installation

6.  open web browser and navigate to your owncloud domain or ip and follow the on screen configuration directions.

owncloud install

ubuntu 12.10 runs very slow on virtualbox 4.2.10

What’s causing the problem?

in short, 12.10 no longer includes unity 2d and VirtualBox settings don’t have 3d acceleration enabled with unity 3d.

How to fix?

Found this great fix given by Mathew Buckett inside the askubuntu forums.

Ubuntu 12.10 no longer includes Unity 2D, which was implemented for platforms that can’t provide 3D acceleration. Instead, Ubuntu 12.10 has Unity run under LLVM, making code intended for the GPU run on the CPU. It is much slower than using the GPU.

To check if your Ubuntu 12.10 guest is using 3D acceleration, run this command:

$ /usr/lib/nux/unity_support_test -p
Not software rendered:    no
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity 3D supported:       no

As you can see, “Not software rendered” and “Unity 3D supported” both return “no” in this example, which means Unity is using slow LLVMpipe.

How to enable 3D acceleration (VirtualBox 4.2.x only)

These instructions are intended for VirtualBox 4.2.4 or 4.2.6, installed from VirtualBox’s website, not from Ubuntu’s repo. Future versions of VirtualBox may fix this problem automatically, or may need a different workaround. (i’m using 4.2.10, and will provide my changes in bold). 

  1. Install VirtualBox Oracle VM VirtualBox Extension Pack.
  2. Create a VirtualBox instance and install Ubuntu 12.10 on it.
  3. Install some required packages for the guest additions:
    sudo apt-get install linux-headers-$(uname -r) build-essential
    
  4. Install the guest additions by clicking Devices, Install Guest Additions and running this command from the CD-ROM’s directory: (/media/[username]/VBOXADDITIONS_4.2.10_84104/)
    sudo ./VBoxLinuxAdditions.run
    
  5. Add the vboxvideo driver to the instance by running:
    sudo bash -c 'echo vboxvideo >> /etc/modules'
    
  6. Shutdown the VirtualBox instance.
  7. Open the settings of the Virtualbox instance, navigate to “Display”, and tick “Enable 3D acceleration”.
  8. Boot your Ubuntu 12.10 guest, and check that 3D acceleration is working by running:
    /usr/lib/nux/unity_support_test -p
    

If windows seem to disppear, install CompizConfig Settings Manager and disable Framebuffer Object (FBO) in the OpenGL section:

  1. Install the CompizConfig Settings Manager:
    sudo apt-get install compizconfig-settings-manager
    
  2. Run the CompizConfig Settings Manager:
    ccsm
    
  3. Select the OpenGL section and then untick the Framebuffer Object option. If this fixes the issue it should be immediately visible. No reboot is required.

 

 

——————————————————————————————————————————————————

source:
http://askubuntu.com/questions/207813/why-does-an-ubuntu-12-10-guest-in-virtualbox-run-very-very-slowly

 

cannot mount nfs on ubuntu, wrong fs type message

Getting the following error message when trying to mount from nfs nas?
mount: wrong fs type, bad option, bad superblock on….

Here’s how to fix it.

sudo apt-get install nfs-common

#check if service is already running with
sudo service portmap status

#if service is not running, then start it
sudo service portmap start

 

—————————————-
source: http://www.cyberciti.biz/faq/missing-codepage-helper-program-other-error/

 

Installing Ruby 2.0.0 with RVM, Homebrew, and Mac OSX Mountain Lion

I had a lot of trouble installing ruby 2.0.0 on mountain lion.  Tried various things recommended on different forums and blogs, but the one that was easiest and worked best for me was the one written by Christopher Kaukis on the Interworks blog.  In short, the steps are as follows.

1.  Install the latest version of Xcode from the App Store.  (at this time of writing it is version 4.6)

2.  Go to xcode’s preferences and install the Command Line Tools

3.  Install Homebrew.

4.  Check requirements for RVM and install it.  (I use the multi-user install)

  • brew tap homebrew/dupes
  • brew tap –repair homebrew/dupes
  • brew install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl sqlite
  • curl -L https://get.rvm.io | sudo bash -s stable

5.  Upgrade RVM to the latest repository source version and install ruby 2.0.0 then start using it.

  • rvm get head
  • rvm install 2.0.0
  • rvm use 2.0.0