Easy Website on Your University of Oregon Web Space

NOTE: shell.uoregon.edu is now sftp.uoregon.edu
Ever wanted to have your own webpage at http://uoregon.edu/~YourDuckID? Ever wanted to setup a clean-looking, easy-to-maintain website for a student group your are associated with? Well now the whole process is a snap! Every University of Oregon student is given space to set up their own website.
It’s a fairly complex process to set up all the necessary tools (PHP and MySQL) manually, so I wrote a program to do it for you (mostly) automatically! All you need to do is login to your uoregon.edu account and follow a couple simple instructions.
| Contents [Hide] |
Why WordPress?
WordPress is tool that lets you create, design and maintain a website without knowing anything about computers or the internet. Anyone can do it! It is meant to be a tool for bloggers, but it functions perfectly for those who just want a normal website.
WordPress can be as simple or as powerful as you need it to be. In my opinion, it is the perfect tool for student groups because of how often management changes. With WordPress, anyone can pick it up and make any changes without any knowledge on how to create websites. The real power of WordPress is that you can create/edit pages from a web interface using an WYSIWYG (visual) editor. You can see a demo of this web interface here (username: admin // password: demo).
Other features:
- Customizable themes so you can easily style your website and give it it’s own distinct look.
- Amazing plugins to let you add any kind of functionality to your website (e.g. adding a contact form to your site).
- Multi-user enivronment so you can add other bloggers/editors to help you edit the website. This is especially useful for student groups with a lot of contributors.
If you do have some problems, post a comment at the end of this post and I’ll do my best to help you out.
Getting Started
Before you can complete these instructions you will need a program that let’s you access the files on your sftp.uoregon.edu account. Accessing this account is called “SSHing” into it. This is fairly simple for Mac OS X users, but is a bit more complicated if you are using Windows.
Windows Users
Note: If you own a Mac, skip to the next section called “Mac Users”.
First, you need to download and install a program called PuTTY (or just download v0.60 directly).
Once it is installed, run it and follow these steps.

Enter sftp.uoregon.edu under the host field. It should look the image to the right.
Press OK. You should get a message saying there is a “Security Alert”. Just press Yes.
Now you’re almost ready to go. Just enter your Duck ID (the same one you use to login to your email and blackboard) and your password. If you’re doing this for a student account, the process is exactly the same, but with the username/password that you would use to login your groups email address. It should look like this:

You’re ready to move on! Go on down to the “Running the Script” section below.
Mac Users
Mac OS X users have it much easier because the program you need is already installed.
You just need to run the Terminal application. The quickest way to get it it is by using the searching for it using the search box (Spotlight) in the top right corner of the screen.
Once that program is up and running you just need to use your Duck ID (the same one you use to login to your email and blackboard) and your password. If you’re doing this for a student account, the process is exactly the same, but with the username/password that you would use to login your groups email address. Here’s what it looks like when I use my Duck ID (jblancha) and password:

Running the Script
Now that you have SSH’ed into you account, you’re ready to run the script!
Type each of the following commands in and press enter after each line. The first command will take a couple moments to run, so don’t type the next one until it is done.
wget http://auzigog.com/perm/wordpress_shell.sh chmod 0755 wordpress_shell.sh ./wordpress_shell.sh
The last command will run the script I wrote to do all the work for you.
The first thing you need to do is type n and press enter to indicate that you are not an advanced user. Now you should see a bunch of lines being output to the screen.
*** Do you want to install MySQL using the 'mysql_install_db' command? You should do this ONE TIME ONLY
Are you an advanced user who needs the MySQL passwords later? [y/n]: n
// Creating .htaccess in your public_html directory (/home6/spanst/public_html) so all files ending in .php will execute
// Creating php.cgi in your home directory (/home6/spanst) so all files ending in .php will execute
// Generating a port number (between 5000 and 6000) to run MySQL from
// For reference, the port number that MySQL is running on is: 5430
// Making a MySQL configuration file for your account
// Installing the MySQL database. This may take a few moments...
// Setting a root password for wordpress
// Creating a username and password for wordpress
// Configuring a cron job to ensure the MySQL Daemon doesn't go down
// Downloading and placing wordpress files. This may take a moment....
// Creating public_html/wp-content/uploads for uploaded images/files
// Configuring wordpress
// Here is some stuff you can ignore if you don't know what it is:
PORT: 5430
MySQL 'root' account password: ########
MySQL 'wordpressuser' account password: ########
MySQL database for wordpress: wordpressdb
MySQL host for connections: sftp.uoregon.edu:5430
SUCCESSS! Visit http://uoregon.edu/~spanst to finish the installation of your blog!
Note: Please remove index.html from your ~/public_html folder so that WordPress can actually workNote: Please write down the four lines that start with MySQL in case you or someone else ever needs those passwords to fix things down the road.
As the script indicates, you’re done! You can now visit http://uoregon.edu/~YourDuckID/ to give your blog a name. When it asks you for an email address, be sure to use a real one because it that is where your username and password will be sent.
To login to the control panel (where you edit pages and blog posts), go to http://uoregon.edu/~YourDuckID/wp-admin/.
There’s some more information below that you might find helpful, but you’re basically done! If you’ve successfully used this script, please leave a comment below so I know that people are finding it useful. Spread the word to other individuals and groups so everyone can create a useful website!
Extending WordPress
You’re done with the important part. If you want to customize WordPress, here are some suggestions.
- Install a theme to give your site its own look. Check out my favorite themes. (Instructions)
- In the control panel, go to Settings → Permalinks → Select “Day and Name” → Save Changes
- Add a contact form to your site
- Add other authors/editors to your site by going to the control panel and Users → Add New
- Setup Akismet to block spam comments on your blog posts
If you need any other help in working with WordPress, check out their support site.
Good luck! Please leave a comment below if you have any comments or questions!
What the heck did the script do?
If you’re not a big nerd, just scroll down to the comments section. If you’re a more technical user and are curious what happened, here’s an overview. You can find very detailed instructions for all of this on my wiki.
- Use a .htaccess file to redirect all .php requests to a CGI script
- Use the CGI script to make sure all .php files are run under PHP5 (instead of being served as text files
- Install a copy of MySQL for your account on a specific port number.
- Create a MySQL database for WordPress
- Set up a cron job to make sure MySQL comes back up if the server ever restarts
- Download and unzip the latest version of WordPress
- Automatically edit your WordPress config file with all the information it has just generated
Credits
The only reason I was able to figure out this process in the first place was because of the following people
- Micro’s guide to MySQL on shell - Not the best instructions in the world, but absolutely necessary.
- Easy PHP on shell - Tristan at the EMU marketing department made most of this possible with his instructions for getting PHP files to run properly (instead of being served as text files). Tristan actually wrote a WordPress installation guide similar to this one last month.
- Justin McCraw - Helped me remember the simplest set of steps to get this done
- Bruce and Spencer at the UO for helping with specific issues I had along the way




















Excellent guide! The script is an amazing tool. I even learned a few new BASH tricks from looking at what you’ve done. I don’t know how you have time to write such detailed and nice looking blog posts. Thanks for the shout out!
Awesome tips, awesome script, thanks a lot.
Great post. I love the blog in general. And you’re photo portfolio is incredible. I’m gonna keep you in mind for the future if I ever pictures done. Hope that’s ok!
Hey, great blog post! I tried out your script and it worked perfectly. The one question I have is how I can uninstall what I’ve just done… I am trying to learn PHP & MySQL and want to have a fresh start.
Glad it worked for you, Kevin! I wasn’t sure if it worked after the system admins changed how shell works.
Unfortunately, I am not sure how to “undo” everything that happens. The script runs a command that effectively “installs mysql” for your account.
I would suggest you just don’t try to undo what the script did. Most servers are going to come with MySQL and PHP in the state that they are now in after running my script.
Nice detailed instructions and script Jeremy.
This basically the exact same thing Fantastico does on a regular web host correct?
Thanks, Ron! Yeah, it’s basically what Fantastico does. I’m sure their method is probably a bit cleaner, though.
Jeremy,
Do you know if this script still works with the change to sftp.uoregon.edu?
Should this still work the same?
It should!
Let me know if it doesn’t.
Nice guide. I’ve been able to get PHP and MySQL working, but rather shoddily. It seems that the problem is that the PHP sessions aren’t visible to both servers (as I’m sure you know, the University webpage is hosted across the two servers ‘webserv1′ and ‘webserv2′). Eg, if I sit and refresh the page for a while, some of the time it will look like I’m logged in, and sometimes it won’t.
Is there some way to deal with this?
@Joseph Loubert
To answer my own question, the easiest way around this is to create the directory /home#/username/sessions/, and change the shebang line in php.cgi to:
I am still curious about why I haven’t seen this behavior reported elsewhere. Do sessions just work for everybody else?
Jeremy, while following your instructions for Window’s I came across a problem. After entering the host, sftp.uoregon.edu, and opening up the black user screen, I entered my username, then the password but after pressing enter following the password nothing came up. It just went to the next line. Am i doing something wrong? thanks in advance.