Deprecated. Please use https://github.com/cscart/docker.
These Ansible playbooks will configure the web server for CS-Cart or Multi-Vendor automatically. It will only take a few commands and adjustments to the configuration file.
The playbooks were developed for clean OS installations.
CentOS 6 - no longer supported
sudo yum -y install epel-release
sudo yum install -y gcc git openssl-devel libffi-devel libselinux-python python-crypto python-jinja2 python-paramiko sshpass python-six PyYAML
sudo rpm -ihv https://releases.ansible.com/ansible/rpm/release/epel-6-x86_64/ansible-2.4.6.0-1.el6.ans.noarch.rpm
CentOS 7
sudo yum -y install epel-release
sudo yum install -y gcc git openssl-devel libffi-devel libselinux-python python-crypto python-jinja2 python-paramiko sshpass PyYAML python-setuptools
sudo rpm -ihv https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.4.6.0-1.el7.ans.noarch.rpm
Ubuntu 14.04 - no longer supported
sudo add-apt-repository -y ppa:ansible/ansible-2.4
sudo apt-get -y update
sudo apt-get -y install git python-dev libffi-dev python-markupsafe libssl-dev
sudo apt-get -y install ansible
Ubuntu 16.04 - no longer supported
sudo add-apt-repository -y ppa:ansible/ansible-2.4
sudo apt-get -y update
sudo apt-get -y install git python-dev libffi-dev python-markupsafe libssl-dev
sudo apt-get -y install ansible
Ubuntu 18.04
sudo apt update
sudo apt install ansible
-
Clone the repository:
mkdir ~/playbooks && git clone https://github.com/cscart/server-ansible-playbooks ~/playbooks
-
Create main.json:
cp ~/playbooks/config/advanced.json ~/playbooks/config/main.json
-
Edit ~/playbooks/config/main.json:
stores_dir
- your project directorystores
- an array of projectsexample.com
- the domain name of a projectstorefronts
- an array with the domain names of the storefronts. If there are no storefronts, leave the array empty. For example:"storefronts": []
database
- the credentials of the database that will be created by the playbook. DON'T setroot
as a user here, or elseroot
won't be able to access or create any other databases.
Run one of the playbooks by using a command below. If there are no errors, you can install CS-Cart or Multi-Vendor after that.
-
lemp7.yml: nginx + mysql + php7.1.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_php7 lemp7.yml
-
lemp73.yml: nginx + mysql + php7.3.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_php73 lemp73.yml
-
lemp74.yml: nginx + mysql + php7.4.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_php74 lemp74.yml
-
lvemp7.yml: varnish + nginx + mysql + php7.1.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_varnish lvemp7.yml
-
lvemp73.yml: varnish + nginx + mysql + php7.3.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_varnish73 lvemp73.yml
-
lvemp74.yml: varnish + nginx + mysql + php7.4.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_varnish74 lvemp74.yml
Не поддерживается. Используйте https://github.com/cscart/docker.
Эти плейбуки для Ansible автоматически настроят веб-сервер для CS-Cart или Multi-Vendor. От вас потребуется выполнить несколько команд и указать настройки в одном файле.
Плейбуки работают стабильно только на чистых инсталляциях операционных систем.
CentOS 6 - больше не поддерживается
sudo yum -y install epel-release
sudo yum install -y gcc git openssl-devel libffi-devel libselinux-python python-crypto python-jinja2 python-paramiko sshpass python-six PyYAML
sudo rpm -ihv https://releases.ansible.com/ansible/rpm/release/epel-6-x86_64/ansible-2.4.6.0-1.el6.ans.noarch.rpm
CentOS 7
sudo yum -y install epel-release
sudo yum install -y gcc git openssl-devel libffi-devel libselinux-python python-crypto python-jinja2 python-paramiko sshpass PyYAML python-setuptools
sudo rpm -ihv https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.4.6.0-1.el7.ans.noarch.rpm
Ubuntu 14.04 - больше не поддерживается
sudo add-apt-repository -y ppa:ansible/ansible-2.4
sudo apt-get -y update
sudo apt-get -y install git python-dev libffi-dev python-markupsafe libssl-dev
sudo apt-get -y install ansible
Ubuntu 16.04 - больше не поддерживается
sudo add-apt-repository -y ppa:ansible/ansible-2.4
sudo apt-get -y update
sudo apt-get -y install git python-dev libffi-dev python-markupsafe libssl-dev
sudo apt-get -y install ansible
Ubuntu 18.04
sudo apt update
sudo apt install ansible
-
Скачиваем репозиторий.
mkdir ~/playbooks && git clone https://github.com/cscart/server-ansible-playbooks ~/playbooks
-
Создаем main.json:
cp ~/playbooks/config/advanced.json ~/playbooks/config/main.json
-
Вносим правки в ~/playbooks/config/main.json:
stores_dir
- директория проектовstores
- массив проектовexample.com
- доменное имя проектаstorefronts
- массив доменных имен витрин; если таких не имеется, оставьик поле пустым. Пример:"storefronts": []
database
- параметры подключения к БД, которую создаст плейбук. НЕЛЬЗЯ указывать пользователяroot
; если укажете, тоroot
сможет пользоваться только базой, созданной плейбуком, и не сможет создавать новые БД.
Запустите один из плейбуков с помощью соответствующей команды. Если процесс пройдет успешно, то можно будет устанавливать CS-Cart или Multi-Vendor.
-
lemp7.yml: nginx + mysql + php7.1.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_php7 lemp7.yml
-
lemp73.yml: nginx + mysql + php7.3.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_php73 lemp73.yml
-
lemp74.yml: nginx + mysql + php7.4.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_php74 lemp74.yml
-
lvemp7.yml: varnish + nginx + mysql + php7.1.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_varnish lvemp7.yml
-
lvemp73.yml: varnish + nginx + mysql + php7.3.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_varnish73 lvemp73.yml
-
lvemp74.yml: varnish + nginx + mysql + php7.4.
cd ~/playbooks/ && ansible-playbook -e @config/main.json -c local -i inventory_varnish74 lvemp74.yml