My apologies. I have a correction to make to my first post. Yank didn’t mention anything about RH Linux. In his section on “Linux Installation,” he specifically says: “These instructions were tested under Ubuntu 8.10.” The RH reference is from my confusion from another book on Linux Administration I’m reading concurrently with Yank’s book. Sorry.
I’m using the 4th edition of Yank’s book and the copyright date is 2009. I wouldn’t think things have changed so much in the last year and a half or, if so, I would like to think Yank would have mentioned the differences. There is no mention of these problems in the errata for the book. Perhaps he didn’t know about the differences at the time the book was published. But it seems like he should have at least mentioned significant differences, if any, between automatic and manual installs.
Finally, I’m running MySQL 5.1.41-3ubuntu12.3, PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (CLI) and [B]Apache/2.2.14 /B, all major versions consistent with what Yank says I should be using. Everything was installed automatically with Synaptic Package Manager; i.e., nothing was compiled from source or installed manually.
Following is a list of the discrepancies that are confusing me. To keep things more manageable, I’ll only mention my problems with the MySQL installation, which are typical of the problems I’m also having understanding Yank’s descriptions of the installs of PHP and Apache. Perhaps answers to the MySQL anomalies will enable me to figure out the other similar problems I have with the Apache and PHP installs:
1.) Yank instructs (p. 34) to place the MySQL tar file in the /usr/local directory and uncompress it there, which creates a /usr/local/mysql-version-linux-platform directory. He then creates a symbolic link to that directory using the shorter name “mysql”. Then he changes directory to /usr/local/mysql, which I’m assuming is the MySQL install location. Since I didn’t manually install MySQL there, I have no such directory in my file system. Question: where would my corresponding MySQL install location be after an automatic install with apt?
2.) He then installs database files, does a first launch, and finally tests for proper database operation with these commands:
[INDENT] root@machine:/usr/local/mysql# scripts/mysql_install_db --user=mysql
root@machine:/usr/local/mysql# bin/mysqld_safe --user=mysql &
root@machine:/usr/local/mysql# bin/mysqladmin -u root status[/INDENT]
A search for these files show that mysql_install_db and mysqld_safe are shell scripts, mysqladmin is a shared library, and all three files are located in my /usr/bin directory, along with over 2100 other files. Am I to assume that, with my automatic installation, that /usr/bin is the MySQL install directory? There are no related subdirectories like mysql…, bin, scripts, etc., like Yank indicates. Since /usr/bin is in my $PATH, I can run those commands directly from a shell CLI, but it seems like a pretty sloppy kind of installation, just dumping everything in the /usr/bin directory. Am I missing something here?
3.) Two pages later, Yank tells how to automatically run MySQL server whenever the system is up. He says:
[INDENT]“In the support-files subdirectory of the mysql directory,
you’ll find a script called mysql.server that can be added to your system startup
routines to do this. For most versions of Linux, you can do this by creating a link
to the mysql.server script in the /etc/init.d directory, then create two links to that:
/etc/rc2.d/S99mysql and /etc/rc0.d/K01mysql”[/INDENT]
A search of my file system indicates there is no support-files subdirectory or any script called mysql.server on my system. If /usr/bin is, indeed, the MySQL install directory and that subdirectory and file are not in there, where would mysql.server be located?
I’ve posted here because Yank’s book is a Sitepoint publication and I’m hoping to find someone familiar with this situation. Perhaps I would be better off trying to submit my questions to the author himself. Anyway, this forum seems like a good place to start.
Thanks in advance for any help.