in This Tutorial you will Learn " How To Install Magento 2.4 on Rocky Linux 8"
Magento is a free, open-source, PHP-based eCommerce platform and cloud solution to grow your online business rapidly. It is built on open-source technology, with a flexible shopping cart system and an admin control panel that helps you start your online store easily. Magento also offers many plugins and themes to enhance a customer’s experience.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install httpd httpd-tools mariadb-server -y
systemctl start httpd mariadb ; systemctl enable httpd mariadb
dnf module reset php ; dnf module enable php:7.4
dnf install php php-cli php-mysqlnd php-opcache php-xml php-gd php-soap php-pdo php-bcmath php-intl php-mbstring php-json php-iconv php-zip unzip git -y
gedit /etc/php.ini &>/dev/null
memory_limit = 1024M
upload_max_filesize = 256M
zlib.output_compression = on
max_execution_time = 18000
date.timezone = Asia/Kolkata
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install php-cli libsodium php-pear php-devel libsodium-devel make
pecl channel-update pecl.php.net
pecl install libsodium
nano /etc/php.ini
extension=sodium.so
php -i | grep sodium
mysql
CREATE DATABASE magento;
CREATE USER 'magento'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON magento.* TO 'magento'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
wget https://github.com/magento/magento2/archive/refs/tags/2.4.2.zip
unzip 2.4.2.zip ; mv magento2-* /var/www/html/magento2
cd /var/www/html/magento2
composer install
chown -R apache:apache /var/www/html/magento2
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R apache:apache . && chmod u+x bin/magento
nano /etc/httpd/conf.d/magento.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName magento.example.com
DocumentRoot /var/www/html/magento2/
DirectoryIndex index.php
<Directory /var/www/html/magento2/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/magento_error.log
CustomLog /var/log/httpd/magento_access.log combined
</VirtualHost>
systemctl restart httpd
sudo -u apache bin/magento module:disable {Magento_Elasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}
sudo -u apache bin/magento setup:install --admin-firstname="test" --admin-lastname="tests" --admin-email="admin@example.com" --admin-user="admin" --admin-password="secure@123" --db-name="magento" --db-host="localhost" --db-user="magento" --db-password="password" --language=en_US --currency=USD --timezone=Asia/Kolkata --cleanup-database --base-url=http://"magento.example.com"
nano /etc/hosts/
192.168.1.20 magento.example.com
cd /var/www/html/magento2
sudo -u apache bin/magento cron:install
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Thursday, March 31, 2022
How To Install Magento 2.4 on Rocky Linux 8
Wednesday, March 30, 2022
2 Ways To install Ruby On Rocky Linux | RVM
in This Tutorial you will Learn " 2 Ways To install Ruby On Rocky Linux "
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.60 |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
Method - 1
dnf install gnupg2 wget curl @ruby -y
ruby --version
M- 2 RVM
RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.
curl -sSL https://get.rvm.io | bash
source /etc/profile.d/rvm.sh
rvm requirements
rvm list known
rvm install ruby 3.0.2
ruby --version
_________________________________________________________________________________________
Tuesday, March 29, 2022
How To Install Ruby on Rails with PostgreSQL on Rocky Linux 8
in This Tutorial you will Learn " How To Install Ruby on Rails with PostgreSQL on Rocky Linux 8"
Ruby on Rails or RoR or Rails is a free and open-source web application framework written in Ruby with the MIT License. It is a full-stack web framework that uses the model-view-controller (MVC) pattern.
The Rails web framework provides structures for a database, web service, and web pages. Also, Rails includes some important tools such as scaffolding, Puma, Gems, etc.
PostgreSQL is an advanced, enterprise-class, and open-source relational database system.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - ; curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm reload ; rvm requirements run
rvm install ruby
dnf module enable nodejs:14
dnf install nodejs npm -y
npm install -g yarn
echo "export PATH=$PATH:/usr/local/bin" >> ~/.bashrc
source ~/.bashrc
gem install rails
dnf install postgresql-devel postgresql-server libpq-devel -y
postgresql-setup --initdb
nano /var/lib/pgsql/data/pg_hba.conf
systemctl restart postgresql
sudo -u postgres psql
create role rails_dev with createdb login password 'abc123';
rails new myapp -d postgresql
cd myapp/ ; nano config/database.yml
username: rails_dev
password: abc123
host: localhost
port: 5432
database: myapp_test
host: localhost
port: 5432
username: rails_dev
password: abc123
rails db:setup
rails db:migrate
rails s -b 192.168.1.20 -p 8080
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Monday, March 28, 2022
How To Install Ruby on Rails with Mysql on Rocky Linux 8.5
in This Tutorial you will Learn " How To Install Ruby on Rails with Mysql on Rocky Linux 8.5"
Or
How To Use MySQL With Ruby On Rails Application ?
Ruby on Rails or RoR or Rails is a free and open-source web application framework written in Ruby with the MIT License. It is a full-stack web framework that uses the model-view-controller (MVC) pattern.
The Rails web framework provides structures for a database, web service, and web pages. Also, Rails includes some important tools such as scaffolding, Puma, Gems, etc.
MySQL is an open-source relational database management system.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - && curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm reload ; rvm requirements run
rvm install ruby
dnf module enable nodejs:14
dnf install nodejs npm -y
npm install -g yarn
echo "export PATH=$PATH:/usr/local/bin" >> ~/.bashrc
source ~/.bashrc
gem install rails
rails --version ; node --version
nano /etc/yum.repos.d/mariadb.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.6/rhel8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
dnf update ; dnf install mariadb-server mariadb mysql-devel -y
systemctl start mariadb ; systemctl enable mariadb ; systemctl status mariadb
mariadb-secure-installation
rails new appname -d mysql
nano /root/appname/config/database.yml
password: mysql_root_password
mysql -u root -p
show databases;
cd appname/
rake db:create
rails server
rails server --binding=server_public_IP | rails server -b 0.0.0.0 | rails server -b 0.0.0.0 -p 8080
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Saturday, March 26, 2022
Setup Quick DNS Server On Rocky Linux 8.5 Using Dnsmasq
in This Tutorial you will Learn " How To Setup Quick DNS Server On Rocky Linux 8.5 Using Dnsmasq"
Dnsmasq is a very lightweight and simple DNS server. dnsmasq can be configured to be a DNS server and a DHCP server.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf -y install dnsmasq
gedit /etc/dnsmasq.conf &>/dev/null
domain-needed
bogus-priv
strict-order
server=/server.education/192.168.1.20 | line 67
expand-hosts
# line 145 : add your own domain name
domain=primaryhost.com
systemctl enable --now dnsmasq
firewall-cmd --add-service=dns ; firewall-cmd --runtime-to-permanent
_________________________________________________________________________________________
Client Host -
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf -y install bind-utils
nmcli connection modify ens33 ipv4.dns 192.168.1.20
nmcli connection down ens33; nmcli connection up ens33
dig www.primaryhost.com.
dig -x 192.168.1.20
_________________________________________________________________________________________
Wednesday, March 23, 2022
Set up DHCP Server Using Dnsmasq
in This Tutorial you will Learn " How To Set up a DHCP Server Using Dnsmasq On Rocky Linux 8.5 "
Dnsmasq is a lightweight DNS, TFTP and DHCP server.
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf -y install dnsmasq
gedit /etc/dnsmasq.conf &>/dev/null
dhcp-range=192.168.0.50,192.168.0.150,12h [ line 158 ]
# line 332: add entries for Gateway, NTP, DNS, Subnetmask
dhcp-option=option:router,192.168.0.1
dhcp-option=option:ntp-server,192.168.0.20
dhcp-option=option:dns-server,192.168.0.20
dhcp-option=option:netmask,255.255.255.0
systemctl restart dnsmasq
firewall-cmd --add-service=dhcp --permanent ; firewall-cmd --reload
________________________________________________________________________________________
Configure DHCP Client -
cat /etc/system-release ; sestatus ; hostname -I
dnf -y install dhcp-client
nmcli connection modify ens33 ipv4.method auto
nmcli connection down ens33; nmcli connection up ens33
________________________________________________________________________________________
Thursday, March 17, 2022
How To Install Parvula CMS on Ubuntu 18.04
Parvula CMS:
An extremely simple & flexible CMS generated from flat files with a complete RESTful API |
Offcial Website: https://parvulacms.github.io/
_____________________________________________________________________________________________________
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
create database db;
grant all on db.* to 'dbuser'@'localhost' identified by 'dbpass';
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 bafs/parvula parvula
cd /var/www/html/parvula/ ; composer install
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/parvula
ServerName www.yourdomain.com
<Directory /var/www/html/parvula/>
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/admin
cat /var/www/html/parvula/data/users/users.php