Monday, November 30, 2020

How To install & Configure Elefant CMS On Ubuntu 18.04

 Elefant is a refreshingly simple PHP content management system and web framework. Elefant is a fast, lean tool for building everything from simple websites to complete web applications.
Offcial Website: https://www.elefantcms.com/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification-     
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   |IP address- 192.168.1.50  | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; hostname ; hostname -I ; whoami ; getconf LONG_BIT ; apt install -y build-essential software-properties-common curl gdebi net-tools wget curl sqlite3 dirmngr nano lsb-release apt-transport-https leafpad git sudo unzip socat bash-completion

MariaDB Repositories & Php PPA:
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 ; add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.biznetgio.com/mariadb/repo/10.4/ubuntu bionic main' && add-apt-repository ppa:ondrej/php -y

apt-get update ; apt install -y apache2 mariadb-server mariadb-client php7.2 libapache2-mod-php7.2 php7.2-cli php7.2-fpm php7.2-cgi php7.2-bcmath php7.2-curl php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-sqlite3 php7.2-xml php7.2-zip php7.2-snmp php7.2-json php7.2-imap php7.2-common php7.2-tidy php7.2-pgsql php7.2-ldap php7.2-soap php7.2-snmp php7.2-xsl  php7.2-recode php-imagick php-pear php-memcache php-apcu

a2enmod dir env headers mime rewrite setenvif ; sed -i "s/;date.timezone.*/date.timezone = Asia\/\Kolkata/" /etc/php/*/apache2/php.ini ; echo ServerName 127.0.0.1 >> /etc/apache2/apache2.conf ; systemctl start apache2 mariadb ; systemctl enable apache2 mariadb ; mysql_secure_installation

Create Mariadb Database :
mysql -u root -p
SET GLOBAL sql_mode='';
CREATE USER elefant;
CREATE DATABASE elefantdb;
GRANT ALL PRIVILEGES ON elefantdb.* TO 'elefant'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit


curl -sS https://getcomposer.org/installer | php ; mv composer.phar /usr/local/bin/composer ; chmod +x /usr/local/bin/composer
cd /var/www/html/ ; composer create-project elefant/cms --stability=dev
chown -R www-data:www-data /var/www/html/ ; chmod -R 755 /var/www/html/

Apache VirtualHost :
leafpad /etc/apache2/sites-available/yourdomain.conf &>/dev/null
<VirtualHost *:80>

     ServerAdmin admin@yourdomain.com
     DocumentRoot /var/www/html/cms/
     ServerName www.yourdomain.com

     <Directory /var/www/html/cms/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/yourdomain_error.log
     CustomLog ${APACHE_LOG_DIR}/yourdomain_access.log combined

</VirtualHost>

a2ensite yourdomain ; a2dissite 000-default.conf  ; apache2ctl configtest ; echo "192.168.1.50 www.yourdomain.com" >> /etc/hosts ; systemctl reload apache2
http://www.yourdomain.com

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Saturday, November 28, 2020

How To install Sonerezh on Ubuntu 18.04 LTS with Apache2 Php 7.0

Sonerezh is a self-hosted, web-based music streaming server written in PHP and HTML5. It’s lightweight compared to Subsonic which is written in Java. Sonerezh is open-source software, distributed under the terms of AGPL.
Offcial Website: https://www.sonerezh.bzh/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification-     
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   |            IP address- 192.168.1.50                 | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd  ; getconf LONG_BIT ; whoami ; hostname -f ; hostname -I ; apt install -y build-essential software-properties-common curl gdebi wget aptitude nano git net-tools lsb-release apt-transport-https ffmpeg

apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.biznetgio.com/mariadb/repo/10.4/ubuntu bionic main'
add-apt-repository ppa:ondrej/php -y
apt-get update ; apt install  -y apache2 mariadb-server mariadb-client php7.0 php7.0-cli libapache2-mod-php7.0 php7.0-fpm php7.0-cgi php7.0-bcmath php7.0-curl php7.0-gd php7.0-intl php7.0-json php7.0-mbstring php7.0-mysql php7.0-opcache php7.0-sqlite3 php7.0-xml php7.0-zip php7.0-snmp php7.0-json php7.0-imap php7.0-common php7.0-tidy php7.0-mcrypt php7.0-pgsql php-pear
systemctl start apache2 mariadb ; systemctl enable apache2 mariadb
mysql_secure_installation

a2enmod dir env headers mime rewrite setenvif
sed -i "s/;date.timezone.*/date.timezone = UTC/" /etc/php/7.0/cli/php.ini ; echo ServerName 127.0.0.1 >> /etc/apache2/apache2.conf  

mysql -u root -p
create database db;
grant all on db.* to 'dbuser'@'localhost' identified by 'dbpass';
quit

cd /var/www/html ;  wget https://www.sonerezh.bzh/downloads/latest.tar.gz
tar -zxf latest.tar.gz
chown -R www-data:www-data /var/www/html/ ; chmod -R 755 /var/www/html/

Apache VirtualHost :
gedit /etc/apache2/sites-available/yourdomain.conf &>/dev/null
<VirtualHost *:80>
     ServerAdmin admin@yourdomain.com
     DocumentRoot /var/www/html/sonerezh/app/webroot
     ServerName www.yourdomain.com

     <Directory /var/www/html/sonerezh/app/webroot/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/yourdomain_error.log
     CustomLog ${APACHE_LOG_DIR}/yourdomain_access.log combined

</VirtualHost>
a2ensite yourdomain ; a2dissite 000-default.conf  ; apache2ctl configtest
echo "192.168.1.50 www.yourdomain.com" >> /etc/hosts ; systemctl reload apache2
http://www.yourdomain.com

DB Details:
Database Host: localhost
Database name: db
Database username: dbuser
Database password: dbpass

chmod -R 777 /home/ubuntu/Music/
/home/ubuntu/Music/
Email:  yourmail@yourdomain.com  Password: YourPasswordB4r2nd9nTR   

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How To Deploy MariaDB on Docker Without Dockerfile On Ubuntu 20.04

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 MariaDB is an open source relational database management system (DBMS).

Docker is an open source virtualization and containerization technology for building and containerizing your applications. It's a tool that allows you to create isolated containers that can be used to run your apps.
Offcial Website -https://www.docker.com/

MariaDB Dockerhub link - https://hub.docker.com/_/mariadb
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Testing Environment:
Ubuntu 20.04 LTS                     Hostname - www.yourdomain.com  - ip Address - 192.168.1.10  
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


apt update ; apt install -y build-essential net-tools curl git software-properties-common neofetch apt-transport-https ca-certificates curl gnupg-agent docker.io docker-compose

systemctl enable --now docker ; docker --version ; docker-compose version
usermod -aG docker $USER ; newgrp docker

docker pull mariadb
docker run -d --name mariadb1 \
-p 33061:3306 \
-v ~/Docker/mariadb1/config:/etc/mysql/conf.d \
-v ~/Docker/mariadb1/datadir:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=root123 \
-e MYSQL_DATABASE=dbtest \
mariadb

docker ps
docker logs mariadb1
docker exec -it mariadb1 bash
mysql --user=root --password=root123
show databases;


Container-id -

Container-id -           $ docker ps -aq                         
Stop Container -         $ docker stop ed2896902b49                 
Start Container -        $ docker start ed2896902b49
Check Container logs-    $ docker logs ed2896902b49
Delete a Docker Image -  $ docker rmi ed2896902b49

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thursday, November 12, 2020

How To Install Refinery CMS (Ruby On Rails) On Ubuntu 18.04


 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Refinery CMS, often shortened to Refinery, is a free and open-source content management system written in Ruby as a Ruby on Rails web application with jQuery used as the JavaScript library. Refinery CMS supports Rails 3.2 and Rails 4.2 and Rails 5.1.
Offcial Website: https://www.refinerycms.com/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Our Server Specification-     
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   |            IP address- 192.168.1.50                 | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd  ; getconf LONG_BIT ; whoami ; hostname -f ; hostname -I ; apt-get update ; apt install -y build-essential software-properties-common curl wget nano git net-tools lsb-release apt-transport-https

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update ; sudo apt-get install nodejs yarn zlib1g-dev build-essential libpq-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev nodejs libpq-dev  mysql-client mysql-server libmysqlclient-dev linuxbrew-wrapper -y

cd ~/ ; git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.5.3
rbenv global 2.5.3
gem install bundler
rbenv rehash
gem install rails -v 5.2.1
rbenv rehash
gem update --system
gem install rdoc
brew install imagemagick

gem install refinerycms
refinerycms rickrockstar
cd rickrockstar/
rails server
http://localhost:3000/refinery
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Tuesday, November 10, 2020

How To Install Fathom Analytics with Apache on Ubuntu 18.04 LTS

 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 Fathom is a self-hosted open source web analytics platform that provides simple, useful website statistics without tracking or storing your users' personal information. It is a very good alternative to Google Analytics with a simple web interface that can be used for small and medium businesses. Fathom gives you full control over your data without using third-party solutions. Fathom offers you top pages, top referrers, bounce rate and average time spent on your website.
Offcial Website: https://usefathom.com/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification-     
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   |IP address- 192.168.1.50  | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; hostname ; hostname -I ; whoami ; getconf LONG_BIT

MariaDB Repositories:
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 ; add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.biznetgio.com/mariadb/repo/10.4/ubuntu bionic main'

apt update ; apt install -y build-essential software-properties-common curl gdebi net-tools wget curl sqlite3 dirmngr nano lsb-release apt-transport-https leafpad apache2 mariadb-server

a2enmod proxy proxy_http ; mysql_secure_installation

Create Mariadb Database :
mysql -u root -p
create database db;
grant all on db.* to 'dbuser'@'localhost' identified by 'dbpass';
flush privileges;
quit

wget https://github.com/usefathom/fathom/releases/download/latest-development/fathom-linux-amd64
mv fathom-linux-amd64 /usr/local/bin/fathom  ; chmod 755 /usr/local/bin/fathom

leafpad .env &>/dev/null
FATHOM_SERVER_ADDR=9000
FATHOM_DEBUG=true
FATHOM_DATABASE_DRIVER="mysql"
FATHOM_DATABASE_NAME="db"
FATHOM_DATABASE_USER="dbuser"
FATHOM_DATABASE_PASSWORD="dbpass"
FATHOM_DATABASE_HOST="localhost"
FATHOM_DATABASE_SSLMODE=""
FATHOM_SECRET="random-secret-string"

fathom --config=.env user add --email=admin@yourdomain.com.com --password=yourpassword123
fathom server

nano /etc/systemd/system/fathom.service
[Unit]
Description=Fathom server management service unit
Requires=network.target
After=network.target

[Service]
Type=simple
User=root
Restart=always
RestartSec=3
WorkingDirectory=/root
ExecStart=/usr/local/bin/fathom server

[Install]
WantedBy=multi-user.target
systemctl daemon-reload ; systemctl enable fathom ; systemctl start fathom ; systemctl status fathom

leafpad /etc/apache2/sites-available/yourdomain.conf &>/dev/null
<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAdmin admin@yourdomain.com
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:9000/
    ProxyPassReverse / http://127.0.0.1:9000/
    TransferLog /var/log/apache2/yourdomain_access.log
    ErrorLog /var/log/apache2/yourdomain_error.log
</VirtualHost>

a2ensite yourdomain ; a2dissite 000-default.conf  ; apache2ctl configtest ; echo "192.168.1.50 www.yourdomain.com" >> /etc/hosts ; systemctl reload apache2
http://www.yourdomain.com

Example email=admin@yourdomain.com.com  || password=yourpassword123

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Saturday, November 7, 2020

How To Install Fae CMS (Ruby On Rails) on Ubuntu 18.04

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 Fae: A Formidable Rails CMS
Fae CMS is an open source content management system (CMS) for Ruby on Rails ||
Offcial Website: https://www.faecms.com/documentation
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification-     
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   | IP address- 192.168.1.50  | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; hostname ; hostname -I ; whoami ; getconf LONG_BIT ; apt update ; apt install -y build-essential software-properties-common git curl gdebi net-tools wget sqlite3 dirmngr nano lsb-release apt-transport-https -y

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

apt-get update ; apt-get install nodejs yarn zlib1g-dev build-essential libpq-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev -y

cd ~/ ; git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

rbenv install 2.5.3
rbenv global 2.5.3
gem install bundler
gem install rails -v 5.2.3
rbenv rehash

rails new faecms
cd ~/faecms
nano Gemfile
gem 'fae-rails'
bundle install
rails g fae:install
rails server --binding=0.0.0.0
http://localhost:3000/admin

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thursday, November 5, 2020

How To Install OrangeScrum with Apache2 on Ubuntu 18.04 LTS

 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 OrangeScrum is a free and open source project management and collaboration tool written in PHP with CakePHP framework. It is simple, easy to use and ideal for small or medium businesses. It is used to manage projects, teams, documents, task, and communicate with the team on important issues. Orangescrum comes with lots of features like, Visual representation, kanban view, All in one screen, daily email catch-up, Gantt Charts, conversation thread, ticketing system, Dropbox integration, and many more. You can easily collaborate with Employees, Leaders, Clients and Freelancers from the central location.
Offcial Website: https://www.orangescrum.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification-     
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   |IP address- 192.168.1.50  | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; hostname ; hostname -I ; whoami ; getconf LONG_BIT ; apt install -y build-essential software-properties-common curl gdebi net-tools wget curl sqlite3 dirmngr nano lsb-release apt-transport-https leafpad

MariaDB Repositories:
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 ; add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.biznetgio.com/mariadb/repo/10.4/ubuntu bionic main'

Apache2 Mariadb Php PHP Modules :
add-apt-repository ppa:ondrej/php -y
apt-get update ; apt install -y apache2 mariadb-server mariadb-client php7.2 php7.2-cli php7.2-fpm php7.2-cgi php7.2-bcmath php7.2-curl php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-sqlite3 php7.2-xml php7.2-zip php7.2-snmp php7.2-json php7.2-imap php7.2-common php7.2-tidy php7.2-pgsql php7.2-ldap php-imagick php-pear php7.2-enchant php-memcache xvfb libfontconfig wkhtmltopdf

systemctl start apache2 mariadb ; systemctl enable apache2 mariadb ; mysql_secure_installation
mysql -u root -p
SHOW VARIABLES LIKE 'sql_mode';
set global sql_mode='';
set global sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

a2enmod headers rewrite ; phpenmod mbstring ; sed -i "s/;date.timezone.*/date.timezone = Asia\/\Kolkata/" /etc/php/*/apache2/php.ini ; echo ServerName 127.0.0.1 >> /etc/apache2/apache2.conf

Create Mariadb Database :
mysql -u root -p
CREATE DATABASE orangescrumdb;
GRANT ALL PRIVILEGES ON orangescrumdb.* TO 'orangescrumuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit;

Orangescrum Download Link: https://www.orangescrum.org/free-download
Select installation package - PHP7.2-(Manual) - ( i already Downloaded it )

ls /home/ubuntu/Downloads/
unzip /home/ubuntu/Downloads/orangescrum-master.zip -d /var/www/html/
mv /var/www/html/orangescrum-php72/ /var/www/html/orangescrum
leafpad /var/www/html/orangescrum/app/Config/constants.php &>/dev/null
_____________________________________________________________________________________________________
important Part:
SMTP setting:
ssl://smtp.gmail.com
Smtp Port: 465
SMTP Username: (your Gmail username Or smtp username )  
SMTP Password: (your Gmail password Or smtp Account Password )

define("WEB_DOMAIN", "www.yourdomain.com"); //ex. demo.orangescrum.com
define('FROM_EMAIL_NOTIFY', 'your Gmail username'); //(REQUIRED)
define('SUPPORT_EMAIL', 'your Gmail username'); //(REQUIRED) From Email
______________________________________________________________________________________________________

leafpad /var/www/html/orangescrum/app/Config/database.php &>/dev/null      [ class DATABASE_CONFIG { ]
chown -R www-data:www-data /var/www/html/ ; chmod -R 755 /var/www/html/
cd /var/www/html/orangescrum ; mysql -u orangescrumuser -p orangescrumdb < database.sql   

Setting up Apache VirtualHost :
leafpad /etc/apache2/sites-available/yourdomain.conf &>/dev/null
<VirtualHost *:80>

     ServerAdmin admin@yourdomain.com
     DocumentRoot /var/www/html/orangescrum/
     ServerName www.yourdomain.com

     <Directory /var/www/html/orangescrum/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/yourdomain_error.log
     CustomLog ${APACHE_LOG_DIR}/yourdomain_access.log combined

</VirtualHost>

a2ensite yourdomain ; a2dissite 000-default.conf  ; apache2ctl configtest ; echo "192.168.1.50 www.yourdomain.com" >> /etc/hosts ; systemctl reload apache2
http://www.yourdomain.com

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------