COMPLETE NEWBIES GUIDE: install NEOS CMS on Linux Ubuntu


(Ekkehard Finkeissen) #1

Hi folks,

I know, there is a lot of information on how to install NEOS. However, it has been a pain for me to collect all of the details! I did not want to read hundreds of suggestions and error messages spread over dozens of webpages. But I had to and it took me one day. I just wanted to install NEOS as quickly as possible. But there was no quick guide.

So, I share with you my installation sequence and hope to get some feedback. Perhaps, it can be used to create HowTo-pages for various types of servers, soon.

Later, someone can create a script for automated installation and add it to apt-get. In addition someone could provide ready-to-use virtual machines for download. I guess, this would enlarge the community by a factor of 10 or more.

Cheers!

Ekki


(Ekkehard Finkeissen) #2

Here is how I did it:

  1. Minimal Ubuntu-Server (>500MB RAM, > 4GB HD, Ubuntu 14.04.5 LTS Trusty, naked, if possible no desktop! Super-user sudo password required)
  2. sudo apt-get install openssh-server
  3. sudo service ssh restart
  4. Use e.g. KiTTY for remote access via ssh. Like that you can copy+paste commands from this guide.
  5. sudo apt-get update
  6. sudo apt-get install apache2 libapache2-mod-php7.0 php7.0 php7.0-xml php7.0-mysql php7.0-gd graphicsmagick imagick mysql-server php-mbstring composer zip unzip php-pclzip
  7. sudo apt-get update
  8. sudo apt-get upgrade
  9. cd var/www/html/Neos/
  10. composer update
  11. cd /var/www
  12. sudo chown user:user html
  13. sudo chmod 777 html
  14. cd www
  15. composer create-project neos/neos-base-distribution Neos
  16. composer update
  17. sudo ./flow core:setfilepermissions user www-data www-data
  18. ./flow server:run
  19. sudo ufw allow 8081
  20. cd /var/www
  21. sudo chown root:root html
  22. sudo a2enmod rewrite
  23. sudo nano /etc/apache2/apache2.conf
  24. Apache Virtual Hosts: /etc/apache2/sites-enabled/000-default.conf → 8081
  25. /etc/apache2/ports.conf → 8081
  26. sudo service apache2 restart
  27. Change Neos-PWD in var/www/html/Neos/Data/SetupPassword.txt
  28. Generated PWD → new PWD
  29. lynx 127.0.0.1/setup
  30. ??? mysql: CREATE USER ‘benutzer’@‘localhost’ IDENTIFIED BY ‘passwort’;
  31. ./flow doctrine:migrate
  32. sudo apt-get autoclean
  33. sudo apt-get autoremove

The database setup does not work, yet. Apache config does not work, yet. Can someone add these parts? What else is missing and can be added? Perhaps, we should put these commands in a table and add comments to each line.

Can someone create a new topics “COMPLETE IDIOTS’S GUIDE …” for other machines? Up to now it’s really hard for newcomers… .


(Daniel Lienert) #3

Hey Ekki,

seems you really try it the hard way and it seems there are a lot more steps missing till you see your Neos running. If you just want to evaluate Neos, the effort and the needed knowledge to set up your own server from scratch is too much if you are not familiar with it.

And there are ready-to-use solutions out there. If you don’t mind that it is not ubuntu, you could use the punkt.de proserver box (https://github.com/punktDe/proserver-neos-box) which has all the software needed to run Neos in their latest versions set up and configured and the latest Neos already installed. And I wrote a blog post which describes the setup in detail: https://punkt.de/en/blog/neos-workshop/neos-tutorial-part-1-setup-a-neos-development-environment-easily.html

Or if you like to use docker you can try @hhoechtls https://github.com/webdevops/Neos-docker-boilerplate.

I hope that helps.

Daniel


(Ekkehard Finkeissen) #4

Hey Daniel,

thanks for you reply. But why is there no listing like:

  1. Out-of the-box-solutions (vm-ware, virtualbox, etc.)
  2. Ubuntu Auto-Installer, etc.
  3. Detailed installation guide for linux, windows, mac, etc.
  4. Pre-installed server hostings

Can someone set up such a webpage providing this kind of overview? Is the NEOS-team not interested in easy access for all users? Or is it part of the model that only the NEOS-team is actually able to install the server? I am sorry, but comments like “there are a lot more steps missing…” do not help. What are the steps? Can you provide an overview?

Thanks

Ekki


(Rene Woerz) #5

I am sure that the neos team is very interested to improve the docs but such listings were simply not written yet. If you want to help to improve the docs, feel free to create an github issue and maybe someone will add the missing parts to the docs. no offence.


(Karsten Dambekalns) #6

Of course the team is interested in having Neos usable. But to be honest, it simply is required knowledge how to set up a basic PHP project with the webserver of your choice. We simply cannot provide instructions for everything from OS install to Apache configuration. Plus, all that is covered by literally hundreds of tutorials on the web way better than we could do (and maintain) it.

You will get frustrated very soon, if you really want to use Neos (or any other software of that kind) in a production setting without deeper knowledge.

It’s a bit like expecting the owner’s manual of a new car to teach you how to drive as well.

Disclaimer: no offense intended!


(Christoph Köppel) #7

Recently someone twittered this link:

Personally I appreciated very much the detailed and exhausting documentation of the FlowFramework.
Thanks to Neos/Flow, I learned to set up a Linux system with Apache, dB, php …
But frankly, I never thought that this learning/experience process should be covered by the Neos ecosystem-documentation.

As Neos development was very dynamic during past few years, - Neos overview documentation will be consolidated one day, - I’m quite confident.

Nevertheless, I’m rather convinced that writing good documentation is not trivial and needs quite some resources …

Describing frustrating experience can help to improve or find documentation approaches too … thanks for sharing !
:smiley:

Christoph


(Ekkehard Finkeissen) #8

“It is toooooooo complicated” is not the best answer! So, my suggestions:

  1. Establish a large link on the top of the very front page of NEOS.io on “How to install NEOS”
  2. Establish links to several wikis: “17 ways to install NEOS” -> 1. For … via git-hub, 2. For Linux Ubuntu Server via apt-get, 3. For Linux Server from scratch, 4. For Windows Server, 5. For Mac Server, 6. For a server using VM-War, 7. For a server using virtualbox, 8. For 1und1 virtual server, 9. For…
  3. Set up each wikis - without contents.
  4. Later add more guides by pre-structuring the entry points. Top-down! discuss.neos.io it already a big … mess for newcomers. So, please help us navigating: 1. 8 steps to set up you first project, 2. 7 steps to add …, 3. 9 steps to add …, 4. …
  5. Let the community work it out! Like that we all get in touch.

Get the process started! Now! Don’t try to control everything. Within one week we should have various guides - evolving in time. Like this the NEOS community will grow much faster…NEOS is so amazing! Why frustrate us?


(Rene Woerz) #9

There is a main-navigation link titled “Docs & Support” on the website. For me as developer the first click is always the documentation if i want to install a product. You HAVE TO look into the documentation or follow the upgrade instructions on the website. Thats the normal way, isn’t it?The docs should explain how to set up neos, the product . Not how to set up third party software for neos.

I think that people who like to share “how to’s”, will publish such things on blogs, other tutorial websites or maybe on a extern wiki. But not official because of maintain.


(Ekkehard Finkeissen) #10

…I know, I know. A lot of excuses and reasons not do it. Do you want to have many installations? Do you want many users to succeed?

If you want to, put the installations page into “Docs & Support”. All right. Still, one step missing on you server installation and your NEOS will never work. Sometimes it takes hours to find the problem. Many newcomers will certainly face 3-10 such problems during installation. Just frustrating!

Why? Because the few experts do not spend little time and share the basics…


(David Sporer) #11

IMHO that’s just a bit harsh and I’m not part of the Neos core team.
The Installation part of the documentation states the prerequisites to run Neos cristal clear and if you follow the instructions afterwards the setup works just like described: https://neos.readthedocs.io/en/stable/GettingStarted/Installation.html

I agree that the documentation in general can be improved but it’s not the case that the documentation is not clear enough about what to do. Even if you look at the Wordpress installation documentation which is, by a lot of people, seen as one of the easiest CMS installations there are prerequisites that you have to meet before installing it. They also don’t tell you how to set up your webserver but just stating that you have a working one with a number of prerequisites.
In comparison to Wordpress Neos is more complex which is the reason why it’s not enough to just copy a zip file on a webserver and you’re good to go.
So if you want to get involved and write such guides, I’m sure there are a lot of people in the Neos community that are willing to help


(Ekkehard Finkeissen) #12

ok. I just do not understand the discussion about “why”. Instead we should talk about “how”…


(Bastian Waidelich) #13

Hi Ekkehard,

All the Neos documentation is on Github and contributions are more then welcome.
Feel free to create a Pull Request with additions to https://github.com/neos/neos-development-collection/blob/master/Neos.Neos/Documentation/GettingStarted/Installation.rst (if you fork the repository you can even change the documentation inline in the browser - just like a wiki).
And let us know if you need help with that.

And a personal matter: Please watch your tone. We are proud of the great atmosphere in our community and at least to me your comments sound quite harsh. We’re all on the same track, we all want to improve Neos. And we spend endless hours doing so. If things are unclear or missing it doesn’t mean that we don’t care.


(Ekkehard Finkeissen) #14

I completely understand. You are investing huge efforts. I am watching NEOS for more than 2 years now. And I think you are doing a really great job!!! That is absolutetly unique.

I have my personal projects going on and want to use a next generation CMS for publication. In my eyes there is only one choice: NEOS. So I ask myself: How much effort do I have to invest to get my webpages up and running. I already invested several days to find answers to my questions. Still not answered.

I think, with a few hours invested in refining the NEOS documentation and supporting the installation process, everybody can do it. I am convinced, the impact will be massive.

If the goal of NEOS is to make CMS possible without programming, the entry point is crucial. I think, with 3-10 newcomers + one expert watching their mistakes, this task can easily be achieved - resulting in some extenstions of the documentation. May I apply as one of the newcomers? :wink:

Later, while using NEOS, I will have ideas on how to extend my sites with special features and at some point will need experts’ professional support. But if I get stuck in the very beginning, I will have to outsource the whole CMS project right from the start - making NEOS unpredictable from my perspective.

I hope, you can use my frank remarks. If one of the experts is interested, I can share my ideas - perhaps in a separate, personal discussion.


(Karsten Dambekalns) #15

Sounds like a good idea. But…

These are things I would always answer with a pointer to the documentation of Apache, MySQL, …

But, let’s start with a list of clear questions/problems you have. Ok?


(Ekkehard Finkeissen) #16

…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

  1. lsb_release -a # version check of Ubuntu distribution
  2. sudo apt-get do-release-upgrade # e.g. from 14 LTS to 16 LTS (consider reinstallation!)
  3. sudo apt-get dist-upgrade # enhanced upgrade adding + removing of packets
  4. sudo apt-get update # read your system updates each month!
  5. sudo apt-get upgrade # apply your system updates each month!
  6. sudo apt-get autoclean # clean your system each month!

Server installation

Use copy+paste of commands from this Guide!

  1. sudo apt-get install openssh-server # use ssh access to server for copy+paste commands
  2. sudo service ssh restart # Use e.g. KiTTY for remote access via ssh -> using copy+paste!
  3. ssh to server IP # Login as normal user!
  4. 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
  5. sudo a2enmod rewrite
  6. 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

  1. sudo rm -rf directory-name # remove recursively + forced! Only if cleanup is necessary

Install new instance(s) of FLOW+NEOS

  1. cd /var/www/ # go to web-root folder
  2. sudo -R chown www-data:www-data /var/www/html # set folder user to apache2
  3. sudo chmod 777 /var/www/html # enable writing
  4. cd /var/www/html/ # go to web-pages-root folder
  5. composer create-project neos/neos-base-distribution neos1 # create neos1…neos[N] projects in folder neos[1…N]
  6. cd /var/www/html/neos1 # or neos[2…N]
  7. sudo chown -R www-data:www-data neos1 # set folder neos1 + subfolders + files to user apache2
  8. sudo ./flow core:setfilepermissions [user] www-data www-data# automatically changing file permissions from your user to apache2 user
  9. sudo nano var/www/html/Neos/Data/SetupPassword.txt # change Neos-PWD from “generated PWD ? new PWD”
  10. ./flow server:run # start NEOS server
  11. lynx 127.0.0.1/setup or user normal browser # browse the application on the server internally

Update each NEOS instance

  1. /var/www/html/neos1/composer update # Update NEOS instances [1…N] each month!

Configure Network

  1. If VirtualBox causes problems accessing from host to virtual machine -> try vm_ware workstation player instead

  2. ifconfig -a # view all network adapters of the server; not reliable!

  3. lspci # view all pci interfaces

  4. lsusb # view all usb interfaces

  5. 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
  1. sudo /etc/init.d/networking restart # restart to activate network settings

  2. sudo ip address add 192.168.1.3 dev ens33 # add more IP addresses to server; better use /etc/network/interfaces

  3. ping localhost or ping 127.0.0.1 # check internal network connection

  4. ping 192.168.1.2 or 3 or 4 # check external network connections

  5. ping neos.demo1 or 2 or 3 # check external network connections

Configure Apache Server

Sample configuration of 3 virtual apache2 webservers

  1. 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

  1. 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

  2. sudo service apache2 restart # restart apache2 + apply new configuration

  3. curl -I neos.demo1 # check virtual host configuration

Connect Database(s):

  1. ./flow doctrine:migrate # if error messsage go to next step

  2. ./flow site:import --package-key TYPO3.NeosDemoTypo3Org

  3. sudo nano /etc/mysql/my.cnf # config mysql or mariadb - only if necessary

  4. sudo mysql -u root -p # login to database, enter pwd

  5. mysql> select * from mysql.user; # check if user neos is available

  6. CREATE USER ‘neos1’@‘localhost’ IDENTIFIED BY ‘Password’;

  7. SET PASSWORD FOR ‘neos1’@‘localhost’ = ‘password’;

  8. GRANT ALL ON . TO ‘neos1’@‘localhost’;

Log into NEOS

  1. browse 192.168.8.2

  2. browser 192.168.8.2/setup

  3. browser 192.168.8.2/setup/login

  4. nano /var/www/html/neos1/Data/SetupPassword.txt # find initial setup password here (YfGXluz8)

  5. Login with user: neos1, pwd: vom SetupPassword.txt

  6. 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!