Saturday, January 27, 2018

Disable Directory list by .htaccess

Add Option in Apache2.conf

<Directory /var/www/html>
   Options -Indexes +FollowSymLinks
   AllowOverride None
   Require all granted
</Directory>

Create file .htaccess in /var/www/html
add Option :
Options -Indexes

Wednesday, January 17, 2018

Check Application Run

:Check Schedule Run
SCHTASKS /Query /FO LIST /V >"%USERPROFILE%\Desktop\MyScheduledTasks.txt"

:Check Console Run export by Regedit
reg export "HKEY_CURRENT_USER\Console" "%USERPROFILE%\Desktop\MyConsoleSettings.txt" /y

:Check Local Machine Run export by Regedit
reg export "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "%USERPROFILE%\Desktop\MyLocalRunSettings.txt" /y

:Check Cuurent User Run export by Regedit
reg export "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "%USERPROFILE%\Desktop\MyUserRunSettings.txt" /y

:Check Config on StartUP
MSCONFIG

Friday, January 12, 2018

Windows 10 Access FileShare On Windows 7

Windows 10  Access FileShare On Windows 7

1: gpedit

Computer configuration\administrative templates\network\Lanman Workstation
"Enable insecure guest logons"

2: regdit

Default Registry Value:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"AllowInsecureGuestAuth"=dword:0
Configured Registry Value:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"AllowInsecureGuestAuth"=dword:1

Thursday, November 30, 2017

Remove Blank Line and Comment by grep

remove blank line:
grep -v -e ^$

remove comment line:
grep -v ^#

ex:
cat filename | grep -v -e ^$ | grep -v ^#

Friday, November 17, 2017

Find DB Size Order by Schemas, Oracle

select
   sum(bytes)/1024/1024 as size_in_megabyte,
   segment_type, owner
from
   dba_segments
where
   OWNER in ('MEISPSN','MEISPAY','HRIS', 'NDMS')
and
  segment_type like 'TABLE'
group by
   segment_type, owner
order by owner;


ALL DB SIze in Megabytes

set lines 200
set pages 999
col "DBSize" format a10
col "Free" format a10
col "Used" format a10
select    round(sum(used.bytes) / 1024 / 1024  ) || ' MB' "DBSize"
,    round(sum(used.bytes) / 1024 / 1024  ) -
    round(free.p / 1024 / 1024 ) || ' MB' "Used"
,    round(free.p / 1024 / 1024 ) || ' MB' "Free"
from    (select    bytes
    from    v$datafile
    union    all
    select    bytes
    from     v$tempfile
    union     all
    select     bytes
    from     v$log) used
,    (select sum(bytes) as p
    from dba_free_space) free
group by free.p
/

ALL DB Size in GB

set lines 200
set pages 999
col "DBSize" format a10
col "Free" format a10
col "Used" format a10
select    round(sum(used.bytes) / 1024 / 1024 / 1024  ) || ' GB' "DBSize"
,    round(sum(used.bytes) / 1024 / 1024 / 1024  ) -
    round(free.p / 1024 / 1024 / 1024 ) || ' GB' "Used"
,    round(free.p / 1024 / 1024 / 1024 ) || ' GB' "Free"
from    (select    bytes
    from    v$datafile
    union    all
    select    bytes
    from     v$tempfile
    union     all
    select     bytes
    from     v$log) used
,    (select sum(bytes) as p
    from dba_free_space) free
group by free.p
/

Tuesday, November 7, 2017

RHEL/CentOS EPEL Repository

On RHEL/CentOS – 32-bit OS

-------------- For RHEL/CentOS 6 --------------
# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ihv epel-release-6-8.noarch.rpm
-------------- For RHEL/CentOS 5 --------------
# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ihv epel-release-5-4.noarch.rpm

On RHEL/CentOS – 64-bit OS

-------------- For RHEL/CentOS 7 --------------
# wget dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
# rpm -ihv epel-release-7-11.noarch.rpm
-------------- For RHEL/CentOS 6 --------------
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ihv epel-release-6-8.noarch.rpm
-------------- For RHEL/CentOS 5 --------------
# wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -ihv epel-release-5-4.noarch.rpm

ALCATEL 6900

write memory copy running certified reload from working no rollback-timeout