I worked 20 hours straight to prepare an old Gateway tower with 280 gig drive for an Ubuntu 9.10 install. The Gateway was hopelessly unbootable in Windows because of some operating system problem (not hardware problem). I realized that I should drop down to C: and type format, to just reformat the entire drive which took about 30 minutes. I forgot that I should have typed FDISK first, to set up the necessary partitions, but it was too late.
I downloaded an ISO image for GNOME partition and burned it to a bootable CD.
I booted the GNOME partition utility. It took me literally hours to guess at what I should do.
Finally I realized that Ubuntu expects THREE partitions. The first is referred to as ROOT but the actual name you give it in the partition process is simpl “/” (forward slash omitting the double quotes).
The second partition will have NO name, but you will designate its format TYPE as swapfile, and that will become the system swap file.
The third partition is called /home.
I had no idea how much space to allocate, so I gave 512 for root and 512 for swap, and the huge remainder for /home.
The software warned me that root and swap were too small. Just for the heck of it, I changed root and swap to 5000, and it worked.
Then it took me dozens of tries installing Ubuntu. I had a 2008 Ubuntu disc and a 9.10 disc I had created last week. Time after time, I would boot from each one, say INSTALL UBUNTU, and it would chug away for a long time, and then die with no messages. FINALLY, but why or how I dont know, the 9.10 unstall brought up an Ubuntu desktop with what looked like all kinds of error messages. There were TWO icons on the desktop which I had never seen before. One said EXAMPLES which I never looked at. I was about to give up in dispair when I decided to click on the icon marked Ubuntu. AS IT TURNS OUT, that is the icon which COMPLETES the install process, and it first brings you into its OWN partition software. I cant exactly remember what I did next. I do remember that GNOME partition utility offered me literally 20 DIFFERENT format types to choose from for each partition (one of which is swap-file). I had no clue what to choose. I did some google searching on my other machine (and you NEED a windows machine attached to the internet to look these things up). I discovered that format type ext3 is good for Debian Linux (and Ubuntu is a flavor of Debian) so I went with ext3.
Finally, I had a working bootable pure Ubuntu 9.10 machine.
My next Sisyphean agony task was to connect it to the Internet. The tower already had an Ethernet card. I was informed that IF I connected a cable from the ethernet to the router, then Ubuntu would automatically sense the ethernet connection and configure it. The ethernet board DID light up and pulse when I connected the cable to my Westell router. But Ubuntu never recognized it. Later I read that only certain ethernet cards will be automatically recognized, so I guess the one in my tower was not a compatible one. My next choice was to try and get my Belkin USB WiFi adapter working. I went to ADMINISTRATION -> SYNAPTIC PACKAGE MANAGER and keyed ndiswrapper into the search. I was prompted to place the Ubuntu install cd into my drive. It kept giving me errors. I placed my Belkin adapter install cd in the drive and looked around for the ini driver file, but could not see it. Finally, out of despair, I plugged the Belkin wifi adapter into the USB and LIKE MAGIC Ubuntu recognized it, asked me to choose a connection and enter the WEP key, which I have now done many times with other machines and during the Wubi Ubuntu install on Windows. So now I had a working Ubuntu machine connected to the Internet.
I went to J&R computer store up the street and found a $10 USB 4 gig memory stick by http://www.dane-elec.com which is REALLY cheap. I recently discovered that the Sancor memory sticks that I love actually have a lot of SOFTWARE on them, which only works under windows, AND if you have a password set on the device, then Ubuntu wont even read it.
I had to go into synaptic manager and search on usb for some installs. Again, it was trial and error, and I dont know what finally made it work, but finally, Ubuntu recognized the memory stick.
TODAY, I had to meet my step-son near at Borders Book Store next to Penn Station. This was lucky for me, because while I waited for him, I browsed the computer book section on the second floor. I found a $9 small Linux handbook reference of commands by Daniel J. Barrett (O Reilly publishers) so I got that to practice all the hundreds of Linux commands that I dont know but need to know.
I browse various books on Ubuntu and Mysql.
I found the key thing I needed to know for my next project, to install LAMP (Linux Apache MySQL PhP) on my new Ubuntu desktop.
All one needs to do is enter TERMINAL, and key in
(you will be prompted for your system password next)
A task selection window will pop up with many packages available for install, one of which is LAMP. Now here is a mystery that took me an hour to solve. You can arrow down to highlight LAMP, but you dont have a clue in the world as to how to CHECK it for install. Google revealed the secret: YOU SIMPLY PRESS THE SPACE BAR AND IT IS MARKED CHECKED FOR INSTALL. Then you press ENTER and the install proceeds, Apache, MySQL and PhP. You will be prompted for the MySQL admin password.
Next I wanted to install phpmyadmin to administrate mysql, creating databases, tables, etc. I went to SYSTEM-> Synaptic Manager and searched on phpmyadmin. I think there is only one. BUT HERE IS A SECRET. Once your LAMP install finishes, then power down and boot back up; otherwise, certain files will remain locked by processes and the phpmyadmin install will fail.
Once phpmyadmin installs (and you will again be prompted for that pesky password), then you can open firefox and key in http://localhost/phpmyadmin
You will be PROMPTED FOR A USER NAME AND PASSWORD. This is tricky and confusing. You have to key in the user name “root” without quotes, and then give the password that you have been using all along throughout this. Now you are in phpmyadmin, and you can go to Privileges, and create a new user and give him all possible privileges.
Then, I found a $50 book, also by O’Reilly, entitled
“Head First – PHP & MySQL”. THIS book looks like the perfect way to teach myself how to develop php mysql applications which will have proper security (which is a very complex topic).
I didnt purchase that book tonight, because I wanted to come home and see first if I could successfully install LAMP and phpmyadmin, which I just now finished.
The Head First book gave me links to try the book on line free for 45 days. Money is kind of tight, so I decided to see how far I can go without any additional purchases, but if I get things working, I will buy the book one day. It is interesting that O’Reilly also offers a link to an on line university which can grant degrees in computer science.
I signed up at Oreilly for a trial access of the electronic version of the above-mentioned book.
Here is something I tried which crashed my Ubuntu. I wanted to copy the introduction to the book, from the OReilly site, and PASTE it into an Open Office Document. The first time Open Office died, and the file was shown as requiring recovery. I did the recovery, opened it again with Open Office Document, and then the whole Ubuntu system crashed. I rebooted, and had to go through a long complicated reconstruct procedure. I thought perhaps I would have to install everything from scratch, but fortunately, Ubuntu repaired itself. Moral to story is paste into GEDIT and save, which I guess eliminates whatever hidden characters are in the webpage which cause Open Office to crash the system.
There, I found a link to download all the source code from the book.
I downloaded the zipped file of all the source code.
Next, I went to the source code for chapter 1. They have a beginning version (which I guess you make changes to, and then a final version).
I tried to copy and paste report.html to var/www which is where Apache wants to find pages loaded from local host. I was not allowed to paste because I do not have superuser privileges. So, I went to terminal and typed SUDO GEDIT, which gets me into gedit with super powers, so I can now navigate to the unzipped code in my DOCUMENTS in a special folder I created, open report.html, then do a save as to var/www.
THIS WORKED, because now, when I open Firefox and key in localhost/report , it runs the Chapter 1 example webpage.
FOR MY NEXT TRICK, I must figure out how to copy a chapter 1 tutorial image of a dog (fang.jpg) from the location where it unzipped (in a folder in my Documents) and copy it into var/www where I do not have Admin privileges. SO, I open my OReilly handbook of Linux commands and find the CP command. I open a TERMINAL session and key in SUDO CP which I know will executed it with super admin privileges, but NOW I do not have a clue as to what the PATH names are for the file source and destination.
I am permitted to copy fang.jpg from the unzipped file into DOCUMENTS, just to simplify things.
Using PLACES -> COMPUTER, which brings up the FILE BROWSER, I first navigate to home/Documents and I RIGHT CLICK on the fang.jpg image, and click on PROPERTIES which will SHOW ME that the path is
/home/bryan/Documents/fang.jpg (I use bryan as my user name, but that is my step-son’s name). Next I do the same right click trick on any file which is already in var/www such as report.html, and I discover THAT path, which tells me that the command I should issue in TERMINAL is
sudo cp /home/bryan/Documents/fang.jpg var/www/fang.jpg
BUT IT HANGS… NOTHING HAPPENS.
Then I realize that I should close my other applications, because they are somehow LOCKING UP something that the CP command needs. Sure enough, once I close a bunch of applications, the SUDO CP command asks me for the PASSWORD and then copies fang.jpg to var/www
I can now bring up the image by opening Firefox and typing
into the browser address field.
NOW that fang.jpg is in var/www, if I once again open Firefox and type
the exercise 1 page loads and also shows the picture of the little dog fang.jpg
I still need to copy report.php and style.css from the place where they unzipped to var/www. Since I can launch gedit with sudo and have superadmin powers, I may open them in that fashion and do a save as.
I ran the finished example, hoping that it would actually send me an email.
I realized that I must examine my php.ini and somehow reconfigure it. I went to some pains to locate that file, but did not post notes as I went, and now I must reconstruct what I did. I still have not succeeded in getting the app to actually send an email through php. But I feel it is more essential for me to move on to other lessons in the HEAD FIRST book.