Machine
- Disque : 30G
- RAM : 4G
- vCPU : 2
1. Installation Ubuntu Serveur LTS
Ne pas faire d’update
Clavier « Français »
Partie Réseau (A redéfinir pour une IP Statique)
Pas de Proxy
Dépôts des Paquets Linux (Default Value)
Mode Disque => Entier (A redéfinir pour un montage en LVM)
Choix disque Install /boot
Inventaire Slice avant Installation
Compte de Profil
Activer SSH server
Aucun service à sélectionner
Laisser faire l’installation + Update Security package
Connexion au serveur via SSH (Putty, mobaXterm,etc..)
2. Installation middleware
sysbreak@akeneo:~$ sudo apt update && sudo apt upgrade sysbreak@akeneo:~$ sudo apt install nmap wget curl iotop htop
3. Supprimer ipv6
sysbreak@akeneo:~$sudo vi /etc/sysctl.conf net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1
Sur Ubuntu il est possible de désactiver IPV6 via /etc/netplan ou /etc/cloud/
sysbreak@akeneo:~$ sudo sysctl -p
4.Installation Mysql 8
sysbreak@akeneo:~$ sudo apt-get install lsb-release apt-transport-https ca-certificates wget gnupg sysbreak@akeneo:~$ wget -O mysql-apt-config.deb https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb sysbreak@akeneo:~$ sudo dpkg -i mysql-apt-config.deb
sysbreak@akeneo:~$ sudo apt update && sudo apt-get install mysql-server
Mot de passe root (2 fois)
« Use Leacy … »
Attention Akeneo ne supporte pas « Use Strong Password Encryption »
sysbreak@akeneo:~$ sudo systemctl enable mysqld
5. Installation PHP 7.3
sysbreak@akeneo:~$ sudo apt-get install software-properties-common sysbreak@akeneo:~$ sudo add-apt-repository ppa:ondrej/php sysbreak@akeneo:~$ sudo apt update && sudo apt upgrade sysbreak@akeneo:~$ sudo apt-get install php7.3-cli php7.3-apcu php7.3-bcmath php7.3-curl php7.3-fpm php7.3-gd php7.3-intl php7.3-mysql php7.3-xml php7.3-zip php7.3-zip php7.3-mbstring php7.3-imagick php7.3-exif
6. Installation ElasticSearch 7.5
sysbreak@akeneo:~$ sudo apt-get install apt-transport-https sysbreak@akeneo:~$ sudo wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - sysbreak@akeneo:~$ sudo echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list sysbreak@akeneo:~$ sudo apt update && sudo apt-get install elasticsearch sysbreak@akeneo:~$ sudo systemctl enable elasticsearch && sudo systemctl start elasticsearch sysbreak@akeneo:~$ sudo sysctl -w vm.max_map_count=262144 sysbreak@akeneo:~$ sudo echo "vm.max_map_count=262144" | sudo tee /etc/sysctl.d/elasticsearch.conf sysbreak@akeneo:~$ sudo service elasticsearch restart
7 .Installation Apache
sysbreak@akeneo:~$ sudo apt-get install apache2 sysbreak@akeneo:~$ sudo a2enmod rewrite proxy_fcgi sysbreak@akeneo:~$ sudo systemctl enable apache2 && sudo systemctl start apache2
sysbreak@akeneo:~$ sudo systemctl enable apache2
8. Configuration Utilisateur Akeneo MySQL
sysbreak@akeneo:~$ sudo mysql -u root -p Enter password: « Mot de passe root » mysql> CREATE DATABASE akeneo_pim; Query OK, 1 row affected (0.03 sec) mysql> CREATE USER akeneo_pim@localhost IDENTIFIED WITH mysql_native_password BY 'akeneo_pim'; Query OK, 0 rows affected (0.01 sec) mysql> GRANT ALL PRIVILEGES ON akeneo_pim.* TO akeneo_pim@localhost; Query OK, 0 rows affected (0.00 sec) mysql> EXIT Bye
Ce compte sera à écrire dans le fichier .env de l’application Web Akeneo
9. Configuration PHP pour Akeneo
sysbreak@akeneo:~$ sudo vi /etc/php/7.3/cli/php.ini (Si on l’utilise via Apache) memory_limit = 512M file_uploads = On allow_url_fopen = On upload_max_filesize = 100M max_execution_time = 30 max_input_vars = 1500 date.timezone = Europe/Paris
sysbreak@akeneo:~$ sudo vi /etc/php/7.3/fpm/php.ini (Utilisé dans la conf actuelle de Akeneo) memory_limit = 512M file_uploads = On allow_url_fopen = On upload_max_filesize = 100M max_execution_time = 30 max_input_vars = 1500 date.timezone = Europe/Paris
sysbreak@akeneo:~$ sudo service php7.3-fpm stop
10.Lancer Akeneo avec User Akeneo (ici sysbreak)
Petit conseil, il faudra créer un user spécifique akeneo pour lancer le service , pour me faciliter la vie je le lance via mon compte crée au début de l’installation d’Ubuntu.
sysbreak@akeneo:~$ id uid=1000(sysbreak) gid=1000(sysbreak) groups=1000(sysbreak),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lxd)
sysbreak@akeneo:~$ sudo vi /etc/php/7.3/fpm/pool.d/www.conf ;user = www-data ;group = www-data user = sysbreak group = sysbreak listen = /run/php/php7.3-fpm.sock listen.owner = www-data listen.group = www-data sysbreak@akeneo:~$ sudo service php7.3-fpm start
11.Installation Akeneo Web Application
sysbreak@akeneo:/var/www/html/akeneo$ wget https://download.akeneo.com/pim-community-standard-v4.0-latest-icecat.tar.gz sysbreak@akeneo:~$ sudo mkdir /var/www/html/akeneo sysbreak@akeneo:~$ sudo tar -xzvf pim-community-standard-v4.0-latest-icecat.tar.gz -C /var/www/html/akeneo/ sysbreak@akeneo:~$ cd /var/www/html/akeneo/pim-community-standard/
12. Initialisation Composer et APCU
Install acpu Objet
sysbreak@akeneo:~$ rm /etc/php/7.4/cli/conf.d/25-apcu_bc.ini sysbreak@akeneo:~$ sudo apt install curl php-cli php-mbstring git unzip sysbreak@akeneo:~$ sudo apt install php-pear sysbreak@akeneo:~$ sudo apt-get install php-pear pkg-config libbson-1.0 libmongoc-1.0-0 php-xml php7.3-xml php-dev sysbreak@akeneo:~$ sudo pecl install apcu sysbreak@akeneo:~$ echo "extension = apcu.so" | sudo tee -a /etc/php/7.3/mods-available/apcu.ini sysbreak@akeneo:~$ sudo ln -s /etc/php/7.3/mods-available/apcu.ini /etc/php/7.3/fpm/conf.d/30-apcu.ini sysbreak@akeneo:~$ sudo ln -s /etc/php/7.3/mods-available/apcu.ini /etc/php/7.3/cli/conf.d/30-apcu.ini sysbreak@akeneo:~$ sudo service php7.3-fpm start sysbreak@akeneo:~$ sudo mkdir -p /etc/apache2/conf.d/ sysbreak@akeneo:~$ sudo ln -s /etc/php/7.3/mods-available/apcu.ini /etc/apache2/conf.d/30-apcu.ini sysbreak@akeneo:~$ sudo service apache2 reload
13. Install composer
sysbreak@akeneo:~$ sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" sysbreak@akeneo:~$ HASH="$(wget -q -O - https://composer.github.io/installer.sig)" sysbreak@akeneo:~$ sudo php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" sysbreak@akeneo:~$ sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
14. Initialisation Akeneo
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo apt remove php7.4* sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo php -d memory_limit=4G /usr/local/bin/composer create-project --prefer-dist akeneo/pim-community-standard /srv/pim 4.0.*@stable
Laisser charger les Paquets et dépendances
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo php bin/console cache:clear --no-warmup --env=prod
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo php bin/console pim:installer:assets --symlink --clean --env=prod
15. Configurer Apache => Akeneo
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo chown -R www-data:www-data /var/www/html/akeneo/ sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo chmod -R 755 /var/www/html/akeneo/ sysbreak@akeneo:~$ cd /etc/apache2/sites-available/
sysbreak@akeneo:/etc/apache2/sites-available$ sudo vi akeneo-pim.local.conf <VirtualHost *:80> ServerName akeneo.house.cpb DocumentRoot /var/www/html/akeneo/pim-community-standard/public <Directory /var/www/html/akeneo/pim-community-standard/public> AllowOverride None Require all granted Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] </Directory> <Directory /var/www/html/a keneo/pim-community-standard/public/bundles> RewriteEngine Off </Directory> <FilesMatch \.php$> SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost/" </FilesMatch> SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 ErrorLog ${APACHE_LOG_DIR}/akeneo-pim_error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/akeneo-pim_access.log combined </VirtualHost>
sysbreak@akeneo:/etc/apache2/sites-available$ sudo apache2ctl configtest sysbreak@akeneo:/etc/apache2/sites-available$ sudo a2ensite akeneo-pim.local sysbreak@akeneo:/etc/apache2/sites-available$ sudo service apache2 reload
16. Installation Node et yarn
sysbreak@akeneo:~$ sudo apt-get install curl sysbreak@akeneo:~$ curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh sysbreak@akeneo:~$ sudo bash nodesource_setup.sh sysbreak@akeneo:~$ sudo curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - sysbreak@akeneo:~$ sudo echo "deb https://dl.yarnpkg.com/debian/ stable main" |sudo tee /etc/apt/sources.list.d/yarn.list sysbreak@akeneo:~$ sudo apt update && sudo apt-get install yarn
17 .Akeneo Web Application => Mysql
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo vi .env APP_ENV=prod APP_DEBUG=0 APP_DATABASE_HOST=localhost APP_DATABASE_PORT=null APP_DATABASE_NAME=akeneo_pim APP_DATABASE_USER=akeneo_pim APP_DATABASE_PASSWORD=akeneo_pim APP_DEFAULT_LOCALE=fr APP_SECRET=ThisTokenIsNotSoSecretChangeIt APP_INDEX_HOSTS=localhost:9200 APP_PRODUCT_AND_PRODUCT_MODEL_INDEX_NAME=akeneo_pim_product_and_product_model MAILER_URL=null://localhost AKENEO_PIM_URL=http://localhost:8080
18. Lancement en Mode PROD Akeneo
sysbreak@akeneo:~$ cd /var/www/html/akeneo/pim-community-standard
Pour lancer La version DEV => NO_DOCKER=true make dev
La version de DEV possède de nombreux exemples avec images.
Ici on lance la version de PROD
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo NO_DOCKER=true make prod
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo chown -R www-data:www-data /var/www/html/akeneo/ sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo chmod -R 755 /var/www/html/akeneo/ sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo systemctl reload apache2 sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ sudo service php7.3-fpm restart
19. Inscription Host Machine
sysbreak@akeneo:/etc/apache2/sites-available$ sudo vi /etc/hosts akeneo akeneo.house.cpb
20. Création User Superadmin et admin pour Akeneo
sysbreak@akeneo:/home/sysbreak# cd /var/www/html/akeneo/pim-community-standard
Compte Superadmin
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ bin/console pim:user:create uperadmin admin chris@en-images.info Super Admin en_US --admin -n --env=prod
- Login : superadmin
- Pass : admin
Compte Admin
sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard$ bin/console pim:user:create admin admin christian.pernotbrouard@ratp.fr Super Admin fr_FR --admin -n --env=prod
21. Correction des BUGS d’installation
- Login : admin
- Pass : admin
BUG d’accès site
Changement des Droits sur le répertoire var de pim-community
sysbreak@akeneo:/home/sysbreak# cd /var/www/html/akeneo/pim-community-standard sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard# chmod -R 777 var
Simulation DNS Local pour la résolution hostname/domaine sur ta machine
Editer le fichier de ton PC local => C:\Windows\System32\drivers\etc\hosts (mode Administrateur)
Ajouter ton nom d’host
Dans Firefox/Chrome (pas IE)
BUG d’affichage des images
sysbreak@akeneo$:cd /var/www/akeneo/pim-community-standard/public sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard/public$ sudo mkdir -p media sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard/public$ cd media sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard/public/media$ sudo ln -s /var/www/html/akeneo/pim-community-standard/var/file_storage/catalog show sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard/public/media$ sudo mkdir -p cache/thumbnail_small sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard/public/media$ sudo chmod -R 777 * (Pour la démo) sysbreak@akeneo:/var/www/html/akeneo/pim-community-standard/public/media$ sudo chown -R www-data:www-data *
Views: 17