2007/9/28 金曜日

VineLinux4.1でphp+MySQLサーバー構築

カテゴリー: Linux — admin @ 23:24:15

vine変w
serviceやchkconfigコマンドが/sbinに居るのだけどパスが通っていない。
いちいち /sbin/chkconfig とか打ちたくないので.bash_profileにPATH設定。

PATH=$PATH:$HOME:/sbin
export PATH

再ログインして・・・ふぅ〜。
環境を修正すると気分が良い。

php関係をインストール
apt-get install php5 php5-apache2 php5-devel php5-pear php5-mysql

mysql5をインストール・起動・自動起動設定
apt-get install MySQL-server MySQL-client
service mysql start
chkconfig mysql on

apache2を起動・自動起動設定
service apache2 start
chkconfig apache2 on

/var/www/html にinfo.phpを置いて
< ?php phpinfo() ?>
を書いておく。
ブラウザでinfo.phpを読みに行ってphp情報が表示されたらOK,
その中にmysqlの項目があることも確認しよう。

●mysqlの設定

mysql -u root -p rootで入る

mysql> set password for root@localhost=password(’パスワード’);
パスワードを設定する(必須、コピペ禁止)
このコマンドはコピペするとうまくいかないことがありました。面倒なことになるのでちゃんと打ちましょう。

デフォで入っているつかわないユーザーとdbを削除しよう。
セキュリティの問題となるので。

$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-standard

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

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> delete from user where User=”;
Query OK, 2 rows affected (0.02 sec)

mysql> delete from db where User=”;
Query OK, 2 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

●mysqlにユーザー追加
root使っても良いけどきもちわるくないかい?

ユーザーuhyahya でパスワードohyahya で作成

mysql> grant all privileges on uhyahya.* to hoge identified by ‘ohyahya’;
Query OK, 0 rows affected (0.00 sec)

2007/9/22 土曜日

らしい葉っぱが出てきた。

カテゴリー: パクチー — admin @ 10:39:43

ca340261.jpg

らしい葉っぱが出てきた。

2007/9/21 金曜日

finkのself-update

カテゴリー: unix — admin @ 23:44:45

curlでダウンロードが始まらない場合はCtrl+CでBreakを送ると

Downloading the file “fink-0.27.6.tar.gz” failed.
(1) Give up
(2) Retry the same mirror
(3) Retry another mirror from your country
(4) Retry another mirror
(5) Retry using next mirror set “Custom (package-defined) servers”

How do you want to proceed? [5] 4

ということでRetry another mirrorを選ぼう。
まだ無理でも繰り返せばそのうち生きている鯖にあたる。
でそのあと

Default answer will be chosen in 60 seconds…
The list of possible mirrors in fink has been updated. Do you want to review
and change your choices? [y/N]

ときたらまよわずyでjapanを選んで速そうな鯖を選ぼう!
クソ鯖とおさらばできます。

2007/9/19 水曜日

パクチー若干のびた。

カテゴリー: パクチー — admin @ 19:05:47

ca340260.jpg

若干のびた。
発芽より5日。

2007/9/18 火曜日

松久園のにじます鉄火丼

カテゴリー: uncategorized — admin @ 22:56:44

雰囲気もナイスで(゚Д゚ )ウマー

ca340256.JPG
(゚Д゚ )ウマー
枚数もかなりあるヨ

ca340257.JPG

次ページへ »

HTML convert time: 0.733 sec. Powered by WordPress