2011/03/05

Serversmanのwordpressインストール

mysqlのインストール
yum install -y mysql mysql-server

文字コードの設定
vim /etc/my.cnf
下記を追記
default-character-set=utf8

MySQLを再起動、起動設定
/etc/rc.d/init.d/mysqld start
chkconfig mysqld on

DBの作成(MySQLで)
create database wordpress;
grant all privileges on wordpress.* to wordpress@localhost identified by 'パスワード';

Worpressをダウンロードして、解凍、設定(DBの設定は作ったDBの設定を入力)
wget http://ja.wordpress.org/wordpress-3.1-ja.zip
unzip wordpress-3.1-ja.zip
mv wordpress-3.1-ja /var/www/
chown -R apache:apache /var/www/wordpress/
cp /var/www/wordpress/wp-config-sample.php /var/www/wordpress/wp-config.php
vim /var/www/wordpress/wp-config.php

あとはSendmainlのインストールと起動設定
yum install sendmail
/etc/rc.d/init.d/sendmail start
chkconfig sendmail on

ServersmanのSSH初期設定

まずは接続
ssh root@xxx.xxx.xxx.xxx -p ポート番号
パスワードを入力で接続OK

バージョンを更新
yum update
新しいユーザーを作成してログインを許可
useradd user
passwd user
vim /etc/group
wheel::10:root,user
rootでのログインをなしに
vim /etc/ssh/sshd_config
PermitRootLogin no
AllowUsers user
SSHの再起動
/etc/init.d/sshd restart
exit
参考:http://d.hatena.ne.jp/deeeki/20100530/serversman_user_ssh