CoreShop is an e-commerce platform based on Symfony and eCommerce Bundle. This tutorial will guide you through the process of installing CoreShop on OpenBSD.
Before installing CoreShop, we need to install some dependencies. Run the following command to install PHP, Composer, and other required packages.
sudo pkg_add php php7-pdo_mysql composer
If your system does not have the unzip
command, you will need to install it as well.
sudo pkg_add unzip
Now, clone the CoreShop repository from GitHub.
git clone https://github.com/coreshop/CoreShop.git
This command will create a CoreShop
directory in your current working directory.
Change the directory to CoreShop
and install dependencies for CoreShop using Composer.
cd CoreShop
composer install
Create a new MySQL database for CoreShop.
mysql -u root -p
CREATE DATABASE coreshop;
GRANT ALL PRIVILEGES ON coreshop.* TO 'coreshop'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
Change password
to your own password.
Copy the .env.dist
file as .env
and modify the following environment variables.
cp .env.dist .env
nano .env
DATABASE_URL
- Set the database URL to mysql://coreshop:password@localhost/coreshop
APP_ENV
- Set the environment to prod
Save and close the file.
CoreShop requires SSL to be enabled. Generate a self-signed SSL certificate and key using OpenSSL.
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/coreshop.key -out /etc/ssl/coreshop.crt
Change the SSL key's ownership to the www
user.
sudo chown www:www /etc/ssl/private/coreshop.key
CoreShop recommends using Apache as a web server. Create a virtual host configuration file for CoreShop.
sudo nano /etc/httpd/conf/coreshop.conf
Add the following virtual host configuration.
<VirtualHost *:80>
ServerName <your-server-name>
RedirectPermanent / https://<your-server-name>/
</VirtualHost>
<VirtualHost *:443>
ServerName <your-server-name>
DocumentRoot /path/to/CoreShop/web
SSLEngine on
SSLCertificateFile /etc/ssl/coreshop.crt
SSLCertificateKeyFile /etc/ssl/private/coreshop.key
<Directory "/path/to/CoreShop/web">
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
Change <your-server-name>
to your server's hostname or IP address.
Save and close the file.
Start Apache service.
sudo rcctl enable httpd
sudo rcctl start httpd
Generate CoreShop schema.
php bin/console doctrine:schema:create
(Optional) Now Load Demo fixtures.
php bin/console coreshop:install --load-fixtures --symlink-media
Open your web browser and navigate to https://<your-server-name>/
. You should see the CoreShop homepage.
Congratulations! You have successfully installed CoreShop on OpenBSD.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!