Skip to content

Instantly share code, notes, and snippets.

@rakibulinux
Last active June 28, 2020 17:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rakibulinux/65ed1f39cc6e879dbeb3d4bca203ac11 to your computer and use it in GitHub Desktop.
Save rakibulinux/65ed1f39cc6e879dbeb3d4bca203ac11 to your computer and use it in GitHub Desktop.
How to install attendize on ubuntu 18.04
#!/bin/sh
sudo apt-get update
sudo apt-get install nginx mariadb-server php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-mysql php7.2-curl php7.2-json php7.2-zip php7.2-gd php7.2-xml php7.2-mbstring php7.2-opcache php7.2-pgsql curl git unzip -y
sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl start mariadb
sudo systemctl enable mariadb
#Configure Database
sudo mysql_secure_installation
sudo mysql -u root -p
CREATE DATABASE attendize DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON attendize.* TO 'attendize'@'localhost' IDENTIFIED BY 'E@kiS2019P@';
FLUSH PRIVILEGES;
EXIT;
#Install Attendize
curl -sS https://getcomposer.org/installer -o composer-setup.php
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
composer --version
cd /var/www/html/
sudo git clone https://github.com/Attendize/Attendize attendize
cd attendize
sudo mv .env.example .env
sudo nano .env
#Define your database setting as shown below:
DB_TYPE=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=attendizedb
DB_USERNAME=attendize
DB_PASSWORD=password
sudo composer install
sudo php artisan key:generate
#Save and close the file, when you are finished. Then, give proper permissions to the attendize directory with the following command:
sudo chown -R www-data:www-data /var/www/html/attendize
sudo chmod -R 755 /var/www/html/attendize
#Configure Nginx for Attendize
sudo nano /etc/nginx/sites-available/attendize.conf
server {
listen 80;
listen [::]:80;
server_name example.com;
root /var/www/html/attendize/public;
index index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; # Check this
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
#Now save and exit
sudo ln -s /etc/nginx/sites-available/attendize.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo systemctl restart php7.2-fpm
sudo systemctl status nginx
#Now visit
http://localhost:8080/install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment