Apache2 のインストールは以下。ついでに PHP もインストールしておきます。
[root@host ~]# yum -y install httpd [root@host ~]# yum -y install php php-mbstring設定ファイルの編集。
[root@host ~]# vim /etc/httpd/conf/httpd.conf編集内容は以下。コメントアウトしている行はデフォルトの設定で、その下の行が変更内容。
#ServerName www.example.com:80
ServerName www.fedora10.vm:80
<Directory "/var/www/html">
# Options Indexes FollowSymLinks
Options Includes ExecCGI FollowSymLinks Indexes
# AllowOverride None
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#DirectoryIndex index.html index.html.var
DirectoryIndex index.html index.htm index.cgi index.php index.html.var
#AddDefaultCharset UTF-8 (コメントアウトする)
#AddHandler cgi-script .cgi
AddHandler cgi-script .cgi .pl
ユーザーディレクトリの設定。要は UserDir ディレクティブのコメントアウトを逆にします。
<IfModule mod_userdir.c>
#UserDir disabled
UserDir public_html
</IfModule>
<Directory /home/*/public_html>
AllowOverride All
Options IncludesNoExec ExecCGI FollowSymLinks
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
で、Apache 再起動。
[root@host ~]# service httpd start httpd を起動中: [ OK ]次は MySQL のインストール。
[root@host ~]# yum -y install mysql-server設定ファイルの編集。
[root@host ~]# vim /etc/my.cnf編集内容は以下。[mysqld]、[mysqld_safe] は default-character-set 追加、[mysql] はそのセクション自体追加します。
[mysqld] default-character-set = utf8 [mysqld_safe] default-character-set = utf8 [mysql] default-character-set = utf8MySQL を起動します。起動時に初期化が行われます。
[root@host ~]# service mysqld start
MySQL データベースを初期化中: Installing MySQL system tables...
090502 18:23:56 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090502 18:23:56 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
090502 18:23:56 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090502 18:23:56 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h host.domain.com password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[ OK ]
MySQL を起動中: [ OK ]
ざっと書いたからってのもありますが、内容はこれだけです。簡単ですよね。参考にしたリンク
コメント