Tuesday, December 6, 2011

November 5, 2011 - Installing MySQL and LibreOffice Base

After several weeks of not working with my virtual machine, it's time to install MySQL Workbench and begin working with databases. I opened my virtual machine, and went directly to the Update Manager. Because it had been a number of days since running the program, it took approximately 35 minutes to install all necessary updates.

When all updates were installed, I opened the Firefox browser and typed in:

www.mysql.com/products/workbench

I clicked the Download Now button

I then select the platform: Ubuntu Linux ver. 11.04 (x86, 32-bit), DEB

And the mirror site: University of Wisconsin/Madison, WI FTP

I selected Save File and waited while the file downloaded.

After the file download was complete, I exited the Downloads dialog box.

I navigated to Places, Downloads where I found the downloaded MySQL file. I double-clicked the mysql-workbench-gpl-5.2.35-1ubu1104-i386.deb folder and clicked the Install button in the window that opened.Once the software was installed, I closed the Ubuntu Software Center window.

I opened MySQl Workbench by navigating to Applications, Programming and clicked New Connection under SQL Development. I typed:

readings

in Connection Name box and left all other settings default: Hostname, Port, Username.

After which, I clicked Test Connection button and a prompt came up to enter my password:

******

A dialog box appeared indicating: Connection parameters are correct.

Next, I went to install LibreOffice Base by going to System, Administration, Synaptic Package Manager. I entered my password and typed libreoffice-base into the Quick Filter search box. I marked it for installation and it indicated the following would also be installed:

libhsqldb-java

Libreoffice-java-common

Libservlet2.5-java

I clicked Apply and the software installed.

Finally, I returned to the Synaptic Package Manager, and typed mysql-client into search box. My results indicated I had mysql-client-5.1 installed, but not mysql-client. I marked it for installation, and clicked Apply.

I am now ready to create databases!

October 6, 2011 - Networks

Upon starting my virtual box, I ran Update Manager and waited for uploads to install.

In order to find the IP address of my virtual machine, I opened the command line and typed the command:
ifconfig

This resulted in the following screen:





I noted both the IP address from the Ethernet connection and the Local Loopback.

I then moved back to my host computer and used the Windows command line to pull up the same information by typing cmd into search box in the Start menu and using the same command:
ipconfig

My home ip address is:
192.168.1.4.

In order to find my default gateway and name server, I searched the Internet to find sites providing the correct commands for both my Ubuntu and Windows machines. I found it could get the default gateway information on my Windows machine through the same ipconfig command. In order to find the name server, I returned to the command line, and typed in:
ipconfig /all

On my virtual machine
, I used two separate commands to pull up the information. For the default gateway:
route -n
And for the name server:
cat /etc/resolv.conf

I then completed the next two tasks on Assignment 6 by using the commands:
nslookup

ping localhost
ping localhost.net

In an attempt to set up a VPN connection to Clayton I returned to my host computer, where I:
Opened the Start Menu, selected Control Panel, then Network and Internet.
I clicked on Network and Sharin
g Center, Set up a new connection or network, then Connect to a network. This took me through a series of steps to create the connections. I selected to create a new connection, and Use my Internet Connection (VPN) under "How do you want to connect? In the next dialog box, I entered vpn.clayont.edu in the box for Internet address and CCSU under Destination name. I was then prompted to enter my username and password:
hoswald
******

Finally, I clicked Create.

When I tried to actually connect to this network; however, the following error occurred, saying my connection was denied.




The last task I attempted was to log into my home router. After finding the router paperwork, I tried to long-in using the system password provided, but I believe it was changed by the cable company upon installation. I was never able to get into my account.

September 27, 2011 - Installing Archon

I began the Archon installation process by creating all the usernames and passwords RPM indicated I would need.

  • MySQL Archon Username: hoswald Password: *******
  • Archon Username: hoswald Password: *******
  • Archon Super Administrator Password: *******
  • Archon Admin Username: Archonadmin Password: ****** Display name: Admin

To ensure my computer was up-to-date, I ran Update Manager on VM then exported the machine to my external drive using export appliance wizard. I saved it as ARST5100.ova.

After restarting the machine, I opened the Synaptic Package Manager under Administration in the System drop-down menu. After entering my password, I began to search for the five pieces of software I needed to install in order to correctly download and install Archon.

-apache2 //Apache web server (v 2.2.17)

-mysql-server //MySQL database (v 5.1.54)

-php5-mysql (v 5.3.5) /php extensions for MySQL

-php5 PHP 5.0 (5.3.5) //php web scripting language

-php-pear

I typed apache2 into the Quickfilter box, right-clicked on the file, marked it for installation, then clicked the Apply box on the main screen. A Summary dialog box listed all libraries that would be installed along with the desired software. I clicked ok and each of the five pieces of software downloaded in under 5 minutes.

I was prompted for a password for the MySQL server. Password: *******

After all five programs were successfully installed, I opened Terminal under Accessories in the Applications drop-down menu. I typed in the command:

sudo pear install MDB2-2.4.1

I was prompted for my root password and entered it to continue. At this point I received the following warning message:

WARNING: channel “pear.php.net” has updated its protocols, use “pear channel-update pear.php.net” to update

However the download ensued and typed in the next command:

sudo pear install pear/MDB2#mysql

I again received the warning message:

WARNING: channel “pear.php.net” has updated its protocols, use “pear channel-update pear.php.net” to update

But this download was also successfully completed.

In order to give users access to the Archon installation, I opened the Users and Groups function under Administration in the System drop-down menu. I selected Manage Groups, then Add. This prompted me to enter my password. After verifying my privileges, I created an archon group and selected myself (Heather) as a group member. I then re-opened the command line terminal in order to give Archon the rights to appropriate web directories. I typed in the following commands:

cd /var/ww

sudo mkdir archon

sudo chgrp –R archon archon

sudo chmod –R g+rw archon

These commands created the Archon directory, changed ownership of the directory to archon group, and added read and write permissions for the group.

I closed the Terminal window and shut down the virtual machine using the shut down button in the upper right hand corner. After restarting the machine, I tested the Apache server. First, I opened a Firefox browser and typed in the address http://localhost/. This brought up a web page with the message, “It works!” I then opened a Terminal window and typed in the command:

ifconfig

This displayed the information for each of my adapters and my IP address: 1. 92.168.1.5. I switched to my local Windows host and typed in this IP address. The same “It works!” message appeared.

Following the Apache test, I returned to my virtual machine and the Terminal window. In order to create an Archon database in MySQL, I typed in the following commands:

mysql –u root –p

mysql> ******

mysql> create user hoswald

mysql > GRANT ALL ON *.*

TO ‘hoswald‘@’localhost’

IDENTIFIED BY ‘******’

WITH GRANT OPTION ;

mysql> create database archon;

mysql> quit ;

I opened the Firefox browser and went to the URL:

http://mas.clayton.edu/bootcamp/test_conn.txt

I went to the File drop down menu and clicked on Save Page As. I changed the name of the file to text_conn.php. I chose File System from the Places list on the left-hand side of the screen, var, www, archon, then clicked Save. I returned to my Firefox browser and typed in: http://localhost/archon/test_conn.php. A screen came up named MySQL connection test. I entered:

Hostname: localhost

Username: hoswald

Password: ******

I clicked the Test Connection button and received a message that I had, “Successfully connected to the server ‘localhost’

While still in the Firefox browser, I typed in the address: http://www.archon.org/download.php and clicked on Download Archon 3.21 which directed me to sourceforge.net. A dialog box opened, asking if I wanted to Save or Open the Archon 3.21.zip. I chose the Save File option.

I opened the Home folder under the places drop down menu and clicked on Downloads. I double-clicked on Archon 3.21.zip which opened a new window containing the 3.21 folder. I returned to the Downloads box and navigated to File System, var, www, archon. I then opened the 3.21 folder and dragged the contents into the archon folder, transferring the data.

Within the folder, I found and right-clicked the config.inc.php file and selected Open. A dialog box gave me the option to either run the file or display its content. I clicked Display and the file opened in gedit. I scrolled through the document until I reached

$_ARCHON->db->Login =

where I entered hoswald.

I then went to

$_ARCHON->db->Password =

where I entered ******

finally I scrolled to

$_ARCHON->db->DatabaseName =

and put in ‘archon’

I clicked Save and closed the file.

I returned to the Firefox browser and entered

http://localhost/archon/

and clicked Next to each of the prompts.

When I reached the page which prompted me to create a super administrator I maintained the

userid:sa

and entered

Password: ******

When prompted to enter the administrator account, I used:

userid: archonadmin

password: ******

I entered the repository name: VMTest

Name of Administrator: Heather

Country: United States

Email: hoswald@student.clayton.edu

While leaving MARC Org Code, Address, Phone Number and Fax Number blank. Then clicked Next.

I clicked on all packages to Install and clicked Next. A screen came up indicating all packages had been successfully installed, I clicked Next. The screen offered me the option of installing both English and Spanish. I unclicked Spanish and clicked Next. Screen 12 of 12 appeared with the message, “ Installation Complete.” Before I clicked the Finish button, I opened up the Terminal window and typed in the following command:

-cd /var/www/archon/packages/core/install

-mv install.php install.php.bak

-exit

I returned to the Firefox browser and clicked Finish. This took me to a screen prompting me to enter my login and password. I entered:

Login: archonadmin

Password:

I had successfully installed Archon.

Tuesday, September 20, 2011

September 19, 2011 - PeDALS

With RPM’s instructions and tip video open for reference, I opened my ARST5100 virtual machine in VirtualBox. Under the Places dropdown menu, I opened the Home Folder and created a new folder named PeDALS. I then opened a Firefox browser and went to the address http://mas.clayton.edu/collections/PeDALS/PeDALS.zip. A dialog box opened giving me the option to either Open or Save the file. I chose the Save File option, which downloaded the compressed file to the Downloads folder. I used the cut command to remove the zip file from the Downloads folder and pasted it into the PeDALS folder located in my home (hoswald) folder.

I double-clicked on the zip file in the PeDALS folder in order to open it with Archive Manager. This gave me a set of options at the top of the page, including Extract. I chose to extract all files, and unchecked the Overwrite existing files box under Actions. I then clicked the Extract button. This process created a folder named PeDALS within the home/hoswald/PeDALS directory of files. In order to make the files as accessible as possible, without multiple layers of folders, I moved all of the files within the PeDALS folder into the upper PeDALS directory and deleted the extraneous folder. This made the full path hoswald/PeDALS.

I opened the command line by going to the Applications dropdown menu and opening Terminal. I input the following commands in order to create an inventory of file names in the PeDALs folder.

$ cd ~

$ find PeDALS -exec basename {} \; > inv_filenames_hlo.txt

Because I copied and pasted the second command from RPM’s instructions, I did need to edit the line to read as a hyphen as opposed to an en dash.

I then attempted to create a list of the directories into which the files are organized using the following commands.

$ cd ~

$ find PeDALS -exec > dirname {} \; > inv_dirlist_hlo.txt

However, at this time, I received a long list of documents followed by the notation: Permission denied. I went to the text file created out of this process, and it was blank. At this point, I reviewed both the assignment and the video from the September 7 ARST 5100 class. I noticed there was an extra > in the command that was not used in the command to create an inventory of filenames. I removed the extra > and the command worked.

In order to sort and find only unique file directories, I used the command:

find PeDALS -exec dirname {} \; |sort |uniq > inv_dirlist_hlo.txt

I also realized it would be useful to see the inventory of filenames in some sort of order, so I created a second, sorted text file using the command:

find PeDALS -exec basename {} \; |sort > inv_filenes_hlo1.txt

Now that I have only unique directories and a sorted inventory, I determined the number of lines of each of the files, using the command:

$ wc –l inv_filenames_hlo.txt

$ wc –l inv_dirlist_hlo1.txt

I found I have 598 lines in the inv_filename_hlo1.txt file and 203 lines in the inv_dirlist_hlo.txt file.

To characterize the types of files found in the collection, I underwent a number of steps, following RPM’s directions as seen below.

1. I switched to the parent directory of PeDALS.

$ cd /home/hoswald

2. I then created a list of the filenames without the directory

$ find PeDALS -exec basename {} \; > inv1.txt

3. Eliminated (imperfectly) lines that are likely not file names.

$ cat inv1.txt | grep '\.' > inv2.txt

4. Some files used a period elsewhere in the filename, so I used the stream editor command (sed).

$ cat inv2.txt | sed 's/^[^.]*\.//g' > inv3.txt

5. I stripped the file name, hopefully leaving just the extension.

$ cat inv3.txt | sed 's/^[^.]*\.//g' > inv4.txt

6. I sorted the list.

$ sort inv4.txt > inv5.txt

7. I removed duplicates

$ uniq inv5.txt > inv6.txt

8. I changed the name inv6.txt to inv_hlo.txt using the right-click, Rename option.

At this point, I opened the txt file to view my completed work. It showed two lines that appeared to be errors.

Both the highlighted 3.xls line and the 1_2009-11-14).doc line were left in after the removal of lines with at least two ‘.’s. In order to present the most accurate final product, I copied the document and renamed it inv_hlotest.txt.

I then repeated the command line:

$ cat inv_hlotest.txt | sed 's/^[^.]*\.//g' > inv_hlotest2.txt

This stripped the remainder of these two filenames, but I still needed to sort and then ensure only unique file extensions were listed. I used the following command lines:

$ sort inv_hlotest2.txt > inv_hlotest3.txt

$ uniq inv_hlotest3.txt > inv_hlofinal.txt

Finally, I did a quality control check by doing a word count on both inv_hlo.txt and inv_hlofinal.txt using the following command lines:

hoswald@ARST5100:~$ wc -l inv_hlo.txt

29 inv_hlo.txt

hoswald@ARST5100:~$ wc -l inv_hlofinal.txt

27 inv_hlofinal.txt