Last active
July 13, 2020 15:19
-
-
Save linuxbiekaisar/19bddf0c538ec574ad58c2920b31ae78 to your computer and use it in GitHub Desktop.
How to install attendize in Ubuntu 18.04 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Youtube: https://www.youtube.com/watch?v=ltlGdKRJSuo&t=66s | |
# !/bin/sh | |
sudo apt-get update | |
sudo apt-get install apache2 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 apt install php-pear php7.3-curl php7.3-dev php7.3-gd php7.3-mbstring php7.3-zip php7.3-mysql php7.3-xml php7.3-fpm libapache2-mod-php7.3 php7.3-imagick php7.3-recode php7.3-tidy php7.3-xmlrpc php7.3-intl | |
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 'LinuxK@!SAR; | |
FLUSH PRIVILEGES; | |
EXIT; | |
#Install Attendize | |
curl -sS https://getcomposer.org/installer -o composer-setup.php | |
sudo 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 update-alternatives --set php /usr/bin/php7.3 | |
php -v | |
composer require superbalist/php-pubsub-http | |
php -m or php -m | grep bcmath | |
sudo apt install php7.3-bcmath | |
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 | |
sudo ln -s /etc/nginx/sites-available/attendize.conf /etc/nginx/sites-enabled/ | |
sudo systemctl restart nginx | |
cd /etc/nginx/sites-available/ | |
ls | |
#then show | |
attendize.conf default | |
sudo rm -rf default | |
cd /etc/nginx/sites-enabled/ | |
ls | |
#then show | |
attendize.conf default | |
sudo rm -rf default | |
sudo systemctl restart nginx | |
http://localhost/install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment