やったことメモ。
細かいとこ追記していくかも。
準備
- ダウンロード(DVD)
http://ftp.riken.jp/Linux/centos/5.2/isos/i386/
CentOS-5.2-i386-bin-DVD.iso
- 中身の確認
# mount -o loop /tmp/CentOS-5.2-i386-bin-DVD.iso /mnt # ls /mnt # umount /mnt
- DVD書込み
# cdrecord -scanbus dev=ATAPI ... scsibus0: 0,0,0 0) 'HL-DT-ST' 'DVDRAM GSA-4167B' 'DL10' Removable CD-ROM ... # cdrecord -v -eject speed=8 dev=ATAPI:0,0,0 -dao CentOS-5.2-i386-bin-DVD.iso (うちのドライブはデフォルトのTAOモードに対応してないらしく、-daoオプションつけないとエラー) # ls /media/CentOS_5.2_Final/
# rm .ssh/known_hosts
インストール後
- ユーザ追加
NFSのためにmacにユーザIDを合わせる。GIDはムリ・・・
# useradd -u 501 -G wheel mikeda # passwd mikeda # vi /etc/pam.d/su auth required pam_wheel.so use_uid
- sshd設定
# vi /etc/ssh/sshd_config
- ソフトウェアアップデート
# yum -y install yum-fastestmirror # yum -y update yum # yum -y update
- MySQLインストール
# yum -y install mysql-server # vi /etc/my.cnf # /etc/init.d/mysqld start # chkconfig mysqld on
- DB設定
# mysqladmin -uroot password PASSWORD # mysql -uroot -p > delete from mysql.user where user=''; > drop database test; > grant all privileges on *.* to mikeda@localhost; > \q
# yum -y install httpd # yum -y install php php-mysql php-mbstring # vi /etc/httpd/conf/httpd.conf # chown mikeda. /var/www/html/ # /etc/init.d/httpd start # chkconfig httpd on
(httpdをインストールしようとしたら既にあると、おかしいないれてなかったはずだけど。)
- FTPサーバインストール
# yum -y install vsftpd # vi /etc/vsftpd/vsftpd.conf # /etc/init.d/vsftpd start # chkconfig vsftpd on
- NTP設定
# crontab -e 0 4 * * * ntpdate -s ntp.nict.jp > /dev/null 2>&1 # vi /etc/ntp.conf # /etc/init.d/ntpd start # chkconfig ntpd
- 余りディスクをNFS共有
# mkdir /home/nfs # vi /etc/fstab ... /dev/sda1 /home/nfs ext3 defaults 0 0 # mount /home/nfs # vi /etc/exports # /etc/init.d/nfs start # chkconfig nfs on
- 今後の予定
DNSサーバ設定
メールサーバ設定