■CALENDAR■
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31   
<<前月 2009年12月 次月>>
■LOGIN■
現在のモード: ゲストモード
USER ID:
USER PW:
■ADMIN■
ADMIN ID:
ADMIN PW:
■NEW ENTRIES■
■ARCHIVES■
■PROFILE■
■POWERED BY■
BLOGN(ぶろぐん)
BLOGNPLUS(ぶろぐん+)
■OTHER■
 

MYSQLの設定
MYSQLの設定

rootユーザはデフォルトではパスワードが設定されていないた

# mysql -u root ← MySQLサーバーへrootユーザでログイン


 mysql> select user,host,password from mysql.user; ← 登録済ユーザ、パスワード確認

mysql> set password for root@localhost=password('rootパスワード'); ← ホスト名がlocalhostのrootユーザにパスワード設定
Query OK, 0 rows affected (0.00 sec)

mysql> set password for root@'centos.centossrv.com'=password('rootパスワード'); ← ホスト名が自ホストのrootユーザにパスワード設定
Query OK, 0 rows affected (0.00 sec)

mysql> set password for root@127.0.0.1=password('rootパスワード'); ← ホスト名が127.0.0.1のrootユーザにパスワード設定
Query OK, 0 rows affected (0.00 sec)

mysql> select user,host,password from mysql.user; ← 登録済ユーザ、パスワード確認

mysql> exit ← MySQLサーバーからログアウト

[root@centos ~]# mysql -u root -h localhost
 ← ホスト名がlocalhostのrootユーザでパスワードなしでMySQLサーバーへログインできないことを確認
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[root@centos ~]# mysql -u root -h 'centos.*****.com'
 ← ホスト名が自ホストのrootユーザでパスワードなしでMySQLサーバーへログインできないことを確認
ERROR 1045 (28000): Access denied for user 'root'@'centos.*****.com' (using password: NO)

[root@centos ~]# mysql -u root -h 127.0.0.1
 ← ホスト名が127.0.0.1のrootユーザでパスワードなしでMySQLサーバーへログインできないことを確認
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[root@centos ~]# mysql -u root -h localhost -p ← MySQLへrootでログイン
Enter password:  ← MySQLのrootパスワード応答
ホスト名がlocalhostのrootユーザでパスワードありでMySQLサーバーへログインできることを確認
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18 to server version: 4.1.12

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit ← MySQLサーバーからログアウト
Bye

[root@centos ~]# mysql -u root -h 'centos.centossrv.com' -p
Enter password:  ← MySQLのrootパスワード応答
ホスト名が自ホストのrootユーザでパスワードありでMySQLサーバーへログインできることを確認
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 19 to server version: 4.1.12

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit ← MySQLサーバーからログアウト
Bye

[root@centos ~]# mysql -u root -h 127.0.0.1 -p ← MySQLへrootでログイン
Enter password:  ← MySQLのrootパスワード応答
ホスト名が127.0.0.1のrootユーザでパスワードありでMySQLサーバーへログインできることを確認
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18 to server version: 4.1.12

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit ← MySQLサーバーからログアウト
Bye

※ホスト名を指定してログインできない場合の対処
ホスト名を指定してログインできない原因は、サーバーが自身のホスト名を名前解決(ホスト名→IPアドレス)できないことが原因。
サーバーが自身のホスト名を名前解決できるように、サーバーの/etc/hostsにホスト名とIPアドレスの対応を追加する。

[root@centos ~]# grep `hostname` /etc/hosts ← /etc/hostsにホスト名が定義してあるか確認
なにも表示されない=ホスト名が定義されていないことを確認

[root@centos ~]# echo 127.0.0.1 `hostname` >> /etc/hosts ← /etc/hostsにホスト名の定義を追加

[root@centos ~]# grep `hostname` /etc/hosts ← /etc/hostsにホスト名が定義してあるか確認
127.0.0.1 centos.centossrv.com ← ホスト名定義追加を確認


| http://minagawa.ddo.jp/centos/index.php?e=4 |
| | 10:11 PM | comments (0) | trackback (0) |
■MySQLインストール
■MySQLインストール

# yum -y install mysql-server

■MySQL設定

# /etc/my.cnf を編集する。

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-character-set = utf8 ← 追加(MySQLサーバーの文字コードをUTF-8にする)

以下を追加(MySQLクライアントの文字コードをUTF-8にする)

[mysql]
default-character-set = utf8


■MySQL起動

# /etc/rc.d/init.d/mysqld start ← MySQL起動


# chkconfig mysqld on ← MySQL自動起動設定

# chkconfig --list mysqld ← MySQL自動起動設定確認
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off ← ランレベル2~5のonを確認

| http://minagawa.ddo.jp/centos/index.php?e=3 |
| | 09:28 AM | comments (0) | trackback (0) |
■Webminのインストール
■Webminのインストール

# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.430-1.noarch.rpm
# rpm --install webmin-1.430-1.noarch.rpm

インストールが終了したらローカルのコンソールより
https://127.0.0.1:10000
でWebminにアクセス webminの設定で日本語を設定する。

続いてファイアオールの設定で10000を開放する。



| http://minagawa.ddo.jp/centos/index.php?e=2 |
| | 01:10 PM | comments (0) | trackback (0) |
■Centos 5.4 をインストール
■Centos 5.4 をインストール

CentOSのダウンロードページからインストールCDイメージをダウンロード
CDが6枚あり、1枚約10分でダウンロードができました。

インストール後、WindowsからSSHサーバーへリモート接続のため

(1)Microsoft .NET Frameworkインストール
   Poderosa実行に必要なMicrosoft .NET Frameworkをダウンロード&インストールする

(2)Poderosaインストール
   Poderosaをダウンロード&インストールする




| http://minagawa.ddo.jp/centos/index.php?e=1 |
| | 01:03 PM | comments (0) | trackback (0) |
PAGE TOP ↑