Sunday, December 26, 2010
Thursday, December 16, 2010
How to Install Zimbra on RedHat Enterprise 5
2-stop service sendmail and httpd(if you had installed these services)
#service sendmail stop
#service httpd stop
#chkconfig --level 2345 sendmail off
#chkconfig --level 2345 httpd off
3-configure the hosts file
#vi /etc/hosts (enter text below)
127.0.0.1 localhost.localdomain localhost
4- configure resolv.conf file
#vi /etc/resolv.conf (enter text below, then save and exit)
5- configure DNS or named.conf file (see this link: http://not-late.blogspot.com/2010/11/dns-bind-on-red-hat-linux-enterprise-5.html) make sure you can start and stop your named service
6- add record to named.conf file
#vi /etc/named.conf (enter text below at the bottom of your named file, then save and exit)
7- create database zone file in /var/named/
7.a- create forward zone file
7.b create reverse zone file
#vi /var/named/not-late.rev.db (enter text below, then save and exit)
8-Restart named service ( the result must be OK)
9- Testing your DNS to make sure it works
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> not-late.com mx
10-Testing Reverse DNS
#host 192.168.74.106 (result look similar below)
Saturday, November 20, 2010
DNS Bind on Red Hat Linux Enterprise 5
#cd /usr/share/doc/bind-9.3.6/sample/etc
#cp -v * /etc/
#cd /usr/share/doc/bind-9.3.6/sample/var/named
#cp -rv * /var/named/
#service named start (result will be FAILED)
#vim /etc/named.conf (Please delete from line "// All BIND 9 zones are in a "view", which allow different zones to be served") And your named.conf will look like below:
// Sample named.conf BIND DNS server 'named' configuration file
// for the Red Hat BIND distribution.
//
// See the BIND Administrator's Reference Manual (ARM) for details, in:
// file:///usr/share/doc/bind-*/arm/Bv9ARM.html
// Also see the BIND Configuration GUI : /usr/bin/system-config-bind and
// its manual.
//
options
{
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
// Put files that named is allowed to write in the data/ directory:
directory "/var/named"; // the default
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
};
logging
{
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named).
* By default, SELinux policy does not allow named to modify the /var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
#service named start ( [ OK ] )
Monday, November 15, 2010
Khmer Unicode on SQL Server
ជាធម្មតាយើងមិនអាចបញ្ចូលអក្សរខ្មែរនៅក្នុង SQL Server បានទេ លុះត្រាតែយើង Install Khmer Unicode ជាមុនសិន សូមមើលរបៀបបញ្ចូល Khmer Unicode។ បន្ទាប់មកសូមសាកល្បងបញ្ចូលទិន្នន័យជាភាសាខ្មែរក្នុង SQL Server ដោយប្រើ SQL Command "INSERT INTO tblUnicode VALUES('១','អក្សរខ្មែរ')"។ (សូមមើលរូប)
បន្ទាប់មកសូមចុចលើ !Execute Button អ្នកនឹងទទួលបាន Messages ដូចក្នុងរូប(1 row(s) affected) នោះមានន័យថា ការបញ្ចូលទិន្នន័យជាអក្សរខ្មែរទៅក្នុងSQL Server បានសំរេចហើយ។ បន្ទាប់មកទៀតសូមបើកTable(tblUnicode) ជាទំរង់ នោះយើងនឹងឃើញទិន្នន័យដែលបានបញ្ចូលមានលក្ខណៈជាសញ្ញាសួរ(????????)។
ដូច្នេះដើម្បីអោយយើងអាចមើលជាទំរង់អក្សរខ្មែរបាន នោះយើងគ្រាន់តែបន្ថែមអក្សរ "N" នៅពីមុខតំលៃដែលបញ្ចូលដោយSQL Command គឺ "INSERT INTO tblUnicode VALUES(N'១',N'អក្សរខ្មែរ')" រួចសូមបើក Table(tblUnicode) មើលម្តងទៀត យើងនឹងទទួលលទ្ធផលជាអក្សរខ្មែរដែលអាចមើល និងអានបាន។
២- To select record from sql server ដោយ Sql command គឺ SELECT * FROM tblunicode WHERE [ID]=N'២'
Thursday, November 11, 2010
USB boot with Hiren
2-using Grub4Dos Installer.
Exact and Open file(grubinst_gui.exe)
then the dialog below will be open and please follow the figure
then Please press any to continue
3-Copy files(grldr, menu.lst) from Grub4Dos to your usb drive.
4-Insert your CD Hiren(10.1 or new) and copy all files from Hiren CD to your usb drive.
5-Test your usb boot hiren.
Saturday, November 6, 2010
Configuration Yum on Red Hat Linux Enterprise 5
# ps ax |grep http
If the httpd service is not running please install
#yum -y install httpd*
Starting web server service
#service httpd start
Build the repository
# mkdir /var/www/html/yum
Getting packages to repository
Mounting CD/DVD RHEL
Copying RPM packages from CD/DVD to yum repository
#cp -v /media/RHEL/RPMS/* /var/www/html/yum
installing createrepo
Installing createrepo package
Checking its package
# rpm -qa |grep createrepo
If doesn’t have : install # rpm –ivh createrepo.x.x.x.rpm
Running createrepo tool to repository directory
Createing meta-data to repository directory
# createrepo /var/www/html/yum
You can see:
-rw-r--r-- 1 root root 2227275 2010-02-18 11:51 filelists.xml.gz
-rw-r--r-- 1 root root 6487453 2010-02-18 11:51 other.xml.gz
-rw-r--r-- 1 root root 747714 2010-02-18 11:51 primary.xml.gz
-rw-r--r-- 1 root root 951 2010-02-18 11:51 repomd.xml
Configure yum client
Editing file: /etc/yum.conf Or /etc/yum.repos.d/*
[base-local]
name=RHEL $releasever - $basearch failover
method=priority
baseurl=http://192.168.74.100/yum/
enabled=1
gpgcheck=0
Friday, October 29, 2010
Samba File Server
1- Install all samba package
#rpm -ihv --nodeps samba*
2- Add user
#useradd user1
#useradd user2
3- add samba user
#smbpasswd –a user1
#smbpasswd –a user2
4- Create Shared Folder
#mkdir –p /FileServer/Public
#cd /FileServer
#chmod o-rx Public
#chmod 750 Public
#chown userName:GroupName Public
5- Samba configuration File
#vi /etc/samba/smb.conf
[Public]
comment=for User Group
path=/FileServer/Public
writeable=no
readonly=yes
#valid user=user1,user2,user3,user4,user5
Write list =@GroupName
6- Turn on Samba Services
#chkconfig smb on
7- Start/Restart Samba Service
#service smb start/restart
8- End (and try to access from your os client)
Thursday, February 25, 2010
Create tablespace, user, table in oracle 10g
[oracle@localhost ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 25 15:19:56 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> CREATE TABLESPACE mytbs DATAFILE '/u01/app/oracle/oradata/ORCL/datafile/mytbs.dbf' SIZE 10M; Tablespace created. SQL> show user USER is "SYS" SQL> SQL> CREATE USER ora1 IDENTIFIED BY ora1 DEFAULT TABLESPACE mytbs; User created. SQL> exit [oracle@localhost ~]$ sqlplus ora1/ora1 ERROR: ORA-01045: user ORA1 lacks CREATE SESSION privilege; logon denied Enter user-name: [oracle@localhost ~]$ sqlplus / as sysdba SQL> GRANT CONNECT TO ora1; Grant succeeded. SQL> connect ora1/ora1 Connected. SQL> show user USER is "ORA1" SQL> CREATE TABLE ora1.table1(col1 number); CREATE TABLE ora1.table1(col1 number) * ERROR at line 1: ORA-01031: insufficient privileges SQL> exit [oracle@localhost ~]$ sqlplus / as sysdba SQL> show user USER is "SYS" SQL> GRANT CREATE TABLE TO ora1; Grant succeeded. SQL> connect ora1/ora1 Connected. SQL> show user USER is "ORA1" SQL> CREATE TABLE ora1.table1(col1 number); CREATE TABLE ora1.table1(col1 number) * ERROR at line 1: ORA-01950: no privileges on tablespace 'MYTBS' SQL>exit [oracle@localhost ~]$ sqlplus sys/oracle as sysdba SQL> show user USER is "SYS" SQL> ALTER USER ora1 QUOTA UNLIMITED ON mytbs; User altered. SQL> connect ora1/ora1 Connected. SQL> CREATE TABLE ora1.table1(col1 number); Table created. SQL> |
Monday, February 8, 2010
Oracle Answer
Instructor: Chalit Pojarutsangkul [cpojarut@yahoo.com]
Answer question or choose the best choice. Some of the questions, you can use the EM GUI to simulate and click the SHOW SQL button to see the SQL command.
1. Use dbca to create a database named orcl3 with instance name orcl3. Have the dbca generate scripts which will create database for you. There are many scripts created by the dbca. You need to execute just one file, it will execute the rest and your database will be created. What is the one file you need to execute?
Answer.
The one file that we have to execute is orcl3.sh.
2. In what environment would you execute that file? At the o/s prompt or inside SQL*PLUS?
Answer.
We use o/s prompt to execute that file.
3. You want to make sure next time you startup, the parameter JOB_QUEUE_PROCESSES is set to 15 without affecting current setting of this parameter. What is the SQL command you will issued?
Answer.
1-SQL>CREATE PFILE FROM SPFILE;
2-SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=15 SCOPE=SPFILE;
4. What is the SQL command to create a tablespace MYTBS with the file named /u01/app/mytbs.dbf. The file size should be 10m. The tablespace is locally managed and with automatic space management.
Answer is D.
A. CREATE TABLESPACE mytbs DATAFILE ‘/u01/app/mytbs.dbf’ SIZE 10M EXTENT MANAGEMENT LOCAL AUTOMATIC SEGMENT SPACE MANAGEMENT
B. CREATE TABLESPACE mytbs DATAFILE ‘u01/app/mytbs.dbf’ SIZE 10 LOCAL MANAGEMENT EXTENT AUTOMATIC SEGMENT SPACE MANAGEMENT
C. CREATE TABLESPACE mytbs DATAFILE ‘u01/app/mytbs.dbf’ SIZE 10M EXTENT LOCALLY MANAGED SEGMENT SPACE MANAGEMENT AUTO
D. CREATE TABLESPACE mytbs DATAFILE ‘u01/app/mytbs.dbf’ SIZE 10M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
Tuesday, January 19, 2010
PHStat2
you can download by link below:
http://rapidshare.com/files/61524131/PhStat2.part1.rar
http://rapidshare.com/files/61525130/PhStat2.part2.rar
or you can search in http://www.filecrop.com/