[[Linuxめも]] *SELinuxを無効化 [#i87d33e8] # vi /etc/sysconfig/selinux #SELINUX=enforcing SELINUX=disabled *PostgreSQLのインストール [#mee6e453] # yum install postgresql-server 自動起動設定 # chkconfig postgresql on 確認 # chkconfig --list postgresql データベースの初期化 # su postgres $ initdb --encoding=UTF8 --no-locale -D /var/lib/pgsql/data 起動 $ postmaster -D /var/lib/pgsql/data *MySQLのインストール [#d69464f3] $ exit # yum install mysql mysql-devel mysql-server # /etc/rc.d/init.d/mysqld start 自動起動設定 # /sbin/chkconfig --add mysqld # /sbin/chkconfig mysqld on # /sbin/chkconfig --list mysqld コンソール経由で文字化けする場合 設定ファイルに2行を追加してMySQLを再起動 # vi/etc/my.cnf [mysqld] default-character-set=utf8 skip-character-set-client-handshake *Apacheのインストール [#i3eca5e0] # yum install httpd 自動起動設定 # chkconfig httpd on 確認 # chkconfig --list httpd 起動 # service httpd start # vi /etc/httpd/conf/httpd.conf ServerName localhost:80 UseCanonicalName On <IfModule mod_userdir.c> UserDir public_html </IfModule> <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS> Order deny,allow Deny from all </LimitExcept> </Directory> *つながらない場合 [#t9b7d63f] firewalldとやらがじゃまをしているらしいので停止 # systemctl stop firewalld 再起動後も自動起動しないようにするためには # systemctl disable firewalld *PHPのインストール [#lc043ef2] # yum install php php-mbstring php-pgsql php-mysql php-gd php-pear php-xml