Skip to content

Instantly share code, notes, and snippets.

@CloudLinuxDeveloper
Last active June 19, 2020 03:51
Show Gist options
  • Select an option

  • Save CloudLinuxDeveloper/f3838a82f8c5868f00773c698efc2dc5 to your computer and use it in GitHub Desktop.

Select an option

Save CloudLinuxDeveloper/f3838a82f8c5868f00773c698efc2dc5 to your computer and use it in GitHub Desktop.
Install Siberian CMS on Ubuntu with Apache2, MariaDB and PHP 7.2
https://www.youtube.com/watch?v=oAmfypawmdY
#!/bin/sh
#Install Apache
sudo apt update
sudo apt install apache2
sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service
# Install MariaDB
sudo apt-get install mariadb-server mariadb-client
sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
sudo mysql_secure_installation
# Install PHP
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mysql php7.2-gmp php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-gd php7.2-xml php7.2-cli php7.2-zip
sudo nano /etc/php/7.2/apache2/php.ini
#EDIT SAME AS BELOW
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 1024M
upload_max_filesize = 1024M
max_execution_time = 3000
date.timezone = America/Chicago
# Save ctrl+x+y then hit enter
sudo systemctl restart apache2.service
sudo nano /var/www/html/phpinfo.php
<?php phpinfo( ); ?>
http://localhost/phpinfo.php
# Create Database
sudo mysql -u root -p
CREATE DATABASE siberian DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON siberian.* TO 'user'@'localhost' IDENTIFIED BY 'Siberi@n69';
use siberian;
FLUSH PRIVILEGES;
EXIT;
# Download Siberian
sudo apt install curl git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
cd /var/www/html
sudo git clone https://github.com/Xtraball/SiberianCMS.git
sudo chown -R www-data:www-data /var/www/html/SiberianCMS/
sudo chmod -R 755 /var/www/html/SiberianCMS/
sudo nano /etc/apache2/sites-available/siberian.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/SiberianCMS/siberian
ServerName localhost.com
ServerAlias www.localhost.com
<Directory /var/www/html/SiberianCMS/siberian/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# Enable the Siberian
sudo a2ensite siberian.conf
sudo a2enmod rewrite
sudo systemctl restart apache2.service
# http://localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment