Showing posts with label Centos. Show all posts
Showing posts with label Centos. Show all posts

Friday, 31 May 2024

Clean Centos

cat /etc/centos-release
rm -rf y /usr/local/WowzaStreamingEngine-4.5.0/logs/*
free -m
sync; echo 1 > /proc/sys/vm/drop_caches
sync; echo 2 > /proc/sys/vm/drop_caches
sync; echo 3 > /proc/sys/vm/drop_caches
rm -rf /var/cache/yum
rm -rf /var/tmp/yum-*

df -h

Tuesday, 6 February 2024

SSL Wowza JKS

 openssl pkcs12 -export -in stream.tvtpi.com.ca-bundle.pem -inkey stream.tvtpi.com.key -name stream.tvtpi.com -out stream.tvtpi.com-PKCS-12.p12

Wednesday, 20 September 2023

Adaptive Bitrate NGINX

            hls_variant _160p BANDWIDTH=160000;
            hls_variant _240p BANDWIDTH=240000;
            hls_variant _360p BANDWIDTH=448000;
            hls_variant _720p BANDWIDTH=1152000;
            hls_variant _1080p BANDWIDTH=2048000;

Tuesday, 12 September 2023

RTMP HLS SSL NGINX CENTOS

 Berikut Conf nginx Centos 8

nginx.conf

# TRIMAN SEPTEMBER 2023 @M3U8,RTMP,SSL,HTML #
user nginx; 
worker_processes  auto;
error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

Saturday, 12 November 2022

SLL WOWZA Certivicate

 keytool -genkey -keysize 2048 -alias wowzaprivatekey -keyalg RSA -keystore avtech.mooo.com.jks

keytool -certreq -file avtech.mooo.com.csr -alias wowzaprivatekey -keyalg RSA -keystore avtech.mooo.com.jks

===================== OK =====================

Warning:

The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using 

"keytool -importkeystore -srckeystore avtech.mooo.com.jks -destkeystore avtech.mooo.com.jks -deststoretype pkcs12".


openssl x509 -in avtech.mooo.com-2022-10-30-111324.cer -text

For a chain certificate:

keytool -import -alias [user-friendly-name] -trustcacerts -file [filename-of-chain-certificate] -keystore ssl.mycompany.com.jks

For a new certificate

keytool -import -alias wowzaprivatekey -trustcacerts -file [filename-certificate] -keystore ssl.mycompany.com.jks

=====================================

keytool -genkey -keysize 2048 -alias wowza -keyalg RSA -keystore ssl.avtech.mooo.com.jks

keytool -certreq -file ssl.avtech.mooo.com.csr -alias wowza -keyalg RSA -keystore ssl.avtech.mooo.com.jks

Warning:

The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using 

"keytool -importkeystore -srckeystore ssl.avtech.mooo.com.jks -destkeystore ssl.avtech.mooo.com.jks -deststoretype pkcs12"


Saturday, 25 September 2021

Rebuild Default Repository Centos 8

 /etc/distro.repos.d

  1. Create mkdir /opt/tmp  cd /opt/tmp-repo

  2. Download file centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm (sesuaikan dengan  “cat /etc/centosrelease” atau “rpm query centosrelease“)
    wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm
  3. Extract file 

Rebuild RPM Database in CentOS 8

Download 
git clone https://github.com/facebookincubator/dcrpm.git
cd dcrpm
python setup.py install

Atau download scara manual kemudian hasil exstrak di copy ke  /var/lib/rpm

mkdir /opt/rpm8/
cp -avr /var/lib/rpm /opt/rpm8/
tar -zcvf opt/rpm8/rpmdb-$(date +"%d%m%Y").tar.gz  /var/lib/rpm
rm -f /var/lib/rpm/__db*
/usr/lib/rpm/rpmdb_verify /var/lib/rpm/Packages
# cd /var/lib/rpm/
mv Packages Packages.back
/usr/lib/rpm/rpmdb_dump Packages.back | /usr/lib/rpm/rpmdb_load Packages
/usr/lib/rpm/rpmdb_verify Packages
rpm -qa >/dev/null #output is discarded to enable printing of errors only
rpm -vv --rebuilddb

dnf update
dnf clean packages

Thursday, 3 January 2019

CLEAN CENTOS

cek HDD
df -h
du -sh /*
#---------------------------------
RECOVERY
#---------------------------------
yum history list all
yum history info [entry number]
yum history undo [entry number]
#---------------------------------
hapus repo
rpm -qf /etc/yum.repos.d/epel.repo
yum remove epel-release
yum clean all
yum upgrade
yum -y install yum-utils
find /var -name "*.log" \( \( -size +50M -mtime +7 \) -o -mtime +30 \) -exec truncate {} --size 0 \;
yum clean all
rm -rf /var/cache/yum
rm -rf /var/tmp/yum-*
package-cleanup --oldkernels --count=2
package-cleanup --oldkernels --count=1
rm -rf /root/.composer/cache
rm -rf /home/*/.composer/cache
find -regex ".*/core\.[0-9]+$" -delete
find /home/*/public_html/ -name error_log -delete
rm -rf /root/.npm /home/*/.npm /root/.node-gyp /home/*/.node-gyp /tmp/npm-*

mv /var/log/*gz /var/log/*.0 /home/backup/var/log
yum clean packages
# -------------------------------
rm -rf /var/log/squid/*.gz
rm -rf /usr/local/WowzaStreamingEngine-4.7.7/logs/*.log.*
rm -rf /usr/local/WowzaStreamingEngine-4.7.7/manager/logs/*.log.*
rm -rf /var/log/squid/*.log.*
rm -rf /var/log/*.log.*
rm -rf /var/log/httpd/*_log-*
rm -rf /var/log/audit/*.log.*
yum clean all && yum update

cek HDD
df -h
du -sh /*

Tuesday, 14 August 2018

Start Wowza in Centos7

iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -p tcp --dport 1935 -j ACCEPT
iptables -I OUTPUT -p tcp --dport 8080 -j ACCEPT
iptables -I INPUT -p tcp --dport 8087 -j ACCEPT
iptables -I INPUT -p tcp --dport 8083 -j ACCEPT
iptables -I INPUT -p tcp --dport 8084 -j ACCEPT
iptables -I INPUT -p tcp --dport 8086 -j ACCEPT
iptables -I INPUT -p tcp --dport 8088 -j ACCEPT
/etc/init.d/WowzaStreamingEngine restart
iptables -I INPUT -p tcp --dport 8087:8088 -j ACCEPT
iptables -I INPUT -p udp -m udp --dport 6970:9999 -j ACCEPT
chkconfig --level 345 WowzaStreamingEngine on
sudo service WowzaStreamingEngine start
sudo service WowzaStreamingEngineManager start
/etc/init.d/WowzaStreamingEngine start
/etc/init.d/WowzaStreamingEngineManager start
sudo /usr/local/WowzaStreamingEngine/bin/installsystemd.sh
sudo /usr/local/WowzaStreamingEngine/bin/installupstart.sh
systemctl daemon-reload
systemctl enable WowzaStreamingEngine.service
systemctl enable WowzaStreamingEngineManager.service
systemctl start WowzaStreamingEngine.service
systemctl start WowzaStreamingEngineManager.service

Friday, 20 July 2018

Recovery Centos System

# Get all yum commands previously run
yum history list all

# Get the details of the command
yum history info [entry number]

# Undo each command top-down
yum history undo [entry number]

free -m
sync; echo 1 > /proc/sys/vm/drop_caches
sync; echo 2 > /proc/sys/vm/drop_caches
sync; echo 3 > /proc/sys/vm/drop_caches

sudo yum clean all
#sudo yum autoremove
sudo yum -y update

Friday, 29 June 2018

Speed Test Centos

yum install python
wget https://klikhost.com/speedtest_cli.py
python speedtest_cli.py --share

Saturday, 26 May 2018

FFmpeg Script Trancoding on Centos

Play loop file

ffmpeg -re -i "http://127.0.0.1/content/sample.mp4" -vcodec libx264 -preset fast -crf 30 -acodec aac -ab 128k -ar 44100 -strict experimental -f flv "rtmp://127.0.0.1/stream/live"`

Thursday, 24 May 2018

Crontab in CentOS (64 Bit)

Untuk definisi tentang crontab silahkan dibaca di bagian referensi, untuk menjalankan cron :
/etc/init.d/crond start
atau
service crond start

Sunday, 20 May 2018

CARA INSTALL JAVA CENTOS


There are also two different implementations of Java, OpenJDK and Oracle Java with almost no differences between them except that Oracle Java has a few additional commercial features.

Install OpenJDK
OpenJDK, the open source implementation of the Java Platform is the default Java development and runtime in CentOS 7.

The installation is simple and straightforward.

Monday, 27 November 2017

Wowza Media Server In Centos

wget http://cyber3.cf/WowzaMediaServer-2.2.4.rpm.bin
chmod 755 WowzaMediaServer-2.2.4.rpm.bin
chmod +x WowzaMediaServer-2.2.4.rpm.bin
./WowzaMediaServer-2.2.4.rpm.bin

Friday, 17 November 2017

Vi Pada Centos

PENGGUNAAN DASAR VI

Untuk mulai menggunakan vi, ketik seperti contoh berikut, kemudian Enter
vi nama_file.conf

Setelah file terbuka untuk insert atau mulai mengedit, ketik
i

Untuk keluar dari mode insert atau mode edit, tekan
Ctrl+C

Setelah keluar dari insert mode, untuk menyimpan hasil edit sekaligus keluar dari vi editor, tekan
ZZ atau ketik
:wq

Namun jika hanya ingin menyimpan tapi masih belum ingin keluar dari vi editor, ketik
:w

Sedangkan, untuk keluar tanpa menyimpan
:q!

Sedangkan untuk mencari kata/karakter pada line-line Sebelumnya
?

Contoh penggunaan misal ketik /date, kemudian enter:
?date

Untuk mencari kata/karakter pada line-line Selanjutnya
/

Untuk kembali ke mode perintah
Esc

Untuk menghapus 1 baris ketik dd saat mode perintah [pada baris yang ingin dihapus.
dd

Untuk perintah yang lain silahkan lihat di manual vi melalui command prompt
man vi

Monday, 6 February 2017

Awstas Setup for VPS Centos 6.x

The procedures for setup Awstats on a virtual host running Apache on a Centos 6.x server can be explained as follows;
The first thing to do, off course, is installing the Awstats RPM. Login as root and do the installation of Awstats using the command: yum install awstats
Next, it is needed to append Awstats directives into the httpd.conf file of the server that running virtual hosting.
The httpd.conf can be accessed for editing using the command: nano /etc/httpd/conf/httpd.conf
Add the following sections inside the corresponding <VirtualHost *:80> section of the httpd.conf

Sunday, 29 January 2017

Nagios 4 and Monitor Your Servers on CentOS 7

Introduction

In this tutorial, we will cover the installation of Nagios 4, a very popular open source monitoring system, on CentOS 7 or RHEL 7. We will cover some basic configuration, so you will be able to monitor host resources via the web interface. We will also utilize the Nagios Remote Plugin Executor (NRPE), that will be installed as an agent on remote hosts, to monitor their local resources.

Nagios is useful for keeping an inventory of your servers, and making sure your critical services are up and running. Using a monitoring system, like Nagios, is an essential tool for any production server environment.