Jared Heinrichs

  • Technology Blog
  • Winnipeg Computer Repair
  • Winnipeg Photographer
  • Cooking With Jared
You are here: Home / 2011 / Archives for February 2011

Archives for February 2011

Feb 12, 2011 By Jared Heinrichs 2 Comments

How to build a network tutorial (Intro)

Over the next week or so I am planning on releasing a tutorial that will be very large in scope. I still haven’t figured out if I want to do this using open source products or Microsoft products or a combination of the two. Here’s a look at the network I hope to build out during the post .

Click on Link for a larger version of the network Map.

Image of Network we will be building

While this might not be the Most complex network out there, this network I will give the user reading the post a good fundamental view on how to start planning a network as well as building it out. Whether it is a house, a renovation, or a building a network. You should always at least have some sort of plan laid out in front of you. If you do make a mistake I guarantee that you will be able to be able to trouble shoot things faster then if you didn’t make a plan.

The network that is laid out above you will give you two separate real world networks. That is, You will have two single networks that will both be connected to an Internet IP address. The reason why I chose to layout my network this way was I wanted to do “REAL WORLD” testing. Using this layout I can actually test a VPN connection inside my own house instead of having to go “Outside” the home network to do the testing.

You might be wondering how I am going to do this. My ISP give out two Dynamic IP address. The first router will actually just be a glorified switch. It will allow Routers 1 and 2 to get their own IP address off the same Internet connection. I am going to be using two fairly fast computers. I am going to make one of the two computers a Virtual server. The other one I will be writing the tutorial from. The Virtual server will have two network cards installed on it. One NIC will be plugged into Router #1 and the other NIC will be plugged into Router #2. Half the Virtual Machines will use a Virtual NIC that using the real NIC #1 and the other half with use a Virtual NIC that uses NIC#2.

We are going to have mail, Web and Files servers each network. I will also have clients in each network.

If this sounds interesting please tune back in a few weeks while I engineer out this network. We will stop and look at security and different ways of doing this along the way. If you bookmark this page I will link to each section as I make them. Smile

Filed Under: Networking

Feb 10, 2011 By Jared Heinrichs Leave a Comment

How to re-brand Zarafa by changing images

I just setup my own Zarafa webmail server. For those that aren’t in the know Zarafa is Linux’s equivalent to Outlook Web Access (OWA). I like all the hard work that Zarafa has put into the software. Their name however is scattered all over the place. Companies also like to rebrand items with their own logo etc.

Let’s say you want to re-brand Zarafa with your own images. Can this be done? Sure! It’s opensource!

In this “How to” article on Zarafa I am using Zentyal as the distribution. These files may be located in another directory if you are using a different distro. For you that are using a different distro and have it working then you should check your apache virtual server config files.

On my server the files needed are located in this directory:

how to re-brand Zarafa 01

There are 3 main files that need editing:

  1. login.jpg (Full Webmail Client)
  2. zarafa_top_logo.gif (Full Webmail Client)
  3. favicon.ico (Icon displayed in the URL Bar)

Here’s some example of how I changed mine.

imagehow to re-brand Zarafa 02how to re-brand Zarafa 03

How you go about changing those files is up to you. The easiest way to do that is to create a Samba share directly pointing @ the directory noted above. Make sure to remove the permissions once you have finished editing the files.

You could also copy it to another share on the server. Using the copy command “sudo cp” you could copy the files from the share you copied the files to, to the folder that was mentioned above.

Here’s a few screenshots of the new files in action:

how to re-brand Zarafa 04

how to re-brand Zarafa 05

Hope this helped you figure out how to re-brand Zarafa to your liking.

Filed Under: Zarafa Tagged With: How To

Feb 8, 2011 By Jared Heinrichs Leave a Comment

How to install .sh files

Well this will be a quick post. .sh files are install files that you can install using the command “SH”. “sh” is simply a Shell Script that can work some magic.

For example I downloaded the latest “Netbeans IDE” from their website. It is named: netbeans-6.9.1-ml-linux.sh

To install it I open the terminal and type:

sudo sh netbeans-6.9.1-ml-linux.sh

This will allow me to run the shell command. Once done it will try and load the install Wizard.

Filed Under: Ubuntu Linux

Feb 5, 2011 By Jared Heinrichs 13 Comments

The Ultimate Ubuntu WordPress Development Machine

This post will go over creating a WordPress development machine. I am hoping that someone who is just learning can get their feet wet in such a way that will be easy to follow along. That being said, my other goal is to have a setup that even the most advanced WordPress developer would be proud to use.

Please don’t be scared off by how long this post is! I’ve made over 70 screen shots which takes up a bunch of room. Honestly the whole procedure (minus install and updates) really doesn’t take much time to do at all! I have made a PDF version of this document. If you are wanting it please leave a comment on this blog with your email letting me know you want a copy. Your email is never posted and I will email you a copy of the PDF in all it’s glory. It looks amazing on the iPad Smile

One question you might have before we start is why do I need a machine specific to developing for Web development? I find it’s beneficial because:

  • I have a fully functional machine with everything I need on it
  • Doesn’t have all the distractions that normal machine would have.
  • Help streamlines the development especially like WordPress MultiSite
  • Having things setup properly like backup, config tools and shortcuts right from the beginning really does help!

Here’s a very simplified high level list of things I’ll cover:

  • What You will need
  • My setup
  • Brief How To Install Ubuntu
  • Install LAMP Stack with config Tools
  • Create Links for all the main web tools
  • Setup Apache (Permissions,Folders and security)
  • Download & Install WordPress
  • Configure MultiSites in WordPress. We do this so that you can host multiple WordPress websites locally.
  • Setup Web Development programs
  • Learn how to use almost every browser to test a website from one machine
  • Setup Backup

What you will need for this “How To”

You will need several things for following along:

  • Dedicated computer/virtual machine to install Linux on
  • Ubuntu Linux install disk
  • A Network Server/ USB Drive for backup

My Setup

To make sure that I didn’t miss any steps in this “How to” I redid my setup on both a HP Pavillion dv6700 and a Dell 9400. For the screenshots I am using Ubuntu running in a virtual machine. The virtual machine software I used is called Virtual Box. All testing was done using Ubuntu 10.10 32bit Desktop Edition. While I don’t think the steps will change much with newer versions. If it does I will reflect the changes/updates here as needed. I am using Ubuntu 10.10.

What you will need

  • You will need a machine capable of running Linux or some sort of Virtual Machine software that can run Linux
  • You need to get the Ubuntu Desktop version downloaded/burnt to CD on a separte machine.
  • You can download the disk image from here:  http://www.ubuntu.com/desktop/get-ubuntu/download
  • You will need to write down all usernames and passwords as we progress through the install. If you forget them you will have to figure out how to reset them by yourself.

Terms/Items you will need to know

  • %user% will always mean the user you created for Ubuntu. The user you log in as. In my examples it is “jared”
  • In this example my password is just “password” for every password entered. I recommend that you don’t do the same thing
  • I will use terminal or command prompt for describing being at the terminal. The terminal can be opened by going to “applications-Terminal”. Terminal has a black computer monitor icon
  • I don’t recommend that you use the defaults especially if this is a production machine.

Brief overview on how to install Ubuntu Linux.

I expect that you have Ubuntu on a DVD and that you are ready to proceed.

One thing I need to warn you is that Linux is always playing catch up in regards to hardware drivers. If you have the latest and greatest hardware you might not be able to find a driver that works with your rig. That being said, it’s nice to see that recently some companies are taking the initiative to develop drivers for Linux at the same time they release the driver for Windows. The Linux install process has come along way in the last 20 years. The hardest part about the Ubuntu install is going to be whether your machine will have hardware support.

You will need to make sure that computer can boot the machine from the Cd/DVD drive. Most machines from Dell, HP, ACER etc have notes during the boot screen to tell you what you need to press. If you aren’t sure do a search for your particular machine and  model # for the Boot Keys.

Here’s a visual walk through of a install (Follow left to right. Top to bottom):

The Ultimate WordPress Development Machine 01   The Ultimate WordPress Development Machine 02

The Ultimate WordPress Development Machine 03    The Ultimate WordPress Development Machine 04

The Ultimate WordPress Development Machine 05 The Ultimate WordPress Development Machine 06

The Ultimate WordPress Development Machine 07 The Ultimate WordPress Development Machine 08

Your install should be done!

It is time to start building this development machine. In order to do this we will need to get the webserver up and running. There are MANY ways of installing a webserver, MySQL and PHP but I will show you one of the ways I do it that has proven to be VERY reliable for me.
Make sure that everything is all up to date. Type:

sudo apt-get upgrade

sudo apt-get update

The Ultimate WordPress Development Machine 09

Apply any updates you are presented with. Open “Update Manager”. Install everything in the list.

The Ultimate WordPress Development Machine 10        The Ultimate WordPress Development Machine 11

I normally restart the machine at this point because there is normally a Linux kernel upgrade. Make sure to reboot now.

Install the LAMP stack

You’ve already got the “L” part of LAMP done. Now let’s install Apache, MySQL, and PHP (AMP). To do this we will open a command prompt and type:

sudo apt-get install tasksel

The Ultimate WordPress Development Machine 12

Hit “Y” for everything that comes up. Next type:

sudo tasksel

tasksel-install02

*NOTE*- I have heard some people get “tasksel: aptitude failed (100)” error. This means that there are updates waiting to be applied and you missed the last step. You should install those updates first. Type: sudo apt-get update to force your machine to check updates and then select “Install”.

Follow the instructions on the screen.

The Ultimate WordPress Development Machine 13

The Ultimate WordPress Development Machine 14

The Ultimate WordPress Development Machine 15

Now go check –http://localhost–. You should see that Apache is install correctly.

The Ultimate WordPress Development Machine 16

Install PhpMyAdmin

This program allows you to setup and work with both MySQL databases and users. To install it at the command line type:

sudo apt-get install phpmyadmin

NOTE – Hit “Y” and enter to install.

The Ultimate WordPress Development Machine 17

Follow the screen shots for the install info.

*Note* – In order to select an item you need to press the space bar. This will insert a “*” to the left of the item you were selecting. Enter moves you on to the next screen.

The Ultimate WordPress Development Machine 18

The Ultimate WordPress Development Machine 19

The Ultimate WordPress Development Machine 20

The Ultimate WordPress Development Machine 21

The Ultimate WordPress Development Machine 22

Now go check and log into:

  • http://localhost/phpmyadmin

The Ultimate WordPress Development Machine 23

*NOTE* – If you get a 404 error on phpmyadmin then you made a mistake most likely things aren’t up to date. No worries. Run this if you are getting the 404 Error and follow the prompts: sudo dpkg-reconfigure -plow phpmyadmin

Install Webmin

While this isn’t completely needed I am sure you will use it eventually. It’s a very powerful application that can configure your Linux box. This tool is a must on headless boxes. Here’s how to install Webmin:

Download webmin from here: http://sourceforge.net/projects/webadmin/files/webmin/1.530/webmin_1.530_all.deb/download

You will want to download the .deb version and open it with “Ubuntu Software Center

The Ultimate WordPress Development Machine 24

Click install and and verify that it is installing through the “In Progress” section (left side).

You should create and check the links to the websites we just created in FireFox

  • http://localhost
  • https://localhost:10000   <– Webmin
  • http://localhost/phpmyadmin

*NOTE* – The first time you log into Webmin there will be a security warning. The reason for this warning is that Webmin by default uses HTTPS. HTTPS needs a certificate. What this warning is basically saying is that you are using a private (FREE Cert) or that the Cert doesn’t match the url you typed into the machine. It’s no big deal. You wouldn’t want to use a private cert if you were planning on using this as a full time hosting machine.

The Ultimate WordPress Development Machine 25      The Ultimate WordPress Development Machine 26

Setup MySQL

  • Log into PhpMyAdmin
  • Click on Privilages
  • Click on “add new User”
  • Fill out info. NOTE – Do not use WordPress as a username if you plan on putting your machine on the internet or in a production environment!
  • Click on “Go” at the bottom of the Webpage once you fill out the info
  • You will see that the user has been created. Phpmyadmin will even show you the script it ran.

The Ultimate WordPress Development Machine 27

The Ultimate WordPress Development Machine 28

The Ultimate WordPress Development Machine 29

The Ultimate WordPress Development Machine 29

 

Configure Apache

This is going to be some of the hardest parts of the whole “How to” if you were trying to figure things out yourself. Trust me! This section is one of the main reason’s why I made this “how to” article.

  • Create a www in Home directory. Apply “World Icon” to show it’s a folder used for web server.
  • The globe icon I find helps you find the directory faster later.

The Ultimate WordPress Development Machine 30    The Ultimate WordPress Development Machine 31   The Ultimate WordPress Development Machine 32

Tell Apache to use this new folder as the default Web server. Go to:

  • Webmin – https://localhost:10000
  • Login
  • Servers
  • Apache Webserver
  • Existing virtual Hosts tab
  • Virtual Server
  • Click Document Options Icon
  • Document root will be ” /home/%user%/www”
  • click “save”

The Ultimate WordPress Development Machine 33

Scroll all the way to the bottom

The Ultimate WordPress Development Machine 34

We need to save these setting and then restart Apache

In Webmin click:

  • Apply changes (top right)
  • Stop Apache
  • Start Apache

We will now tell Apache to run as your account. This will give Apache the ability to save and edit files to the new “www” folder that is located in your home directory. To configure this go to:

  • Webmin
  • Servers
  • Apache Webserver
  • Global Configuration tab
  • Users and Groups”
  • Run as unix user- ” %username%
  • Run as Unix Group- admin

The Ultimate WordPress Development Machine 35

The Ultimate WordPress Development Machine 35

Because WordPress uses index.php to start the install we need to allow index.php to automatically load when you visit the root of a folder. To allow Apache to do this we must make one configuration change. You must:

  • Open a Terminal
  • sudo gedit /etc/apache2/conf.d/php.conf
  • enter “DirectoryIndex index.html index.htm index.php index.php3”
  • Save the php.conf file

The Ultimate WordPress Development Machine 36

Configure “Pretty Links”

At this point you might be wanting to start in on the WordPress install. Don’t! We need to enable an apache module that will allow apache to do some real magic when it comes to creating dynamic URLS! While WordPress by itself doesn’t need to have “pretty links” enabled, it will if you plan on using the enabling “MultiSite” for WordPress. “Pretty Links” module’s real name is called “rewrite_mod”. Let’s enable it and set things up so that WordPress can take advantage of it’s magic.

  • Open command line
  • sudo a2enmod rewrite
  • sudo gedit /etc/apache2/sites-available/default– This should open up a file in a text editor
  • In default there should be 2 separate sections that look almost the same. In my example it was the second section that we need to change: “Directory /home/%user%/www/>”. Change None to All
  • Restart apache by running this command: “sudo /etc/init.d/apache2 restart“

The Ultimate WordPress Development Machine 37

You should see this

The Ultimate WordPress Development Machine 38

The Ultimate WordPress Development Machine 39

The Ultimate WordPress Development Machine 40

The Ultimate WordPress Development Machine 41

Download WordPress

  • http://wordpress.org/download/

Install WordPress

Wow. We’re finally at the part where we can start installing WordPress. To do this you will need to:

  • Copy Files from the WordPress download into the “www” folder we created a few steps ago
  • Run WordPress install by going to: http://localhost/

View the screenshots on how to install WordPress

The Ultimate WordPress Development Machine 42

The Ultimate WordPress Development Machine 43

The Ultimate WordPress Development Machine 44

The Ultimate WordPress Development Machine 45

The Ultimate WordPress Development Machine 46

 

Log in with your new credentials Smile

Configure MultiSites

MultiSites is a feature of WordPress that allows you to have multiple sites in one WordPress install! This is great for developers who need a play ground in which to develop multiple client websites and not have to worry about having multiple databases kicking around. Another nice feature of Multisites is that it makes backup much easier as well.

To configure MultiSites you need to make one change to your “wp-config.php” file. The “wp-config.php” file is located in the root of where you installed WordPress. You will need to use some sort of text editor to edit this file. You will want to add this line to the file:

define(‘WP_ALLOW_MULTISITE’, true);

“I like to put it above the line that reads “That’s all, stop editing!…”

The Ultimate WordPress Development Machine 47

Save the file, log out of WordPress and then log back in. Click on Tools – Network. Select Sub-directories and then fill out info. Click install button.

The Ultimate WordPress Development Machine 48

The Ultimate WordPress Development Machine 49

It’s say’s create a folder called “blogs.dir” in wp-content.

The Ultimate WordPress Development Machine 50

In the “wp-config.php” file you edited earlier

The Ultimate WordPress Development Machine 51

Open up terminal and type – sudo gedit .htaccess

The Ultimate WordPress Development Machine 52

Paste info into .htaccess file and hit save.

image

Log out and then back into WordPress.

MultiSites is now setup.

Setup Tools to help with Web Development

This next section is the tools and add-ons that I can’t live without when I do web programming. I hope that you will try these out and see just how helpful they can be.

Netbeans IDE

This is by far one of the best editors I’ve ever had the pleasure to work with. The GUI might not be the BEST looking (Visual studio is my favorite looking IDE) but I find it is the best IDE for open source programming. Go to “Ubuntu Software Centre”. Search for “Netbeans”. Tell it to install.

The Ultimate WordPress Development Machine 53

GIMP

This program has really matured. While I still find it not as good as Photoshop the program can do most things almost as well. One thing that it’s missing by default is a slicing program. I’ve found a way to emulate slicing like in photoshop by installing Slicer. Similar to Netbeans search for “Gimp”. Click install. I’ve included a link to “slicer”.

  • http://docs.gimp.org/en/python-fu-slice.html – Slicer

Inkscape

Inkscape is to Adobe Illustrator ad Gimp is to Photoshop. Inkscape is a vector drawing tool that is very good. You can search and install it much like “The Gimp”.

PlaysOnLinux

Use Ubuntu Software Center to install “PlayOnLinux”. This will also install “Microsoft Core Fonts” during install. You need to install them.

The Ultimate WordPress Development Machine 54

This program will install the most common MS fonts on Linux as well as helping you install:

  • IE6
  • IE7
  • Chrome
  • Safari

To run “PlayOnLinux” you need to click on “Applications-Games-PlayOnLinux”

The Ultimate WordPress Development Machine 55

Let’s setup PlayOnLinux.

The Ultimate WordPress Development Machine 56      The Ultimate WordPress Development Machine 57

If it finds any updates you will have to manually download it.

The Ultimate WordPress Development Machine 58

You can download PlayOnLinux here: http://www.playonlinux.com/en/download.html

You need to use the “Debian” file format with Ubuntu. Tell it to open with “Ubuntu Software Centre” when it is downloaded.

The Ultimate WordPress Development Machine 59

Tell it to upgrade.

The Ultimate WordPress Development Machine 60

Open “PlayOnLinux” again. It will most likely ask you to install some more MS Fonts. Let it do it’s job. You will have to agree with it’s EULA.

The Ultimate WordPress Development Machine 61

Click install to start installing Internet Explorer:

The Ultimate WordPress Development Machine 63

I won’t go through all the installs with you as they are all pretty similar. Click on the program you want installed and the program will automatically download and install on your machine. I found IE 6 works awesome. IE 7 however isn’t all that great but does the job re: checking websites.

The Ultimate WordPress Development Machine 64   The Ultimate WordPress Development Machine 64  The Ultimate WordPress Development Machine 65

Once you are all done you can use all these programs.

The Ultimate WordPress Development Machine 66

Setup Backup.

My favorite backup tool is called “Deja Dup”. It’s a front-end program for duplicity. It works very much like Time Machine for Mac OSX. What’s great about this program is that it is able to backup to almost any media known to man. SSH, FTP, Windows Share or even Amazon S3!

When it backups it will only copy files that have changes since the last backup! This means that backup sizes are smaller and much, much faster! You can also schedule backups as well with it. Ok, enough talk let get it setup!

Very much like every other program in this “How to” we’ve installed apps through Ubuntu Software Centre. This program is no exception. Search for “Deja Dup” and install it. Once installed it will add itself to the system tools menu under Applications.

While you might be tempted to jump into the backup program it would be best to think out your backup needs and know where you want to backup to. I recommend that you backup to an external hard drive or NAS. I have a DLink 323 that has Samba (Windows Share) running on it. My walk through will show how I connect to my share and then make a link to the folder I want to backup to.

First go to places – Connect to server.

The Ultimate WordPress Development Machine 67

Enter the server information. Here’s what my server info is:

The Ultimate WordPress Development Machine 68

Doing this will mount the network folder to your places. Find the folder you want to backup to and then drag it to the “places” sidebar. It will become more apparent in future steps why we will need this.

The Ultimate WordPress Development Machine 69

Now we need to open the backup program “Deja Dup”. Remember the first backup will take the longest.

The Ultimate WordPress Development Machine 70

It can’t get much easier than this. Do you want to backup or do you want to restore!

The Ultimate WordPress Development Machine 71

You want to select the shortcut to the backup folder you added to your “places side bar”. Select “Encrypt” if you don’t want someone looking at the backups.

The Ultimate WordPress Development Machine 72

You will need to specify the items that need to be backed up. Remember we moved the HTML files into www in our profile? That will all be nicely backed up now Smile

The Ultimate WordPress Development Machine 73

When the backup is done you will be asked if you want to schedule the backup. I recommend that you backup at least once a day.

The Ultimate WordPress Development Machine 73

Here’s another link you might want to read. There is a member of the WordPress Community here in Winnipeg that also blogged about Netbeans and WordPress – http://dan.bernardic.ca/wordpress-netbeans/

Filed Under: Ubuntu Linux

Feb 2, 2011 By Jared Heinrichs Leave a Comment

FREE ebook for Ubuntu Linux

While most of the stuff in this ebook is common sense to most IT staff that has ever dabbled in Ubuntu Linux there are a “few” things that that you might not know about. I am posting this because normally you need to sign up to get this eBook and the spam isn’t worth it by itself. As a true FREE ebook it might be worth the download 😉

Free Ebook

Filed Under: Ubuntu Linux

  • 1
  • 2
  • Next Page »

Categories

  • Board Game Rules
  • Camera
  • Computer Hardware
    • Blackberry
    • drivers
    • iPad
    • Magic Jack
    • USB
  • Damn Small Linux
  • Exam Notes
  • Facebook
  • FREE Flashcards
  • Games
    • PC
      • League of Legends
    • Wii
    • xbox 360
  • Music
  • Networking
    • Cisco Certification
    • Mitel
    • Palo Alto Firewall
  • News
    • Google
    • Microsoft
  • Operating System
    • Active Directory (2003)
    • Android
    • Command Prompt
    • Damn Small Linux
    • Group Policy
    • Hyper-V
    • IIS
    • ISA 2006
    • Mac OS X
    • Microsoft Exchange Server
    • Powershell
    • Security
    • SME Server
    • Terminal Server 2003
    • Ubuntu Linux
      • Adito Web SSL VPN
      • OpenVpn-als
      • Webmin
    • Virtual Machine Manager
    • Windows 2003 SBS
    • Windows 2003 Server
    • Windows 2008
    • Windows 2008 R2
    • Windows 2012R2
    • Windows 7
    • Windows 8
    • Windows Command Line
    • Windows Deployment Services
    • Windows Server Backup
    • Windows Vista
    • Windows XP
  • Phones
  • Photography
  • Photos
    • Animals
    • Misc
    • Nature
    • Portraits
  • Portfolio
  • Programming
    • CSS
    • HTML
    • jQuery
    • MySQL
    • PHP
    • Script
  • Programs
    • Acrobat
    • Acrobat Reader
    • Adobe Dreamweaver
    • Adobe Illustrator
    • Adobe Photoshop
    • Anti-virus Software
    • Antivirus
    • Backup Exec
    • Bittorent
    • Blackberry BESADMIN
    • Internet Explorer 9
    • Lightroom
    • Microsoft Office
    • Netbeans
    • Onenote
    • Outlook
    • Shelby
    • Sysprep
    • Trend
    • Video Editing
    • Visual Studio
    • Windows Live Writer
    • WireShark
    • XP Mode
    • Zarafa
  • Recipe
  • Review
  • Software Links
  • Troubleshooting
  • Uncategorized
  • Videos
  • Web Applications
    • Brage
    • Google
    • Spiceworks
    • Wordpress
  • Web Browsers
    • Internet Explorer
  • Web Server
    • XAMPP
  • Winnipeg
    • ISP

Try searching this site!

Copyright © 2021 Winnipeg Web Design