各種サーバのインストール
Apacheのインストール
インストール
[root@cent0502 yum.repos.d]# yum install httpd-devel Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: ftp.riken.jp * base: ftp.riken.jp * centosplus: ftp.riken.jp * extras: ftp.riken.jp * updates: ftp.riken.jp Setting up Install Process Resolving Dependencies略 Complete!
httpd.confの編集
ユーザーディレクトリへのアクセスを許可
## # UserDir is disabled by default since it can confirm the presence # of a username on the system (depending on home directory # permissions). # #UserDir disable ← コメントアウトする # # To enable requests to /~user/ to serve the user's public_html # directory, remove the "UserDir disable" line above, and uncomment # the following line instead: # UserDir public_html ← コメントアウトを外す
mod_rewriteを有効に
# # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All ← 「None」を「All」に変更 #
ユーザーディレクトリのアクセス権限を変更
chmod 705 /home/username
MySQLのインストール
# yum install mysql-server mysql-devel Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: ftp.riken.jp * base: ftp.riken.jp * centosplus: ftp.riken.jp * extras: ftp.riken.jp * updates: ftp.riken.jp Setting up Install Process 略 Complete!
my.cnfの編集
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 # add 2 lines 20100404 default-character-set=utf8 character-set-server=utf8 # Disabling symbolic-links is recommended to prevent assorted security risks; # to do so, uncomment this line: # symbolic-links=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid #add 2 lines 20104040 [client] default-character-set=utf8
PHPのインストール
# yum install php php-mysql php-mbstring Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: ftp.riken.jp * base: ftp.riken.jp * centosplus: ftp.riken.jp * extras: ftp.riken.jp * updates: ftp.riken.jp Setting up Install Process 略 Complete!
phpMyAdminのインストール
[root@CentOS ~]# vi /etc/yum.repos.d/CentOS-Base.repo
以下を追加
[dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://ftp.riken.jp/Linux/dag/redhat/el$releasever/en/$basearch/dag/ gpgcheck=1 enabled=0
# wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt `RPM-GPG-KEY.dag.txt' に保存中
# rpm --import RPM-GPG-KEY.dag.txt
# yum -y install --enablerepo=dag phpmyadmin Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile 略 Running Transaction Test Finished Complete!