ZPanel y Sentora en CentOS 6 x64
ZPanel, un panel de control de alojamiento web popular, se bifurcó en 2014 a un nuevo proyecto llamado Sentora. Aprende a instalar Sentora en tu servidor con este tutorial.
Sylius is a modern e-commerce platform for PHP, based on the Symfony Framework. Sylius source code is hosted on GitHub.
This guide will walk you through the Sylius installation process on a fresh FreeBSD 12 Vultr instance using PHP, MariaDB as a database, and Nginx as a web server.
To be able to install Sylius you will need:
gd
, exif
, fileinfo
, intl
memory_limit
equal to or greater than 1024M
, date.timezone
Check the FreeBSD version.
uname -ro
# FreeBSD 12.0-RELEASE
Ensure that your FreeBSD system is up to date.
freebsd-update fetch install
pkg update && pkg upgrade -y
Install the necessary packages.
pkg install -y sudo vim unzip curl wget bash socat git
Create a new user account with your preferred username. We will use johndoe
.
adduser
# Username: johndoe
# Full name: John Doe
# Uid (Leave empty for default): <Enter>
# Login group [johndoe]: <Enter>
# Login group is johndoe. Invite johndoe into other groups? []: wheel
# Login class [default]: <Enter>
# Shell (sh csh tcsh nologin) [sh]: bash
# Home directory [/home/johndoe]: <Enter>
# Home directory permissions (Leave empty for default): <Enter>
# Use password-based authentication? [yes]: <Enter>
# Use an empty password? (yes/no) [no]: <Enter>
# Use a random password? (yes/no) [no]: <Enter>
# Enter password: your_secure_password
# Enter password again: your_secure_password
# Lock out the account after creation? [no]: <Enter>
# OK? (yes/no): yes
# Add another user? (yes/no): no
# Goodbye!
Run the visudo
command and uncomment the %wheel ALL=(ALL) ALL
line, to allow members of the wheel
group to execute any command.
visudo
# Uncomment by removing hash (#) sign
# %wheel ALL=(ALL) ALL
Now, switch to your newly created user with su
.
su - johndoe
NOTE: Replace johndoe
with your username.
Set up the timezone.
sudo tzsetup
Install PHP and required PHP extensions.
sudo pkg install -y php73 php73-mbstring php73-tokenizer php73-pdo php73-pdo_mysql php73-openssl php73-hash php73-json php73-phar php73-filter php73-zlib php73-dom php73-xml php73-xmlwriter php73-xmlreader php73-curl php73-session php73-ctype php73-iconv php73-gd php73-simplexml php73-zip php73-filter php73-tokenizer php73-calendar php73-fileinfo php73-intl php73-phar php73-soap php73-xmlrpc php73-opcache php73-mysqli php73-bcmath php73-gmp php73-exif
Check the version.
php --version
# PHP 7.3.8 (cli) (built: Aug 8 2019 01:28:36) ( NTS )
Soft-link php.ini-production
to php.ini
.
sudo ln -s /usr/local/etc/php.ini-production /usr/local/etc/php.ini
Enable and start PHP-FPM.
sudo sysrc php_fpm_enable=yes
sudo service php-fpm start
Run sudo vim /usr/local/etc/php.ini
and set memory_limit
to 1024M
or more, and set up date.timezone
.
memory_limit = 1024M
date.timezone = Region/City
Restart PHP-FPM.
sudo service php-fpm restart
Install MariaDB.
sudo pkg install -y mariadb102-client mariadb102-server
Check the version.
mysql --version
# mysql Ver 15.1 Distrib 10.2.25-MariaDB, for FreeBSD12.0 (amd64) using readline 5.1
Start and enable MariaDB.
sudo sysrc mysql_enable="yes"
sudo service mysql-server start
Run the mysql_secure installation
script to improve security and set the password for the root
user.
sudo mysql_secure_installation
Connect to the shell as the root user.
sudo mysql -u root -p
# Enter password
Create an empty database and user for Sylius, and remember the credentials.
CREATE DATABASE dbname;
GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit
NOTE: Replace dbname
and username
with appropriate names for your setup. Replace password
with a strong password.
Install Nginx.
sudo pkg install -y nginx
Check the version.
nginx -v
# nginx version: nginx/1.16.1
Enable and start Nginx.
sudo sysrc nginx_enable=yes
sudo service nginx start
Configure Nginx for Sylius. Run sudo vim /usr/local/etc/nginx/sylius.conf
and populate the file with the following configuration.
server {
listen 80;
server_name example.com;
root /usr/local/www/sylius/public;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
location ~ \.php$ {
return 404;
}
client_max_body_size 6m;
}
Save the file and exit with :+W+Q.
Now we need to include sylius.conf
in the main nginx.conf
file.
Run sudo vim /usr/local/etc/nginx/nginx.conf
and add the following line to the http {}
block.
include sylius.conf;
Test the configuration.
sudo nginx -t
Reload Nginx.
sudo service nginx restart
Install Composer globally.
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
Check the version.
composer --version
# Composer version 1.9.0 2019-08-02 20:55:32
Install Node.js.
sudo pkg install -y node
Check the version.
node --version
# v12.4.0
Install the Yarn package manager.
sudo pkg install -y yarn
Check the version.
yarn --version
# 1.16.0
Create a document root directory.
sudo mkdir -p /usr/local/www/sylius
Change ownership of the /usr/local/www/sylius
directory to johndoe
.
sudo chown -R johndoe:johndoe /usr/local/www/sylius
Navigate to the document root folder.
cd /usr/local/www/sylius
Initiate a new Sylius project by running this command:
composer create-project sylius/sylius-standard .
Run vim .env.local
to enter database details and to run Sylius in an environment of choice.
APP_ENV=prod
DATABASE_URL=mysql://username:[email protected]/dbname
NOTE: Replace username
, password
and dbname
with your database details.
After everything is in place, run the following command to install Sylius:
php bin/console sylius:install -e prod
In order to see a fully functional front-end, you will need to install its assets. Sylius uses Gulp to build front-end assets using Yarn as a JavaScript package manager. Having Yarn installed, go to your project directory to install the dependencies.
yarn install
Then build the front-end assets by running:
yarn build
Change ownership of the /usr/local/www/sylius
directory to www
.
sudo chown -R www:www /usr/local/www/sylius
Create /var/lib/php/session/
directory and change ownership to www
.
sudo mkdir -p /var/lib/php/session && sudo chown -R www:www /var/lib/php/session
Restart the PHP-FPM service.
sudo service php-fpm restart
The Sylius e-commerce platform is installed. By default, administration panel routes to /admin
.
ZPanel, un panel de control de alojamiento web popular, se bifurcó en 2014 a un nuevo proyecto llamado Sentora. Aprende a instalar Sentora en tu servidor con este tutorial.
Aprende cómo instalar Vtiger CRM, una aplicación de gestión de relaciones con el cliente, en CentOS 7 para aumentar tus ventas y mejorar el servicio al cliente.
Esta guía completa le mostrará cómo configurar un servidor Counter-Strike 1.6 en Linux, optimizando el rendimiento y la seguridad para el mejor juego. Aprende los pasos más recientes aquí.
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.