httpd

 ---------------------

httpdインストール・設定
[root@masato ~]# yum -y install httpd

[root@masato ~]# rm -f /etc/httpd/conf.d/welcome.conf
[root@masato ~]# rm -f /var/www/error/noindex.htm

[root@masato ~]# vi /etc/httpd/conf/httpd.conf
45 ServerTokens Prod
76  KeepAlive On
262 ServerAdmin masato@localhost
276 ServerName masato.falcon21.space:80
338   AllowOverride All
402 DirectoryIndex index.html index.htm index.php index.cgi index.html.var
536 ServerSignature Off


[root@masato ~]# /etc/rc.d/init.d/httpd start
httpd を起動中: [ OK ]
[root@masato ~]# chkconfig httpd on


[root@masato ~]# yum -y install php php-mbstring

[root@masato ~]# /etc/rc.d/init.d/httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]

[root@masato ~]# vi /var/www/html/info.php
<?php
phpinfo();
?>



perl を確認
[root@masato ~]# whereis perl
perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz

ユーザーディレクトリ作成
[root@masato ~]# vi userdirmake
#!/bin/bash

for user in `ls /home`
do
id $user > /dev/null 2>&1
if [ $? -eq 0 ] && [ ! -d /home/$user/html ]; then
mkdir -p /home/$user/html
chown $user. /home/$user/html
chmod 711 /home/$user
echo $user
fi
done


[root@masato ~]# sh userdirmake
masato

 
******************************
投票数:2 平均点:10.00

 
Back to Top