Installing Authpuppy from zero

Source: Internet
Author: User
Tags apcu

In fact, not from zero installation, first of all, we need a Debian Linux distribution, such as Ubuntu, or Debian itself, second, we have a smooth internet, and has been configured to update the source of the system. The meaning of "from zero" is that the system is "clean", such as just installed Debian/ubuntu, no service occupies 80 ports, etc...

The following 18 steps are not exhaustive, but are most likely required to install Authpuppy.

0, installation OpenSSH

This step is not required, but allows us to complete the following steps remotely from the command line.

sudo apt-get install openssh-server openssh-client

Use the TAB key to complete the package name.

1, installation Apache2

sudo apt-get install apache2

Of course, a bunch of dependent packages will be installed.

2. Install MySQL

sudo apt-get install Mysql-server

Use the TAB key to complete the name of the package, for example, after entering the mysql-server, press TAB, the possible completion is 5.6! This is related to the version of the Mysql-server package inside the software source, so you cannot copy the command. Of course, a bunch of dependent packages will also be installed.

3, installation PHP5

sudo apt-get install php5

A lot of dependent packages ...

4, install php5 of some plug-in packages, such as the MySQL database connected to the package

sudo apt-get install php5-mysql php5-curl PHP5-APCU php5-xsl

5, the next operation, can be found on the Authpuppy website.

http://www.authpuppy.org/doc/Getting_Started

But I'm still a one-line list.

6, open the Apache2 rewrite mode

sudo a2enmod rewrite

8. Start Apache2

sudo service apache2 start

9, check the PHP plug-in package is installed completely

Go to http://svn.symfony-project.com/branches/1.4/data/bin/check_configuration.php

Download check_configuration.php, put under/var/www/html, permission 755;

Visit 127.0.0.1/check_configuration.php and the page will list a single item. If the plug-in is fully installed, you will see something like the following:

* * Mandatory Requirements * *

OK PHP version is at least 5.2.4

* * Optional Checks * *

OK PD0 is installed.

OK PD0 has some drivers installed:mysql (this is the reason for installing php5-mysql)

OK php-xml module is installed.

OK XSL module is installed. (This is the reason for the installation of php5-xsl)

OK A PHP Accelerator is installed (this is the reason for installing PHP5-APCU)

If a warning or error message is displayed, you need to install the missing plug-in package, or overwrite the contents of some of the configuration files.

10. Download Authpuppy File

To access Https://launchpad.net/authpuppy, on the right "Downloads" bar, download the latest Authpuppy file compression package:

Https://launchpad.net/authpuppy/trunk/1.0.0-stable/+download/authpuppy-1.0.0-stable.tgz

For example, I downloaded the authpuppy-1.0.0-stable.tgz.

Unzip it:

Tar xvzf authpuppy-1.0.0-stable.tgz

Move to the/var/www directory:

sudo mv Authpuppy/var/www

11, let Apache2 can read and write freely in the/var/www/authpuppy directory

sudo chown-r www-data/var/www/authpuppy

Assuming that the apache2 is running under the Www-data user, the specific view can be used

Ps-aux | grep apache2

See a similar

Www-data 1524 0.0 0.3 155348 7140? S 21:09 0:00/usr/sbin/apache2-k Start

, then Www-data is the user apache2 this process belongs to.

(The above method is more secure than the sudo chmod-r 777/var/www/authpuppy.) )

12. See where the apache2 configuration file is

Our goal is to configure APACHE2 so that it can carry authpuppy. First, look at where the apache2 configuration file is. Switch to/etc/apache2, open the apache2.conf file, and the 18th to 30th line clearly shows the structure of the Apache2 configuration file. We need to add a file to the sites-available and then change the contents of the sites-enabled directory.

Let's stop apache2:

sudo service apache2 stop

After all, it is a dangerous thing to repair the engine when the car has not stalled ...

13. Edit/etc/apache2/sites-available/authpuppy.conf

Switch to/etc/apache2/sites-available

Cd/etc/apache2/sites-available

List all the files below

Ls-l

Under/etc/apache2/sites-available, there have been two files, 0000-default.conf and default-ssl.conf. Below, we create a new authpuppy.conf below, which reads as follows:

1<VirtualHost*:80>2ServerAdmin [email protected]3ServerName Authpuppy.localhost4Serveralias Authpuppy.sample5Documentroot/var/www/authpuppy/web6DirectoryIndex index.php7<Directory/var/www/authpuppy/web/>8Options Indexes followsymlinks MultiViews9AllowOverride All10Order Allow,deny11Allow from all12</Directory>13Alias/sf/var/www/authpuppy/lib/vendor/symfony/data/web/sf14<Directory"/VAR/WWW/AUTHPUPPY/LIB/VENDOR/SYMFONY/DATA/WEB/SF">15 allowoverride all16  Allow from All17 </>18 19  # Possible values Include:debug, info, notice, warn, error, crit, alert, Emerg. 20  LogLevel warn21 Span style= "color: #000000;" > Customlog/var/log/apache2/authpuppy/access.log combined22 </virtualhost>  

Refer to the example in http://www.authpuppy.org/doc/Getting_Started for details.

14. Disable APACHE2 default site

Under/etc/apache2/sites-enabled, the Apache2-hosted site configuration file is stored, and the default is 000-default.conf, which points to/var/www/html. Below we deactivate it:

sudo a2dissite 000-default

This next/etc/apache2/sites-enabled directory is empty.

15. Enable Authpuppy site

sudo a2ensite authpuppy

16. Set up the database for Authpuppy (MySQL)

First, we need to log in to MySQL

Mysql-u root-p

Enter the password to log in. If you encounter a bug that can not be logged in MySQL, congratulations, we have a toss.

(1) Create a new user

Create user ' authpuppy ' @ ' localhost ' identified by ' password ';

(2) Create a new database

Create Database Authpuppy;

(3) Give the user "Authpuppy" the right to operate freely on all the tables in the database "Authpuppy"

Grant all privileges on authpuppy.* to ' authpuppy ' @ ' localhost ' with GRANT option;

Flush privileges;

(4) Exit MySQL

Exit

17. Start Apache2

sudo service apache2 start

If you encounter problems, the problem description contains "/var/log/apache2/authpuppy", create a new folder Authpuppy under/var/log/apache2, and change the permissions to 777.

18, try!

Visit http://127.0.0.1 to see what happened? Did you come up with a cute puppy?

According to the requirements of the Web page, step by step configuration is possible. Note that the user name and password for the database are used. As for authpuppy how to use .... and listen to tell

Installing Authpuppy from zero

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.