20120403
用虛擬機器安裝centos6.2
開啟預設服務等等
adduser eip
passwd eip
-----------
/home/eip/新增public_html/index.htm
-----------
/etc/httpd/conf/httpd.conf
1.左邊#註解拿掉
<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>
-----------------
2. disabled註解掉,UserDir public_html打開
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disabled
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
UserDir public_html
</IfModule>
1. 先關閉 /etc/selinux/config 的內容
[root@linux ~]# vi /etc/selinux/config
# 將底下的設定值改成這樣:
SELINUX=disabled
---到此為止應該可以進入網址/~eip/裡面的網頁---
然後要去/etc/php.ini改錯誤訊息要不要顯示
error_reporting = E_ALL | E_STRICT
error_reporting = E_ALL & ~E_NOTICE //這個更常用!!
display_errors = On
display_startup_errors = On
log_errors = Off
short_open_tag = On <--- <? 變可以了!
1.short_open_tag 預設變成打開了
2.預設變數一定要有值,$val; <- 犯法 $val=''; <- 合法
這個真的超討厭的,所以我把這個錯誤訊息關掉了xd,看還會不會出現...
3.date.timezone = "Asia/Taipei" 一定要設
---設定mysql sql
mysql> -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newpass") where User=’root’;
mysql> flush privileges;
mysql> quit
---安裝pma
安裝於/var/www/html
---中間有遇到yum -y update無法執行
是因為DNS設定問題
使用setup 指令修改 dns 並且記得service network restart
---在家裡安裝時,首先要先克服上網問題---
要先把中華電信的小烏龜,設定成硬撥
然後進setup 網卡的東西都要設定好
目前的設定如下:
然後修改網卡設定:
因為每次phpmyadmin都一下子就timeout了
所以要去調一下session的時間
/
var
/html/www/pma
//這是我電腦的路徑,網友們的路徑自己要去找一下,而且應該是phpmyadmin不是pma
去/
var
/html/www/pma/libraries/config.
default
.inc.php裡面找$cfg[
'LoginCookieValidity'
]複製出來
貼到/
var
/html/www/pma/libraries/config.sample.inc.php檔案裡面。
並改成$cfg[
'LoginCookieValidity'
] = 8*60*60;
然後去修改php.ini
/etc/php.ini 裡面修改session.gc_maxlifetime的值改成28800 (不可以用8*60*60 不知道為什麼...)
//這個隨便設一設
$cfg[
'blowfish_secret'
] =
'sheepisgoodaNimal'
;
/* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
//還有一個錯誤訊息 "缺少 mcrypt 外掛。請檢查 PHP 設定"
重啟服務service httpd restart
step 1:
# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm //取得rpm檔案
# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm //取得rpm檔案
step 2:
# rpm -ivh epel-release-6-5.noarch.rpm //安裝取得的rpm檔案
# rpm -ivh epel-release-6-5.noarch.rpm //安裝取得的rpm檔案
step 3:
# yum update //更新yum的資源庫
# yum update //更新yum的資源庫
step 4:
# yum install php-mssql //安裝php-mssql
# yum install php-mssql //安裝php-mssql
step 5:
# service httpd restart //重啟apache伺服器
# service httpd restart //重啟apache伺服器
沒有留言:
張貼留言