ncowboy

统计

常用链接

留言簿(1)

c#

Linux

阅读排行榜

评论排行榜

2005年1月19日 #

MDK 10.1版,简单硬盘安装法(图形界面)

MDK 10.1版,简单硬盘安装法(图形界面)
1、用md5sums.exe filename.iso命令,验证ISO文件的MD5码是否正确。

2、把几个ISO文件都解压到同一个目录中,比如MDK10。由于目前MDK还不能识别ISO软件源,因此不解压ISO文件安装后,只能手工挂接ISO和安装软件,比较麻烦,因此推荐此全解压ISO文件安装法

3、将解压后的isolinuxalt0中的文件(vmlinuz,all.rdz)都复制到dosutils目录里面的autoboot中。


4、在dosutils目录中编辑一个autoboot.bat文件,内容为:(\请改成英文状态的半角斜杠"",这里我在下面命令行用了可是论坛把斜杠删除了我只有用中文全角代替)
loadlin autoboot\vmlinuz vga=788 ramdisk_size=128000 initrd=autoboot\all.rdz

5、用DOS软盘或光盘重启电脑进入dos,转到dosutils目录,运行autoboot.bat文件,

此法安装后的MDK启动检测是图形界面。
另外,大内存的可以把ramdisk_size设为256000,17寸显示器可以将vga设为791

posted @ 2005-01-19 14:36 35号房客 阅读(974) | 评论 (1)编辑

2004年11月29日 #

ORACLE_SID在Linux平台是否大小敏感?是!

今天创建了一个新的oracle数据库。然后更改ORACLE_SID,但是,数据库无法启动。报无法找到“ /u01/app/oracle/product/10.1.0/db_1/dbs/initLACL.ora”文件。经过检查,我发现是因为建库时指定的sid,和环境里面的sid大小写不一直。大小写差异的缘故。实际存在“ /u01/app/oracle/product/10.1.0/db_1/dbs/initlacl.ora”文件。

posted @ 2004-11-29 18:55 35号房客 阅读(638) | 评论 (1)编辑

2004年11月25日 #

oracle 9i on redhat as3,应该安装的rpm

安装:
gnome-libs-1.4.1.2.90-34.1.i386.rpm
libpng10-1.0.13-8.i386.rpm

 

posted @ 2004-11-25 14:31 35号房客 阅读(1002) | 评论 (0)编辑

start isqlplus&em of oracle

start isqlplus
************************************************


[oracle@lacl-001 ~]$isqlplusctl

iSQL*Plus 10.1.0.2.0
Copyright (c) 2004 Oracle. All rights reserved.
Invalid arguments

Unknown command option
Usage::
      isqlplusctl start| stop


[oracle@lacl-001 ~]$isqlplusctl start

iSQL*Plus 10.1.0.2.0
Copyright (c) 2004 Oracle. All rights reserved.
Starting iSQL*Plus ...
iSQL*Plus started.

[oracle@lacl-001 ~]$

************************************************
start em
************************************************

[oracle@lacl-001 ~]$emctl start dbconsole

TZ set to Asia/Chungking
Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
http://localhost:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control
............................... started.

------------------------------------------------------------------

Logs are generated in directory
/u01/app/oracle/product/10.1.0/db_1/lacl-001_TSH1/sysman/log
************************************************

posted @ 2004-11-25 14:27 35号房客 阅读(632) | 评论 (0)编辑

通过ftp修改帐户密码

通过ftp修改帐户密码
quote SITE PSWD "<oldpassword>" "<newpassword>".

posted @ 2004-11-25 14:25 35号房客 阅读(1037) | 评论 (4)编辑

学会将SYS_GUID和序列作为主关键字

学会将SYS_GUID和序列作为主关键字
ZDNet China
10/11/2003
URL: http://www.zdnet.com.cn/developer/tech/story/0,2000081602,39178163,00.htm

本文译自Builder.com,未经许可请勿转载
Oracle8i引入了SYS_GUID这个概念,它同Oracle管理员所使用的传统的序列(sequence)相比具有诸多优势。一个序列生成器只是简单地创建从给定的起点开始的一系列整数值,而且它被用在选择陈述式的时候自动地递增该系列。

序列生成器所生成的数字只能保证在单个实例里是唯一的,这就不适合将它用作并行或者远程环境里的主关键字,因为各自环境里的序列可能会生成相同的数字,从而导致冲突的发生。SYS_GUID会保证它创建的标识符在每个数据库里都是唯一的。

此外,序列必须是DML陈述式的一部分,因此它需要一个到数据库的往返过程(否则它就不能保证其值是唯一的)。SYS_GUID源自不需要对数据库进行访问的时间戳和机器标识符,这就节省了查询的消耗。

create table use_seq_table(id integer);
create sequence use_seq_sequence;
insert into use_seq_table values (use_seq_sequence_value.nextval);

REM - for some reason, the documentation uses raw(32)
create table use_guid_table(id raw(16));
insert into use_guid_table(sys_guid());

很多应用程序都依靠序列生成器来创建数据行的主关键字,这些数据行没有一个明显的主值,这也就是说,在这样的数据集里一条记录的创建就会让数据列发生改变。因此,管理员可能会对在表格中将SYS_GUID用作主关键字而不使用序列数感兴趣。这在对象在不同机器的不同数据库里生成以及需要在后来合并到一起的情况下很有用。

但是,SYS_GUID所生成的值是一个16位的原始值。序列所生成的整数不会使用16位(的值),除非它达到了10的30次方(每个字节有两位),而且数字是相当独特的:

SQL> select dump(123456789012345678901234567890) from dual;

DUMP(123456789012345678901234567890)

--------------------------------------------------------------
Typ=2 Len=16: 207,13,35,57,79,91,13,35,57,79,91,13,35,57,79,91

较短的值就意味着用于表格和索引的存储空间更少,以及查询访问的时间更短。

使用SYS_GUID或者序列会在数据库使用周期里的某些地方造成性能上的消耗;问题就是在哪里。对于SYS_GUID而言,性能上的影响在查询时间和创建时间上(在表格里要创建更多的块和索引以容纳数据)。对序列而言,性能上的影响在查询期间,在这个时候,SGA序列的缓冲区被用光。在缺省情况下,一个序列一次会缓冲20个值。如果数据库没有使用这些值就关闭了,它们就会被丢失。

SYS_GUID生成的值的另一个显著的不足之处是,管理这些值会变得困难得多。你必须(手动)输入它们或者通过脚本来填充它们,或者将它们作为Web参数来传递。

出于这些原因,将SYS_GUID作为一个主关键字不是一个很好主意,除非是在一个并行的环境里或者希望避免使用管理序列生成器的情况下。

posted @ 2004-11-25 14:23 35号房客 阅读(702) | 评论 (0)编辑

How can I make Yahoo! Mail my default email application?


How can I make Yahoo! Mail my default email application?


The Yahoo! Default Email Application is a small 60KB download that allows you to set Yahoo! Mail as your default email application in Microsoft Windows. For example, in Internet Explorer it lets you access your Yahoo! Mail account from any email link on a web page, as well as from the "File/Send" menu or the "Mail" button on the IE toolbar. It also allows you to send a file using Yahoo! Mail directly from Microsoft Word, Excel, and PowerPoint. It's perfect for Yahoo! Mail power users who would like easier access to their Yahoo! Mail accounts.

To install the program:

Go to this help page(http://help.yahoo.com/help/us/mail/ext/ext-11.html).
Check to make sure your system meets the requirements listed.
Click on "Continue." The program will automatically install on your hard drive and set Yahoo! Mail as your default email application.
After the download is complete, you'll have the opportunity to add links or shortcuts to Yahoo! Mail from your desktop and "Quick Launch" menu.
Once this application is installed, when you send files from Word, Excel, or PowerPoint, you'll be taken to the attachments interface in Yahoo! Mail. At the top of the attachments page, you'll be told where your file is temporarily stored. You can add the file to your message by clicking on "Browse" to find it in the location indicated and then attaching as usual.
If you want to switch your default mail application back to another email program, just click on "Tools" and then "Internet Options" in your Internet Explorer toolbar. Then click on the "Programs" tab, and use the pull-down menu to select the default email application you'd like. From there, click on "OK," and your changes will be saved.


The Yahoo! Default Email Application can be installed on a PC running Windows 9x, Windows Me, Windows NT, Windows 2000, or Windows XP. It works with Internet Explorer 4.0 and greater.

posted @ 2004-11-25 14:21 35号房客 阅读(822) | 评论 (0)编辑

Quick .Net File Download Security

Quick .Net File Download Security
http://www.wwwcoder.com/main/Default.aspx?tabid=68&mid=407&site=1795
In this article we will discuss providing a programmable method of securing files on for your ASP.Net applications. This code could come in handy where you have an application hosted on an ISP and you do not have access to a folder outside of your Web directory structure, and you are not able to change permissions on folder in the Web. This method does not require storing your file in a binary field in your database, thus reducing cost of having to buy database storage from your ISP, and with no impact on the network traffic between the database and web servers.

The Problem

On another project we have been talking about how we could allow a person upload a file to the Web application, and be able to secure the file so that someone couldn't type the file URL directly in the browser and be able to download the file.

Several methods were discussed of providing a secure file system for our application:

Database Storage

Storing the file in a database in a binary field, but this method could cost money for folks hosting with an ISP that charges for database storage, and it also impacts network traffic. Basically this solution entails storing the file in the database and attaching some security information in the database about the file; this could be user roles that are allowed to download the file. You can accomplish this by uploading the file to the database; when someone goes to access the file you would authenticate them, check the roles that can access the file, then check the user to see if they have permissions to access the file. Once you're done with the security checks create an ADO stream and send the file information to their client.

The database method meets the requirement of providing secure method of downloading files and prevents someone from being able to access the file directly via typing in the URL into the browser. But as mentioned there are several drawbacks to this method.

File Storage

Another method would be storing the file in a folder on the Web server. If the file were stored in the Web application directory structure you could secure it using NT ACLs. While this method works for an intranet where you have administrative access to the machine, it does not work well if you are hosting a site with an ISP. An ISP may not be able to provide you with the level of security you need for your application.

Another file storage method was storing the files in a folder outside of the Web application's directory structure and streaming the file to the browser. This would be accomplished much in the same way as the database solution, where you could store security information in a table, but the actual file resides on the Web server. You would do your security checks in your code and send the file to the user once they authenticated for access to the file. This method would accomplish restricting the file for downloading directly from typing in the URL of the file since the code is handling the file stream. Again the drawback to this method is you have to rely on an administrator to configure the folders that will reside outside of the Web directory structure.

Another method was to store the file within the directory structure and use the web.config file to restrict access to the directory in the following manner:

<location path="SecureDirectory">
   <system.web>     
      <authorization>
         <deny users="*" />
      </authorization>
     </system.web>
</location>

This method will secure any requests that are being processed by ASP.Net, the problem is it will not secure files that are not being processed by ASP.Net; for example, pdf, doc, xls, and other files you wish to secure. A way around this is to change the settings in IIS so all file extensions are processed by ASP.Net. Again, in the ISP case they may not want to do this because it can have some performance implications.

One Solution

So how do you provide access to files and ensure they cannot be accessed directly by typing in a URL? The following blocks of code will cover one method of doing this using a combination of all the methods described above. This can be done entirely via code.

First, select a location for storing your files. As in the example web.config file mentioned previously, we'll select the "SecureDirectory" folder off of the Web root. We will keep the web.config modification to restrict access to this folder by unauthorized groups. We then create a database table to store security information for our file.

FILE_NAME

ACCESS_ROLES

myfile.doc

admin;managers

This table will contain the names of the files that are uploaded to our secure directory and the security roles that can access the file. Notice the actual file is not stored in the database just the associated security information.

The File Upload Code

Now that you have your table defined to store security information for your file, we need to create methods for uploading and downloading the documents from the server. We will create a webform with a file browse dialog to browse our local system and upload it the server. In your Webform.aspx file add the following:

<INPUT id="cmdBrowse" type="file" runat="server" size="50" NAME="cmdBrowse">
<asp:LinkButton id="cmdUpload" runat="server" Cssclass="CommandButton">
 Upload File
</asp:LinkButton>

Then in our code behind page, Webform.aspx.vb, we need to handle the file upload. The following code will take the file that is being uploaded, save it into our secure directory as defined in the web.config file, and add the extension "resources" to the file so it will secure the file from a directly typed URL. You could use any extension like .vb, .acsx, .config, .resources, .resx or any file type that will be processed by the .Net handler.

Private Sub cmdUpload_Click(ByVal sender As System.Object, _
           ByVal e As System.EventArgs) Handles cmdUpload.Click
     SecureFileUpload()
End Sub
Public Sub SecureFileUpload()
   Dim strFileName As String
   Dim strFileNamePath As String
   strFileName = System.IO.Path.GetFileName(cmdBrowse.PostedFile.FileName)
   'now save the file as an resources file.
   strFileNamePath = Request.MapPath("SecureDirectory") & "\" & strFileName & ".resources"
   If File.Exists(strFileNamePath) Then
      File.Delete(strFileNamePath)
   End If
   cmdBrowse.PostedFile.SaveAs(strFileNamePath)
End Sub

So now if a person tries to go to the file directly by typing in the URL they will be greeted by a login prompt and an eventual 401.2 status message of "Access is denied"


Denied download from directly entering the file URL.

Downloading the File

So now that we have the file on our Web server and it can't be downloaded by browsing to the file URL, how are we supposed to get the file to the people who are supposed to get it?

First, you need to pass the file that you want to download and check it against your database to see if they have permissions on the file. If they have permissions for the file, then proceed with the download. You can write any security check you want, you may want to run a stored procedure to check to see if your user is a member of a certain role for your portal. Since the security mechanism will vary depending on the application, we will call a CheckSecurity method that returns either true or false depending on whether or not the person has access to the file as defined by the table earlier in this article.

If CheckSecurity(filename, userole) Then
   SecureFileDownload(filename)
Else
  'change the http response to access denied or some other error.
End If

After checking the permissions in the database, if the user has access to the file we then call the SecureFileDownload method which accepts the file path as the parameter, maps the file to the physical directory on the server, then sends the download to the client without the resources extension allowing them to download the file.:

Public Sub SecureFileDownload(ByVal inFile As String)
    Dim strFileNamePath As String
    strFileNamePath = Request.MapPath("SecureDirectory") & "\" & inFile
    Dim myFile As FileInfo = New FileInfo(strFileNamePath)
    Response.Clear()
    'now we send the file header minus the resources extension.
    Response.AddHeader("Content-Disposition", "attachment; filename=" & _
         Replace(myFile.Name, ".resources", ""))
    Response.AddHeader("Content-Length", myFile.Length.ToString())
    Response.ContentType = "application/octet-stream"
    Response.WriteFile(myFile.FullName)
    Response.End()
End Sub


Download dialog for the file.

The user will be presented with a download dialog and is now able to save the file to their local system.

As discussed there are several methods you can do to secure your file downloads, the method described in this article is ideally suited for those who do not have access to the administrative functions of the Web server.

posted @ 2004-11-25 14:19 35号房客 阅读(788) | 评论 (0)编辑

如何让win XP实现自动登陆

如何让win XP实现自动登陆


Windows XP是一个比较安全的操作系统,每次启动时都要求选择账户并输入密码,对于公用电脑,这样当然更安全,但是如果这台电脑是一个人用,也没有什么重要资料,每次都要选择帐户并输入密码实在太麻烦了,怎么样才能让
Windows XP 不用输入密码自动登录呢?


单击"开始/运行",输入"rundll32 netplwiz.dll,UsersRunDll",按回车键后弹出"用户帐户"窗口,看清楚,这可跟"控制面板"中打开的"用户账户"面板窗口不同哦!然后取消选定"要使用本机,用户必须输入用户名和密码"选项,单击确定,在弹出的对话框中输入你想让电脑每次自动登录的账户和密码即可。


事实上,在Windows 2000中也可以这样实现自动登录,不过它可以通过"控制面板"打开"用户账户"窗口,而在Windows XP中不行罢了。

 

posted @ 2004-11-25 14:18 35号房客 阅读(9949) | 评论 (11)编辑

关于yahoo邮箱如何开通POP access服务

from(http://jeyoshiki.yculblog.com/post-165043.html)

众所周知,yahoo邮箱是不提供pop access服务的,所以yahoo邮箱只能在线上登陆收取信件,而不能用outlook或foxmail等软件收取。

不过,yahoo的邮箱其实是有办法开通pop access服务的。你只要愿意接受偶尔的广告邮件,你就可以开通名为yahoo! delivers的功能。这个yahoo官方提供的服务,所以不必担心。它的服务有两个。
1是网上阅读邮件和 POP 功能(不仅可以使用浏览器访问 Yahoo! 电邮,并且,还可以通过 POP3 及电子邮件程序收取信件。例如Eudora, Outlook, 或Netscape Mail )
2是邮件转发功能。利用邮件转发功能, 您收到的Yahoo!电邮可以被自动转发到您在这里指定的电子邮件地址。

我们要的pop access功能就是它的服务1。

方法:
把下面整个的链接贴到IE地址栏里。(注意:整个都是一行) http://rd.yahoo.com/mail_us/options/?http://edit.my.yahoo.com/config/set_popfwd?.src=ym&.done=http://us.f93.mail.yahoo.c om/ym/Options?YY=22797

如果你事先没有登陆邮箱,那你会进入平时登陆yahoo的登陆界面。登陆后选"是",即激活yahoo! delivers功能,然后按着他的步骤,两步完成设置。

如果你事先已经登陆了yahoo邮箱了,那你就跳过登陆界面,直接进入激活设置。

至此,你的yahoo邮箱已经开通了pop access功能。然后你就可以在你的outlook,foxmail等软件收发yahoo邮件了。很棒,是不是?

yahoo邮件服务器设置如下:

接收邮件(POP3)服务器:pop.mail.yahoo.com.cn
发送邮件(SMTP)服务器:smtp.mail.yahoo.com.cn

posted @ 2004-11-25 13:54 35号房客 阅读(33146) | 评论 (146)编辑