- 環境:Oralce Virtual Box
- O/S:Oracle Linux
- Ram:2g
- HDD:50g
Database installation
- Set root password
- Remove anonymous users
- 接受遠端root登入
- Remove test database and access
# mysql_secure_installation
Installing Communication server required PERL modules
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm # yum install perl-XML-Simple # yum install perl-Apache-DBI # yum install perl-Net-IP # yum install perl-SOAP-Lite
Installing Administration console required PHP modules
# yum install php-pecl-zip # yum install php-gd
Installing management server
- 輸入sh setup.sh開始安裝
- 持續下一步的當下,有遭遇到沒有檢測到有安裝perl-SOAP-Lite.noarch,但是實際上是有裝,只是不知道為何找不到。不過這個套件是選用的,不裝也可以。
- 若有成功安裝,可以看到Enjoy OCS Inventory NG字樣,同時也提醒要重啟Apache。
- 重啟httpd的時候遭遇到這個問題,經查明原來是自己豬頭,忘了裝php。
- 安裝php相關套件,再次重啟httpd,順利解決問題。
# yum install php # yum install php-mysql
Configuring management server
- 開啟瀏覽器,輸入http://localhost/ocsreports,開啟設定畫面
- 輸入MySQL帳號/密碼:取代原先預設的account name:ocs,改為root。
- Database維持預設的ocsweb
- 進入下一步時,遭遇到錯誤(ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull))
- 訊息表示權限不足,但是實際上是SELinux在搞鬼,因此需要將SELinux Disabled,編輯/etc/selinux/config,把SELINUX=enforcing改為disabled,重開機後解決。
- 按下“確認查詢”按鈕後,完成設定作業。
- 點擊“Click here to enter OCS-NG GUI“,輸入初始帳號密碼admin/admin
- 移除/usr/share/ocsinventory-reports/ocsreports/install.php
- 排除SECURITY ALERT!The default SQL login/password is activate on your database: ocsweb問題
1.修改mysql ocs密碼
# mysql -u root -p Enter password: mysql> UPDATE mysql.user SET Password = PASSWORD('ocs123') WHERE User = 'ocs'; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye
2.編輯/etc/httpd/conf.d/z-ocsinventory-server.conf
PerlSetVar OCS_DB_PWD ocs123
3.編輯/usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
4.重啟Apache
沒有留言:
張貼留言