…thanks for the feedback of mindscreen Munich and all the others! I tested multiple approaches, ending up with this guide:
NEOS INSTALLATION GUIDE for multiple NEOS 4 instances on one server
Alternative ways for Host + SSH Installation:
1a. apt, apt-get or aptitude installation for NEOS CMS is not available, yet.
1b. Try using composer: curl -s https://getcomposer.org/installer | php -> php /path/to/composer.phar create-project --no-dev neos/neos-base-distribution . -> ./flow server:run -> http://127.0.0.1:8081/setup
1c. Try using DOCKER based on virtualbox (can be installed by docker!) as a virtual environment on linux, windows or macOS: www.docker.com. https://www.youtube.com/watch?v=1L739qK2sJY. It is great, elegant, convenient. You can have as many NEOS instances with docker as you want to. And you can move your NEOS container including elasticsearch to any other server easily. I NEOS alls persistant project information is stored in the database, so you better place it in a separate and persistent docker container communicating via internal or external IP. Is the complete NEOS 4 server already available as a docker image via docker hub?
1d. If you have special requirements or have problems with you machine you can take the hard way and configure your server for multiple NEOS instances as follows on Ubuntu:
Specify Server
min. 512MB RAM + 5GB SSD for static webpages on Ubuntu + FLOW + NEOS
1-4 processors cores
Ubuntu 16 (or 14) - start naked
PHP 7.1 requirement
MySQL 5.7.x or MariaDB 10.2.x or other databases
-> Elasticssearch etc. requires more especially for the import of large databases and caches. In some cases (e.g. imports) it can be massive!
-> desktop wastes cpu
=> Super-user ‘sudo’ password required
Server update
- lsb_release -a # version check of Ubuntu distribution
- sudo apt-get do-release-upgrade # e.g. from 14 LTS to 16 LTS (consider reinstallation!)
- sudo apt-get dist-upgrade # enhanced upgrade adding + removing of packets
- sudo apt-get update # read your system updates each month!
- sudo apt-get upgrade # apply your system updates each month!
- sudo apt-get autoclean # clean your system each month!
Server installation
Use copy+paste of commands from this Guide!
- sudo apt-get install openssh-server # use ssh access to server for copy+paste commands
- sudo service ssh restart # Use e.g. KiTTY for remote access via ssh -> using copy+paste!
- ssh to server IP # Login as normal user!
- sudo apt-get install curl apache2 libapache2-mod-php7.1 php7.1 php7.1-xml php7.1-mysql php7.1-gd graphicsmagick imagick mysql-server php-mbstring composer zip unzip php-pclzip
- sudo a2enmod rewrite
- sudo nano /etc/php/7.1/apache2/php.ini # check php settings. If you experience problems look at php error log and data logs exception
Remove old directories - if necessary
- sudo rm -rf directory-name # remove recursively + forced! Only if cleanup is necessary
Install new instance(s) of FLOW+NEOS
- cd /var/www/ # go to web-root folder
- sudo -R chown www-data:www-data /var/www/html # set folder user to apache2
- sudo chmod 777 /var/www/html # enable writing
- cd /var/www/html/ # go to web-pages-root folder
- composer create-project neos/neos-base-distribution neos1 # create neos1…neos[N] projects in folder neos[1…N]
- cd /var/www/html/neos1 # or neos[2…N]
- sudo chown -R www-data:www-data neos1 # set folder neos1 + subfolders + files to user apache2
- sudo ./flow core:setfilepermissions [user] www-data www-data# automatically changing file permissions from your user to apache2 user
- sudo nano var/www/html/Neos/Data/SetupPassword.txt # change Neos-PWD from “generated PWD ? new PWD”
- ./flow server:run # start NEOS server
- lynx 127.0.0.1/setup or user normal browser # browse the application on the server internally
Update each NEOS instance
- /var/www/html/neos1/composer update # Update NEOS instances [1…N] each month!
Configure Network
-
If VirtualBox causes problems accessing from host to virtual machine -> try vm_ware workstation player instead
-
ifconfig -a # view all network adapters of the server; not reliable!
-
lspci # view all pci interfaces
-
lsusb # view all usb interfaces
-
sudo nano /etc/network/interfaces # sample IP configuration for 3 IP addresses on one server
- Remember: IP address from host of virtual machine will also remain!!!
- This file describes the network interfaces available on your system and how to activate them. For more information, see interfaces(5).
- source /etc/network/interfaces.d/* # deactivate NetworkManager
Primary network interface
# auto ens33 # until Ubuntu 14 called eth(0) instead of ens33
# iface ens33 inet static # do not set for virtual machines
# address 192.168.1.2 # because it will automatically be host IP!!!
# netmask 255.255.255.0
# network 192.168.1.1
# broadcast 192.168.1.255
# gateway 192.168.1.1
# auto ens33:1
iface ens33:1 inet static # set static IP address for 1. virtual network adapter
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.1
# auto ens33:2
iface ens33:2 inet static # set static IP address for 2. virtual network adapter
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.1
# auto ens33:3
iface ens33:3 inet static # set static IP address for 3. virtual network adapter
address 192.168.1.4
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.1
# This is an autoconfigured IPv6 interface
# iface ens33 inet6 auto
# The loopback network interface
auto lo
iface lo inet loopback
-
sudo /etc/init.d/networking restart # restart to activate network settings
-
sudo ip address add 192.168.1.3 dev ens33 # add more IP addresses to server; better use /etc/network/interfaces
-
ping localhost or ping 127.0.0.1 # check internal network connection
-
ping 192.168.1.2 or 3 or 4 # check external network connections
-
ping neos.demo1 or 2 or 3 # check external network connections
Configure Apache Server
Sample configuration of 3 virtual apache2 webservers
-
sudo nano /etc/apache2/sites-enabled/000-default.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerName neos.demo1
DocumentRoot "/var/www/html/neos1/Web"
SetEnv FLOW_CONTEXT Production # enable for production context
<VirtualHost *:80>
ServerName neos.demo2
DocumentRoot "/var/www/html/neos2/Web/"
SetEnv FLOW_CONTEXT Production # enable for production context
<VirtualHost *:80>
ServerName neos.demo3
DocumentRoot "/var/www/html/neos3/Web/"
SetEnv FLOW_CONTEXT Production # enable for production context
<Directory /var/www/html/neos1>
AllowOverride All # allow access to .htaccess
<Directory /var/www/html/neos2>
AllowOverride All # allow access to .htaccess
Connect server name to IP address
-
sudo nano /etc/hosts # connect name + IP addresses in ServerName directive globally
127.0.0.1 localhost # internal. keep it
127.0.1.1 ubuntu # internal. keep it
127.0.0.2 neos.demo1 # internal
127.0.0.3 neos.demo2 # internal
127.0.0.4 neos.demo3 # internal
192.168.1.2 neos.demo1 # external
192.168.1.3 neos.demo2 # external
192.168.1.4 neos.demo3 # external
-
sudo service apache2 restart # restart apache2 + apply new configuration
-
curl -I neos.demo1 # check virtual host configuration
Connect Database(s):
-
./flow doctrine:migrate # if error messsage go to next step
-
./flow site:import --package-key TYPO3.NeosDemoTypo3Org
-
sudo nano /etc/mysql/my.cnf # config mysql or mariadb - only if necessary
-
sudo mysql -u root -p # login to database, enter pwd
-
mysql> select * from mysql.user; # check if user neos is available
-
CREATE USER ‘neos1’@‘localhost’ IDENTIFIED BY ‘Password’;
-
SET PASSWORD FOR ‘neos1’@‘localhost’ = ‘password’;
-
GRANT ALL ON . TO ‘neos1’@‘localhost’;
Log into NEOS
-
browse 192.168.8.2
-
browser 192.168.8.2/setup
-
browser 192.168.8.2/setup/login
-
nano /var/www/html/neos1/Data/SetupPassword.txt # find initial setup password here (YfGXluz8)
-
Login with user: neos1, pwd: vom SetupPassword.txt
-
flow.dummy # Create a new site package with a dummy site
HowTo - start NEOS Project: https://media.readthedocs.org/pdf/neos/stable/neos.pdf
Migrate Project
cd /var/www/html/neos1/
./flow doctrine:migrate
If you have ideas on correcting errors and improvements, I am looking forward to you feedback. Perhaps, we can condense the information in a wiki later.
Now, I will try using docker and give you my feedback later!