Friday, January 28, 2022

How To Compile Apache 2.4 From Source On Ubuntu 18.04 LTS

 Apache Server (HTTP) is a free open source web server for Unix-like systems, windows and other operating systems. _______________________________________________________________________________________________________________________
Our Server Specification:-
Os : Ubuntu 18.04 LTS bionic beaver
Hostname:- www.example.com
IP Address of Server:-
_______________________________________________________________________________________________________________________
lsb_release -a ; getconf LONG_BIT

apt-get install -y build-essential dpkg-dev net-tools git nano gedit cmake dpkg-dev libc6-dev libssl-dev debhelper fakeroot libxml2-dev libxslt1-dev zlib1g-dev libpcre3-dev libbz2-dev libapr1-dev libaprutil1-dev libpcre3-dev libbz2-dev zlib1g-dev

cd /usr/local/src && wget https://zlib.net/fossils/zlib-1.2.11.tar.gz
tar xvfz zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix=/usr/local
make && make install

cd /usr/local/src && wget https://www.apache.org/dist/httpd/httpd-2.4.29.tar.gz
tar -xvf httpd-2.4.29.tar.gz
cd httpd-2.4.29
./configure --help
./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-deflate --enable-proxy --enable-proxy-balancer --enable-proxy-http --enable-ssl --enable-headers --enable-rewrite --enable-so --enable-cgi --enable-speling --enable-proxy-ftp --enable-headers --with-mpm=prefork
make && make install

/usr/local/apache2/bin/apachectl start
/usr/local/apache2/bin/apachectl stop

cp /usr/local/apache2/bin/apachectl /etc/init.d/apachectl
chmod +x /etc/init.d/apachectl
/usr/sbin/update-rc.d -f apachectl defaults
adduser --system apache
gedit /usr/local/apache2/conf/httpd.conf &>/dev/null
User apache
Group nogroup
/usr/local/apache2/bin/apachectl start
ps -aux | grep httpd

http://localhost/
or
http://127.0.0.1/
_______________________________________________________________________________________________________________________

Thursday, January 27, 2022

How To Install GNUMP3d Streaming Media Server in Ubuntu 20.04

in This Tutorial you will learn " How To Install GNUMP3d Streaming Media Server in Ubuntu 20.04"

GNUMP3d is a streaming server for MP3s, OGG vorbis files, movies and other media formats.
_________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -192.168.1.80            |Hostname -  ubuntu.example.com
_________________________________________________________________________________________
lsb_release -d ; hostname -I ; hostname

apt-get install apache2 -y
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gnump3d/gnump3d_3.0-2_all.deb
dpkg -i gnump3d_3.0-2_all.deb

Default streaming directory for gnump3d is /var/music.
nano /etc/gnump3d/gnump3d.conf
root = /var/music
user = root
sudo /etc/init.d/gnump3d restart
http://localhost:8888/
__________________________________________________________________________________________

How To install Gerbera Media Server with Apache On Ubuntu 20.04

 in This Tutorial you will learn "How To install Gerbera Media Server with Apache Web Server On Rocky Linux 8
Gerbera is a UPnP media server which allows you to stream your digital media through your home network and consume it on a variety of UPnP compatible devices.
Homepage - https://gerbera.io/
Apache is the most widely used web server software.
_________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -192.168.1.80            |Hostname -  ubuntu.example.com
_________________________________________________________________________________________
lsb_release -d ; hostname -I ; hostname

curl -fsSL https://gerbera.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -
apt-add-repository https://gerbera.jfrog.io/artifactory/debian
apt-get update ; apt install gerbera -y
systemctl start gerbera ; systemctl status gerbera

__________________________________________________________________________________________
Gerbera Config File - /etc/gerbera/config.xml
__________________________________________________________________________________________
apt update ; apt install apache2 -y
a2enmod proxy proxy_http
nano /etc/apache2/sites-available/gerbera.conf
<VirtualHost *:80>
    #Domain Name
    ServerName gerbera.com
    ServerAlias www.gerbera.com

    #HTTP proxy/gateway server
    ProxyRequests off
    ProxyPass / http://192.168.1.80:49152/
    ProxyPassReverse / http:/192.168.1.80:49152/     
</VirtualHost>
a2dissite 000-default.conf ; a2ensite gerbera.conf
apache2ctl configtest
systemctl daemon-reload ; systemctl reload apache2
echo "192.168.1.80 www.gerbera.com"  >> /etc/hosts
__________________________________________________________________________________________

How To Install Emby Media Server On Rocky Linux 8.5

 Emby is a free media server that allows your to organize and stream your movies, shows, music, and photos.
Hoempage - https://emby.media/
_________________________________________________________________________________________
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

yum install https://github.com/MediaBrowser/Emby.Releases/releases/download/4.6.7.0/emby-server-rpm_4.6.7.0_x86_64.rpm
systemctl restart emby-server ; systemctl status emby-server
dnf update ; dnf install httpd -y
nano /etc/httpd/conf.d/example.conf
<VirtualHost *:80>
        ServerAdmin admin@example.com
        ServerName www.example.com    
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined
        ProxyRequests On
        ProxyPass / http://localhost:8096/
        ProxyPassReverse / http://localhost:8096/
</VirtualHost>
systemctl start httpd ; systemctl enable httpd ; systemctl status httpd
apachectl configtest
nano /etc/hosts
192.168.1.60    www.example.com    
systemctl restart httpd ; systemctl status httpd
www.example.com    

mkdir -p /opt/movies ; chmod -R 777 /opt/movies
_________________________________________________________________________________________


How To install Stremio Media center On Ubuntu 20.04

 in This Tutorial you will learn " How To install Stremio On Ubuntu 20.04"
Stremio is a media center that allows users to watch movies, TV shows, and even YouTube videos instantaneously. It also supports DLNA and many other features. Here’s how to use Stremio on Linux.
_________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -192.168.1.80            |Hostname -  ubuntu.example.com
_________________________________________________________________________________________
lsb_release -d

wget https://dl.strem.io/shell-linux/v4.4.137/stremio_4.4.137-1_amd64.deb
apt install ./stremio_4.4.137-1_amd64.deb
_________________________________________________________________________________________

How To install Red5 Media server on Rocky Linux 8.5

 Red5 Media Server is a powerful media streaming server worked on RTMP protocal. Red5 is an open and extensible platform, which can be used in Video Conferencing or Network gaming.
Homepage -https://www.red5pro.com/open-source/
_________________________________________________________________________________________
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

yum -y install  java-11-openjdk java-11-openjdk-devel
sudo tee /etc/profile.d/java11.sh <<EOF
export JAVA_HOME=\$(dirname \$(dirname \$(readlink \$(readlink \$(which javac)))))
export PATH=\$PATH:\$JAVA_HOME/bin
export CLASSPATH=.:\$JAVA_HOME/jre/lib:\$JAVA_HOME/lib:\$JAVA_HOME/lib/tools.jar
EOF
source /etc/profile.d/java11.sh
alternatives --config java
echo $JAVA_HOME ; java -version

wget https://github.com/Red5/red5-server/releases/download/v1.2.12/red5-server-1.2.12.tar.gz
tar -zxvf red5-server-1.2.12.tar.gz
cd red5-server/
nano red5.sh

sh red5.sh &
http://127.0.0.1:5080/
http://127.0.0.1:5080/demos/

dnf install -y http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
dnf install -y libcurl flash-plugin alsa-plugins-pulseaudio
_________________________________________________________________________________________







How To Install Plex Media Server With Nginx on Rocky Linux 8.5

 in This Tutorial you will learn " How To Install Plex Media Server With Nginx on Rocky Linux 8.5"
    
Plex is a streaming service that is based on a client-server architecture. Homepage - https://www.plex.tv/
_________________________________________________________________________________________
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

nano /etc/yum.repos.d/plex.repo
[Plex]
name=Plex
baseurl=https://downloads.plex.tv/repo/rpm/$basearch/
enabled=1
gpgkey=https://downloads.plex.tv/plex-keys/PlexSign.key
gpgcheck=1

dnf install plexmediaserver nginx -y
systemctl enable plexmediaserver ; systemctl restart plexmediaserver ; systemctl status plexmediaserver
mkdir -p /opt/plexmedia/{movies,series} ; chown -R plex: /opt/plexmedia
nano /etc/nginx/nginx.conf
server_names_hash_bucket_size 64;

nano /etc/nginx/conf.d/plex.conf
upstream plex_backend {
        server 127.0.0.1:32400;
        keepalive 32;
}
server {
        listen 80;
        server_name plex.example.com;
        send_timeout 100m;
        gzip on;
        gzip_vary on;
        gzip_min_length 1000;
        gzip_proxied any;
        gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
        gzip_disable "MSIE [1-6]\.";

        client_max_body_size 100M;
       #Forward real ip and host to Plex
        proxy_set_header Host $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;
        proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
        proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
        proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
       #Websockets
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
      #Buffering off send to the client as soon as the data is received from Plex.
        proxy_redirect off;
        proxy_buffering off;

        location / {
                proxy_pass http://plex_backend;
        }
}

nginx -t
nano /etc/hosts
192.168.1.60    plex.example.com
systemctl restart nginx ; systemctl status nginx

firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --zone=public --permanent --add-service=https
firewall-cmd --reload
plex.example.com
__________________________________________________________________________________________

How To Ant Media Server With Apache On Ubuntu 20.04 LTS

 in This Tutorial you will learn " How To Ant Media Server With Apache web server On Ubuntu 20.04 LTS"
Ant Media Server is a media streaming server with WebRTC support.
Offcial website - https://antmedia.io/
__________________________________________________________________________________________
lsb_release -d ; hostname -I ; hostname
cd /usr/local/src
wget https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.0.0/ant-media-server-2.0.0-community-2.0.0-20200504_1842.zip
wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh
chmod 755 install_ant-media-server.sh
./install_ant-media-server.sh ant-media-server-2.0.0-community-2.0.0-20200504_1842.zip
systemctl restart antmedia ; systemctl status antmedia

apt update ; apt install apache2 -y
a2enmod proxy proxy_http
nano  /etc/apache2/sites-available/antmedia.conf
<VirtualHost *:80>
    #Domain Name
    ServerName antmedia.com
    ServerAlias www.antmedia.com

    #HTTP proxy/gateway server
    ProxyRequests off
    ProxyPass / http://127.0.0.1:5080/
    ProxyPassReverse / http:/127.0.0.1:5080/     
</VirtualHost>
a2dissite 000-default.conf ; a2ensite antmedia.conf
apache2ctl configtest
systemctl daemon-reload ; systemctl reload apache2
echo "192.168.1.80 www.antmedia.com"  >> /etc/hosts
http://www.antmedia.com  | Username- admin/password
________________________________________________________________________________________

How To Install Ampache Streaming Media Server On Rocky Linux 8.5

 in This Tutorial you will learn " How To Install Ampache Streaming Media Server On Rocky Linux 8.5"

Ampache is a free, open-source, and web-based software that allows you to host your own music streaming server. With Ampache, you can access your music and video over the internet. You can view, edit, and play your music via a web browser or any media streaming client.

Features:-
Powerful API and streaming to any client
Flexible catalogs and customization
Modern HTML5 Web Player
Support various authorization methods such as MySQL, LDAP, HTTP and PAM
Compatibility with any Subsonic client                    
Offcial website -https://ampache.org/  | Github - https://github.com/ampache/ampache
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/centos-release ; getconf LONG_BIT ; hostname ; hostname -I ; sestatus

dnf module reset php ; dnf -y module install php:7.4
dnf install -y httpd mariadb mariadb-server php php-{bz2,mysqli,curl,gd,intl,common,mbstring,xml,json,bcmath,pear,xmlrpc,snmp,cli,ldap,opcache,pdo}

systemctl enable httpd mariadb ;  systemctl start httpd mariadb
mysql_secure_installation

mkdir -p /var/www/yourdomain.com/public_html
chown -R $USER:$USER /var/www/yourdomain.com ; chmod -R 777 /var/www
nano /etc/httpd/conf.d/yourdomain.com.conf
<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/yourdomain.com/public_html/public
    <Directory /var/www/yourdomain.com/public_html/public>
        Options -Indexes +FollowSymLinks
        AllowOverride All
    </Directory>
    ErrorLog /var/log/httpd/yourdomain.com-error.log
    CustomLog /var/log/httpd/yourdomain.com-access.log combined
</VirtualHost>

cd /var/www/yourdomain.com/public_html
wget https://github.com/ampache/ampache/releases/download/5.2.0/ampache-5.2.0_all.zip
unzip ampache-5.2.0_all.zip

mysql -u root -p
create database testdb;
create user 'testuser'@'localhost' IDENTIFIED BY 'testpassword';
grant all privileges on testdb.* TO 'testuser'@'localhost';
flush privileges;
exit;

apachectl configtest
echo "192.168.1.60 www.yourdomain.com" >> /etc/hosts
systemctl restart httpd ; systemctl status httpd
www.yourdomain.com
__________________________________________________________________________________________







How To Install Universal Media Server in Ubuntu 20.04

 in This Tutorial you will learn "How To Install and Setup Universal Media Server in Ubuntu 20.04"

Universal Media Server, UMS in short, is a DLNA-compliant UPnP media server allows streaming media files to a wide range of devices including video game consoles, smart TVs, smartphones, and Blu-ray players.
_________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -192.168.1.80            |Hostname -  ubuntu.example.com
_________________________________________________________________________________________
lsb_release -d ; hostname -I ; hostname ; apt install mediainfo dcraw vlc mplayer mencoder -y
wget -c https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/10.0.1/UMS-10.0.1-x86_64.tgz
tar -zxvf UMS-10.0.1-x86_64.tgz -C /opt/ --transform s/ums-10.0.1/ums/
users
nano /etc/systemd/system/ums.service
[Unit]
Description=Run UMS as ubuntu
DefaultDependencies=no
After=network.target

[Service]
Type=simple
User=ubuntu
Group=ubuntu
ExecStart=/opt/ums/UMS.sh
TimeoutStartSec=0
RemainAfterExit=yes
Environment="UMS_MAX_MEMORY=768M"

[Install]
WantedBy=default.target

systemctl daemon-reload ; systemctl enable ums.service ; systemctl start ums.service ; systemctl status ums.service
http://192.168.1.80:9001
__________________________________________________________________________________________

How To Install Subsonic Media Server with Apache On Rocky Linux 8.5

 in This Tutorial you will learn" How to Install Subsonic Media Server With Apache On Rocky Linux 8.5 "                      
Subsonic is a web-based media server written in Java language, so it can run on any operating system with Java support. It comes with a user-friendly web interface and allows us to share music and video with multiple users. You can stream your music from home and listen to your music from anywhere.
Homepage - http://www.subsonic.org/pages/index.jsp
________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; java -version
dnf groupinstall "Development Tools" -y

Subsonic Download page - http://www.subsonic.org/pages/download.jsp
wget https://s3-eu-west-1.amazonaws.com/subsonic-public/download/subsonic-6.1.6.rpm
dnf install subsonic-6.1.6.rpm
systemctl restart subsonic ; systemctl enable subsonic ; systemctl status subsonic
http://localhost:4040/

dnf update ; dnf install httpd -y
nano /etc/httpd/conf.d/subsonic.conf
<VirtualHost *:80>
        ServerAdmin admin@subsonic.com
        ServerName www.subsonic.com    
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined
        ProxyRequests On
        ProxyPass / http://localhost:4040/
        ProxyPassReverse / http://localhost:4040/
</VirtualHost>
systemctl start httpd ; systemctl enable httpd ; systemctl status httpd
apachectl configtest
nano /etc/hosts
192.168.1.60    www.subsonic.com    
systemctl restart httpd ; systemctl status httpd
www.subsonic.com    
admin/admin
__________________________________________________________________________________________

How To install Medusa On Ubuntu 20.04

in This Tutorial you will learn "How To install Medusa - Automatic Video Library Manager On Ubuntu 20.04"
Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
Offcial website - https://pymedusa.com/
Github :- https://github.com/pymedusa/Medusa
_________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -192.168.1.80            |Hostname -  ubuntu.example.com
_________________________________________________________________________________________
lsb_release -d ; hostname -I ; hostname

addgroup --system medusa
adduser --disabled-password --system --home /var/lib/medusa --gecos "Medusa" --ingroup medusa medusa

mkdir /opt/medusa && sudo chown medusa:medusa /opt/medusa
git clone https://github.com/pymedusa/Medusa.git /opt/medusa
chown -R medusa:medusa /opt/medusa

cp -v /opt/medusa/runscripts/init.systemd /etc/systemd/system/medusa.service
chown root:root /etc/systemd/system/medusa.service ; chmod 644 /etc/systemd/system/medusa.service
systemctl enable medusa ; systemctl start medusa ; systemctl status medusa
http://127.0.0.1:8081
__________________________________________________________________________________________

How To install Madsonic (Music Streaming Server) With Nginx On Rocky Linux 8

 in This Tutorial you will learn " How To install Madsonic (Music Streaming Server) With Nginx On Rocky Linux 8"

Madsonic is a web-based media streamer and jukebox server. |
Homepage -https://www.madsonic.org/pages/index.jsp
_________________________________________________________________________________________
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

java -version
Download Link -https://www.madsonic.org/pages/download.jsp
https://www.madsonic.org/pages/download62.jsp

http://localhost:4040
admin/admin
_________________________________________________________________________________________
dnf install @nginx -y
cd /etc/nginx/ ; mkdir sites-available ; mkdir sites-enabled
nano /etc/nginx/sites-available/ghost
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name example.com www.example.com;
    root /var/www/ghost;
    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_pass http://127.0.0.1:4040;
    }
    client_max_body_size 50m;
}
nginx -t
ln -s /etc/nginx/sites-available/ghost /etc/nginx/sites-enabled/ghost
nano /etc/nginx/nginx.conf  [
include /etc/nginx/sites-enabled/*;
server_names_hash_bucket_size 64;
Comment out the entire server block:
nano /etc/hosts
192.168.1.60    www.example.com
systemctl restart nginx ; systemctl status nginx
www.example.com
__________________________________________________________________________________________

How To install Madsonic (Music Streaming Server) With Apache On Rocky Linux 8

 in This Tutorial you will learn " How To install Madsonic (Music Streaming Server) With Apache Web Server On Rocky Linux 8"

Madsonic is a web-based media streamer and jukebox server. | Apache is the most widely used web server software.
Homepage -https://www.madsonic.org/pages/index.jsp
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; hostname ; java -version ; hostname -I
dnf groupinstall "Development Tools" -y

Download Link -https://www.madsonic.org/pages/download.jsp | https://www.madsonic.org/pages/download62.jsp

http://localhost:4040  | admin/admin
dnf update ; dnf install httpd -y
nano /etc/httpd/conf.d/example.conf
<VirtualHost *:80>
        ServerAdmin admin@example.com
        ServerName www.example.com    
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined
        ProxyRequests On
        ProxyPass / http://localhost:4040/
        ProxyPassReverse / http://localhost:4040/
</VirtualHost>
systemctl start httpd ; systemctl enable httpd ; systemctl status httpd
apachectl configtest
nano /etc/hosts
192.168.1.60    www.example.com    
systemctl restart httpd ; systemctl status httpd
www.example.com    
__________________________________________________________________________________________

How To Install Jellyfin Media Server With Nginx On Ubuntu 20.04 LTS

 lsb_release -d ; hostname -I ; hostname
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo apt-key add -
apt update ; apt install apt-transport-https ca-certificates jellyfin nginx  -y
systemctl start jellyfin ; systemctl status jellyfin
http://127.0.0.1:8096/

Library Path - mkdir -p /jellyfin-library/Movies
nano /etc/nginx/conf.d/jellyfin.conf
server {
       listen 80;
       server_name ubuntu.example.com;

       location / {
              proxy_pass http://127.0.0.1:8096;
              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
systemctl reload nginx ; systemctl status nginx
echo "192.168.1.80 ubuntu.example.com"  >> /etc/hosts
ubuntu.example.com
__________________________________________________________________________________________

How To Install Jellyfin Media Server With Apache On Ubuntu 20.04 LTS

in This Tutorial you will learn "How To Install Jellyfin Media Server With Apache Web Server On Ubuntu 20.04 LTS"
Jellyfin is an open source fork of Emby Media Server that allows you to organize and stream your movies, shows, music, and photos.
Apache is the most widely used web server software.
_________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -192.168.1.80            |Hostname -  ubuntu.example.com
_________________________________________________________________________________________
lsb_release -d ; hostname -I ; hostname
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo apt-key add -
apt update ; apt install apt-transport-https ca-certificates jellyfin apache2 -y
systemctl start jellyfin ; systemctl status jellyfin

a2enmod proxy proxy_http headers proxy_wstunnel
nano /etc/apache2/sites-available/jellyfin.conf
<VirtualHost *:80>
   ServerName ubuntu.example.com
   ErrorDocument 404 /404.html
   DocumentRoot /var/www
   ProxyPass / http://127.0.0.1:8096/
   ProxyPassReverse / http://127.0.0.1:8096/
   Header always unset X-Frame-Options
</VirtualHost>

a2dissite 000-default.conf ; a2ensite jellyfin.conf
apache2ctl configtest
systemctl daemon-reload ; systemctl reload apache2 ; systemctl enable apache2
echo "192.168.1.80 ubuntu.example.com"  >> /etc/hosts
Library Path - mkdir -p /jellyfin-library/Movies
ubuntu.example.com
__________________________________________________________________________________________

How To install Ant Media Server With Nginx On Ubuntu 20.04 LTS

 in This Tutorial you will learn " How To install Ant Media Server With Nginx web server On Ubuntu 20.04 LTS"
Ant Media Server is a media streaming server with WebRTC support.
Offcial website - https://antmedia.io/

NGINX is an open-source web server software that serves as a reverse proxy, HTTP load balancer, and email proxy for IMAP, POP3, and SMTP.
_________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -         |Hostname -  
_________________________________________________________________________________________
lsb_release -d ; hostname -I ; hostname ; cd /usr/local/src
wget https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.0.0/ant-media-server-2.0.0-community-2.0.0-20200504_1842.zip
wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh

chmod 755 install_ant-media-server.sh
./install_ant-media-server.sh ant-media-server-2.0.0-community-2.0.0-20200504_1842.zip
systemctl restart antmedia ; systemctl status antmedia

apt update ; apt install nginx -y
systemctl start nginx ; systemctl enable nginx
nano /etc/nginx/conf.d/antmedia.conf
server {
      listen 80;
      server_name www.antmedia.com;

      location / {
          proxy_pass http://127.0.0.1:5080;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

          #upgrade to WebSocket protocol when requested
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "Upgrade";
      }
}
nginx -t
systemctl restart nginx
echo "192.168.1.80 www.antmedia.com"  >> /etc/hosts
http://www.antmedia.com  |  admin/yourpassword
__________________________________________________________________________________________


How To Install AirSonic Media Server With Nginx on Rocky Linux 8.5

AirSonic is a free and open source media streaming server.
NGINX is an open-source web server software that serves as a reverse proxy, HTTP load balancer, and email proxy for IMAP, POP3, and SMTP.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; java -version ; sestatus
dnf groupinstall "Development Tools" -y
useradd airsonic ; mkdir /var/airsonic /var/media_files
wget https://github.com/airsonic/airsonic/releases/download/v10.4.1/airsonic.war --output-document=/var/airsonic/airsonic.war
chown -R airsonic /var/airsonic ; chown -R airsonic /var/media_files

wget https://raw.githubusercontent.com/airsonic/airsonic/master/contrib/airsonic.service -O /etc/systemd/system/airsonic.service
 wget https://raw.githubusercontent.com/airsonic/airsonic/master/contrib/airsonic-systemd-env -O /etc/sysconfig/airsonic
systemctl daemon-reload ; systemctl start airsonic ; systemctl enable airsonic ; systemctl status airsonic

dnf update ; dnf install nginx -y
nano /etc/nginx/conf.d/airsonic.conf
server {
   listen 80;
   server_name server.yourdomain.com;
   access_log off;
   error_log off;
   location / {
      proxy_pass http://127.0.0.1:8080;
      proxy_redirect off;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_max_temp_file_size 0;
      client_max_body_size 10m;
      client_body_buffer_size 128k;
      proxy_connect_timeout 90;
      proxy_send_timeout 90;
      proxy_read_timeout 90;
      proxy_buffer_size 4k;
      proxy_buffers 4 32k;
      proxy_busy_buffers_size 64k;
      proxy_temp_file_write_size 64k;
}
}
nginx -t
nano /etc/hosts
192.168.1.60    server.yourdomain.com
systemctl restart nginx ; systemctl status nginx
firewall-cmd --zone=public --add-port=80/tcp --permanent ; firewall-cmd --zone=public --add-port=8080/tcp --permanent ; firewall-cmd --reload
http://server.yourdomain.com/
http://server.yourdomain.com/airsonic
admin/admin
__________________________________________________________________________________________

How To Install AirSonic Media Server With Apache on Rocky Linux 8.5

 in This Tutorial you will learn "How To Install AirSonic Media Server With Apache web server on Rocky Linux 8.5"     
AirSonic is a free and open source media streaming server. Apache is the most commonly used Web server on Linux systems.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; java -version ; sestatus
dnf groupinstall "Development Tools" -y
useradd airsonic ; mkdir /var/airsonic /var/media_files
wget https://github.com/airsonic/airsonic/releases/download/v10.4.1/airsonic.war --output-document=/var/airsonic/airsonic.war
chown -R airsonic /var/airsonic ; chown -R airsonic /var/media_files

wget https://raw.githubusercontent.com/airsonic/airsonic/master/contrib/airsonic.service -O /etc/systemd/system/airsonic.service
 wget https://raw.githubusercontent.com/airsonic/airsonic/master/contrib/airsonic-systemd-env -O /etc/sysconfig/airsonic
systemctl daemon-reload ; systemctl start airsonic ; systemctl enable airsonic ; systemctl status airsonic

dnf update ; dnf install httpd -y
nano /etc/httpd/conf.d/airsonic.conf
<VirtualHost *:80>
        ServerAdmin admin@airsonic.com
        ServerName www.airsonic.com    
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined
        ProxyRequests On
        ProxyPass / http://localhost:8080/
        ProxyPassReverse / http://localhost:8080/
</VirtualHost>
systemctl start httpd ; systemctl enable httpd ; systemctl status httpd
apachectl configtest
nano /etc/hosts
192.168.1.60    www.airsonic.com    
systemctl restart httpd ; systemctl status httpd
www.airsonic.com     | admin/admin
__________________________________________________________________________________________

Tuesday, January 25, 2022

How To Install Attendize Event Management Software on Ubuntu 18.04 LTS

Attendize is an open-source ticket selling and event management platform written in PHP on top of the Laravel framework.
Offcial Website:https://www.attendize.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 vim sudo unzip socat bash-completion

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 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 php-imagick php-pear

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
git clone https://github.com/attendize/attendize /var/www/html/attendize
cd /var/www/html/attendize ; cp .env.example .env
nano .env
composer install
php artisan attendize:install
php artisan key:generate
chown -R www-data:www-data /var/www/html/attendize ; chmod -R 755 /var/www/html/attendize

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

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

     <Directory /var/www/html/attendize/public/>
          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/index.php

Saturday, January 22, 2022

How To install Mattermost with Apache on Rocky Linux 8.5

 Mattermost is an open-source instant messaging service. It comes in both free and paid versions. It can be operated either in the cloud or on-premise as a web application.
Homepage - https://mattermost.com/
_________________________________________________________________________________________
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 ; dnf install mysql-server httpd -y

systemctl start mysqld httpd ; systemctl enable mysqld httpd
mysql_secure_installation

mysql -u root -p
CREATE DATABASE matterdb;
CREATE USER 'matteruser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON matterdb.* TO matteruser@localhost;
FLUSH PRIVILEGES;
EXIT;

useradd --system --user-group mattermost
wget https://releases.mattermost.com/6.0.2/mattermost-6.0.2-linux-amd64.tar.gz ; tar -xf mattermost-6.0.2-linux-amd64.tar.gz ; mv mattermost /opt

mkdir /opt/mattermost/data ; chown -R mattermost:mattermost /opt/mattermost ; chmod -R g+w /opt/mattermost

nano /opt/mattermost/config/config.json
"SiteURL": "http://server.yourdomain.com",
    "DriverName": "mysql",
    "DataSource": "matteruser:password@tcp(localhost:3306)/matterdb?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=30s",

nano /etc/systemd/system/mattermost.service
[Unit]
Description=Mattermost
After=syslog.target network.target mysqld.service

[Service]
Type=notify
WorkingDirectory=/opt/mattermost
User=mattermost
ExecStart=/opt/mattermost/bin/mattermost
PIDFile=/var/spool/mattermost/pid/master.pid
TimeoutStartSec=3600
LimitNOFILE=49152

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

nano /etc/httpd/conf.d/example.conf
<VirtualHost *:80>
        ServerAdmin admin@example.com
        ServerName server.yourdomain.com    
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined
        ProxyRequests On
        ProxyPass / http://localhost:8065/
        ProxyPassReverse / http://localhost:8065/
</VirtualHost>
apachectl configtest ; echo "192.168.1.60 server.yourdomain.com" >> /etc/hosts
firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload        
systemctl restart httpd ; systemctl status httpd
http://server.yourdomain.com | admin/a7=DtPIsp>ir1j!  
__________________________________________________________________________________________

How To install Mattermost with Nginx web server on Rocky Linux 8.5

 in This Tutorial you will learn " How To install Mattermost with Nginx web server on Rocky Linux 8.5"
Mattermost is an open-source instant messaging service.
Nginx (pronounced engine x) is open source Web server software that also performs reverse proxy, load balancing, email proxy and HTTP cache services.
Hoempage - https://mattermost.com/
_________________________________________________________________________________________
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 ; dnf install mysql-server nginx -y

systemctl start mysqld ; systemctl enable mysqld
mysql_secure_installation

mysql -u root -p
CREATE DATABASE matterdb;
CREATE USER 'matteruser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON matterdb.* TO matteruser@localhost;
FLUSH PRIVILEGES;
EXIT;

useradd --system --user-group mattermost ; wget https://releases.mattermost.com/6.0.2/mattermost-6.0.2-linux-amd64.tar.gz
tar -xf mattermost-6.0.2-linux-amd64.tar.gz ; mv mattermost /opt

mkdir /opt/mattermost/data ; chown -R mattermost:mattermost /opt/mattermost ; chmod -R g+w /opt/mattermost ; nano /opt/mattermost/config/config.json

"SiteURL": "http://server.yourdomain.com",
    "DriverName": "mysql",
    "DataSource": "matteruser:password@tcp(localhost:3306)/matterdb?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=30s",

nano /etc/systemd/system/mattermost.service
[Unit]
Description=Mattermost
After=syslog.target network.target mysqld.service

[Service]
Type=notify
WorkingDirectory=/opt/mattermost
User=mattermost
ExecStart=/opt/mattermost/bin/mattermost
PIDFile=/var/spool/mattermost/pid/master.pid
TimeoutStartSec=3600
LimitNOFILE=49152

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

nano /etc/nginx/conf.d/mattermost.conf
 server {
        listen       80;
        server_name  server.yourdomain.com;
        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;
        location / {
    proxy_pass http://localhost:8065/;
            index  index.html index.htm;
        }
        error_page 404 /404.html;
            location = /40x.html {
        }
        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }
nginx -t
systemctl start nginx ; systemctl enable nginx ; systemctl status nginx
http://server.yourdomain.com  | admin/●●●●●●
__________________________________________________________________________________________

Friday, January 7, 2022

How To Install SABnzbd Usenet Client with Nginx on Ubuntu 18.04 LTS

 SABnzbd is a free open-source and web-based Usetnet client for downloading binary content (image, audio, video, e-book, etc.) on Usetnet. It’s cross-platform, available for Linux, BSD, MacOS, UNIX, Windows, Synology, QNAP and so on.
Offcial Website: https://sabnzbd.org/
Github:https://github.com/sabnzbd/sabnzbd                        
_______________________________________________________________________________________________________
Our Server Specification- [ Os:  Ubuntu 18.04.2 LTS Bionic Beaver 64Bit ]
_______________________________________________________________________________________________________
lsb_release -cd  ; getconf LONG_BIT ; whoami ; apt update -y ; apt install -y build-essential software-properties-common curl gdebi vim wget aptitude leafpad nano git net-tools lsb-release apt-transport-https nginx

sed -i 's/ubuntu/www.yourdomain.com/g' /etc/hosts
sed -i 's/ubuntu/www.yourdomain.com/g' /etc/hostname

apt update ; apt install sabnzbdplus -y
man sabnzbdplus
sabnzbdplus -d
sabnzbdplus -d --browser 0
sabnzbdplus -d -s 127.0.0.1:8081 --browser 0


nano /etc/systemd/system/sabnzbd.service
[Unit]
Description=SABnzbd Usenet Client
After=network.target

[Service]
Type=simple
User=sabnzbd
Group=sabnzbd
ExecStart=/usr/bin/python -OO /usr/bin/sabnzbdplus --browser 0 &
ExecStop=/usr/bin/pkill sabnzbdplus
Restart=always
SyslogIdentifier=SABnzbd Usenet Client

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
adduser --system --home /home/sabnzbd sabnzbd

addgroup --system sabnzbd
adduser sabnzbd sabnzbd
pkill sabnzbdplus
systemctl start sabnzbd ; systemctl enable sabnzbd ; systemctl status sabnzbd

nano /etc/nginx/conf.d/sabnzbd.conf
server {
       listen 80;
       server_name www.yourdomain.com;

       location / {
              proxy_pass http://localhost:8080;
              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 ; ifconfig
systemctl enable nginx ; systemctl reload nginx
echo "192.168.11.131 www.yourdomain.com" >> /etc/hosts
http://www.yourdomain.com
_______________________________________________________________________________________________________

How To Install SABnzbd Usenet Client with Apache web Server on Ubuntu 18.04 LTS

 SABnzbd is a free open-source and web-based Usetnet client for downloading binary content (image, audio, video, e-book, etc.) on Usetnet. It’s cross-platform, available for Linux, BSD, MacOS, UNIX, Windows, Synology, QNAP and so on.
Offcial Website: https://sabnzbd.org/
Github:https://github.com/sabnzbd/sabnzbd                        
_______________________________________________________________________________________________________
Our Server Specification- [ Os:  Ubuntu 18.04.2 LTS Bionic Beaver 64Bit ]
_______________________________________________________________________________________________________
lsb_release -cd  ; getconf LONG_BIT ; whoami ; apt update -y ; apt install -y build-essential software-properties-common curl gdebi vim wget aptitude leafpad nano git net-tools lsb-release apt-transport-https apache2
a2enmod proxy proxy_http rewrite

sed -i 's/ubuntu/www.yourdomain.com/g' /etc/hosts
sed -i 's/ubuntu/www.yourdomain.com/g' /etc/hostname

apt update ; apt install sabnzbdplus -y
man sabnzbdplus
sabnzbdplus -d
sabnzbdplus -d --browser 0
sabnzbdplus -d -s 127.0.0.1:8081 --browser 0

nano /etc/systemd/system/sabnzbd.service
[Unit]
Description=SABnzbd Usenet Client
After=network.target

[Service]
Type=simple
User=sabnzbd
Group=sabnzbd
ExecStart=/usr/bin/python -OO /usr/bin/sabnzbdplus --browser 0 &
ExecStop=/usr/bin/pkill sabnzbdplus
Restart=always
SyslogIdentifier=SABnzbd Usenet Client

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
adduser --system --home /home/sabnzbd sabnzbd

addgroup --system sabnzbd
adduser sabnzbd sabnzbd
pkill sabnzbdplus
systemctl start sabnzbd ; systemctl enable sabnzbd ; systemctl status sabnzbd

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

    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
a2ensite sabnzbd.conf ; a2dissite 000-default
apache2ctl configtest ; ifconfig
systemctl enable apache2 ; systemctl reload apache2
echo "192.168.11.131 www.yourdomain.com" >> /etc/hosts
http://www.yourdomain.com
_______________________________________________________________________________________________________





Wednesday, January 5, 2022

How To Install Swift Programming Language on Debian 11

Swift is a modern open source high-performing programming language with a focus on safety. It was developed by Apple and released in 2014.

apt install binutils git gnupg2 libc6-dev libcurl4 libedit2 libgcc-9-dev libpython2.7 libsqlite3-0 libstdc++-9-dev libxml2 libz3-dev pkg-config tzdata zlib1g-dev -y

wget https://download.swift.org/swift-5.5.1-release/ubuntu2004/swift-5.5.1-RELEASE/swift-5.5.1-RELEASE-ubuntu20.04.tar.gz
tar -xvzf swift-5.5.1-RELEASE-ubuntu20.04.tar.gz
mv swift-5.5.1-RELEASE-ubuntu20.04 /opt/swift
wget -q -O - https://swift.org/keys/all-keys.asc | sudo gpg --import -
echo "export PATH=/opt/swift/usr/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
swift --version
___________________________________________________________________________________________

Tuesday, January 4, 2022

How to Install Gitea with PostgreSQL Apache HTTP Server on Debian 11

 Gitea is a community managed lightweight code hosting solution written in Go. || PostgreSQL is an advanced, enterprise-class, and open-source relational database system.
Apache is the most widely used web server software.
Offcial Website : https://gitea.io/en-us/
________________________________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐃𝐞𝐛𝐢𝐚𝐧 𝟏𝟏 𝐛𝐮𝐥𝐥𝐬𝐞𝐲𝐞 𝟔𝟒 𝐁𝐢𝐭     || 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:  debian.example.com     || 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:192.168.1.60
________________________________________________________________________________________________________________________
                            lsb_release -cd  ; getconf LONG_BIT ; hostname ; hostname -I
 
apt install -y build-essential net-tools curl git software-properties-common apache2
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update ; sudo apt-get -y install postgresql -y
systemctl start postgresql ; systemctl enable postgresql ; systemctl status postgresql

nano  /etc/postgresql/14/main/postgresql.conf
listen_addresses = 'localhost, 0.0.0.0' || password_encryption = scram-sha-256
systemctl restart postgresql

sudo -u postgres psql
CREATE ROLE gitea WITH LOGIN PASSWORD 'secure@123';
CREATE DATABASE giteadb;
GRANT ALL PRIVILEGES ON DATABASE giteadb TO gitea;
exit
git config --global user.name "Your Name" ; git config --global user.email "youremail@yourdomain.com"


sudo adduser \
   --system \
   --shell /bin/bash \
   --gecos 'Git Version Control' \
   --group \
   --disabled-password \
   --home /home/git \
   git

cd /tmp ; GITEAVERSION=1.15.7
wget -O gitea https://dl.gitea.io/gitea/${GITEAVERSION}/gitea-${GITEAVERSION}-linux-amd64
mv /tmp/gitea /usr/local/bin ; chmod +x /usr/local/bin/gitea ; mkdir -p /etc/gitea ; mkdir -p /var/lib/gitea/{custom,data,indexers,public,log} ; chown -R git:git /var/lib/gitea/ ; chown root:git /etc/gitea ; chmod -R 750 /var/lib/gitea/ ;chmod 770 /etc/gitea

nano /etc/systemd/system/gitea.service
[Unit]
Description=Gitea
After=syslog.target
After=network.target
After=postgresql.service

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea

[Install]
WantedBy=multi-user.target
systemctl daemon-reload ; systemctl start gitea ; systemctl enable gitea ; systemctl status gitea
http://localhost:3000/

a2enmod ssl proxy proxy_ajp proxy_wstunnel proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html
systemctl restart apache2
nano /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:*>
    ProxyPreserveHost On

    # Servers to proxy the connection, or;
    # List of application servers:
    # Usage:
    # ProxyPass / http://[IP Addr.]:[port]/
    # ProxyPassReverse / http://[IP Addr.]:[port]/
    # Example:
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/

    ServerName debian.example.com
</VirtualHost>

apache2ctl configtest
systemctl restart apache2 ; systemctl status apache2
echo "192.168.1.60  debian.example.com debian" >> /etc/hosts
_________________________________________________________________________________________________________________________









How to Install Gitea with PostgreSQL Nginx web server on Debian 11

 Gitea is a community managed lightweight code hosting solution written in Go. || PostgreSQL is an advanced, enterprise-class, and open-source relational database system.
Offcial Website : https://gitea.io/en-us/
________________________________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐃𝐞𝐛𝐢𝐚𝐧 𝟏𝟏 𝐛𝐮𝐥𝐥𝐬𝐞𝐲𝐞 𝟔𝟒 𝐁𝐢𝐭     || 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:  debian.example.com     || 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:192.168.1.60
________________________________________________________________________________________________________________________
                            lsb_release -cd  ; getconf LONG_BIT ; hostname ; hostname -I
 
apt install -y build-essential net-tools curl git software-properties-common nginx
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update ; sudo apt-get -y install postgresql -y
systemctl start postgresql ; systemctl enable postgresql ; systemctl status postgresql

nano  /etc/postgresql/14/main/postgresql.conf
listen_addresses = 'localhost, 0.0.0.0'
password_encryption = scram-sha-256
systemctl restart postgresql

sudo -u postgres psql
CREATE ROLE gitea WITH LOGIN PASSWORD 'secure@123';
CREATE DATABASE giteadb;
GRANT ALL PRIVILEGES ON DATABASE giteadb TO gitea;
exit

git config --global user.name "Your Name"
git config --global user.email "youremail@yourdomain.com"

sudo adduser \
   --system \
   --shell /bin/bash \
   --gecos 'Git Version Control' \
   --group \
   --disabled-password \
   --home /home/git \
   git

cd /tmp ; GITEAVERSION=1.15.7
wget -O gitea https://dl.gitea.io/gitea/${GITEAVERSION}/gitea-${GITEAVERSION}-linux-amd64
mv /tmp/gitea /usr/local/bin ; chmod +x /usr/local/bin/gitea
mkdir -p /etc/gitea ; mkdir -p /var/lib/gitea/{custom,data,indexers,public,log} ; chown -R git:git /var/lib/gitea/ ; chown root:git /etc/gitea ; chmod -R 750 /var/lib/gitea/ ;chmod 770 /etc/gitea


nano /etc/systemd/system/gitea.service
[Unit]
Description=Gitea
After=syslog.target
After=network.target
After=postgresql.service

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea

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

nano /etc/nginx/sites-enabled/default
server {

listen 80;
index index.php index.html index.htm;

server_name debian.example.com;
                
location / {
proxy_pass http://localhost: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
systemctl restart nginx ; systemctl status nginx
http://debian.example.com
_________________________________________________________________________________________________________________________

How to Install Gitea with Mariadb on Debian 11

 Gitea is a community managed lightweight code hosting solution written in Go. || MariaDB Server is one of the most popular open source relational databases.
Offcial Website : https://gitea.io/en-us/
________________________________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐃𝐞𝐛𝐢𝐚𝐧 𝟏𝟏 𝐛𝐮𝐥𝐥𝐬𝐞𝐲𝐞 𝟔𝟒 𝐁𝐢𝐭     || 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:  debian.example.com     || 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:192.168.1.60
________________________________________________________________________________________________________________________
                            lsb_release -cd  ; getconf LONG_BIT ; hostname ; hostname -I
 
apt install -y build-essential net-tools curl git software-properties-common mariadb-server
systemctl start mariadb ; systemctl status mariadb
mysql_secure_installation
mysql -u root -p
CREATE DATABASE gitea;
GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' IDENTIFIED BY "StrongPassword";
FLUSH PRIVILEGES;
QUIT;
git config --global user.name "Your Name" ; git config --global user.email "youremail@yourdomain.com"

sudo adduser \
   --system \
   --shell /bin/bash \
   --gecos 'Git Version Control' \
   --group \
   --disabled-password \
   --home /home/git \
   git

cd /tmp ; GITEAVERSION=1.15.7 ; wget -O gitea https://dl.gitea.io/gitea/${GITEAVERSION}/gitea-${GITEAVERSION}-linux-amd64
mv /tmp/gitea /usr/local/bin ; chmod +x /usr/local/bin/gitea ; mkdir -p /etc/gitea ; mkdir -p /var/lib/gitea/{custom,data,indexers,public,log} ; chown -R git:git /var/lib/gitea/ ; chown root:git /etc/gitea ; chmod -R 750 /var/lib/gitea/ ;chmod 770 /etc/gitea

nano /etc/systemd/system/gitea.service
[Unit]
Description=Gitea
After=syslog.target
After=network.target
After=postgresql.service

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea

[Install]
WantedBy=multi-user.target
systemctl daemon-reload ; systemctl start gitea ; systemctl enable gitea ; systemctl status gitea
http://localhost:3000/
_________________________________________________________________________________________________________________________

Monday, January 3, 2022

How To Install Guacamole Remote Desktop on Rocky Linux 8

 Apache Guacamole is a free, open-source, web-based, and clientless remote desktop application that supports standard protocols like VNC, RDP, and SSH. It allows you to access Linux and Windows PC from a web browser via RDP, SSH, or VNC. It is clientless so you don't need to install any plugins or client software. It is made from two components Guacamole Server and Guacamole Client. Guacamole server provides server-side and native components required to connect to remote PC while Guacamole client is an HTML 5 web application used to connect to the remote PC.
________________________________________________________________________________________________________________________
𝐎𝐮𝐫 𝐒𝐞𝐫𝐯𝐞𝐫 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧:-
𝐎𝐬 : 𝐑𝐨𝐜𝐤𝐲 𝐋𝐢𝐧𝐮𝐱 𝟖.𝟓 (𝐆𝐫𝐞𝐞𝐧 𝐎𝐛𝐬𝐢𝐝𝐢𝐚𝐧)          | 𝐇𝐨𝐬𝐭𝐧𝐚𝐦𝐞:                    | 𝐈𝐏 𝐀𝐝𝐝𝐫𝐞𝐬𝐬 𝐨𝐟 𝐒𝐞𝐫𝐯𝐞𝐫:
________________________________________________________________________________________________________________________
                            cat /etc/os-release ; getconf LONG_BIT ; sestatus

dnf -y update ; dnf groupinstall "Development Tools" -y && yum install java-11-openjdk-devel

dnf install -y unzip curl make cmake wget gcc zlib-devel compat-openssl10 epel-release
sudo dnf config-manager --set-enabled powertools ; sudo dnf config-manager --enable devel


dnf install cairo-devel libuv-devel libjpeg-turbo-devel libjpeg-devel libpng-devel libtool uuid-devel freerdp-devel pango-devel libvncserver-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-devel libssh2-devel libtheora opus lame-libs ; dnf config-manager --disable devel

curl -s https://api.github.com/repos/seanmiddleditch/libtelnet/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
tar -xf libtelnet-*.tar.gz ; cd libtelnet-*/ ; ./configure ; make && sudo make install

sudo groupadd --system tomcat ; sudo useradd -d /usr/share/tomcat -r -s /bin/false -g tomcat tomcat
cd ~ ; wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.56/bin/apache-tomcat-9.0.56.tar.gz
tar -xvf apache-tomcat-*.tar.gz
mkdir /usr/share/tomcat
sudo mv apache-tomcat-9.0.56/*  /usr/share/tomcat ; sudo chown -R tomcat:tomcat /usr/share/tomcat/

sudo nano /etc/systemd/system/tomcat.service
[Unit]
Description=Tomcat Server
After=syslog.target network.target

[Service]
Type=forking
User=tomcat
Group=tomcat

Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment='JAVA_OPTS=-Djava.awt.headless=true'
Environment=CATALINA_HOME=/usr/share/tomcat
Environment=CATALINA_BASE=/usr/share/tomcat
Environment=CATALINA_PID=/usr/share/tomcat/temp/tomcat.pid
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M'
ExecStart=/usr/share/tomcat/bin/catalina.sh start
ExecStop=/usr/share/tomcat/bin/catalina.sh stop

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload ; systemctl enable --now tomcat ; systemctl status tomcat

VER=1.3.0
wget https://downloads.apache.org/guacamole/$VER/source/guacamole-server-$VER.tar.gz
tar xzf guacamole-server-$VER.tar.gz
cd guacamole-server-$VER ; ./configure --with-init-dir=/etc/init.d
make ; sudo make install ; sudo ldconfig
sudo systemctl daemon-reload ; sudo systemctl start guacd ; sudo systemctl enable guacd ;  systemctl status guacd


sudo mkdir /etc/guacamole ; cd ~
wget https://downloads.apache.org/guacamole/1.3.0/binary/guacamole-1.3.0.war
sudo mv guacamole-1.3.0.war /etc/guacamole/guacamole.war ; sudo ln -s /etc/guacamole/guacamole.war /usr/share/tomcat/webapps/
sudo echo "GUACAMOLE_HOME=/etc/guacamole" | sudo tee -a /etc/default/tomcat

sudo nano /etc/guacamole/guacamole.properties
guacd-hostname: localhost
guacd-port:    4822
user-mapping:    /etc/guacamole/user-mapping.xml
auth-provider:    net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider

sudo ln -s /etc/guacamole /usr/share/tomcat/.guacamole
echo -n StrongPassword | openssl md5

sudo nano /etc/guacamole/user-mapping.xml
<user-mapping>
        
    <!-- Per-user authentication and config information -->

    <!-- A user using md5 to hash the password
         guacadmin user and its md5 hashed password below is used to
             login to Guacamole Web UI-->
    <authorize
            username="admin"
            password="0f6e4a1df0cf5ee97c2066953bed21b2"
            encoding="md5">

        <!-- First authorized Remote connection -->
        <connection name="Ubuntu 20.04 Server SSH">
            <protocol>ssh</protocol>
            <param name="hostname">192.168.1.80</param>
            <param name="username">ubuntu</param>
            <param name="port">22</param>
        </connection>

        <!-- Second authorized remote connection -->
        <connection name="Windows 10 RDP">
            <protocol>rdp</protocol>
            <param name="hostname">192.168.1.50</param>
            <param name="port">3389</param>
            <param name="username">test</param>
            <param name="ignore-cert">true</param>
        </connection>

    </authorize>

</user-mapping>

sudo systemctl restart tomcat guacd
sudo firewall-cmd --permanent --add-port={4822,8080}/tcp ; sudo firewall-cmd --reload
http://server-IP:8080/guacamole  [ http://192.168.1.60:8080/guacamole ]  [ admin/StrongPassword
_________________________________________________________________________________________________________________________