Monday, October 30, 2017

Upgrade Ubuntu Ubuntu 16.04.1 LTS to Ubuntu 16.04.3 LTS

First of all you have to check Ubuntu end of life:
https://www.ubuntu.com/info/release-end-of-life

2. You can used this step to upgrade your ubuntu;
Ref: https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-ubuntu-16-04-lts

3. But when you run apt-get upgrade
    You got error run apt-get -f install .
This maybe because of your /boot is already fully utilize 100%.

Here is the step to solve it : Ref: https://askubuntu.com/questions/345588/what-is-the-safest-way-to-clean-up-boot-partition

Or you can used Ref: http://www.mogilowski.net/lang/en-us/2014/04/14/remove-old-kernel-packages-from-ubuntu/

4. If you have problem while upgrading nginx:
EG: Errors were encountered while processing: nginx-extras

  •   You have to check what web service that you use? 
5. Check your version 
lsb_release -a


Tuesday, October 3, 2017

Upgrade freebsd 10.3 to 11

Ref:
1. https://sysadmin-note.ru/obnovlenie-freebsd-s-10-3-do-11-0/
2. https://www.linuxsecrets.com/en/entry/51-freebsd/2017/08/30/2926-upgrading-freebsd-11-0-to-11-1

Sunday, October 1, 2017

housekeeping old files

find /path/to/check/ -name '*.sql' -type f -mtime +6 -exec rm -rfv "{}" \;

delete file older that +n day

https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/

Monday, August 21, 2017

Tuning Apache

Letak dulu.. Nanti Refer balik :

https://rudd-o.com/linux-and-free-software/tuning-an-apache-server-in-5-minutes
http://tweenpath.net/simple-way-to-tune-apache-performance-using-mpm-prefork-module/
https://www.devside.net/articles/apache-performance-tuning
https://www.woktron.com/secure/knowledgebase/133/How-to-optimize-Apache-performance.html


https://www.cyberciti.biz/faq/freebsd-command-to-get-ram-information/

https://serverfault.com/questions/241636/what-does-apache-busy-workers-idle-workers-means

https://stackoverflow.com/questions/15922194/problems-with-apache-servers-and-a-lot-of-httpd-processes

https://www.maketecheasier.com/optimizing-apache-part-1/


Okay for my case, I did calculation as below
#dmesg | grep memory
SRAT: No CPU found for memory domain 0
real memory  = 8589934592 (8192 MB)
avail memory = 8252219392 (7869 MB)


 # ps aux | grep 'httpd' | awk '{print $6}'
48552
49872
61092
48516
48516
48516
48512
48516
25860
49032
51148
50984
2376

# ps aux | grep 'mysql' | awk '{print $6}'
907112
2556
2204


MaxRequestWorkers would be:
(Total Memory – Critical Services Memory) / Size Per Apache process
(8252219392 - 907112) /51148   = 161322.2859153828 /1024 = 157



Wednesday, June 14, 2017

Script to backup application and database in linux

#!/bin/sh
TIME=`date +%y%m%d`
FILENAME=$TIME-folderapps-site.tar.gz
SRCDIR=/data/folderapps
DESDIR=/data/backup/
tar -zcvf $DESDIR/$FILENAME $SRCDIR
#tar -zcvf /data/backup/ $TIME-folderapps-site.tar.gz data/folderapps

FILENAME1=$TIME-database_apps26.sql
mysqldump -h172.15.100.22 -udb_admin -pP@ssW0rD --default-character-set=utf8 database_apps26 > $FILENAME1
#backup database

Monday, January 16, 2017

Failover Cluster can’t access when Disk Quorum witness is outage

The problem is when the disk quorum witness is full, we cannot expend or do anything.

Here is the solution that we did;

1. The "disk quorum" which is offline -> we remove it from the "Failed Cluster Manager"-Storage-Disks- Disk quorum- right click remove

2. In my case : the disk is "Disk 1"






















PowerShell command:
Clear-ClusterDiskReservation –Disk
Source: http://technet.microsoft.com/en-us/library/ee461016.aspx
In my case : Clear-ClusterDiskReservation –Disk 1


Then, resize the harddisk by making it online -> right click-> extend

Finish -> then right click -> offline the hardisk

3. Then add back the disk (Add Disk) to the cluster storage;

4. Then configure cluster quorum settings ->  use default quorum configuration setting.






Tuesday, January 10, 2017

Apache 2.4 from 2.2

Here is the refference of changes in apache 2.4 from apache 2.2.
Ref: https://httpd.apache.org/docs/2.4/upgrading.html

From :
    AllowOverride none
    Require all granted

To:
        Options Indexes FollowSymLinks MultiViews
        AllowOverride FileInfo  All
        Order allow,deny
        Allow from all
        Require all granted