php5+apache2+mysql環境安裝authpuppy
所用環境: php5, apache2伺服器
首先檢測環境:check_configuration.php,執行該檔案,在安裝authpuppy之前保證所有必須的條件都滿足。
可能會遇到的問題:
解決辦法:
1.PDO has some drivers installed : FAILED
如果你用的資料庫是mysql, 請安裝; sudo apt-get install php5-mysql
2. XSL module is installed: FAILED
請安裝: sudo apt-get install php5-xsl
3. a PHP accelerator is installed: FAILED
請安裝; sudo apt-get install php5-apc
4. php.ini has short_open_tag set to off: FAILED
在你的安裝目錄中找著php.ini, 並找著short_open_tar設定為off即可。
擷取原始碼:
擷取最新的代碼: 原始碼, 將檔案解壓到web伺服器目錄中。
tar xvf authpuppy--_.tgz
sudo mv authpuppy/ /var/www
配置apache伺服器:
該項目的apache2伺服器的配置和其他任一個symfony項目的配置類似。想要查看更多細節請查看:symfony web server configuration.
設定目錄許可權:
為了應用可以使用,一些目錄必須有寫入權限,在程式開發伺服器上,可以這麼做:
chmod -R a+w
在生產環境下最好將所有者設定成web伺服器處理序的所有者:
chown -R www-data (procided www-data is the apache proces owner ,on some os, it is 'apache' or 'https')
下面列出要設定許可權的目錄.其中標記*的對工作系統必須是可寫的,其他的在外掛程式自動安裝時必須是可寫的,但這寫可以被手動設定。
.config* 或者至少config/authpuppy.yml: 因為config/authpuppy.yml檔案包含使能外掛程式列表,可寫保證在初始化時可以被載入。
.cache*: 在運行時被symfony使用,緩衝函數和資料。
.log*: 日誌目錄。
.data*: 清除緩衝人物需要該目錄的存取權限。
.plugins: 外掛程式安裝的目錄。
.web: Plugins may have assets(images, javascript, css)to publish to the web directory , so make sure it is writable, otherwise you'll need to do this by hand.
建立資料庫:
mysql:
user@youserver $> mysqladmin -uroot -p create autpuppy
Enter password: #Enter the root password
user@youserver $> mysql -u root -p
Enter password
Welcome to the MySQL minitor. Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.0.51a-3ubuntu5.5(Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create user 'authpuppy'@'localhost' identified by 'autelan';
Query OK, 0 rows affected(0.21 sec)
mysql> grant all privileges on authpuppy.* to 'authpuppy'@'localhost' with grant option;
Query OK, 0 rows affected (0.02 sec)
開始安裝authpuppy
在瀏覽器中開啟http://localhost:youport(http://localhost:9090)
如果你的許可權出現以下問題:
請保證該有寫入權限的目錄都有寫入權限即可。