# Become root sudo -i # Do a couple of pre-requisites apt-get install build-essential ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h # Extract each of the VMware module packages cd /usr/lib/vmware/modules/source for file in * do tar xvf $file done # Fetch and apply patches required for this release... wget http://communities.vmware.com/servlet/JiveServlet/download/2234875-108182/vmci.linux-3-8.patch patch -p0 < vmci.linux-3-8.patch # Put the VMware module source packages back together again for file in *-only do tar cvf `basename $file -only`.tar $file done rm -rf *-only # Tell VMware to rebuild the modules - can also just run the command "vmware" as root vmware-modconfig --console --install-all
As everything that comes from ruby world, getting heroku running on Ubuntu is not as easy as we're used to (ie: apt-get install heroku) so there are a few steps that need to be followed. I've written this down so i can come back to it later and so that others don't lose hours trying to figure this out. The data on this article has been scraped from http://www.web2linux.com/05/installing-rails-3-on-ubuntu-10-04-lucid-lynx/ and http://devcenter.heroku.com/articles/quickstart
sudo apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev
#for latest, check https://rvm.beginrescueend.com/ bash <
rvm install 1.9.2 && rvm use 1.9.2 --default
Then add this line as the last line in your .bashrc:
if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then source "$HOME/.rvm/scripts/rvm"; fi
Sign-up for a Heroku account if you haven’t already and then install the
gem install heroku
You will be asked to enter your Heroku credentials the first time you run a command; after the first time, your email address and an API token will be saved to
~/.heroku/credentials for future use.
It’s generally a good idea to add your public key immediately after installing the heroku gem so that you can use git to push or clone Heroku app repositories:
heroku keys:add Enter your Heroku credentials. Email: firstname.lastname@example.org Password: Uploading ssh public key /Users/joe/.ssh/id_rsa.pub
Track your application with Git
If you’re already using Git with your application, skip to the next step. If you’re not yet using Git to track your application, run this:
cd PATH/TO/MY_APP git init # Initialized empty Git repository in .git/ git add . git commit -m "new app" Created initial commit 5df2d09: new app 44 files changed, 8393 insertions(+), 0 deletions(-)
Create your Heroku application
At the command line, run heroku create. The first time you do this, you’ll be asked to enter your Heroku credentials. Once you do, your email address and an API token will be saved to ~/.heroku/credentials, so you won’t have to provide them again.
This first use will also upload your public SSH key so you’ll be able to push and pull code.
heroku create Enter your Heroku credentials. Email: email@example.com Password: Uploading ssh public key /Users/joe/.ssh/id_rsa.pub Created http://high-sunrise-58.heroku.com/ | firstname.lastname@example.org:high-sunrise-58.git Git remote heroku added
The last line shows the name of your new Heroku app; in this case, it’s “high-sunrise-58”, and is available at http://high-sunrise-58.heroku.com. If you were to visit that URL before pushing your application code (either by typing it in or running heroku open), you’d see a standard Heroku welcome page.
On the next to last line, there’s another important piece of information: email@example.com:high-sunrise-58.git. This is the Git repository address for your new Heroku app, and if you check the output of git remote show heroku you can see that the heroku gem added it as a remote for you automatically.
Push your application to Heroku
git push heroku master Counting objects: 65, done. Compressing objects: 100% (58/58), done. Writing objects: 100% (65/65), 80.54 KiB, done. Total 65 (delta 14), reused 0 (delta 0) -----> Heroku receiving push -----> Rails app detected Compiled slug size is 0.1MB -----> Launching....... done App deployed to Heroku To firstname.lastname@example.org:high-sunrise-58.git * [new branch] master -> master
Bootstrap your database
Your app is now running on Heroku with an empty database. Depending on your framework, run the appropriate command to set up your DB. For Ruby on Rails, run:
heroku rake db:migrate (in /mnt/home/slugs/41913_b81cc1e5813c58c443e4120aff984d006f36ef20/mnt) == 20081118092504 CreateWidgets: migrating ==================================== -- create_table(:widgets) -> 0.0519s == 20081118092504 CreateWidgets: migrated (0.0520s) ===========================
That’s it, your app is now running on Heroku! You can take a look at it in your default web browser by running heroku open.
Now that your application is running, it’s easy to push updates:
Develop and test changes locally.
Commit code to git.
Push your changes to Heroku with git push heroku.
Update 3 [30 10 2011]: The script was updated to install of Flash Player 11.2 Beta
Update 2 [7 09 2011]: The script was updated to install rc1 of Flash Player 11
Update 1 [13 08 2011]: The script was updated to install b2 of Flash Player 11
Abobe released yesterday the first beta of Flash Player 11 for Linux 64 bit.
I've put together a small script that takes care of installing it on Ubuntu:
#!/bin/bash # Script created by # Romeo-Adrian Cioaba email@example.com echo "Stopping any Firefox that might be running" sudo killall -9 firefox echo "Removing any other flash plugin previously installed:" sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper sudo rm -f /usr/lib/mozilla/plugins/*flash* sudo rm -f ~/.mozilla/plugins/*flash* sudo rm -f /usr/lib/firefox/plugins/*flash* sudo rm -f /usr/lib/firefox-addons/plugins/*flash* sudo rm -rfd /usr/lib/nspluginwrapper echo "Installing Flash Player 11" cd ~ wget 'http://download.macromedia.com/pub/labs/flashplatformruntimes/flashplayer11-2/flashplayer11-2_p1_install_lin_64_102611.tar.gz' tar zxvf flashplayer11-2_p1_install_lin_64_102611.tar.gz sudo cp libflashplayer.so /usr/lib/mozilla/plugins/ sudo cp -r usr/ /usr echo "Linking the libraries so Firefox and apps depending on XULRunner (vuze, liferea, rsswol) can find it." sudo ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/firefox-addons/plugins/ sudo ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/xulrunner-addons/plugins/ # now doing some cleaning up: sudo rm -rf libflashplayer.so sudo rm -rf usr/ sudo rm -rf flashplayer11-2_p1_install_lin_64_102611.tar.gz
A very interesting application that comes bundled in this release is the "flash-player-properties" app which allows us to finally be able to set permissions to mic/camera on websites.
apps → compiz → general→ allscreens → options → show_desktop_edge
If the show_desktop_edge key is not there, create it as string and then add the value BottomLeft and save.
Here are a few easy steps to replace openoffice.org with libreoffice on ubuntu:
CLI instructions (these will take care of removing OpenOffice.org and installing LibreOffice):
Add the PPA and install LibreOffice:
sudo add-apt-repository ppa:libreoffice/ppa sudo apt-get update sudo apt-get install libreoffice
For GNOME integration (for people running default Ubuntu):
sudo apt-get install libreoffice-gnome
or for KDE Integration (for people running Kubuntu):
sudo apt-get install libreoffice-kde
As of Ubuntu 11.04, LibreOffice will replace by default OpenOffice.
I've recently started playing around with git and found out the power of gitk. Gitk is a small tool built using tcl/tk that helps the user visualize the changes he's done in a graphical, easy to follow manner. By default Ubuntu 10.10 ships with tk8.4 installed by default and that makes gitk look really ugly, as tk8.4 doesn't support antialiased fonts. To fix this problem simply install tk8.5 and make it default on your machine:
sudo apt-get install tk8.5 sudo update-alternatives --config wish # a list will show up and you need to type in the number that corresponds to tk8.5 (in my case was 3) then hit enter.
That's it. You can now reopen gitk and see the difference.
Handy snippet to find some string inside the files in a directory:
grep -r --line-number "string_you_search" path/where/to/look
Note the -r tells grep also to look into all subfolders recursively.
The good thing during the last years is that net access is almost everywhere, and is pretty cheap or even free. A lot of bars, hotels, restaurants offer a free wifi connection, but most of the times that connection is not secured. The biggest security risk with unencrypted connections is the man-in-the-middle type of attack. You are sitting on a bar, checking email, browsing and all your traffic is not encrypted. That means that an attacker can tap into your connection and "listen", intercept everything you are typing. Like that the attacker can get sensitive data (accounts, passwords, credit card numbers etc.)
Since you don't have any control over the connection, what one can do to protect himself is to use a VPN. With a VPN, you are creating a secure (encrypted) point-to-point connection between your PC and the VPN server. Translated, that means that all the Internet traffic you are doing, is going through that secure channel, which can't be hacked that easily.
Here us how to setup a vpn server using openVPN
1. Install openvpn and openssl
sudo apt-get install openvpn libssl-dev openssl
cd /etc/openvpn/ cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0/* /etc/openvpn/easy-rsa/
3. Create server certificates
cd /etc/openvpn/easy-rsa/ source vars ./clean-all ./build-dh ./pkitool --initca ./pkitool --server server cd keys openvpn --genkey --secret ta.key cp server.crt server.key ca.crt dh1024.pem ta.key /etc/openvpn/
4. Create client certificates
cd /etc/openvpn/easy-rsa/ source vars ./pkitool hostname
For each new client that connects to the VPN you'll need to create new client certificates using step 4
5. Create server configuration file:
cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/ gzip -d /etc/openvpn/server.conf.gz
After editing your file should look like this:
dev tun proto tcp port 1194 ca ca.crt cert server.crt key server.key dh dh1024.pem user nobody group nogroup server 10.10.0.0 255.255.255.0 persist-key persist-tun client-to-client push "redirect-gateway def1" push "dhcp-option DNS 22.214.171.124" push "dhcp-option DNS 126.96.36.199"
6. Enable routing and MASQUERADE for your VPN by placing the following in your /etc/rc.local
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -s 10.10.0.0/24 -o eth0 -j MASQUERADE
7. Start the server
/etc/rc.local /etc/init.d/openvpn restart
1. Ubuntu (all modern linux?)
I'm using an Ubuntu machine as a client. To use openvpn in Ubuntu just install the openvpn plugin for NetworkManager:
sudo apt-get install network-manager-openvpn
A reboot is recommended.
You can now go and add your connection in Network Manager
2. Windows - to come
3. Mac OS X - to come
Adobe® Flash® Player "Square" is a preview release that enables native 64-bit support on Linux, Mac OS, and Windows operating systems, as well as enhanced support for Microsoft Internet Explorer 9 beta.
I'm glad to see Adobe has is finally embracing the way it should the 64 bit Platform. This release is a milestone as far as i know, as is the first one that's released in the same time for win, mac and linux. I've put together a small tutorial on
how to install adobe flash player square on linux:
#!/bin/bash # Script created by # Romeo-Adrian Cioaba firstname.lastname@example.org echo "Stopping any Firefox that might be running" sudo killall -9 firefox echo "Removing any other flash plugin previously installed:" sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper sudo rm -f /usr/lib/mozilla/plugins/*flash* sudo rm -f ~/.mozilla/plugins/*flash* sudo rm -f /usr/lib/firefox/plugins/*flash* sudo rm -f /usr/lib/firefox-addons/plugins/*flash* sudo rm -rfd /usr/lib/nspluginwrapper echo "Installing Flash Player Square" cd ~ # 64 bit wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer_square_p1_64bit_linux_091510.tar.gz tar zxvf flashplayer_square_p1_64bit_linux_091510.tar.gz # 32 bit # wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer_square_p1_32bit_linux_091510.tar.gz # tar zxvf flashplayer_square_p1_32bit_linux_091510.tar.gz sudo cp libflashplayer.so /usr/lib/mozilla/plugins/ echo "Linking the libraries so Firefox and apps depending on XULRunner (vuze, liferea, rsswol) can find it." sudo ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/firefox-addons/plugins/ sudo ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/xulrunner-addons/plugins/ # now doing some cleaning up: sudo rm -rf libflashplayer.so sudo rm -rf flashplayer_square_p1_64bit_linux_091510.tar.gz
To check if the install did it's job, you need to check about:plugins in your address bar. It should show you this for flash player:
- File: libflashplayer.so
- Shockwave Flash 10.2 d161
As usual, I've wrapped everything mentioned before into a script to easily install flash player square on Linux
If this version doesn't work out that well for you, you can still check my other tutorial on how to install native 64bit flash player on Linux
Modern Linux systems have plenty of tools for both Gnome and Kde to analyze the disk space. But if you log into a server via SSH or similar, you're out of luck. You need a tool for Cli Disk Usage analytics. That tool is ncdu.
You can install it easy:
sudo apt-get install ncdu
Issuing ncdu inside the folder you want to check will open a cool ncurses interface, really easy to use