Teampass

From Newroco Tech Docs
Revision as of 13:56, 27 November 2018 by Alexandru.horea (talk | contribs)
Jump to navigationJump to search

Prerequisites

Install the following packages

apt-get install mysql-server mysql-client
apt-get install apache2 libapache2-mod-php php php-mcrypt php-mbstring php-mysql php-opcache php-ldap php-bcmath php-gd php-xml php-common php-mysqlnd

Edit this line in /etc/php/7.0/apache2/php.ini

max_execution_time = 60

Login to mysql

mysql -u root -p

Create a database and user for Teampass

create database teampass character set utf8 collate utf8_bin;
grant all privileges on teampass.* to teampass_admin@localhost identified by 'PASSWORD';
flush privileges;
quit

DB sync

If you want a backup DB you can set a slave mysql server as here: Mysql Sync

Install Teampass

Download Teampass and unzip it

wget https://github.com/nilsteampassnet/TeamPass/archive/2.1.26-final-3.zip
unzip 2.1.26-final-3.zip

Remove /var/www/html (after you make sure you don't have something important there) and move Teampass there.

rm -r /var/www/html
mv TeamPass-2.1.26-final-3 /var/www/html

Set Permissions

chown -R www-data:www-data /var/www/html
chmod -R 0777 /var/www/html/includes/config
chmod -R 0777 /var/www/html/includes/avatars
chmod -R 0777 /var/www/html/includes/libraries/csrfp/libs
chmod -R 0777 /var/www/html/includes/libraries/csrfp/log
chmod -R 0777 /var/www/html/includes/libraries/csrfp/js
chmod -R 0777 /var/www/html/backups
chmod -R 0777 /var/www/html/files
chmod -R 0777 /var/www/html/install
chmod -R 0777 /var/www/html/upload

Now go on your browser to https://teampass.domain.com/install/install.php and finish the installation.

When you get to Preparation, create dir /etc/teampass on the server

mkdir /etc/teampass
chown :www-data /etc/teampass
chmod 775 /etc/teampass

And set Absolute path to SaltKey to /etc/teampass/. If the field is left empty the SaltKey will be stored by default in /var/www/html/includes/ which could be accessed by unauthorized people.


For upgrade: https://docswiki.newro.co/index.php/Teampass-Upgrade