Tuesday, July 5, 2011 6:17:01 AM
linux
Introduction
To update the system applying the most recent corrective patches of security and to the operating system is not as difficult as many do not suppose, nor either must be a hell of dependencies between packages RPM as some others argue. The reality of the things is that it is much very simple and single requires of good bandwidth or very many patience. Next we presented/displayed the procedures to use yum and to make easily what some denominate "horrible, difficult and complicated ".
Please note there are some changes that apply to Fedora Core 3. You will need to install GPG Key for yum in FC3.
Creating Yum Repo's For FC3.
To update system. Update of the system with all the dependencies that are necessary:
Code:
yum update
Searches. To make a search of some package or term in the data base in some of the formed deposits yum in the system:
Code:
yum search any-package
Example:
Code:
yum search httpd
I hope this will help you understand how to use yum more effeciently. Any erros in this how please notify me.
Consultation of information. To consult the information contained in a package in individual:
Code:
yum info any-package
Example:
Code:
yum info httpd
Installation of packages. Installation of paquetería with automatic resolution of dependencies:
Code:
yum install any-package
Example.
Code:
yum install gkrellm
Uninstalling packages. Desinstalación of packages along with everything what it depends on these:
Code:
yum remove any-package
Example.
Code:
yum remove gkrellm
Listing Packages. The following thing will list all the packages available in the data base yum and that can settle:
Code:
available yum list|less
The following thing will list all the packages installed in the system:
Code:
yum list installed|less
The following thing will list all the packages installed in the system and that can (they must) be updated:
Code:
yum list updates|less
Cleaning of the system.
Yum leaves as result of its use heads and packages RPM stored in the interior of the directory located in the route /var/cache/yum/. Particularly the packages RPM that have settled can occupy much space and is by such reason agrees to eliminate them once no longer they have utility. Also it agrees to do the same with the old heads of packages that no longer are in the data base. In order to make the corresponding cleaning, the following thing can be executed:
Code:
yum clean all
Group install
Code:
yum groupinstall "groupname"
Dont forget the quotation marks for group install.
I hope this will help you understand how to use yum more effeciently. I did this for our newbies that may want to uninstall packages which is not mention in the fedora FAQ. For more info on yum go here:
http://www.fedorafaq.org/#installsoftware
Tuesday, July 5, 2011 2:56:44 AM
linux
Q. I have Red hat enterprise Linux 5 installed on one of the production server. However there is no c compiler installed. I need to compile few applications on this box. How do I install C or C++ compiler on Red Hat Enterprise Linux 5? Where can I get / download compile package?
A.In order to compile and use c/c++ under Linux you need following packages
=> autoconf : GNU's Autoconf is a tool for configuring source code and Makefiles.
=> make/automake : A GNU tool for controlling the generation of executables and other
non-source files of a program from the program's source files.
=> GNU GCC C compiler (gcc) : The gcc package contains the GNU Compiler Collection version 4.1
=> GNU GCC C++ compiler (gcc-c++): This package adds C++ support to the GNU Compiler Collection.
You have total 3 options to download and install GCC compiler under Redhat / CentOS / Fedora Linux:
[a] Use GUI tool
Install rpm from CDROM/DVD
[c] Download and install compiler from RHN over internet
Option # 1: Use GUI tool
Use GUI tool called system-config-packages to install gcc. Just type the following command and select gcc and above packages:
$ system-config-packages &
Option # 2: Install rpm from CDROM/DVD
Mount your CD/DVD and install following packages using rpm command.
# rpm -ivh gcc*
Option # 3: Download and install compiler from RHN over internet
You can download and install packages using RHN and yum command:
# yum install gcc gcc-c++ autoconf automake
(Collections)
Wednesday, December 8, 2010 5:07:20 PM
Hibernate
- QuerySyntaxException .... Vì hibernate ko mapping được đến những class mà bạn cần . Hoặc những class đó tham chiếu tới những bảng trong cơ sở dữ liệu bị sai. Một nguyên nhân khác là do sai cấu trúc của lệnh Query ===> nên nhớ khi dùng Hibernate mỗi câu query sẽ query tới tên object chứ ko phải là tên bảng trong DB. vd select * from Student ===> Student là table ....... Những trong Hibernate khi ta query thì là from Student ==> Student ở đây là tên Object.... ta cần nhìn vào những EJB đã được ta tạo dựng . tên của chúng như thế nào .
- Lỗi về Dialiect : Dialect là những thuật ngữ ( hay là từ khóa ) ... ở mỗi cơ sở dữ liệu có 1 nhóm thuật ngữ khác nhau vd:MySQL ,Oracle, SQLServer ...... ta cần phải chọn đúng dialect cho nó nếu không nó sẽ báo lỗi này .... 1 trường hợp khác xảy ra nữa là ta đã khai báo dialect trong hibernate,hbm.xml rồi nhưng lại vẫn gặp nó ... Đơn giản là khi cơ sở dữ liệu bạn không kết nối đến được ở FactorySession sẽ throw ra 1 ngoại lệ (Exception) và khi đến Dialect ngoại lệ đó được bắt và khiến ta hiểu lầm là Dialect , trường hợp này cần coi lại tên Cơ sở dữ liệu , password , kết nối và cấu hình JDBC thật kĩ .
- Lỗi khác là do 1 số Object do Netbean tự tạo ra sẽ có thêm những quan hệ 1 nhiều nhiều nhiều nhiều 1 ..... Dĩ nhiên đôi khi ở phần này sẽ bị báo lỗi .. Ta vào Object đó xóa phần code về 1 nhiều đó đi ... Có lẽ nó được sử dụng theo 1 phương pháp nào đó . Những giờ tôi hiểu đến đó thôi .
28/12/2010
Khi đang save 1 object vào DB ... Tôi ko chú ý kiểm tra lại DB ... và object đã ko được lưu. Tìm một hồi ... tôi thấy phải có 1 dòng trong file cấu hình hibernate là <property name="connection.autocommit">true</property> . Lúc đầu khi nó ko lưu . Tôi dùng hệ quản trị DB SQLServer để mở table lên xem .. kết quả là mở ko được ... rõ ràng 1 điều là Hibernate đang giữ kết nối với table này , và nó ko nhả ra cho việc truy xuất của tôi = hệ quản trị. Khi thêm 1 dòng <property name="connection.autocommit">true</property> thì chạy rất tốt , tôi nghĩ object lúc đó đã commit lên DB rồi ... nếu ko có dòng đó thì có lẽ tôi phải sử dụng tới transaction mới commit được . Nếu ko Application sẽ giữ kết nối . Đây có lẽ là 1 lỗi ===> và cũng có thể là 1 điểm để tấn công DB ... nếu như người đó thay đổi được code .
Thursday, October 21, 2010 10:57:12 AM
Hôm nay lên trường cũng đang suy nghĩ ... cài lại cái máy ở trường cho phù hợp với nhu càu của mình. Mỗi lần lên cài này cài nọ lại mất thời gian. Máy trường sử dụng Shadow Defender chẳng rõ mấy chấm, nhưng chắc cũng khá mới. Theo mình suy nghĩ có 3 cách phá được Shadow Defender
1. Biết được file lưu pass của Shadow defender nằm trong máy rồi decipher nó . lấy pass nhấn vào . Cách này thì chỉ còn chờ các pro về lập trình sử lý ... mình chẳng biết.
2. Xâm nhập từ 1 hệ điều hành khác . xóa shadow defender rồi chỉnh lại regedit cho nó là xong. Cách này thì biết làm nhưng ko có dụng cụ( đĩa , USB để boot)
3. Cũng là cách dễ nhất. Khi vào window nhấn F8 rồi chọn Safe mode ... vào đó rồi uninstall nó

)... chẳng hiểu sao lại đơn giản đến vậy .

) Mình đã làm và thành công . Bạn cứ thử ...
Thursday, October 21, 2010 10:41:55 AM
-------------------------------------------Vietnamese------------------------------------------
Bước 1: Vào start/run gõ services.msc 1 cửa sổ services hiện ra tìm ra 1 mục tên là Messenger rồi chuột phải chọn Properties trong startup type chọn Automatic rồi OK để lưu lại .
Bước 2: Trong cửa sổ services chuột phải tiếp vào Messenger chọn start để khởi động service đó .
Bước 3: Vào Start/run gõ cmd để vào command prompt . Sử dụng lệnh net send theo cú pháp sau :
net send <IP máy nhận> <thông điệp>
hoặc là
net send <tên máy nhận> <thông điệp>
VD: gửi đến máy có IP là 192.168.1.3 và tên của nó là LONG. bạn dùng là
net send 192.168.1.3 Hello!
hoặc sử dụng theo tên máy
net send LONG Hello!
Chú ý: Những máy được gửi cũng phải active Service Messenger giống như máy bạn . và start lại nó . Sau đó thì gửi .... thành công .
-------------------------------------------English---------------------------------------------
Step 1: start/run and you type services.msc ... after that you have to find out a entry that is 'Messenger' right click ===> Properties .... in startup type, You select Automatic and click OK to save.
Step 2. In Services pane , right click Messenger and select start
Step 3. Start/run and type cmd to enter command prompt type following syntax to send message.
net send <IP of computer you want to send> <type message>
Or
net send <name of computer you want to send> <type message>
Example: I send a message to computer have name LONG and it's IP :192.168.1.3
I type in cmd
net send 192.168.1.3 Hello!
or
net send LONG Hello!
Notice: The computers you want to contact must be start the Messenger service in services pane. Do it like you do for your computer.