Cómo instalar Thelia 2.3 en CentOS 7
¿Usando un sistema diferente? Thelia es una herramienta de código abierto para crear sitios web de comercio electrónico y administrar contenido en línea, escrito en PHP. Código fuente de Thelia i
DotCMS is an open-source, enterprise-grade content management system written in Java. It contains nearly every feature required to create a website for your business. It provides a RESTful API to integrate with other services such as CRM, mobile applications and more. It uses Elasticsearch for real-time indexing of content and Redis for implementing a multi-tier cache.
For this tutorial, we will use 192.168.0.1
as the public IP address and cms.example.com
as the domain name pointed towards the Vultr instance. Please make sure to replace all occurrences of the example domain name and public IP address with the actual one.
Update your base system using the guide How to Update Ubuntu 16.04. Once your system has been updated, proceed to install Java.
Add the Ubuntu repository for Oracle Java 8.
sudo add-apt-repository --yes ppa:webupd8team/java
sudo apt update
Install Java.
sudo apt -y install oracle-java8-installer
You will be able to verify Java's version.
java -version
You will see the following output.
user@vultr:~$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
Set the default path for Java by installing the following package.
sudo apt -y install oracle-java8-set-default
You can verify that JAVA_HOME
is set.
echo $JAVA_HOME
You should see the following.
user@vultr:~$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle
If you see no output at all, you will need to log out from the current shell and log back in.
By default, dotCMS is configured to use the H2 database engine. The H2 database engine is a flat file based database engine. It is not recommended to use in production. In this tutorial, we will use PostgreSQL server to store the dotCMS database.
PostgreSQL is an object-relational database system, known for its stability and speed. The default Ubuntu repository contains an old version of PostgreSQL, so add the PostgreSQL repository.
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
Install the PostgreSQL database server.
sudo apt -y install postgresql
Start the PostgreSQL server and enable it to start automatically at boot time.
sudo systemctl start postgresql
sudo systemctl enable postgresql
Change the password for the default PostgreSQL user.
sudo passwd postgres
Log in as the PostgreSQL user.
sudo su - postgres
Create a new PostgreSQL user for dotCMS.
createuser dotcms
PostgreSQL provides the psql
shell to run queries on the database server. Switch to the PostgreSQL shell.
psql
Set a password for the newly created user for the dotCMS database.
ALTER USER dotcms WITH ENCRYPTED password 'DBPassword';
Replace the database user password DBPassword
with a secure password.
Create a new database for the dotCMS installation.
CREATE DATABASE dotcms OWNER dotcms;
Exit from the psql
shell.
\q
Switch to the sudo
user.
exit
Download the dotCMS archive.
wget https://dotcms.com/physical_downloads/release_builds/dotcms_4.3.2.tar.gz
You can always find the link to the latest version of the application on the dotCMS download page.
Create a new directory to store the dotCMS files and extract them into it.
sudo mkdir /opt/dotcms
sudo tar -zxf dotcms*.tar.gz -C /opt/dotcms
Open the database configuration file.
cd /opt/dotcms
sudo nano dotserver/tomcat-*/webapps/ROOT/META-INF/context.xml
Find the H2
block.
<!-- H2 -->
<Resource name="jdbc/dotCMSPool" auth="Container"
...
validationQuery="SELECT 1" testOnBorrow="true" testWhileIdle="true" />
Comment out the whole H2
section by moving the comment delimiter -->
from the start of the section to the end of the section. It should look like the following.
<!-- H2
<Resource name="jdbc/dotCMSPool" auth="Container"
...
validationQuery="SELECT 1" testOnBorrow="true" testWhileIdle="true" />
-->
Uncomment the PostgreSQL section by removing the comment delimiter -->
from the end of section and placing it on the top wrapping POSTGRESQL
. Also, find username=
and password=
and replace the existing values with the username and password of your PostgreSQL database user. If you have used a database name other than dotcms
, then you will need to change the database name in url=
. Once configured, the PostgreSQL block in the file will look like the following.
<!-- POSTGRESQL -->
<Resource name="jdbc/dotCMSPool" auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost/dotcms"
username="dotcms" password="DBPassword" maxTotal="60" maxIdle="10" maxWaitMillis="60000"
removeAbandonedOnBorrow="true" removeAbandonedOnMaintenance="true" removeAbandonedTimeout="60" logAbandoned="true"
timeBetweenEvictionRunsMillis="30000" validationQuery="SELECT 1" testOnBorrow="true" testWhileIdle="true" />
Provide the execution permission for all the executable files.
sudo chmod 755 ./bin/*.sh
sudo chmod 755 dotserver/tomcat-*/bin/*.sh
DotCMS is now installed on your server. To immediately run the application, execute the following.
cd /opt/dotcms
sudo bin/startup.sh
You will see the following output when the server has started successfully.
user@vultr:/opt/dotcms$ sudo bin/startup.sh
Using DOTCMS_HOME = /opt/dotcms/dotserver/tomcat-8.0.18/webapps/ROOT
Using DOTSERVER = dotcms
Using CATALINA_PID = /tmp/dotcms.pid
Using JAVA_OPTS = -Djava.awt.headless=true -Xverify:none -Dfile.encoding=UTF8 -server -XX:+DisableExplicitGC -XX:MaxMetaspaceSize=512m -Xmx1G -XX:+UseG1GC -javaagent:/opt/dotcms/dotserver/tomcat-8.0.18/webapps/ROOT/WEB-INF/lib/byte-buddy-agent-1.6.12.jar -Ddotserver=dotcms
Using CATALINA_BASE: /opt/dotcms/dotserver/tomcat-8.0.18
Using CATALINA_HOME: /opt/dotcms/dotserver/tomcat-8.0.18
Using CATALINA_TMPDIR: /opt/dotcms/dotserver/tomcat-8.0.18/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/dotcms/dotserver/tomcat-8.0.18/bin/bootstrap.jar:/opt/dotcms/dotserver/tomcat-8.0.18/bin/tomcat-juli.jar
Using CATALINA_PID: /tmp/dotcms.pid
Tomcat started.
The above command will start the Tomcat web server to serve the application on port 8080
.
Open your favorite browser and browse to http://192.168.0.1:8080
. You will see that the application is running a demo website. If you do not see your website, please wait as the first startup of the dotCMS server takes five to ten minutes as it writes data into the PostgreSQL database and builds the cache. You can also check the startup logs.
tail -n 1000 -f /opt/dotcms/dotserver/tomcat-*/webapps/ROOT/dotsecure/logs/dotcms.log
The dotCMS server can be started directly using the startup script provided in the installer package. As a matter of convenience, you should set up a Systemd unit file for the dotCMS server. This will ensure that the application server is automatically started on system restart and failures.
Stop the running dotCMS server using the shutdown script.
sudo bin/shutdown.sh
Create an unprivileged user for running the dotCMS server, for security reasons.
sudo adduser --home /opt/dotcms -gecos "dotCMS User" --disabled-password --disabled-login dotcms
Provide ownership of the files to the dotCMS user.
sudo chown -R dotcms:dotcms /opt/dotcms
Create a new Systemd service.
sudo nano /etc/systemd/system/dotcms.service
Populate the file.
[Unit]
Description=dotCMS service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/dotcms/bin/startup.sh
ExecStop=/opt/dotcms/bin/shutdown.sh
User=dotcms
Group=dotcms
Restart=always
[Install]
WantedBy=multi-user.target
Start the application and enable it to automatically start at boot time.
sudo systemctl start dotcms
sudo systemctl enable dotcms
Ensure that the service is running.
sudo systemctl status dotcms
By default, the dotCMS server listens on port 8080
. We will configure Nginx as the reverse proxy so that the application can be accessed via the standard HTTP
and HTTPS
ports. We will also configure Nginx to use the SSL generated with Let's Encrypt.
Install Nginx.
sudo apt -y install nginx
Start Nginx and enable it to automatically start at boot time.
sudo systemctl start nginx
sudo systemctl enable nginx
Add the Certbot repository.
sudo add-apt-repository --yes ppa:certbot/certbot
sudo apt-get update
Install Certbot, which is the client application for Let's Encrypt CA.
sudo apt -y install certbot
Note: To obtain certificates from Let's Encrypt CA, the domain for which the certificates are to be generated must be pointed towards the server. If not, make the necessary changes to the DNS records of the domain and wait for the DNS to propagate before making the certificate request again. Certbot checks the domain authority before providing the certificates.
Generate the SSL certificates.
sudo certbot certonly --webroot -w /var/www/html -d cms.example.com
The generated certificates are likely to be stored in /etc/letsencrypt/live/cms.example.com/
. Let's Encrypt certificates expire in 90 days, hence it is recommended to set up auto-renewal of the certificates using Cron jobs.
Open the cron job file.
sudo crontab -e
Add the following line at the end of the file.
30 5 * * * /usr/bin/certbot renew --quiet
The above cron job will run every day at 5:30 AM. If the certificate is due for expiration, it will automatically be renewed.
Create a new server block file for the dotCMS site.
sudo nano /etc/nginx/sites-available/dotcms
Populate the file.
server {
listen 80;
server_name cms.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name cms.example.com;
ssl_certificate /etc/letsencrypt/live/cms.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/cms.example.com/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/dotcms.access.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8080;
proxy_read_timeout 90;
proxy_redirect http://localhost:8080 https://cms.example.com;
}
}
Activate the configuration.
sudo ln -s /etc/nginx/sites-available/dotcms /etc/nginx/sites-enabled/dotcms
Restart the Nginx web server so that the changes can take effect.
sudo systemctl restart nginx
The dotCMS application is now installed on your server for production use. Access the administrative dashboard on the following address.
https://cms.example.com/dotAdmin
Log in using the initial administrator account, [email protected]
and the password admin
. Change the default password immediately after login.
Congratulations, the dotCMS content management system is now installed on your server. You can modify the demo site or you can start building your site from scratch.
¿Usando un sistema diferente? Thelia es una herramienta de código abierto para crear sitios web de comercio electrónico y administrar contenido en línea, escrito en PHP. Código fuente de Thelia i
¿Usando un sistema diferente? Fuel CMS es un sistema de gestión de contenido basado en CodeIgniter. Su código fuente está alojado en GitHub. Esta guía le mostrará cómo t
¿Usando un sistema diferente? Couch CMS es un sistema de gestión de contenido (CMS) simple y flexible, gratuito y de código abierto que permite a los diseñadores web diseñar
MODX es un sistema de gestión de contenido gratuito y de código abierto escrito en PHP. Utiliza MySQL o MariaDB para almacenar su base de datos. MODX está diseñado para el negocio i
Using a Different System? Alfresco Community Edition is an open source version of the Alfresco Content Services. It is written in Java and uses PostgreSQL t
Using a Different System? WonderCMS is an open source, fast and small flat file CMS written in PHP. WonderCMS source code is hosted on Github. This guide wil
Using a Different System? Redaxscript 3.2 CMS is a modern and ultra lightweight, free and open source Content Management System (CMS) with rocket-fas
Using a Different System? Neos is a Content Application Platform with a CMS and an application framework at its core. This guide will show you how to instal
¿Usando un sistema diferente? October 1.0 CMS es un sistema de gestión de contenido (CMS) simple y confiable, gratuito y de código abierto creado en el marco de Laravel
¿Usando un sistema diferente? Directus 6.4 CMS es un sistema de gestión de contenido sin cabeza (CMS) potente y flexible, gratuito y de código abierto que proporciona al desarrollador
Using a Different System? Introduction BoltWire is a free and lightweight content management system written in PHP. Compared to most other content managemen
Bolt es un CMS de código abierto escrito en PHP. El código fuente de Bolts está alojado en GitHub. Esta guía le mostrará cómo instalar Bolt CMS en un nuevo CentOS 7 Vult
Using a Different System? Redaxscript 3.2 CMS is a modern and ultra lightweight, free and open source Content Management System (CMS) with rocket-fas
¿Usando un sistema diferente? Anchor es un blog ligero de código abierto CMS escrito en PHP. El código fuente de Anchors está alojado en GitHub. Esta guía te mostrará ho
¿Usando un sistema diferente? Couch CMS es un sistema de gestión de contenido (CMS) simple y flexible, gratuito y de código abierto que permite a los diseñadores web diseñar
Using a Different System? Microweber is an open source drag and drop CMS and online shop. Microweber source code is hosted on GitHub. This guide will show yo
Using a Different System? Fork is an open source CMS written in PHP. Forks source code is hosted on GitHub. This guide will show you how to install Fork CM
¿Usando un sistema diferente? ImpressPages CMS 5.0 es un sistema de gestión de contenido (CMS) simple y efectivo, gratuito y de código abierto, fácil de usar y basado en MVC
¿Usando un sistema diferente? Pagekit 1.0 CMS es un sistema de administración de contenido (CMS) hermoso, modular, extensible y liviano, gratuito y de código abierto con
¿Usando un sistema diferente? ProcessWire CMS 3.0 es un sistema de gestión de contenido (CMS) simple, flexible y potente, gratuito y de código abierto. ProcessWire CMS 3.
Los ataques de ransomware van en aumento, pero ¿puede la IA ayudar a lidiar con el último virus informático? ¿Es la IA la respuesta? Lea aquí, sepa que la IA es una bendición o una perdición
ReactOS, un sistema operativo de código abierto y gratuito, está aquí con la última versión. ¿Puede satisfacer las necesidades de los usuarios de Windows de hoy en día y acabar con Microsoft? Averigüemos más sobre este estilo antiguo, pero una experiencia de sistema operativo más nueva.
Whatsapp finalmente lanzó la aplicación de escritorio para usuarios de Mac y Windows. Ahora puede acceder a Whatsapp desde Windows o Mac fácilmente. Disponible para Windows 8+ y Mac OS 10.9+
Lea esto para saber cómo la Inteligencia Artificial se está volviendo popular entre las empresas de pequeña escala y cómo está aumentando las probabilidades de hacerlas crecer y dar ventaja a sus competidores.
Recientemente, Apple lanzó macOS Catalina 10.15.4, una actualización complementaria para solucionar problemas, pero parece que la actualización está causando más problemas que conducen al bloqueo de las máquinas Mac. Lee este artículo para obtener más información
13 Herramientas comerciales de extracción de datos de Big Data
Nuestra computadora almacena todos los datos de una manera organizada conocida como sistema de archivos de diario. Es un método eficiente que permite a la computadora buscar y mostrar archivos tan pronto como presiona buscar.
A medida que la ciencia evoluciona a un ritmo rápido, asumiendo muchos de nuestros esfuerzos, también aumentan los riesgos de someternos a una singularidad inexplicable. Lea, lo que la singularidad podría significar para nosotros.
Una mirada a 26 técnicas analíticas de Big Data: Parte 1
La IA en la salud ha dado grandes pasos desde las últimas décadas. Por tanto, el futuro de la IA en el sector sanitario sigue creciendo día a día.