Skip to content

starcraft04/people

Repository files navigation

This tool will help on people management

Install


Those are the steps used on a Debian 10

  1. Install apache, php and mysql
    sudo apt-get update
    sudo apt-get install apache2 php7.3 mariadb-server-10.3 libapache2-mod-php7.3 php7.3-mysql

If you need to setup your DB for the first time, use

   sudo mysql_secure_installation
  1. Configure the database to have a db for the tool and a user pass to access it
    sudo mysql
    CREATE DATABASE <db_name>;
  1. Install Git
    sudo apt-get install git
  1. Install the application (go in the appropriate directory first, eg: /var/www/html)
    sudo git clone https://github.com/starcraft04/people/ .
  1. Install composer (attention, go to the composer website and install from there don't use apt as it doesn't install latest version)
    https://getcomposer.org/download/
    make sure it is installed like this to have it available globally: sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
    When you have composer.phar, rename to composer and move to /usr/bin/composer
  1. Changed owner and group of www with
    sudo chown -R <user> /var/www/html/
And for Laravel to be able to write temp files:
    sudo chmod a+w -R /var/www/html/bootstrap/cache/
    sudo chmod a+w -R /var/www/html/storage/
  1. Execute composer to install necessary applications for Laravel 5
    composer install

And also install the following php packages:

    sudo apt-get install php7.3-xml php7.3-gd php7.3-zip php7.3-mbstring
  1. Rename .env.example into .env with
    mv .env.example .env
  1. Create an application key
    php artisan key:generate
  1. Edit .env

    Enter information about MySQL database credentials Enter location of mysqldump executable (usually in /usr/bin/)

  2. Restart apache
    sudo service apache2 restart
  1. Edit /etc/apache2/apache2.conf

    change from

    <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride None
            Require all granted
    </Directory>
    

    to

    <Directory /var/www/>
            Options FollowSymLinks
            AllowOverride All
            Allow from all
            Require all granted
    </Directory>
    

    Then run

    a2enmod rewrite
    

    then restart apache by:

    sudo service apache2 restart
    
  2. Upgrade DB and use the seeds to create a user admin with the basic rights (admin@orange.com // Welcome1)

    php artisan migrate
    php artisan db:seed --class=DatabaseSeeder
    

    If reset is not working, do

    php composer dump-autoload
    
  3. Modify your php.ini file (for php 7, located at: /etc/php/7.3/apache2/php.ini)

    Upload_max_filesize  - 15 M
    Max_input_time  - 600
    Memory_limit    - 128M
    Max_execution_time -  600
    Post_max_size - 15 M
  1. In order to make sure that the git update button works, please enter the following
    sudo visudo

Add the line: git ALL=(www-data) /usr/bin/git pull

  1. if you are going to use the automatic backup function, then you need to enter this in your cron (crontab -e)
    * * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •