Kusprayitna Blogs

Hidup untuk berbagi ilmu :: IT Linux Windows Database Oracle PHP OpenSource

Archive for July 29th, 2015

Menikmati lokal repository CentOS

Posted by Prayitna Kuswidianta on 29th July 2015

Menginstall repository secara lokal cukuplah mudah, sudah banyak cara di publis diinternet.

Berikut script yang didapat dari internet

## Point our log file to somewhere and setup our admin email
log=/var/log/mirrorcentos.log

adminmail=kusprayitna@uii.ac.id
# Set to 0 if you do not want to receive email
sendemail=1

# Subject is the subject of our email
subject="Centos Mirror Sync Finished"

## Setup the server to mirror
remote=mirror.smartmedia.net.id::centos

## Setup the local directory / Our mirror
local=/media/centos

## setup exclude
kecuali=/opt/mirror/centos.exclude

## Initialize some other variables
complete="false"
failures=0
status=1
pid=$$

 

echo "`date +%x-%R` - $pid - Started Centos Mirror Sync" >> $log
while [[ "$complete" != "true" ]]; do

if [[ $failures -gt 0 ]]; then
## Sleep for 5 minutes for sanity's sake
## The most common reason for a failure at this point
## is that the rsync server is handling too many concurrent connections.
sleep 5m
fi

if [[ $1 == "debug" ]]; then
echo "Working on attempt number $failures"
rsync -azH --delete-after --progress --exclude-from=$kecuali $remote $local
status=$?
else
rsync -azvH --delete-after --exclude-from=$kecuali $remote $local >> $log
status=$?
fi

if [[ $status -ne "0" ]]; then
complete="false"
(( failures += 1 ))
else

echo "`date +%x-%R` - $pid - Finished CentosĀ Mirror Sync" >> $log

# Send the email
if [[ -x /usr/bin/mail && "$sendemail" -eq "1" ]]; then
mail -s "$subject" "$adminmail" <<OUTMAIL
Summary of Centos Mirror Synchronization
PID: $pid
Failures: $failures
Finish Time: `date`

Sincerely,
$HOSTNAME

OUTMAIL
fi
complete="true"
fi
done

exit 0

 

Alhamdulillah telah selesai melakukan sinkronisasi

Read the rest of this entry »

Posted in Centos, Linux | No Comments »

Memperbesar kapasitas Harddisk iSCSI

Posted by Prayitna Kuswidianta on 29th July 2015

Beberapa server menggunakan Harddisk dari SAN (Storage Area Network) dan dengan sudah banyak data yang digunakan sekarang mengalami kekurangan kapasitas.

SAN yang dipakai yaitu Windows 2008 Storage Server dan server klien yang dipakai yaitu Centos 5

Sebagai contoh kasus adalah Server FTP dimana kapasitas harddisk iscsi adalah 100G dan akan ditingkatkan kapasitasnya menjadi 200G.

Tahapan yang dilakukan yaitu :

Di SAN

  1. Besarkan kapasitas iSCSI Storage yang diinginkan

Di Server FTP

Read the rest of this entry »

Posted in Centos, Linux | No Comments »