Kimai 2

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

timesheet machine => passwd 123

sudo -i
apt-get update
apt-get -y upgrade
apt-get -y install git unzip curl
apt-get -y install software-properties-common
add-apt-repository ppa:ondrej/php

apt-get -y install php7.3 php7.3-fpm php7.3-cli php7.3-common php7.3-json php7.3-


opcache php7.3-readline php7.3-xml php7.3-zip php7.3-intl php7.3-gd php7.3-mbstring
php7.3-mysql php7.3-curl

apt-get -y install php7.3 libapache2-mod-php7.3 php7.3-cli php7.3-mysql php7.3-gd


php7.3-imagick php7.3-recode php7.3-tidy php7.3-xmlrpc

apt-get update

--
apt-get -y install gcc make autoconf libc-dev pkg-config

apt-get -y install php7.3-dev


apt-get -y install libmcrypt-dev
pecl install mcrypt-1.0.3
[Enter]

nano /etc/php/7.3/cli/php.ini
[Add " extension=mcrypt.so " bellow PHP]

apt install apache2


cd /var/www/
git clone https://github.com/kevinpapst/kimai2.git

cd kimai2/

chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/
--

apt install composer

composer install
composer install --no-dev --optimize-autoloader

apt-get-y install mysql-server mysql-client

mysql -u root

CREATE DATABASE IF NOT EXISTS `kimai2`;


CREATE USER IF NOT EXISTS `kimai2`@127.0.0.1 IDENTIFIED BY "HJ#$%^Yh89!G##$%TGW$R
%THopwritbghu$%^BFUKMU$^*Y$%&HUWRj";
GRANT select,insert,update,delete,create,alter,drop,index,references ON `kimai2`.*
TO [email protected];
exit;
composer install
composer install --no-dev --optimize-autoloader

vim .env

[=================================]
DATABASE_URL=mysql://kimai2:[email protected]:3306/kimai2
[=================================]

bin/console kimai:install -n
bin/console kimai:create-user admin [email protected] ROLE_SUPER_ADMIN

[pass: ZAQ!xsw2!!@@ ]

chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/
chmod -R g+rw public/avatars/

nano /etc/apache2/sites-available/000-default.conf

[==================================================================================
===]

<VirtualHost *:80>
ServerName kimai.local
ServerAlias www.kimai.local

DocumentRoot /var/www/kimai2/public
<Directory /var/www/kimai2/public>
AllowOverride All

# If you see an error like the following in your logs:


# AH01630: client denied by server configuration: /var/www/kimai2/public/
# then you might have to exchange the "Order/Allow" rules with "Require"
(see below)
# More infos at https://httpd.apache.org/docs/2.4/de/upgrading.html

# Apache 2.2
Order Allow,Deny
Allow from All

# Apache 2.4
# Require all granted

FallbackResource /index.php
</Directory>

<Directory /var/www/kimai2>
Options FollowSymlinks
</Directory>

# optionally disable the fallback resource for the asset directories


# which will allow Apache to return a 404 error when files are
# not found instead of passing the request to Symfony
<Directory /var/www/kimai2/public/bundles>
FallbackResource disabled
</Directory>

ErrorLog /var/log/kimai_error.log
CustomLog /var/log/kimai_access.log combined

# optionally set the value of the environment variables used in the application
#SetEnv APP_ENV prod
#SetEnv APP_SECRET <app-secret-id>
#SetEnv DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name"
</VirtualHost>

[==================================================================================
===]

systemctl restart apache2.service

You might also like