Legacy
...
Passwork 4
Ubuntu
Ubuntu 18.04
30 min
how to install passwork on ubuntu 18 04 1\ get root privileges and reload local package database sudo i apt get update change server hostname to "passwork" hostnamectl set hostname passwork automatic local network configuration and discovery apt get install y avahi daemon libnss mdns change avahi daemon detect local from 1 to 0 nano /etc/default/avahi daemon set avahi daemon detect local = 0 restart service avahi daemon restart 2\ install git and apache2 apt get install y git apache2 3\ install mongodb import the public key used by the package management system apt key adv keyserver hkp\ //keyserver ubuntu com 80 recv 4b7c549a058f8b6b create a /etc/apt/sources list d/mongodb list file for mongodb echo "deb \[ arch=amd64 ] https //repo mongodb org/apt/ubuntu bionic/mongodb org/4 2 multiverse" | tee /etc/apt/sources list d/mongodb list reload local package database apt get update install the latest stable version of mongodb apt get install y mongodb org start mongodb service service mongod start enable mongod service start on the system boot systemctl enable mongod service 4\ install php7 add the ppa apt get install y software properties common add apt repository y ppa\ ondrej/php install php and additional extensions apt get update apt get install y php7 3 php7 3 json php7 3 dev php7 3 ldap php7 3 xml php7 3 bcmath php7 3 mbstring 5\ install php mongo driver apt get install y pkg config pecl install mongodb echo "extension=mongodb so" | tee /etc/php/7 3/apache2/conf d/20 mongodb ini 6\ install phalcon php framework git clone branch 3 4 x depth=1 "https //github com/phalcon/cphalcon git" cd cphalcon/build /install echo "extension=phalcon so" | tee /etc/php/7 3/apache2/conf d/20 phalcon ini service apache2 restart 7\ download and install passwork clone the repository using your login and password cd /var/www git init git remote add origin http //passwork download/passwork/passwork git git fetch git checkout v4 💡 the system will ask for a login and password to the repository, which you can find in your customer portal if you don't have access to the customer portal, contact us set up permissions for the files find /var/www/ type d exec chmod 755 {} \\; find /var/www/ type f exec chmod 644 {} \\; chown r www data\ www data /var/www/ configure your apache2 open apache’s configuration file nano /etc/apache2/sites enabled/000 default conf make it look like this \<virtualhost 80> \#servername serveradmin webmaster\@localhost documentroot /var/www/public \<directory /var/www/public> options indexes followsymlinks multiviews allowoverride all order allow,deny allow from all \</directory> errorlog ${apache log dir}/error log customlog ${apache log dir}/access log combined \</virtualhost> enable rewrite module and restart apache a2enmod rewrite service apache2 restart open http //passwork local http //passwork local/ or http //127 0 0 1 http //127 0 0 1/ to access website 8\ installation when you open passwork for the first time, you will see an installation wizard that will check if the server is configured correctly and allow you to enter the basic parameters 💡 leave all fields at their default values if you are installing a new copy of passwork sign up an administrator enter the username and password for the first user the user will automatically become the administrator and owner of the organization 9\ create a ssl certificate first, enable the apache ssl module a2enmod ssl activate the default apache website a2ensite default ssl restart apache to put these changes into effect service apache2 restart create a new directory where we can store the private key and certificate mkdir /etc/apache2/ssl generate a new certificate and a private key to protect it openssl req x509 nodes days 365 newkey rsa 2048 subj '/cn=your domain name' addext 'subjectaltname=dns your domain name' keyout /etc/apache2/ssl/apache key out /etc/apache2/ssl/apache crt invoking this command will result in a series of prompts common name specify your server's ip address or hostname this field matters, since your certificate needs to match the domain (or ip address) for your website fill out all other fields at your own discretion example answers are shown below interactive you are about to be asked to enter information that will be incorporated into your certificate request what you are about to enter is what is called a distinguished name or a dn there are quite a few fields but you can leave some blank for some fields there will be a default value, if you enter ' ', the field will be left blank —— country name (2 letter code) \[au]\ us state or province name (full name) \[some state]\ example locality name (eg, city) \[]\ example organization name (eg, company) \[internet widgits pty ltd]\ example inc organizational unit name (eg, section) \[]\ example dept common name (e g server fqdn or your name) \[]\ passwork local email address \[]\ test\@passwork local set the file permissions to protect your private key and certificate chmod 600 /etc/apache2/ssl/ your certificate and the private key that protects it are now ready for apache to use 10\ configuring the product to work correctly in chrome with ssl when working over an ssl connection (https), the chrome browser requires the secure and samesite flags for the cookies without these flags, the browser will not accept cookies, and you will not be able to log into passwork in chrome to set these flags, enable the session cookie secure parameter in the /etc/php/7 3/apache2/php ini file session cookie secure = on and set the parameter disablesamesitecookie ( \[application] section)in file /var/www/app/config/config ini to value off disablesamesitecookie = off 💡 do not set these parameters or reset them to their original value if you change your mind about using ssl and will be working over the http protocol 11\ configure apache to use ssl open the server configuration nano /etc/apache2/sites enabled/default ssl conf locate the section that begins with \<virtualhost default 443> and make the following changes add a line with your server name directy below the serveradmin email line this can be your domain name or ip address serveradmin webmaster\@localhost servername passwork local 443 add “directory” directive next to the “servername” \<directory /var/www/public> options indexes followsymlinks multiviews allowoverride all order allow,deny allow from all \</directory> find the following two lines, and update the paths to match the locations of the certificate and key we generated earlier if you purchased a certificate or generated your certificate elsewhere, make sure the paths here match the actual locations of your certificate and key sslcertificatefile /etc/apache2/ssl/apache crt sslcertificatekeyfile /etc/apache2/ssl/apache key once these changes have been made, check that your virtual host configuration file matches the following \<ifmodule mod ssl c> \<virtualhost default 443> serveradmin webmaster\@localhost servername passwork local 443 documentroot /var/www/public \<directory /var/www/public> options indexes followsymlinks multiviews allowoverride all order allow,deny allow from all \</directory> sslengine on sslcertificatefile /etc/apache2/ssl/apache crt sslcertificatekeyfile /etc/apache2/ssl/apache key \</virtualhost> \</ifmodule> restart apache to apply the changes service apache2 restart check ssl connection by going to https //passwork local https //passwork local/