Kimai 2
Kimai 2
Kimai 2
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 update
--
apt-get -y install gcc make autoconf libc-dev pkg-config
nano /etc/php/7.3/cli/php.ini
[Add " extension=mcrypt.so " bellow PHP]
cd kimai2/
chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/
--
composer install
composer install --no-dev --optimize-autoloader
mysql -u root
vim .env
[=================================]
DATABASE_URL=mysql://kimai2:Huy1099@127.0.0.1:3306/kimai2
[=================================]
bin/console kimai:install -n
bin/console kimai:create-user admin admin@example.com 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
# 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>
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>
[==================================================================================
===]