This Installation Guide is prepared for Ubuntu Operating System. Of course, you can use any UNIX-based system, but in this case you need to adopt this manual by yourself. Before your start make sure your have a dedicated (virtual) server with root permission. On a usual hosting the system will not work!
This section contains links to the guides that describe how to prepare your server for the installation of the AtroCore Application.
Please note that you don't need to perform step 2 of the current guide and optional step with the Docker
This section describes how to install AtroCore Application on the prepared web server.
If the directory already exists, remove everything inside the directory.
To create the directory, run the command:
mkdir /var/www/my-atrocore-project
my-atrocore-project – project name
cd /var/www/my-atrocore-project
Git may be used for this step, so make sure that git is installed. Please note, it is still possible to install the application without having
git
(see 3.6).It is essential, that you use the composer version, which is embedded in our software, because this version contains some of our modifications needed for backup and restoring of the system files and the database. That is why
php composer.phar update
is used. Please DO NOT use composer, which is installed on your server as it does not contain the required modifications.
Demo data can be installed only for MySQL database system.
run
git clone https://gitlab.atrocore.com/atrocore/skeleton-pim.git . && php composer.phar self-update && php composer.phar update
run
git clone https://gitlab.atrocore.com/atrocore/skeleton-pim-no-demo.git . && php composer.phar self-update && php composer.phar update
run
git clone https://gitlab.atrocore.com/atrocore/skeleton-atrocore.git . && php composer.phar self-update && php composer.phar update
git
If you have no git installed you may still copy the files to the project folder manually.
You can download the files from one of these repositories:
Then upload the files to your project folder and run
php composer.phar self-update && php composer.phar update
chown -R www-data:www-data /var/www/my-atrocore-project/
Ubuntu and Debian use www-data as a standard user for the webserver. This can also be one of the following: www, apache2, psacln etc.
find . -type d -exec chmod 755 {} + && find . -type f -exec chmod 644 {} +;
find client data upload -type d -exec chmod 775 {} + && find client data upload -type f -exec chmod 664 {} +
6.1. Open crontab for your webserver user, which is www-data in our case:
crontab -e -u www-data
6.2. Add the following configuration:
* * * * * /usr/bin/php /var/www/my-atrocore-project/index.php cron
Please consider that
/usr/bin/php
is the correct path to PHP in our case. You may have other path. "cron" is the required parameter and should be definitely included for appropriate functioning.
User must have all privileges for the database, which should be used for the AtroCore Application. You can create database and user with all privileges by executing next few commands:
PostgreSQL is recommended to use.
-- Connect to PostgreSQL
sudo -u postgres psql
-- Create a new database
CREATE DATABASE your_database;
-- Create a new user
CREATE USER your_user WITH PASSWORD 'your_password';
-- Grant all privileges on the new database to the new user
GRANT ALL PRIVILEGES ON DATABASE your_database TO your_user;
-- Connect to the new database
\c your_database
-- Grant all privileges on the public schema to the new user
GRANT ALL ON SCHEMA public TO your_user;
-- Connect to MySQL
sudo mysql
-- Create a new database
CREATE DATABASE your_database;
-- Create a new user
CREATE USER 'your_user'@'localhost' IDENTIFIED BY 'your_password';
-- Grant all privileges on the new database to the new user
GRANT ALL ON your_database.* TO your_user@localhost WITH GRANT OPTION;
Start the installation wizard for your AtroCore Application in the web interface from your URL: http://YOUR_PROJECT/ . Follow the instructions in the wizard.
Note: The extension must be installed for the system to be able to mark already indexed files in the file system. For a Docker environment extension is already installed.
Install xattr development files:
sudo apt install libattr1-dev
Install PECL and PHP Development Tools:
sudo apt install php-dev php-pear
Install xattr extension via PECL:
sudo pecl install xattr
Enable the extension:
extension=xattr.so
Note: Depending on your setup, php.ini might be located in different places. Common locations include /etc/php/{PHP_VERSION}/apache2/php.ini for Apache or /etc/php/{PHP_VERSION}/cli/php.ini for command-line PHP. Replace {PHP_VERSION} with your PHP version (e.g., 7.4, 8.0, etc.).
Restart PHP-FPM/Apache:
sudo systemctl restart apache2
or
sudo systemctl restart php7.4-fpm