怎麼更改OHS連接埠為80

來源:互聯網
上載者:User

本文章來給各位同學詳細介紹關於怎麼更改OHS連接埠為80吧,有需要瞭解的朋友可進入參考參考。

一般在實施項目時,客戶都希望網域名稱和地址簡單明了。但是OHS為了安全起見是不允許使用連接埠號碼小於1024,小於1024連接埠號碼是屬於root,常見的OHS都是有自己的安裝使用者(Oracle)。因此如果想要使用小於1024的連接埠,需要修改.apachectl的控制權。

步驟:

1.關閉OHS
2.重新設定監聽連接埠
3.改變 . apachectl的許可權
4.重啟OHS

關閉OHS

 代碼如下 複製代碼

# assuming your MW_HOME is /u00/app/oracle/product/fmw-11.1.1
export MW_HOME=/u00/app/oracle/product/fmw-11.1.1
cd $MW_HOME/Oracle_WT1/instances/instance1/bin
./opmnctl stopall

重新設定監聽連接埠,在這裡我們設定為80

 代碼如下 複製代碼

# assuming you are still connected as oracle user to your sevrer
cd $MW_HOME/Oracle_WT1/instances/instance1/config/OHS/ohs1
cp httpd.conf httpd.conf.save
vi httpd.conf
# Now go to the line with Listen <portnumber> (normally 777x)
# and replace the port number to port 80
Listen 80
# save the changes

修改許可權

 代碼如下 複製代碼

# assuming you are connected to the server as root user
# use the MW_HOME from step 1
cd $MW_HOME/Oracle_WT1/ohs/bin
# be aware, we have to modify the hidden file .apachectl (the dot is correct)
ls -la .apachectl
-rwxr-x--- 1 oracle oinstall 13278 Dec 17 03:54 .apachectl
chown root .apachectl
chmod 6750 .apachectl
ls -la .apachectl
-rwsr-s--- 1 root oinstall 13278 Dec 17 03:54 .apachectl

注意:在Linux以”.”開頭的檔案預設為隱藏。

最後重啟OHS

 代碼如下 複製代碼

cd $MW_HOME/Oracle_WT1/instances/instance1/bin
./opmnctl startall
# Then check the status with the option -l
# to see if your Oracle HTTP Server is up and
# the option -l display the used ports (see picture below)
./opmnctl status –l

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.