Archive for the ‘Tutorials and Guides’ Category

This guide will walk you through how to install and run Django on a shared host such as Bluehost. Because I use Bluehost, I was able to verify the steps you see below, but you might need to modify some of the steps to work with your specific host. The whole thing should take less than 10 minutes. If I’ve done my job right, you should be able to copy/paste multiple lines to run all commands in a block as if it were a script. If you feel more comfortable, you can run each command line by line. Let’s get to it…

This is a quick start guide, so let’s get to it! For more information, see bottom of post…

Note: I dug this one out from my post drafts from April, 2010, so I’m not sure how relevant the information is now. It looks like enough to get somebody heading in the right direction though, so I’m going to post it. I have a related guide here (Guide on TFTP Server Setup in Fedora).

Install

su -c 'yum install -y vsftpd'

Setup

gedit /etc/vsftpd/vsftpd.conf

The above steps will get you started with a FTP server in Fedora (may work in other distros such as Ubuntu as well). It will allow you to immediately start sending files via FTP as a local user. So, if my username on my FTP server was ‘derek’, I could use

ftp <em>ip_address</em> -user derek"

Here’s an example config file:

# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

Most of the guides I came across were just wildly all over the place, so I figured a short and simple guide that gets right to the point would be useful. Here’s how to set up Fedora 15 to build (compile might be another word) a .tex file into a .pdf file from the command line. It can be applied to other Linux distributions as well. There are GUIs to help with this, but it’s best to start with the basics. So, fire up a terminal and let’s get started.

Step 1: Install the TexLive Package

The first thing we need to do is install the texlive package.

su -c 'yum install -y texlive'

Depending on your distribution, you may also need to install the texlive-latex-extras package.

Step 2: Prepare a .tex Document

Next, we’ll create a “hello world” type .tex file. Fire up your favorite text editor and copy/paste the following (I enjoy using vim since I can stay in the command line while building the LaTeX file). When you’re finished, save the file (I’ve saved it as “hello.tex”).

Notice the text “Output written on hello.pdf (2 pages, 22507 bytes).”. That means it worked.

Step 4: View the New PDF File

Now, all you need to do is view the generated PDF document. Run the following command:

evince hello.pdf

Note, if you’re like me, you constantly flip between the source and the pdf. If that’s the case, evince will automatically update the pdf every time you re-build using pdflatex. Simply add “&” on the end of the command above:

evince hello.pdf &

This is what you should be seeing when completed:

Alternative: Rubber

I’d like to make a special note about the ‘rubber’ utility. It can take a lot of the guess work out of building LaTeX files and I strongly recommend using it over pdftex or pdflatex as mentioned above. You can install and run the ‘rubber’ utility with the following commands:

su -c 'yum install -y rubber'
rubber --pdf hello.tex

Conclusions

I hope this helps you get started moving quickly in the right direction. Comments and feedback are welcome.

Apparently, there’s a difference between pdflatex and pdftex. Understand this when moving forward. I would recommend using the command rubber --pdf hello.tex instead since it takes care of the decision for you (as well as offers many other benefits — man rubber for more info).

The goal of this guide is to install the lxml Python package and run the example cssutils Python script that uses the lxml package. This guide was written while running Ubuntu, but can be applied to any Linux distribution. Open up the terminal and let’s get started.

Step 1: Install easy_install For Python

The easy_install binary is a Python package manager that makes it easy to install cssutils. The following steps will get this installed:

The goal of this guide is to show you how to install and run the example Python script for cssutils from start to finsih. This was created while running Ubuntu, but can be applied and modified to any distribution. Open up a terminal and let’s get to it!

Step 1: Install easy_install For Python

The easy_install binary is a Python package manager that makes it easy to install cssutils. The following steps will get this installed:

Selenium is a suite of tools to automate web browsers across many platforms in which you can write your tests in your preferred language. This guide intends on showing you how to install and run a Selenium test on a Linux box. Specifically, this guide was written using a default Fedora 15 installation and using Python as the preferred language. It can easily be applied to other distributions or other preferred languages. Now, open a terminal window and let’s get to it!

Step 1: Install the Selenium Server Package and Python Setup Tools

First, we need to install the selenium-server and python-setuptools packages. The first is obvious: we need the server. The second is for easy_install so we can install the Selenium Python package. Open the terminal and paste the following command.

su -c 'yum install -y selenium-server python-setuptools'

Step 2: Install the Selenium Server Package

Now, we need to install the Python selenium package.

su -c 'easy_install selenium'

Step 3: Startup Selenium Server

Next is starting the selenium server. This is done simply by running the following command as a normal user. I suggest opening in a new terminal window or add “&” to the end to push it to the background so you can continue working in the current terminal.

A note about using the Firefox plugin while running Linux (at the time of this writing). You must enable the experimental features before you can export the created test to Python (or any) code. To do this, open the preferences of the plugin and then make the following changes:

This is a step by step tutorial on how to get VirtualBox 4.0 up and running on Fedora 15 (Lovelock). Specifically, this guide was written using the VirtualBox 4.0 (32-bit) version (Package: kernel-devel.i686 0:2.6.38.8-32.fc15). It can be adapted to upcoming versions and different CPUs (64-bit). The folks at VirtualBox have made it easy to install for Fedora users and I’m going to show you how in a few easy steps. Open a terminal window and let’s get to it…[Read more →]

This is a guide to get Fedora 15 running on a MacBook Aluminium. Specifically, it was written for the MacBook 5,1 generation, but I believe this should work on more recent generations as well. As with Fedora 14, there were many things that worked out of the box. The differences between Fedora 14 and Fedora 15 are: 1) bluetooth required a set of commands to be ran before it worked and 2) the keyboard backlight works out of the box. I have created this guide to help others get Fedora 15 installed on their MacBook Aluminum quickly. I hope to gain a lot of feedback so it can benefit other users who wish to use Fedora on a MacBook. I would also like to add that I used the live CD to install, not the DVD.

Notable frustrations:

The power management still seems to be lacking when compared to Mac OSX.

Bluetooth required “secret commands” in order to work properly.

The touchpad is so frustrating to use, I would just assume disable it entirely.

This is a guide to getting Fedora 14 Laughlin running on a MacBook Aluminium. Specifically, it was written for the MacBook 5,1 generation, but I believe this should work on more recent generations as well. As with Fedora 13, there were many things that worked out of the box. I have created this guide to help others get Fedora 14 installed on their MacBook Aluminum.[Read more →]

This is a step by step tutorial on how to get VirtualBox 3.2 up and running on Fedora 14. Specifically, this guide was written using the VirtualBox 3.2.10 (32-bit) version. It can be adapted to upcoming versions and different CPUs (64-bit). The folks at VirtualBox have made it easy to install for Fedora users and I’m going to show you how in a few easy steps. Right, open a terminal window and let’s get to it…[Read more →]