The “stack” command allows us to install and remove packages or tools installed by Webinoly on the server.
sudo stack <option> <option2>
sudo stack -nginx sudo stack -mysql -notools sudo stack -lemp sudo stack -pma -purge sudo stack -purge-server-all sudo stack -php-ver=7.0
How can I install and configure all the necessary packages for my web server?
During the initial installation of Webinoly you have the option to do it completely (option 1-4) with all the packages required for the configuration of your web server, you can also choose to do a manual installation (option 0) and only install Webinoly.
If you still do not install Webinoly I recommend you first read the documentation about the installation and that way just by executing a command you can have your web server fully configured.
If you decided to do a manual installation, although it is not the recommended option, it will allow you to choose in a personalized way which packages are installed and configured on your server.
sudo stack -html
sudo stack -nginx
Both commands are accepted and identical.
# To install "Mainline" Nginx version: sudo stack -nginx=mainline # "Stable" version is installed by default in Webinoly. sudo stack -nginx=stable # LEMP sudo stack -lemp=mainline
sudo stack -php
When Nginx is not installed Webinoly will ask you if you want to install it together with PHP, if you want to jump or avoid this question you can use the “force” option in the following way
sudo stack -php=force.
Install MySQL (MariaDB)
sudo stack -mysql
PhpMyAdmin is installed automatically with MySQL, if for some reason you have removed it you can reinstall it with the following command:
sudo stack -pma
Installs Nginx, PHP, MySQL and all the additional tools.
sudo stack -lemp
Change or modify the PHP version
It is very simple, at any time you just have to execute the following command indicating the desired version of PHP:
sudo stack -php-ver=5.6
If you have not yet installed PHP, only the version that is installed by default will be modified, therefore, the next time you do the installation, the version you have indicated will be taken. If you currently have a different version installed, this command will perform the uninstallation of the previous version and will install all the necessary packages with the new version you have indicated.
How can I remove installed packages?
-purge will allow you to remove any package installed by Webinoly, you can also use the option
-purge=force to ignore any question (Unattended).
When you delete a package automatically all additional related tools will be deleted.
sudo stack -nginx -purge
sudo stack -php -purge
sudo stack -mysql -purge
PhpMyAdmin will be automatically deleted.
# Tip - Don't delete your databases if you want to reinstall later. sudo stack -mysql -purge=keep-data
Before remove MySQL you should make a backup of your databases, specially if you use the
sudo stack -pma -purge
Delete additional tools:
During installation you can use the
-notools option to not install these tools.
sudo stack -nginx -notools
Remove all packages installed by Webinoly
sudo stack -purge-server-all
sudo stack -purge-server-all=force
Internal API – Events
We have the possibility of executing actions in certain points or events. Check the example file located in
/opt/webinoly/lib/api-events_sample, you just have to rename the file to
api-events to start running.
For example, at the end of the Nginx installation event we could install some additional tool, communicate with an external tool or execute any code we want.
With each module installed (Nginx, Php and MySQL) are added some additional tools that will be useful for the management of your websites.
- Let’s Encrypt – Tool for the creation of free SSL certificates, necessary for the operation of the -ssl-on option of the Webinoly site command for the automatic creation of certificates in your sites.
- Duply & Duplicity – Tool to make backups, for example you can save a backup of your sites periodically in an external service like Amazon S3. I recommend you read my article about Incremental Backups as an example of how to use this tool.
- Postfix – Tool for sending emails, for example, allows your WordPress sites to send emails from your own server.
- Redis – We use it to optimize the use of the database in WordPress (Object Cache). You only have to install the Redis Object Cache plugin on your site and when you activate it automatically your server will be optimizing the use of the resources in your server related to the operations in your database, especially in high traffic sites.
- Memcached – Similar to Redis and although we no longer use it, we leave it as an option for you.
- Php Info & Status – Page available through port 22222 or the one you have chosen to view information about your PHP installation and its status.
- PhpMyAdmin – Tool for the administration of your databases through the browser. You need to have PHP installed.
To access the PhpMyAdmin and Php Info & Status tools you can do it from your browser with your selected domain and port as follows:
Although not recommended, you can not install these tools; see the
-notools option of the
stack command for more information.
Any doubts about the use of Webinoly do not hesitate to consult or ask through the support forum.