stack

EasyEngine(ee) Stack Module covers following operations:

Install Packages

Install web packages:


ee stack install # Another way ee stack install web

Sample output:


^_^[[email protected]:~]# ee stack install Adding rtCamp NGINX launchpad repository, please wait... Adding Ondrej PHP5 launchpad repository, please wait... Executing apt-get update, please wait... Installing nginx-custom, please wait... Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: libxslt1.1 nginx-common The following NEW packages will be installed: libxslt1.1 nginx-common nginx-custom 0 upgraded, 3 newly installed, 0 to remove and 78 not upgraded. Need to get 595 kB of archives. After this operation, 1,692 kB of additional disk space will be used. [...] . . . [...] Setting up NGINX, please wait... Generating SSL private key Generating a certificate signing request (CSR) Removing pass phrase from SSL private key Generating SSL certificate Setting up PHP5, please wait... Setting up MySQL, please wait... Executing service nginx restart, please wait... Executing service php5-fpm restart, please wait... Executing service mysql restart, please wait... Git commit on /etc/nginx/, please wait... Git commit on /etc/php5/, please wait... Git commit on /etc/mysql/, please wait... Git commit on /etc/postfix, please wait... Downloading Adminer, please wait... Downloading phpMyAdmin, please wait... Downloading WP-CLI, please wait... Installing phpMemcachedAdmin, please wait... Downloading nginx FastCGI cleanup script, please wait... Downloading OPcache, please wait... Cloning Webgrind, please wait... Cloning Anemometer, please wait... Successfully installed web packages Create your first WordPress site powered by NGINX using: ee site create example.com --wp

Above command install all the require packages, now you can create your site using Site Module.

NOTE: By default EasyEngine set easyengine:easyengine as HTTP authentication

Refer: How to change HTTP Authentication

If you are thinking installing all packages is not suitable for you, can install single packages by using following commands:

Install NGINX

ee stack install --nginx

NOTE: By default EasyEngine set easyengine:easyengine as HTTP authentication

Refer: How to change HTTP Authentication

Install PHP

ee stack install --php # Deprecated way ee system install php
Install MySQL

ee stack install --mysql # Deprecated way ee system install mysql
Install Postfix

ee stack install --postfix # Deprecated way ee system install postfix
Install WP-CLI

ee stack install --wpcli # Deprecated way ee system install wpcli
Install Adminer

ee stack install --adminer # Deprecated way ee system install adminer
Install phpMyAdmin

ee stack install --phpmyadmin # Deprecated way ee system install phpmyadmin
Install Utilities

Below command installs phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer.


ee stack install --utils # Deprecated way ee system install utils

Install Mail Packages:

Note: Recomened RAM for Mail Package installation is minimum 1GB


ee stack install --mail

Sample output:


^_^[[email protected]:~]# ee stack install --mail Installing Dovecot, please wait... Reading package lists... Building dependency tree... Reading state information... Suggested packages: ntp dovecot-gssapi dovecot-pgsql dovecot-sqlite dovecot-ldap dovecot-solr ufw The following NEW packages will be installed: dovecot-core dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-mysql dovecot-pop3d dovecot-sieve 0 upgraded, 7 newly installed, 0 to remove and 106 not upgraded. Need to get 2,437 kB of archives. After this operation, 7,370 kB of additional disk space will be used. [...] . . . [...] Setting up Postfix, please wait... Generating self signed certificate for Postfix, please wait... Setting up Dovecot, please wait... Generating self signed certificate for Dovecot, please wait... Setting up Amavis, please wait... Setting up ViMbAdmin, please wait... Setting up Roundcube, please wait... Setting up Sieve rules, please wait... Executing service nginx restart, please wait... Executing service postfix restart, please wait... Executing service dovecot restart, please wait... Executing service amavis restart, please wait... Git commit on /etc/nginx, please wait... Git commit on /etc/postfix, please wait... Git commit on /etc/dovecot, please wait... Git commit on /etc/amavis, please wait... Configure ViMbAdmin: https://example.com:22222/vimbadmin Security Salt: UpRBT4LLJwfFcZTNOg0CJkDeJSnSLPYsUylCFzrILcoAreOPRhVwqqipjTCltOBw Successfully installed mail server packages

Above command install all the require packages for mail server.

ViMbAdmin Setup

Now you need to complete ViMbAdmin setup by accessing following url


https://example.com:22222/vimbadmin

and Copy Security salt from terminal to browser


Security Salt: UpRBT4LLJwfFcZTNOg0CJkDeJSnSLPYsUylCFzrILcoAreOPRhVwqqipjTCltOBw

Paste that into webpage and click on activate my account

ViMbAdmin Setup

Now you can create virtual domains and mailboxes in your mail server.

NOTE: If you are getting this error: Fatal error: session_start(): Failed to initialize storage module: memcache then to resolve this use this FAQ

Accessing roundcube

Webmail can be accessed using


http://webmail.example.com

RoundCube

Setting Up Organization Identity

vim /var/www/22222/htdocs/vimbadmin/application/configs/application.ini +250

Now set the following details as per your Organization:


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Identity identity.orgname = "Example Limited" identity.name = "Example Support Team" identity.email = "[email protected]" identity.autobot.name = "ViMbAdmin Autobot" identity.autobot.email = "[email protected]" identity.mailer.name = "ViMbAdmin Autobot" identity.mailer.email = "[email protected]" identity.sitename = "ViMbAdmin" identity.siteurl = "https://www.example.com/vimbadmin/" ;; ;; All mail and correspondence will come from the following;; server.email.name = "ViMbAdmin Administrator" server.email.address = "[email protected]"

Install All Packages:


ee stack install --all

This command is combination of following two commands:


ee stack install --web ee stack install --mail

Remove Packages

Remove Web Packages

ee stack remove
# Another way
ee system remove --web

Sample output:

^_^[[email protected]:~]# ee stack remove
remove nginx-custom package, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
libxslt1.1
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
[...]
.
.
.
[...]
Removing Adminer, please wait...
Removing phpMyAdmin, please wait...
Removing WP-CLI, please wait...
Remove EasyEngine (ee) admin utilities, please wait...
Removing unwanted packages, please wait...
[...]
.
.
.
[...]
Successfully removed all packages

Above command removes all packages installed by ee stack install

If you are thinking removing all packages is not suitable for you, can remove single packages by using following commands:

Remove NGINX
ee stack remove --nginx
# Deprecated way
ee system remove nginx
Remove PHP
ee stack remove --php
# Deprecated way
ee system remove php
Remove MySQL
ee stack remove --mysql
# Deprecated way
ee system remove mysql
Remove Postfix
ee stack remove --postfix
# Deprecated way
ee system remove postfix
Remove WP-CLI
ee stack remove --wpcli
# Deprecated way
ee system remove wpcli
Remove Adminer
ee stack remove --adminer
# Deprecated way
ee system remove adminer
Remove phpMyAdmin
ee stack remove --phpMyAdmin
# Deprecated way
ee system remove phpmyadmin
Remove Utilities

Below command remove phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer.

ee stack remove --utils
# Deprecated way
ee system remove utils

Remove Mail Packages

ee stack remove --mail
````
This command will remove all mail server packages keeping configuration files as it.

Sample output:
```bash
^_^[[email protected]:~]# ee stack remove --mail
remove Dovecot package, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
dovecot-core dovecot-imapd dovecot-lmtpd dovecot-managesieved dovecot-mysql
dovecot-pop3d dovecot-sieve
0 upgraded, 0 newly installed, 7 to remove and 59 not upgraded.
After this operation, 11.7 MB disk space will be freed.
[...]
.
.
[...]
Removing Roundcube dependencies, please wait...
Removing Roundcube, please wait...
Removing unwanted packages, please wait...
[...]
.
.
[...]
Removing libunix-syslog-perl (1.1-2build5) ...
Removing pax (1:20120606-2+deb7u1) ...
Removing re2c (0.13.5-1build2) ...
Removing spamc (3.4.0-1ubuntu1) ...
Removing librpm3 (4.11.1-3) ...
Removing librpmio3 (4.11.1-3) ...
Removing liblua5.2-0:amd64 (5.2.3-1) ...
Removing libnss3:amd64 (2:3.15.4-1ubuntu7) ...
Removing libnss3-nssdb (2:3.15.4-1ubuntu7) ...
Removing libnspr4:amd64 (2:4.10.2-1ubuntu1.1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Successfully removed mail server packages

Remove All packages

ee stack remove --all

This command is combination of following two commands:

ee stack remove --web
ee stack remove --mail

Purge Packages

Purge Web Packages:

ee stack purge
# Another way
ee stack purge --web

Sample output:

^_^[[email protected]:~]# ee stack purge
purge nginx-custom package, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
libxslt1.1
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
[...]
.
.
.
[...]
Removing Adminer, please wait...
Removing phpMyAdmin, please wait...
Removing WP-CLI, please wait...
Remove EasyEngine (ee) admin utilities, please wait...
Removing unwanted packages, please wait...
[...]
.
.
.
[...]
Successfully purged all packages

Above command removes all packages installed by ee stack install

If you are thinking removing all packages is not suitable for you, can remove single packages by using following commands:

Purge NGINX
ee stack purge --nginx
# Deprecated way
ee system purge nginx
Purge PHP
ee stack purge --php
# Deprecated way
ee system purge php
Purge MySQL
ee stack purge --mysql
# Deprecated way
ee system purge mysql
Purge Postfix
ee stack purge --postfix
# Deprecated way
ee system purge postfix
Purge WP-CLI
ee stack purge --wpcli
# Deprecated way
ee system purge wpcli
Purge Adminer
ee stack purge --adminer
# Deprecated way
ee system purge adminer
Purge phpMyAdmin
ee stack purge --phpMyAdmin
# Deprecated way
ee system purge phpmyadmin
Purge Utilities

Below command remove phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer.

ee stack purge --utils
# Deprecated way
ee system purge utils

Purge Mail Packages:

ee stack purge --mail

This command will purge all mail server packages.

Sample output:

^_^[[email protected]:~]# ee stack purge --mail
purge Dovecot package, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
dovecot-core* dovecot-imapd* dovecot-lmtpd* dovecot-managesieved*
dovecot-mysql* dovecot-pop3d* dovecot-sieve*
0 upgraded, 0 newly installed, 7 to remove and 59 not upgraded.
After this operation, 11.7 MB disk space will be freed.
[...]
.
.
[...]
Processing triggers for man-db (2.6.7.1-1) ...
Removing Roundcube dependencies, please wait...
Removing Roundcube, please wait...
Removing unwanted packages, please wait...
Reading package lists...
[...]
.
.
[...]
Removing libunix-syslog-perl (1.1-2build5) ...
Removing pax (1:20120606-2+deb7u1) ...
Removing re2c (0.13.5-1build2) ...
Removing spamc (3.4.0-1ubuntu1) ...
Removing librpm3 (4.11.1-3) ...
Removing librpmio3 (4.11.1-3) ...
Removing liblua5.2-0:amd64 (5.2.3-1) ...
Removing libnss3:amd64 (2:3.15.4-1ubuntu7) ...
Removing libnss3-nssdb (2:3.15.4-1ubuntu7) ...
Removing libnspr4:amd64 (2:4.10.2-1ubuntu1.1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Successfully purged mail server packages

Purge All Packages:

ee stack purge --all

This command is combination of following two commands:

ee stack purge --web
ee stack purge --mail

EE Stack Status

Display important status about EasyEngine services.


ee stack status # Deprecated way ee system status

Sample Output :


^_^[[email protected]:~]# ee stack status System information as of Mon Jul 28 17:19:41 IST 2014 System load: 0.14 Processes: 183 Usage of /: 79% Users logged in: 4 Memory usage: 74% Swap usage: 32.39% Service status information Nginx: Running PHP5-FPM: Running MySQL: Running Postfix: Running

EE Stack Services

All EasyEngine services can be operated using following commands:

Start NGINX, PHP, MySQL & Postfix service


ee stack start # Deprecated way ee system start

Sample output:


^_^[[email protected]:~]# ee stack start Executing service nginx start, please wait... Executing service php5-fpm start, please wait... Executing service mysql start, please wait... Executing service postfix start, please wait...

Stop NGINX, PHP, MySQL & Postfix service


ee stack stop # Deprecated way ee system stop

Sample output:


^_^[[email protected]:~]# ee stack stop Executing service nginx stop, please wait... Executing service php5-fpm stop, please wait... Executing service mysql stop, please wait... Executing service postfix stop, please wait...

Reload NGINX, PHP, MySQL & Postfix service


ee stack reload # Deprecated way ee system reload

Sample output:


^_^[[email protected]:~]# ee stack reload Executing service nginx reload, please wait... Executing service php5-fpm reload, please wait... Executing service mysql reload, please wait... Executing service postfix reload, please wait...

Restart NGINX, PHP, MySQL & Postfix service


ee stack restart # Deprecated way ee system restart

Sample output:


^_^[[email protected]:~]# ee stack restart Executing service nginx restart, please wait... Executing service php5-fpm restart, please wait... Executing service mysql restart, please wait... Executing service postfix restart, please wait...

19 responses to “stack”

      • I tried that too but got the following now:
        Reading package lists… Done
        Building dependency tree
        Reading state information… Done
        Some packages could not be installed. This may mean that you have
        requested an impossible situation or if you are using the unstable
        distribution that some required packages have not yet been created
        or been moved out of Incoming.
        The following information may help to resolve the situation:

        The following packages have unmet dependencies:
        nginx-custom : Depends: nginx-common (= 1.4.1-0ppa~precise) but 1.4.4-1~precise0 is to be installed
        E: Unable to correct problems, you have held broken packages.

  1. Hi Rahul.
    Im learning about NGINX, Im planning to migrate mi site from LAMP to NGINX based system, so Im newby on this…
    Do you recommend install varnish and memcache over the default easyengine intallation???
    Regards.

  2. Hi Rahul,

    I really appreciate you for creating an awesome script which have increased my productivity in setting up nginx wordpress installations. I’m interested in knowing by when the mailserver will be added to this script. It will be really helpful if you can tell me how can I install a mailserver with gui in ubuntu os. Thanks!

  3. On a brand new, test droplet in Digital Ocean, using Ubuntu 12.04.3 x64, I tried the curl -sL rt.cx/ee | sudo bash and the ee system install command and received this http://d.pr/i/iqa

    any clues?

    • Check line “Failed to fetch” from bottom. Looks like when you ran setup script, digitalocean mirror of Ubuntu packages was broken. Just run “ee system install” command again.

      If you see that “Failed to fetch” message again for any mirrors.digtialocean.com URL, please contact digtialocean support. (Most likely you won’t need to contact anybody)

  4. Hey, man! This command ee stack install isn’t working anymore. I’ve found a way around it, but since I am just a beginner i’m not sure if it’s correct or not. I’ve found the command “wget -qO ee https://rt.cx/ee4 && sudo bash ee ”
    Is this correct? Is there a better way of doing it?