[root@localhost tmp]# mv apr-1.4.6 /tmp/httpd-2.4.4/srclib/apr
[root@localhost tmp]# apr-util-1.4.1 /tmp/httpd-2.4.4/srclib/apr-util
[root@localhost httpd-2.4.4]# ./configure --with-included-apr --disable-auth-basic --disable-cgi --disable-cgid --enable-cache --enable-deflate --enable-disk-cache --enable-expires --enable-headers --enable-file-cache --enable-mem-cache --enable-mime-magic --enable-proxy --enable-proxy-http --enable-rewrite --enable-so --enable-ssl --enable-unique-id --enable-vhost-alias --enable-usertrack
[root@localhost httpd-2.4.4]# make
[root@localhost httpd-2.4.4]# make install
[root@localhost httpd-2.4.4]# vi /etc/fstab
/usr/local/apache2 /etc/httpd none bind 0 0
[root@localhost httpd-2.4.4]# mount -a
[root@localhost httpd-2.4.4]# ln -s /usr/local/apache2/bin/apachectl /etc/init.d/httpd
Install PHP
[root@localhost php-5.4.15]# ./configure --enable-magic-quotes --enable-mbstring --enable-pdo --enable-sockets --enable-zip --enable-calendar --prefix=/usr/local/apache2/php --with-apxs2=/usr/local/apache2/bin/apxs --with-curl --with-curlwrappers --with-gd --with-mcrypt --with-mime-magic --with-mysql --with-mssql=/usr/local/freetds --with-openssl --with-sqlite=shared --with-ttf --with-xmlrpc --with-zlib --with-pdflib --with-pdo-mysql --enable-bcmath
MR. K's Blog
My Note is Virtual
Sunday, 8 September 2013
Wednesday, 10 July 2013
ORA-00845: MEMORY_TARGET not supported on this system
Hari ni aku cuba tukar ASMM kepada AMM dalam Oracle DB 11G R1:
Mula-mula login sebagai root dan semak filesystem:
OOO patutlah, saiz /dev/shm yang masih available cuma 20G, tak cukup lagi 10G.
Buka fail /etc/fstab dan edit seperti berikut :
none /dev/shm tmpfs defaults,size=60G 0 0
aku letak saiz 60G. Dah ubah sila save.
[root@db ~]# mount -o remount /dev/shm/
SQL> alter system set memory_max_target = 30G scope=spfile;
SQL> alter system set memory_target = 30G scope=spfile;
SQL> alter system set sga_target = 0 scope=spfile;
SQL> alter system set pga_aggregate_target = 0 scope=spfile;
SQL> shutdown;
SQL> startup nomount;
ORA-00845: MEMORY_TARGET not supported on this system
Opss, masalah di atas adalah disebabkan oleh shared memory filesystem (shmfs) tak cukup saiz. Sebelum aku terlupa, OS yang digunakan adalah RHEL Enterprise 4 update 6, huhuh dah lama gila version ni.Mula-mula login sebagai root dan semak filesystem:
[root@db ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 73G 39G 30G 57% /
/dev/sda1 1012M 45M 916M 5% /boot
none 40G 20G 20G 50% /dev/shm
/dev/sda3 30G 14G 15G 48% /var
/dev/mapper/homevg-homevol
135G 28G 100G 22% /home
OOO patutlah, saiz /dev/shm yang masih available cuma 20G, tak cukup lagi 10G.
Buka fail /etc/fstab dan edit seperti berikut :
none /dev/shm tmpfs defaults,size=60G 0 0
aku letak saiz 60G. Dah ubah sila save.
[root@db ~]# mount -o remount /dev/shm/
Kalau anda gunakan RAC, sila pastikan buat benda yang sama pada semua node (server).
Then cuba start semula :-
[root@ducaticj02 ~]# srvctl start database -d <nama database>
Then cuba start semula :-
[root@ducaticj02 ~]# srvctl start database -d <nama database>
Itu ajer.
Monday, 17 June 2013
Moving Table Partition to new Tablespace - Oracle DB
1) Move partitions (a PL/SQL loop)
ese are procedures I use within an anonymous block wrapper that defines a_tname, a_destTS, vTname, and vTspName - they should give you the general idea:
3) Set index default partition tablespace so new index partitions (if any) are created where you want them:
ese are procedures I use within an anonymous block wrapper that defines a_tname, a_destTS, vTname, and vTspName - they should give you the general idea:
procedure mvTabPart (a_tname in varchar2, a_destTS in varchar2) is
cursor pCur(vTname varchar2, vTspName varchar2) is
select table_name, partition_name
from user_tab_partitions
where table_name = vTname
and tablespace_name not like vTspName
order by partition_position desc;
begin
for pRow in pCur(a_tname, a_destTS) loop
sqlStmnt := 'alter table '||pRow.table_name||
' move partition '||pRow.partition_name||
' tablespace '||a_destTS;
execute immediate sqlStmnt;
end loop;
end mvTabPart;
2) Set table default partition tablespace so new partitions are created there:
procedure setDefTabPart (a_tname in varchar2, a_destTS in varchar2) is
cursor tCur(vTname varchar2) is
select table_name
from user_part_tables
where table_name = vTname;
begin
for tRow in tCur(a_tname) loop
sqlStmnt := 'alter table '||tRow.table_name||
' modify default attributes '||
' tablespace '||a_destTS;
execute immediate sqlStmnt;
end loop;
end setDefNdxPart;
3) Set index default partition tablespace so new index partitions (if any) are created where you want them:
procedure setDefNdxPart (a_tname in varchar2, a_destTS in varchar2) is
cursor iCur(vTname varchar2) is
select index_name
from user_part_indexes
where index_name in (select index_name
from user_indexes where table_name = vTname);
begin
for iRow in iCur(a_tname) loop
sqlStmnt := 'alter index '||iRow.index_name||
' modify default attributes '||
' tablespace '||a_destTS;
execute immediate sqlStmnt;
end loop;
end setDefNdxPart;
4) rebuild any partitioned indexes that need rebuilding and are not in the desired tablespace:
procedure mvNdxPart (a_tname in varchar2, a_destTS in varchar2) is
cursor ndxCur(vTname varchar2, vTspName varchar2) is
select i.index_name index_name, ip.partition_name partition_name
from user_ind_partitions ip, user_indexes i
where i.index_name = ip.index_name
and i.table_name = vTname
and i.partitioned = 'YES'
and (ip.tablespace_name not like vTspName or ip.status not like 'USABLE')
order by index_name, partition_name ;
begin
for ndxRow in ndxCur(a_tname, a_destTS) loop
sqlStmnt := 'alter index '||ndxRow.index_name||
' rebuild partition '||ndxRow.partition_name||
' tablespace '||a_destTS;
execute immediate sqlStmnt ;
end loop;
end mvNdxPart;
5) Rebuild any global indexes
procedure mvNdx (a_tname in varchar2, a_destTS in varchar2) is
cursor ndxCur(vTname varchar2, vTspName varchar2) is
select index_name
from user_indexes
where table_name = vTname
and partitioned = 'NO'
and (tablespace_name not like vTspName or status like 'UNUSABLE')
order by index_name ;
begin
for ndxRow in ndxCur(a_tname, a_destTS) loop
sqlStmnt := 'alter index '||ndxRow.index_name||
' rebuild tablespace '||a_destTS;
execute immediate sqlStmnt ;
end loop;
end mvNdx;
Kenapa perlu ada banyak Tablespace - Oracle DB
You can use multiple tablespaces to perform the following tasks:
- Control disk space allocation for database data
- Assign specific space quotas for database users
- Control availability of data by taking individual tablespaces online or offline
- Perform partial database backup or recovery operations
- Allocate data storage across devices to improve performance
Wednesday, 24 April 2013
Syamantec NetBackup - access to the client was not allowed (59)
Error access to the client was not allowed (59) adalah disebabkan netbackup client tak kenal netbackup server.
Troubleshoot
Dalam netbackup client :-
Penyelesaian
Troubleshoot
Dalam netbackup client :-
Windows:
Buka Backup and Restore (BAR) console. Pergi ke menu 'File' dan pilih 'Specify NetBackup Machines and Policy Type'.
Dekat drop down box ('Server to use for backups and restores') shows you the server list.
UNIX:
Semak fail /usr/openv/netbackup/bp.conf
Penyelesaian
Windows:
click 'Edit Server List' dan tambah nama server yang hilang.
UNIX:
Tambah entry dalam bp.conf.
Sebagai contoh, kalau nama server netbackup tu 'yeti', masukkan dalam bp.conf baris berikut:
SERVER = YETI
Pastikan baris master server SERVER berada pada baris pertama.
kemudian, bukan fail /etc/hosts dan masukkan alamat IP serta nama master server tersebut.
Monday, 22 April 2013
Linux - Re-Mount /etc/fstab Tanpa Perlu Restart
Kalau korang tambah entry baru dalam fail /etc/fstab sebab nak mount drive atau partition. Cara yang paling mudah nak mount tanpa perlu restart server adalah dengan command berikut :-
"mount -a"
itu saja :)
"mount -a"
itu saja :)
Monday, 8 April 2013
vSphere - VLAN Trunking
So sekali lagi aku confuse masa mula-mula dulu, apa benda pulak VLAN Trunking? maksud Trunking pun aku tak paham.
Trunking ni sebenarnya istilah daripada Cisco, maksudnya kita gabungkan beberapa NIC menjadi satu group yang besar, maka kita akan dapat kelajuan yang besar bila digabungkan. Sebagai contoh, kalau kita ada 3 NIC dan setiap satunya berkelajuan 1GB sesaat, maka bila kita set trunking maka kita dapat kelajuan 3GB sesaat (secara kasarnya).
Macam mana nak configure?
1) Bagi VLAN ID pada portgroup (dari 1 hingga 4094).
2) Set NIC teaming policy kepada Route based on originating virtual port ID.
3) Check sekurang-kurangnya ada satu network adapter dalam senarai Active Adapters.
4) Gunakan ping command untuk check sama konfigurasi VST berjalan.
kemudian minta Team Network korang untuk configure fizikal switch pulak :) sampai sini aku dah tak tau sebab aku tak pernah usik switch network kat opis aku ni.
Trunking ni sebenarnya istilah daripada Cisco, maksudnya kita gabungkan beberapa NIC menjadi satu group yang besar, maka kita akan dapat kelajuan yang besar bila digabungkan. Sebagai contoh, kalau kita ada 3 NIC dan setiap satunya berkelajuan 1GB sesaat, maka bila kita set trunking maka kita dapat kelajuan 3GB sesaat (secara kasarnya).
Macam mana nak configure?
1) Bagi VLAN ID pada portgroup (dari 1 hingga 4094).
2) Set NIC teaming policy kepada Route based on originating virtual port ID.
3) Check sekurang-kurangnya ada satu network adapter dalam senarai Active Adapters.
4) Gunakan ping command untuk check sama konfigurasi VST berjalan.
kemudian minta Team Network korang untuk configure fizikal switch pulak :) sampai sini aku dah tak tau sebab aku tak pernah usik switch network kat opis aku ni.
Subscribe to:
Posts (Atom)