Webで調べながらとも思ったんですが、何かしらの指針が欲しいので入門書を選んで購入してみました。
それがこれ。
MySQLの基礎というよりは、MySQLを使ってRDBMSを使うにあたって最低限の使い方をレクチャーしてくれる本です。
DBだけでなく、Apache+PHPでDBを操作するアプリを作る方法等も一緒に書かれているので、LAMPの入門書としても使えそうです。
って事で、これを使ってまた亀の歩みを進めます。
インフラしか知らないITエンジニアが何を思ったかPHPを使用したWebアプリケーションを作ってみたいと思考が暴走。 いままではシェルスクリプトはゴリゴリ書いた事があるけれど、果たしてどうなることやら…。
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/user_id/.ssh/id_rsa): [ENTER]
Enter passphrase (empty for no passphrase): [複合化のフレーズ]
Enter same passphrase again: [同じフレーズ]
Your identification has been saved in /Users/user_id/.ssh/id_rsa.
Your public key has been saved in /Users/user_id/.ssh/id_rsa.pub.
The key fingerprint is:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX user_id@client_host.local
The key's randomart image is:
$ scp /Users/user_id/.ssh/id_rsa.pub user@serverhost.local:/home/user/id_rsa.pub
id_rsa.pub 100% 403 0.4KB/s 00:00
$
# /etc/init.d/sshd restart
sshd を停止中: [ OK ]
sshd を起動中: [ OK ]
#
# yum install php
# yum install mysql-server
# yum list installed | grep mysql-server
mysql-server.i386 5.0.77-3.el5 installed
#
# yum list installed | grep php
php.i386 5.1.6-23.2.el5_3 installed
php-cli.i386 5.1.6-23.2.el5_3 installed
php-common.i386 5.1.6-23.2.el5_3 installed
php-devel.i386 5.1.6-23.2.el5_3 installed
php-mysql.i386 5.1.6-23.2.el5_3 installed
php-pdo.i386 5.1.6-23.2.el5_3 installed
php-pear.noarch 1:1.4.9-6.el5 installed
php-pear-MDB2.noarch 2.4.1-2.el5.centos installed
php-pear-MDB2-Driver-mysql.noarch 1.4.1-3.el5.centos installed
#
# cd /root
# cp -ip /media/VMware¥ Tools/VMwareTools-7.9.7-196839.tar.gz /root/VMwareTools-7.9.7-196839.tar.gz
# tar -zxvf ./VMwareTools-7.9.7-196839.tar.gz
# yum install kernel-headers
# yum install gcc
# cd /root/vmware-tools-distrib/
#
# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.
Installing VMware Tools.
In which directory do you want to install the binary files?
[/usr/bin] [ENTER]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d]
What is the directory that contains the init scripts?
[/etc/rc.d/init.d] [ENTER]
In which directory do you want to install the daemon files?
[/usr/sbin] [ENTER]
In which directory do you want to install the library files?
[/usr/lib/vmware-tools] [ENTER]
The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes] [ENTER]
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools] [ENTER]
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes] [ENTER]
The installation of VMware Tools 7.9.7 build-196839 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes] [ENTER]
It looks like you are trying to run this program in a remote session. This
program will temporarily shut down your network connection, so you should only
run it from a local console session. Are you SURE you want to continue?
[no] [ENTER]
Please re-run this program from a local console shell.
Execution aborted.
Found VMware Tools CDROM mounted at /media/VMware Tools. Ejecting device
/dev/hdc ...
#
# ./vmware-install.pl
A previous installation of VMware Tools has been detected.
The previous installation was made by the tar installer (version 4).
Keeping the tar4 installer database format.
You have a version of VMware Tools installed. Continuing this install will
first uninstall the currently installed version. Do you wish to continue?
(yes/no) [yes] [ENTER]
Uninstalling the tar installation of VMware Tools.
Stopping services for VMware Tools
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: [ OK ]
Virtual Printing daemon: [ OK ]
File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders is
backed up to
/usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders.old.0.
File /usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc is backed up to
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc.old.0.
This program previously created the file
/usr/lib/vmware-tools/libconf/etc/pango/pangorc, and was about to remove it.
Somebody else apparently did it already.
This program previously created the file
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pango.modules, and was about to
remove it. Somebody else apparently did it already.
This program previously created the file
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gdk-pixbuf.loaders, and was about to
remove it. Somebody else apparently did it already.
File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules is backed up
to /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules.old.0.
This program previously created the file
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gtk.immodules, and was about to
remove it. Somebody else apparently did it already.
This program previously created the file
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangox.aliases, and was about to
remove it. Somebody else apparently did it already.
This program previously created the directory
/usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0, and was about to remove it.
Since there are files in that directory that this program did not create, it
will not be removed.
This program previously created the directory
/usr/lib/vmware-tools/lib32/libconf/etc/pango, and was about to remove it.
Since there are files in that directory that this program did not create, it
will not be removed.
This program previously created the directory
/usr/lib/vmware-tools/lib32/libconf/etc, and was about to remove it. Since
there are files in that directory that this program did not create, it will not
be removed.
This program previously created the directory
/usr/lib/vmware-tools/lib32/libconf, and was about to remove it. Since there
are files in that directory that this program did not create, it will not be
removed.
This program previously created the directory /usr/lib/vmware-tools/lib32, and
was about to remove it. Since there are files in that directory that this
program did not create, it will not be removed.
This program previously created the directory /usr/lib/vmware-tools, and was
about to remove it. Since there are files in that directory that this program
did not create, it will not be removed.
The removal of VMware Tools 7.9.7 build-196839 for Linux completed
successfully.
Installing VMware Tools.
In which directory do you want to install the binary files?
[/usr/bin] [ENTER]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d] [ENTER]
What is the directory that contains the init scripts?
[/etc/rc.d/init.d] [ENTER]
In which directory do you want to install the daemon files?
[/usr/sbin] [ENTER]
In which directory do you want to install the library files?
[/usr/lib/vmware-tools] [ENTER]
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools] [ENTER]
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes] [ENTER]
The installation of VMware Tools 7.9.7 build-196839 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes] [ENTER]
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: [ OK ]
Virtual Printing daemon: [ OK ]
The bld-2.6.18-8.el5-i686smp-RHEL5 - vmmemctl module loads perfectly into the
running kernel.
The bld-2.6.18-8.el5-i686smp-RHEL5 - vmhgfs module loads perfectly into the
running kernel.
The bld-2.6.18-8.el5-i686smp-RHEL5 - vmxnet module loads perfectly into the
running kernel.
The bld-2.6.18-8.el5-i686smp-RHEL5 - vmblock module loads perfectly into the
running kernel.
[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base
for more details on this capability. Do you wish to enable this feature?
[no] [ENTER]
The bld-2.6.18-8.el5-i686smp-RHEL5 - vmci module loads perfectly into the
running kernel.
The bld-2.6.18-8.el5-i686smp-RHEL5 - vsock module loads perfectly into the
running kernel.
Detected X.org version
X Window System Version 7.1.1
Release Date: 12 May 2006
? 7.1 : '0.0.0'.1
Build Operating System: Linux 2.6.18-53.1.14.el5PAE i686 Red Hat, Inc.
Current Operating System: Linux jupiter.localdomain 2.6.18-128.el5 #1 SMP Wed
Jan 21 10:44:23 EST 2009 i686
Build Date: 21 January 2009
Build ID: xorg-x11-server 1.1.1-48.52.el5
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
.
Please choose one of the following display sizes that X will start with (1 -
29):
[1] "320x200"
[2] "320x240"
[3] "400x300"
[4] "512x384"
[5] "640x400"
[6] "640x480"
[7] "720x480"
[8] "800x480"
[9] "854x480"
[10] "720x576"
[11] "800x600"
[12]< "1024x768" [13] "1280x720" [14] "1280x768" [15] "1152x864" [16] "1280x800" [17] "1366x768" [18] "1280x960" [19] "1440x900" [20] "1280x1024" [21] "1400x1050" [22] "1680x1050" [23] "1600x1200" [24] "1920x1080" [25] "1920x1200" [26] "1920x1440" [27] "2048x1536" [28] "2560x1600" [29] "2560x1920" Please enter a number between 1 and 29: [12] [ENTER]
X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: Linux 2.6.18-53.1.14.el5PAE i686 Red Hat, Inc.
Current Operating System: Linux jupiter.localdomain 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686
Build Date: 21 January 2009
Build ID: xorg-x11-server 1.1.1-48.52.el5
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/vmware-config0/XF86ConfigLog.3831", Time: Sun Oct 25 23:52:15 2009
(++) Using config file: "/tmp/vmware-config0/XF86Config.3831"
X is running fine with the new config file.
FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing.
Checking acpi hot plug [ OK ]
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: [ OK ]
Guest filesystem driver: [ OK ]
Mounting HGFS shares: [失敗]
Guest memory manager: [ OK ]
Guest vmxnet fast network device: [ OK ]
VM communication interface: [ OK ]
VM communication interface socket family: [ OK ]
Blocking file system: [ OK ]
Guest operating system daemon: [ OK ]
Virtual Printing daemon: [ OK ]
The configuration of VMware Tools 7.9.7 build-196839 for Linux for this running
kernel completed successfully.
You must restart your X session before any mouse or graphics changes take
effect.
You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X server session.
You will need to either manually start /usr/bin/vmware-user or log out and log
back in to this desktop session to obtain the following features: guest
resolution fit, drag and drop, and file and text copy/paste. vmware-user is
configured to automatically start at a graphical login, but that won't take
effect until the next login.
To use the vmxnet driver, restart networking using the following commands:
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start
If the virtual printer feature is enabled, you will need to restart the CUPS
service to make use of this feature.
Enjoy,
--the VMware team
#