1、安装authpuppy服务端验证1、 安装php开发环境:
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
2, 到 https://launchpad.net/authpuppy 下载最新源码authpuppy-1.0.0-stable,解压并剪切到/var/www/authpuppy目录
sudo mv authpuppy /var/www/authpuppy:
这里要注意文件夹,不要/var/www/authpuppy/authpuppy/ 如果重复了下面的配置文件也要这样写,
我这里就是犯了这个错误没有做出来,调试了半上午。
执行:$ sudo chmod 777 /var/www/authpuppy -R(大写) 给所有文件增加权限。不然到下面页面配置的时候不能
通过。(我这里又浪费了1个小时) 看http://www.authpuppy.org/doc/Upgrading_to_a_new_release才明白的。
3、 修改/etc/apache2/apache2.conf替换所有内容
4、 修改/etc/apache2/sites-enabled/000-default.conf替换所有内容(这是一个链接文件,注意它的连接文件)
sudo gedit /etc/apache2/sites-enabled/000-default.conf
如下:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName authpuppy.localhost
ServerAlias authpuppy.test
DocumentRoot /var/www/authpuppy/web/
DirectoryIndex index.php
<Directory /var/www/authpuppy/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Alias /sf /var/www/authpuppy/lib/vendor/symfony/data/web/sf
<Directory "/var/www/authpuppy/lib/vendor/symfony/data/web/sf">
AllowOverride All
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error,crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
6、 重启apache
sudo service apache2 restart
7、访问 http://localhost 出现authpuppy配置页面
点击let‘s go
如果否则会出现(Therequested URL /install/3 was not found on this server.)错误
$sudo a2enmod rewrite
然后
$service apache2 restart
如果页面中出现让您删除 installed.txt的文件 此文件在web/目录下。删除 即可。
下面关于MySQL的操作说明
user@yourserver $> mysqladmin -uroot -p create authpuppy Enter password: #Enter the root password user@yourserver $> mysql -uroot -p Enter password: Welcome to the MySQL monitor. 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 'authpuppydev'; 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)配置sql数据库。
数据库名称:authpuppy 数据库密码:authpuppydev
最后给出老外的参考资料: http://www.authpuppy.org/doc/Getting_Started
再有其他问题,看看老外的网站,内容不多,请仔细看。