Click here to load reader
Upload
mohsen-b
View
60
Download
2
Embed Size (px)
Citation preview
:و باالتر 2003 بر روي ويندوز Cygwinنصب
. كليك كنيد Nextاجراء كرده و بر روي دكمه cywin 1,7نرم افزار را از داخل پوشه setupنسخه .1
.كليك كنيد Nextموجود گزينه سوم را انتخاب كنيد و بر روي دكمه Radio Buttonاز سه .2
و در C:\cygwinمقدار Root Directoryهمانطور كه در شكل نشان داده شده است در قسمت .3
:كليك كنيد Nextرا انتخاب كنيد و بر روي دكمه All Usersگزينه Install Forقسمت
مقدار اين گزينه بستگي به محلي دارد كه نرم . در اين مرحله بايد منبع نصب نرم افزار را مشخص كنيد .4
.كليك كنيد Nextبا مشخص كردن اين مقدار بر روي دكمه . افزار در آن قرار دارد
و يا Localبه صورت ( نرم افزار پس از چك كردن چگونگي نصب Nextبا كليك بر روي دكمه .5
Online ( وارد مرحله انتخابPackage ها مي شود.
. در ويندوز انتخاب مي شوند SSHهاي مورد نياز براي پياده سازي Packageدر اين مرحله .6
Package عبارتند از ) زير قابل مشاهده است همانطور كه در شكلهاي(مورد نياز هاي
a. در قسمتArchive پكيج هايunzip & zip ) توجه داشته باشيد كه هم بايدBin و هم
Source پكيج هاي انتخاب شوند(.
b. در قسمتNet پكيج هايopenssh & openssl
.كليك كنيد Nextپس از انتخاب اين پكيج هاي بر روي دكمه
اطمينان Select required packages (RECOMMENDED)در اين مرحله از انتخاب گزينه .7
.كليك كنيد Nextه و بر روي دكمه حاصل كرد
همانظور كه در شكل زير مشاهده مي شود در اين مرحله ابتدا نصب نرم افزار شروع مي شود و پس از .8
.كليك كنيد Finishبر روي دكمه . اتمام نصب ويزارد اتمام نصب ظاهر مي شود
را با استفاده از ويرايشگر ) C:\cygwin(موجود در مسير نصب cygwin.batپس از اتمام نصب فايل .9
notepad باز كرده و خط زير را به آن اضافه كنيد
set CYGWIN=binmode tty ntsec
شكل زير . استفاده نمود Desktopاز ايكون موجود بر روي مي توان cygwinبراي ورود به نرم افزار .10
.را نشان مي دهد cygwinخط فرمان نرم افزار
فرمان زير را در خط ”can not create /home/userid“مشاهده پيغامي مبتني بر در صورت
mkpasswd –l > /etc/passwd:اجراء كنيد cygwinفرمان
:در سطح ويندوز مراحل زير بايد اجراء شود sshبراي نصب سرويس .11
a. فرمانssh-host-config را در خط فرمانcygwin اجراء كنيد و ورودي هاي مورد نياز را
: )مشخص شده اند Boldورودي هاي به صورت ( مطابق شكل زير وارد كنيد
$ ssh-host-config
***Info: Generating /etc/ssh_host_key
***Info: Generating /etc/ssh_host_rsa_key
***Info: Generating /etc/ssh_host_dsa_key
***Info: Creating default /etc/ssh_config file
***Info: Creating default /etc/sshd_config file
***Info: Privilege separation is set to yes by default since OpenSSH 3,3.
***Info: However, this requires a non-privileged account called 'sshd '.
***Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
***Query: Should privilege separation be used? (yes/no) yes
***Info: Note that creating a new user requires that the current account have
***Info: Administrator privileges. Should this script attempt to create a
***Query: new local account 'sshd'? (yes/no) yes
***Info: Updating /etc/sshd_config file
***Warning: The following functions require administrator privileges!
***Query: Do you want to install sshd as a service?
***Query: (Say "no" if it is already installed as a service) (yes/no) yes
***Query: Enter the value of CYGWIN for the daemon: [] binmode tty ntsec
***Info: On Windows Server 2003, Windows Vista, and above, the
***Info: SYSTEM account cannot setuid to other users -- a capability
***Info: sshd requires. You need to have or to create a privileged
***Info: account. This script will help you do so.
***Info: You appear to be running Windows 2003 Server or later. On 2003
***Info: and later systems, it's not possible to use the LocalSystem
***Info: account for services that can change the user id without an
***Info: explicit password (such as passwordless logins [e.g. public key
***Info: authentication] via sshd.(
***Info: If you want to enable that functionality, it's required to create
***Info: a new account with special privileges (unless a similar account
***Info: already exists). This account is then used to run these special
***Info: servers.
***Info: Note that creating a new user requires that the current account
***Info: have Administrator privileges itself.
***Info: No privileged account could be found.
***Info: This script plans to use 'cyg_server '.
***Info: 'cyg_server' will only be used by registered services.
***Query: Do you want to use a different name? (yes/no) no
***Query: Create new privileged user account 'cyg_server'? (yes/no) yes
***Info: Please enter a password for new user cyg_server. Please be sure
***Info: that this password matches the password rules given on your system.
***Info: Entering no password will exit the configuration.
***Query: Please enter the password : ******
***Query: Reenter:******
***Info: User 'cyg_server' has been created with password ‘*******.’
***Info: If you change the password, please remember also to change the
***Info: password for the installed services which use (or will soon use(
***Info: the 'cyg_server' account.
***Info: Also keep in mind that the user 'cyg_server' needs read permissions
***Info: on all users' relevant files for the services running as 'cyg_server '.
***Info: In particular, for the sshd server all users' .ssh/authorized_keys
***Info: files must have appropriate permissions to allow public key
***Info: authentication. (Re-)running ssh-user-config for each user will set
***Info: these permissions corrently. [Similary restrictions apply, for
***Info: instance, for .rhosts files if the rshd server is running, etc.[
***Info: The sshd service has been installed under the 'cyg_server'
***Info: account. To start the service now, call `net start sshd' or
***Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
***Info: after the next reboot.
***Info: Host configuration finished. Have fun!
b. فرمان اجرايssh-user-config در جهت ايجاد كليدهايPublic & Private
$ ssh-user-config
***Query: Shall I create an SSH1 RSA identity file for you? (yes/no) yes
***Info: Generating /home/Administrator/.ssh/identity
Enter passphrase (empty for no passphrase:(
Enter same passphrase again:
***Query: Do you want to use this identity to login to this machine? (yes/no) yes
***Info: Adding to /home/Administrator/.ssh/authorized_keys
***Query: Shall I create an SSH2 RSA identity file for you? (yes/no) yes
***Info: Generating /home/Administrator/.ssh/id_rsa
Enter passphrase (empty for no passphrase:(
Enter same passphrase again:
***Query: Do you want to use this identity to login to this machine? (yes/no) yes
***Info: Adding to /home/Administrator/.ssh/authorized_keys
***Query: Shall I create an SSH2 DSA identity file for you? (yes/no(
***Query: Shall I create an SSH2 DSA identity file for you? (yes/no) yes
***Info: Generating /home/Administrator/.ssh/id_dsa
Enter passphrase (empty for no passphrase:(
Enter same passphrase again:
***Query: Do you want to use this identity to login to this machine? (yes/no) yes
***Info: Adding to /home/Administrator/.ssh/authorized_keys
***Info: Configuration finished. Have fun!
c. با ورود به قسمتservices در ويندوز)Control Panel/ Administrative Tools/
Services( سرويس ايجاد شده برایCygwin را استارت کنيد.
Gridو سرور agentميان User Equivalencyبر قراري .12
:با اجراي فرمان هاي زير اين امر انجام مي پذيرد
1. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
2. cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
3. ssh Administrator@grid-server cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
4. ssh Administrator@grid-server cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
5. ssh Administrator@agent-server cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
6. ssh Administrator@agent-server cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
7. chmod 644 ~/.ssh/authorized_keys
.نياز به اجراء شدن دارند Agentفقط در زمان اضافه كردن اولين 1،2،3،4خطهاي *
:از فرمان زير استفاده كنيد User Equivalencyبراي تست برقرار بودن .13
On grid server# Ssh grid-server date
On agent server# Ssh agent-server date
از دايركتوري منبع نرم . است Agentاز سرور Silentبه صورت Agentمرحله آخر نصب نرم افزار .14
-additionalشويد و پارامترهاي مورد اشاره در زير را در فايل ...... وارد مسير Agentافزار
agent.rsp مقدار دهي كنيد:
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=True
INSTALL_UPDATES_SELECTION="skip"
ORACLE_AGENT_HOME_LOCATION=”windows path of installation: D:\”
OMS_HOST=”Ip address of grid control server: 10,200,23,19”
OMS_PORT=”Port number for uploading xml files to grid control server: 7201”
AGENT_REGISTRATION_PASSWORD=”Registration password to register agent on grid control: qwert123”
با setup.exeو اجراي فايل .... با ورود به مسير Responseپس انجام تغييرات در فايل .15
:پارامترهاي زير نصب شروع مي شود
setup.exe –silent –responsefile ….