Wednesday, December 29, 2021

How To install OrangeScrum project management system On Rocky Linux

 Orangescrum is a collaborative and open source web application written with CakePHP. This app is a simple and easy-to-use tool for managing projects, teams, documents, tasks and communicating with teams on important issues.
𝐎𝐟𝐟𝐜𝐢𝐚𝐥 𝐖𝐞𝐛𝐬𝐢𝐭𝐞 :https://www.orangescrum.com/
________________________________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐑𝐨𝐜𝐤𝐲 𝐋𝐢𝐧𝐮𝐱 𝟖.𝟓 (𝐆𝐫𝐞𝐞𝐧 𝐎𝐛𝐬𝐢𝐝𝐢𝐚𝐧)          | 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:                    | 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:
________________________________________________________________________________________________________________________
                            cat /etc/os-release ; getconf LONG_BIT ; hostname ; hostname -I
 
dnf -y update ; dnf groupinstall "Development Tools" -y ; dnf install httpd httpd-tools mariadb-server mariadb php php-cli php-mysqlnd php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-curl php-opcache php-bcmath php-fpm php-common -y ; systemctl enable httpd  mariadb php-fpm ;  systemctl start httpd mariadb php-fpm ; systemctl status httpd mariadb php-fpm
    
mysql_secure_installation                                                             [        YourStrongPassword   ]                 
mysql -u root -p
set global sql_mode='';
set global sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';


CREATE DATABASE orangescrum;
CREATE USER 'orangescrumuser'@'localhost' IDENTIFIED BY 'YourStrongPassword';
GRANT ALL PRIVILEGES ON orangescrum.* TO 'orangescrumuser'@'localhost' IDENTIFIED BY 'YourStrongPassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

systemctl restart mysqld ; systemctl status mysqld
sed -i "s/post_max_size = 8M/post_max_size = 200M/" /etc/php.ini ; sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 200M/" /etc/php.ini

wget https://github.com/Orangescrum/orangescrum/archive/master.zip ; unzip master.zip ; mv orangescrum-master /var/www/html/
chown -R apache:apache /var/www/html/orangescrum-master ; chmod -R 777 /var/www/html/orangescrum-master

nano /etc/httpd/conf.d/orangescrum.conf
<VirtualHost *:80>
ServerName server.yourdomain.com
DocumentRoot /var/www/html/orangescrum-master
<Directory /var/www/html/orangescrum-master>
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>

mysql -u orangescrumuser -p orangescrum < /var/www/html/orangescrum-master/database.sql             
nano /var/www/html/orangescrum-master/app/Config/database.php
class DATABASE_CONFIG {

    public $default = array(
            'datasource' => 'Database/Mysql',
            'persistent' => false,
            'host' => 'localhost',
            'login' => 'orangescrumuser',
            'password' => 'YourStrongPassword',
            'database' => 'orangescrum',
            'prefix' => '',
            'encoding' => 'utf8',
    );
}

nano /var/www/html/orangescrum-master/app/Config/constants.php
//Gmail SMTP
define("SMTP_HOST", "ssl://smtp.gmail.com");
define("SMTP_PORT", "465");
define("SMTP_UNAME", "youremail@gmail.com");
define("SMTP_PWORD", "yourpassword");
define("IS_SMTP", "0");
define('FROM_EMAIL_NOTIFY', 'notify@mycompany.com'); //(REQUIRED)
define('SUPPORT_EMAIL', 'support@mycompany.com'); //(REQUIRED) From Email

systemctl restart httpd ; systemctl status httpd ; firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload
http://server.yourdomain.com
_________________________________________________________________________________________________________________________

How To Install LEMP Stack on Rocky Linux 8 [Step-by-Step]

 A LEMP Stack is a group of open source software commonly used for hosting dynamic websites and web apps. LEMP is an acronym for Linux operating system, Nginx web server, MySQL and PHP.
________________________________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐀𝐥𝐦𝐚𝐋𝐢𝐧𝐮𝐱 𝟖.𝟓 (𝐀𝐫𝐜𝐭𝐢𝐜 𝐒𝐩𝐡𝐲𝐧𝐱)                     | 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:                         | 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:
________________________________________________________________________________________________________________________
                            cat /etc/system-release ; getconf LONG_BIT ; hostname ; hostname -I
 
dnf -y update ; dnf groupinstall "Development Tools" -y
dnf install nginx mariadb-server mariadb php php-fpm php-cli php-gd php-curl php-zip php-mbstring php-opcache php-intl php-mysqlnd -y

systemctl enable nginx mariadb php-fpm; systemctl start nginx mariadb php-fpm ; systemctl status nginx mariadb php-fpm
mysql_secure_installation

nano /etc/php-fpm.d/www.conf
user = nginx  || Group = nginx

echo "<?php phpinfo() ?>" > /usr/share/nginx/html/info.php
echo "Hello There, Nginx Webserver is now running" > /usr/share/nginx/html/index.html

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
http://server.yourdomain.com/
http://server.yourdomain.com/info.php
_________________________________________________________________________________________________________________________

How To Install LAMP Stack On Rocky Linux 8 [Step-by-Step]

 LAMP stack is a collection of open-source software installed together to enable a server to host and run modern web applications written in server-side languages like PHP. LAMP is an acronym for Linux, Apache, MySQL/MariaDB, and PHP that work together to serve dynamic web content hosted on a server.
________________________________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐑𝐨𝐜𝐤𝐲 𝐋𝐢𝐧𝐮𝐱 𝟖.𝟓 (𝐆𝐫𝐞𝐞𝐧 𝐎𝐛𝐬𝐢𝐝𝐢𝐚𝐧)          | 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:                    | 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:
________________________________________________________________________________________________________________________
                            cat /etc/os-release ; getconf LONG_BIT ; hostname ; hostname -I
 
dnf -y update ; dnf groupinstall "Development Tools" -y
dnf install httpd httpd-tools mariadb-server mariadb php php-cli php-mysqlnd php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-curl php-opcache php-bcmath php-fpm php-common

systemctl enable httpd  mariadb php-fpm ;  systemctl start httpd mariadb php-fpm ; systemctl status httpd mariadb php-fpm
mysql_secure_installation

echo "<?php phpinfo() ?>" > /var/www/html/info.php
echo "Hello there, Apache webserver is now running" > /var/www/html/index.html

firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload
http://server.yourdomain.com
http://server.yourdomain.com/info.php
_________________________________________________________________________________________________________________________

Tuesday, December 28, 2021

How To Install Asterisk 18 VoIP Server on 𝐀𝐥𝐦𝐚𝐋𝐢𝐧𝐮𝐱 𝟖.𝟓 (𝐀𝐫𝐜𝐭𝐢𝐜 𝐒𝐩𝐡𝐲𝐧𝐱)

Asterisk is a powerful digital PBX and VoIP server released under an open-source license, so you can use it free of charge. VoIP is a technology used to establish and control telephone calls between multiple endpoints. It is used in VoIP gateways, conference servers, call centers, carriers, and government institutions around the world. It runs on Linux, BSD, and OS X and allows you to turn your local system or server into a communication server.
__________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐀𝐥𝐦𝐚𝐋𝐢𝐧𝐮𝐱 𝟖.𝟓 (𝐀𝐫𝐜𝐭𝐢𝐜 𝐒𝐩𝐡𝐲𝐧𝐱)                     | 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:                         | 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:
__________________________________________________________________________________________________
                            cat /etc/os-release ; getconf LONG_BIT ; hostname ; hostname -I
 
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf config-manager --set-enabled powertools
dnf install wget gcc gcc-c++ svn make bzip2 patch libedit-devel uuid-devel libuuid-devel libxml2-devel sqlite sqlite-devel nano openssl openssl-devel -y
dnf groupinstall "Development Tools"
git clone https://github.com/akheron/jansson.git
cd jansson ; autoreconf -i
./configure --prefix=/usr/
make ; make install

cd
git clone https://github.com/pjsip/pjproject.git
cd pjproject
./configure CFLAGS="-DNDEBUG -DPJ_HAS_IPV6=1" --prefix=/usr --libdir=/usr/lib64 --enable-shared --disable-video --disable-sound --disable-opencore-amr
make dep ; make ; make install
ldconfig

cd
wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz
tar -xvzf asterisk-18-current.tar.gz
cd asterisk-18.9.0/ ; ./configure --libdir=/usr/lib64
make menuselect
contrib/scripts/get_mp3_source.sh
make
make install
make samples
make config
ldconfig


groupadd asterisk
useradd -r -d /var/lib/asterisk -g asterisk asterisk
usermod -aG audio,dialout asterisk
chown -R asterisk.asterisk /etc/asterisk /var/{lib,log,spool}/asterisk /usr/lib64/asterisk
nano /etc/sysconfig/asterisk
AST_USER="asterisk"
AST_GROUP="asterisk"
nano /etc/asterisk/asterisk.conf
runuser = asterisk ; The user to run as.
rungroup = asterisk ; The group to run as.
systemctl restart asterisk ; systemctl enable asterisk ; systemctl status asterisk
asterisk -rvv
core show channels
core show uptime
quit
_________________________________________________________________________________________________

Sunday, December 19, 2021

How To Set Up MySQL 5.7 For Remote Access on Ubuntu 18.04 LTS

How To Set Up Mariadb For Remote Access on Ubuntu 18.04 LTS

 By default, remote access to the mariadb database server is disabled for security reasons. However, sometimes you need to provide remote access to database server from home or a web server.
MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL
__________________________________________________________________________________________________________________________
Our Server Specification:-
Os : Ubuntu 18.04.1 LTS Bionic Beaver 64Bit     || Hostname: www.yourdomain.com         || IP Address of Server:
__________________________________________________________________________________________________________________________
lsb_release -cd  ; getconf LONG_BIT ; hostname ; hostname -I
apt-get update ; apt-get upgrade -y
apt install net-tools build-essential software-properties-common curl wget git mariadb-server mariadb-client -y
mysql_secure_installation                                                              
systemctl restart mariadb ; systemctl enable mariadb
gedit /etc/mysql/mariadb.conf.d/50-server.cnf &>/dev/null

mysql -u root -p
create database dbname;
grant all privileges on dbname.* to 'dbuser'@'%' identified by'dbpassword' with grant option;
flush privileges;
exit
systemctl restart mariadb ; systemctl status mariadb
__________________________________________________________________________________________________________________________
192.168.153.234

Client Side:
lsb_release -cd  ; getconf LONG_BIT ; hostname ; hostname -I
apt-get update ; apt-get upgrade -y
apt install net-tools build-essential software-properties-common curl wget git mariadb-server mariadb-client -y
mysql_secure_installation
systemctl restart mariadb ; systemctl enable mariadb
mysql -h 192.168.153.234 -u dbuser -p

Friday, December 17, 2021

How To Setup Install Kooboo CMS On Ubuntu 18.04 LTS

 Kooboo is a cross-platform content management system (CMS) that you can use to develop static pages or complex and powerful websites… Kooboo supports Windows, Mac OS and Linux systems..||
Offcial Website: https://kooboo.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

wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
apt-get update ; apt-get install aspnetcore-runtime-2.1=2.1.5-1 -y

cd /tmp ; wget https://www.kooboo.com/download/kooboolinux.zip
unzip kooboolinux.zip -d $HOME
cd $HOME/Kooboo
dotnet Kooboo.App.dll
Or
nohup dotnet Kooboo.App.dll &

http://127.0.0.1
admin- admin

How To Setup IRedMail Server on Ubuntu 18.04 LTSs

 iRedMail is a free, open source mail server solution that automatically installs and configure all necessary mail server components on your server. iRedMail allows you to create as many mailboxes as you want through their built-in web interface. It provides a web-based interface for managing mails, folders, sieve filters. It uses OpenLDAP, MySQL, MariaDB, PostgreSQL to stores mailboxes. IRedMail server is made from several components including, Postfix, Dovecot, Nginx, OpenLdap, Amavised, SpamAssassin, ClamAV, Roundcube, SOGo, Netdata and Fail2ban.
Offcial Website: https://www.iredmail.org/index.html
_____________________________________________________________________________________________________
Our Server Specification-     
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   | IP address- 192.168.1.50  | Hostname :www.yourdomain.com
_____________________________________________________________________________________________________
hostname -f

lsb_release -cd ; hostname ; hostname -I ; whoami ; getconf LONG_BIT ; apt update ; apt install -y build-essential software-properties-common curl gdebi net-tools wget sqlite3 dirmngr nano lsb-release apt-transport-https -y

wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.9.tar.bz2
tar xjf iRedMail-0.9.9.tar.bz2
cd iRedMail-0.9.9
bash iRedMail.sh
reboot

* - Username: postmaster@yourdomain.com
* - Password: password

https://www.yourdomain.com/mail/
https://www.yourdomain.com/iredadmin/
* - Roundcube webmail: https://www.yourdomain.com/mail/
* - netdata (monitor): https://www.yourdomain.com/netdata/

How To Setup Searx On Ubuntu 18.04 LTS With apache2

 Searx is an open-source, free to use metasearch engine that aggregates results from more than 70 search services, including Google and Bing.
https://asciimoo.github.io/searx/
___________________________________________________________________________________________________________________________________________________
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 python-babel zlib1g-dev libffi-dev libssl-dev libxslt-dev python-dev python-virtualenv apache2 -y
a2enmod proxy rewrite proxy_http

cd /opt/ ; git clone https://github.com/asciimoo/searx.git        [ Config File Path :  /opt/searx/searx/settings.yml ]
cd /opt/searx ; virtualenv searx-ve
source searx-ve/bin/activate
./manage.sh update_packages
nohup python searx/webapp.py &
netstat -tlpn

nano /etc/apache2/sites-available/searx.conf
<VirtualHost *:80>
    ServerName www.yourdomain.com

    ProxyPass / http://127.0.0.1:8888/
    ProxyPassReverse / http://127.0.0.1:8888/
</VirtualHost>

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

How To Setup Radicale On Ubuntu 18.04 LTS

Radicale is a small but powerful CalDAV (calendars, todo-lists) and CardDAV (contacts) server, that:
Shares calendars through CalDAV, WebDAV and HTTP.
Shares contacts through CardDAV, WebDAV and HTTP.
Supports events, todos, journal entries and business cards.
Works out-of-the-box, no installation nor configuration required.
Can warn users on concurrent editing.
Can limit access by authentication.
Can secure connections.
Works with many CalDAV and CardDAV clients.
Is GPLv3-licensed free software.
Offcial Website: https://radicale.org/
___________________________________________________________________________________________________________________________________________________
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 python3-pip python3-pkg-resources

python3 -m pip install --upgrade radicale
python3 -m pip install --upgrade passlib bcrypt

useradd --system --home-dir / --shell /sbin/nologin radicale
mkdir -p /var/lib/radicale/collections && chown -R radicale:radicale /var/lib/radicale/collections
chmod o-x /var/lib/radicale/collections/ && mkdir /etc/radicale && touch /etc/radicale/config

gedit /etc/systemd/system/radicale.service &>/dev/null
[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contact) server
After=network.target
Requires=network.target

[Service]
ExecStart=/usr/bin/env python3 -m radicale
Restart=on-failure
User=radicale
# Deny other users access to the calendar data
UMask=0027
# Optional security settings
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
NoNewPrivileges=true
ReadWritePaths=/var/lib/radicale/collections

[Install]
WantedBy=multi-user.target

touch /etc/radicale/users ; chown radicale:radicale /etc/radicale/users ; chmod 400 /etc/radicale/users
systemctl enable radicale.service ; systemctl start radicale.service

http://127.0.0.1:5232
admin admin


How To Run Apache2 With PHP7.2-FPM On Ubuntu 18.04.1 LTS

 PHP-FPM (FastCGI Process Manager) is an alternative implementation of PHP FastCGI. It provides some additional features like Adaptive process spawning which is useful for sites.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification:-
Os : Ubuntu 18.04.1 LTS Bionic Beaver 64Bit     || Hostname: www.yourdomain.com         || IP Address of Server:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -a ; getconf LONG_BIT
apt install -y apache2 php7.2 php7.2-common php7.2-cli php7.2-fpm  
a2enmod proxy_fcgi setenvif rewrite ; a2enconf php7.2-fpm ; systemctl start apache2 ; systemctl enable apache2
gedit  /etc/apache2/sites-available/000-default.conf &>/dev/null
<VirtualHost *:80>
    ServerAdmin admin@yourdomain.com
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/html/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    <FilesMatch \.php$>
     SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/"
    </FilesMatch>
</VirtualHost>
apache2ctl configtest ; echo '<?php phpinfo(); ?>' > /var/www/html/info.php
systemctl restart php7.2-fpm apache2 ; systemctl status php7.2-fpm
http://127.0.0.1/info.php   
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Method:2  
apt install -y apache2 php7.2 php7.2-common php7.2-cli php7.2-fpm  
a2enmod proxy_fcgi setenvif rewrite ; a2enconf php7.2-fpm ; systemctl start apache2 ; systemctl enable apache2
gedit /etc/apache2/sites-available/default-ssl.conf &>/dev/null
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/"
    </FilesMatch>
apache2ctl configtest ; echo '<?php phpinfo(); ?>' > /var/www/html/info.php
systemctl restart php7.2-fpm apache2 ; systemctl status php7.2-fpm
http://127.0.0.1/info.php  
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Optional Step: gedit /etc/php/7.2/fpm/php.ini &>/dev/null
file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Optional Step:
Apache2 FastCGI Module install Manuall :-
apt install gdebi -y
wget http://mirrors.kernel.org/ubuntu/pool/multiverse/liba/libapache-mod-fastcgi/libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb
gdebi libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb
________________________________________________________________________________

How To Run Multiple Websites Using Nginx Webserver On Ubuntu 18.04 LTS

 Sometimes it may be wise to run multiple websites or blogs on a single server. For example, running one website or blog per server may not be the best way to utilize your server resources. One server, one website? No way.. just not efficient.
That’s why there’s a feature called Virtual Hosts on Apache2 and Server Blocks on Nginx. Virtual hosts or server blocks are feature on these web servers that allow multiple websites and blogs to be hosted on a single server. If a server has enough resources, why wastes those resources by only hosting a single website?
This brief tutorial is going to show you how to enable server blocks on Nginx web server to host multiple blogs.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification:-
Os : Ubuntu 18.04 LTS Bionic Beaver
Hostname:- www.example.com
IP Address of Server:-192.168.213.232
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -a ; getconf LONG_BIT ; hostname -I ; hostname

apt-get install nginx -y
systemctl restart nginx ; systemctl enable nginx
mkdir -p /var/www/html/yourdomain.com/public_html ; mkdir -p /var/www/html/myexample.com/public_html
gedit /var/www/html/yourdomain.com/public_html/index.html &>/dev/null
<html>
<head>
<title>This is the yourdomain.com domain</title>
</head>
<body>
<p>This is yourdomain.com</p>
</body>
</html>

gedit /var/www/html/myexample.com/public_html/index.html &>/dev/null
<html>
<head>
<title>This is the myexample.com domain</title>
</head>
<body>
<p>This is myexample.com</p>
</body>
</html>

chown www-data:www-data /var/www/html ; chmod -R 755 /var/www/html
cp /etc/nginx/sites-available/default /etc/nginx/sites-available/yourdomain.com
cp /etc/nginx/sites-available/default /etc/nginx/sites-available/myexample.com

gedit  /etc/nginx/sites-available/yourdomain.com &>/dev/null
server {
        listen 80;
        listen [::]:80;

        root /var/www/html/yourdomain.com/public_html;
        index index.html index.htm index.nginx-debian.html;

        server_name www.yourdomain.com;

        location / {
                try_files $uri $uri/ =404;
        }
}
gedit /etc/nginx/sites-available/myexample.com &>/dev/null
server {
        listen 80;
        listen [::]:80;

        root /var/www/html/myexample.com/public_html;
        index index.html index.htm index.nginx-debian.html;

        server_name www.myexample.com;

        location / {
                try_files $uri $uri/ =404;
        }
}
nginx -t ; rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
ln -s /etc/nginx/sites-available/myexample.com /etc/nginx/sites-enabled/

systemctl restart nginx ; systemctl enable nginx
nano /etc/hosts
192.168.213.232    www.yourdomain.com
192.168.213.232    www.myexample.com
hostname -I

http://www.myexample.com
http://www.yourdomain.com
Optional steps
sudo nano /etc/nginx/nginx.conf
server_names_hash_bucket_size 64;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Optional steps
sudo nano /etc/nginx/nginx.conf
server_names_hash_bucket_size 64;

How To Set Up a Node.js Application for Production with pm2 Nginx on Ubuntu 18.04

 Node.js is an open source Javascript runtime environment for easily building server-side and networking applications. The platform runs on Linux, OS X, FreeBSD, and Windows, and its applications are written in JavaScript. Node.js applications can be run at the command line but i will teach you how to run them as a service, so they will automatically restart on reboot or failure, so you can use them in a production environment.

Offcial website:- https://nodejs.org/en|| Github:- https://github.com/nodejs
Nginx is a web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. ||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification:-
Os : Ubuntu 18.04 LTS Bionic Beaver ||     Hostname:- www.example.com           || IP Address of Server:-192.168.232.177
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -a ; getconf LONG_BIT  
apt install -y build-essential curl gdebi aptitude git cmake net-tools software-properties-common leafpad nano synaptic vim wget libtool-bin autoconf automake python3-setuptools sqlite3 libtool-bin perl dpkg-dev python3-pip python3-dev libssl-dev checkinstall imagemagick openssl python libkrb5-dev nginx

curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt install nodejs -y

gedit hello.js &>/dev/null
const http = require('http');
const hostname = 'localhost';
const port = 3000;
const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World!\n');
});
server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});

npm install pm2@latest -g --no-optional --no-shrinkwrap --no-package-lock
pm2 start hello.js
pm2 startup
systemctl enable pm2-root ; systemctl start pm2-root ; systemctl status pm2-root
pm2 save

nano  /etc/nginx/conf.d/node.conf
server {
        listen 80;
        server_name www.testdomain.com;

        location / {
                proxy_pass http://127.0.0.1:3000;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
        }
}
nginx -t ; sudo netstat -tlpn | grep 3000 ; hostname -I ; systemctl restart nginx
sudo -- sh -c "echo 192.168.232.177 www.testdomain.com  >> /etc/hosts"
http://www.testdomain.com
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How to Setup install HTTP Git Server with Nginx on Debian 11

 Git is an open-source version control system used by thousands of developers around the world.
HTTP Git Server is an open-source project that uses an Nginx webserver to serve Git repositories over your Local Area Network (LAN). It is very simple and easy to set up. Anyone can manage it from the command-line interface.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐃𝐞𝐛𝐢𝐚𝐧 𝟏𝟏 𝐛𝐮𝐥𝐥𝐬𝐞𝐲𝐞 𝟔𝟒 𝐁𝐢𝐭     || 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:       || 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                            lsb_release -cd  ; getconf LONG_BIT ; hostname ; hostname -I
apt install -y build-essential net-tools curl git software-properties-common nginx git fcgiwrap apache2-utils unzip
mkdir /var/www/html/myrepo  ; cd /var/www/html/myrepo ; mkdir user1.git
cd user1.git ; git --bare init
git update-server-info
chown -R www-data:www-data /var/www/html/myrepo ; chmod -R 755 /var/www/html/myrepo
htpasswd -c /var/www/html/myrepo/htpasswd user1

nano /etc/nginx/conf.d/git.conf
server {
        listen 80;

        root /var/www/html/myrepo;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        server_name debian.example.com;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

location ~ (/.*) {
    client_max_body_size 0;
    auth_basic "Git Login";
    auth_basic_user_file "/var/www/html/myrepo/htpasswd";
    include /etc/nginx/fastcgi_params;
    fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
    fastcgi_param GIT_HTTP_EXPORT_ALL "";
    fastcgi_param GIT_PROJECT_ROOT /var/www/html/myrepo;
    fastcgi_param REMOTE_USER $remote_user;
    fastcgi_param PATH_INFO $1;
    fastcgi_pass  unix:/var/run/fcgiwrap.socket;
}

}
nginx -t
systemctl restart nginx ; systemctl status nginx
mkdir project ; cd project ; git init
git config --global user.email "user1@yourdomain.com"
git config --global user.name "user1"
git remote add origin http://user1@debian.example.com/user1.git
mkdir dev01
echo "Subscribe share like " > dev01/file1
git add .
git commit -a -m "Add files and directories"
git push origin master
git clone http://user1@debian.example.com//user1.git
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Wednesday, December 15, 2021

Manjaro / Arch - How To Set Up Your FTP Server Vsftpd On Manjaro 21.2.0 Linux

 Hi! The Tutorial Shows You Step-by-Step "  How To Set Up Your FTP Server ( Vsftpd ) On Manjaro 21.2.0 Linux


vsftpd is the Very Secure File Transfer Protocol Daemon.

Manjaro Linux is a fast, user-friendly, desktop-oriented operating system based on Arch Linux.    

𝐌𝐚𝐧𝐣𝐚𝐫𝐨 𝐇𝐨𝐦𝐞𝐩𝐚𝐠𝐞 - https://manjaro.org/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧-𝐎𝐬 : 𝐌𝗮𝗻𝗷𝗮𝗿𝗼 𝟐𝟏.𝟐.𝟎 (𝐐𝐨𝐧𝐨𝐬) 𝐗𝐅𝐂𝐄 𝟔𝟒 𝐁𝐢𝐭 𝗟𝗶𝗻𝘂𝘅 | 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞 :                𝐈𝐏 𝐚𝐝𝐝𝐫𝐞𝐬𝐬-
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

lsb_release -cd  ; getconf LONG_BIT ; lsb_release -a

sudo pacman -S vsftpd

sudo nano /etc/vsftpd.conf

write_enable=YES

local_enable=YES

ascii_upload_enable=YES

ascii_download_enable=YES

chroot_local_user=YES

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd.chroot_list

ls_recurse_enable=YES


# add to the end : specify chroot directory

# if not specified, users' home directory equals FTP home directory

local_root=public_html

# turn off seccomp filter if cannot login normally

seccomp_sandbox=NO


nano  /etc/vsftpd.chroot_list

# add users you allow to move over their home directory

manjaro

systemctl restart vsftpd ; systemctl status vsftpd

ftp://192.168.128.134 

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

Saturday, January 2, 2021

How To Run Nginx in a Docker Container On Ubuntu 20.04

 Docker container is a virtualized run-time environment where users can isolate applications from the underlying system. These containers are compact, portable units in which you can start up an application quickly and easily.
Offcial Website -https://www.docker.com/
Nginx is a web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Testing Environment: Ubuntu 20.04 LTS
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
apt update ; apt install -y build-essential net-tools curl git software-properties-common neofetch

docker --version ; docker-compose version
docker pull nginx
mkdir -p ~/docker-nginx/html ; cd ~/docker-nginx/html
nano index.html
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Test Page
</div>
</body>
</html>
docker run --name docker-nginx -p 80:80 -d -v ~/docker-nginx/html:/usr/share/nginx/html nginx
docker ps
docker ps -a
http://192.168.1.10/
docker stop docker-nginx 

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

Friday, January 1, 2021

How To Install Herbie CMS on Ubuntu 18.04

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

 Herbie is a simple Flat-File CMS- und Blogsystem based on human readable text files.
Offcial Website: https://www.getherbie.org/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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

apt-get update ; apt install -y apache2  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 ; systemctl enable apache2

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 getherbie/start-website herbie
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/herbie/web
     ServerName www.yourdomain.com

     <Directory /var/www/html/herbie/web/>
          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

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