หน้าเว็บ

วันจันทร์ที่ 4 กุมภาพันธ์ พ.ศ. 2556

Ubuntu : Install OCS Inventory NG

วิธีการติดตั้ง OCS Server สำหรับจัดเก็บข้อมูลอุปกรณ์คอมพิวเตอร์
Other link
http://intranet.sci.com/blog.php?u=3&b=206
http://intranet.sci.com/blog.php?u=3&b=666

1.Install Ubuntu 10.04 Server
2.Edit sourlist
3.update and upgrade
4.Edit network/interface ใส่ตั้งค่า ip
  1. nano /etc/network/interfaces

4.1 Insert Code in file replace iface.
  1.    iface eth0 inet static
  2.             address 192.168.0.9
  3.             netmask 255.255.255.0
  4.             network 192.168.0.0
  5.             broadcast 192.168.0.255
  6.             gateway 192.168.0.2

4.2 restart network by use command
  1. /etc/init.d/networking restart

4.3 edit file hosts by insert
  1. 192.168.0.9   samba-server.sci.com    samba-server

4.4 Set time from server

change server to 192.168.0.252 << NTP Server IP
5. Install apache, php, mysql
  1.    apt-get install apache2
  2.     apt-get install php5 libapache2-mod-php5 php5-gd
  3.     apt-get install mysql-server
  4.     apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
  5.  
  6.     apt-get install make
  7.     sudo aptitude install libc6-dev
  8.  
  9.     #PERL module
  10.     apt-get install libxml-simple-perl
  11.     apt-get install libcompress-zlib-perl
  12.     apt-get install libdbi-perl
  13.     apt-get install libdbd-mysql-perl
  14.     apt-get install libapache-dbi-perl
  15.     apt-get install libnet-ip-perl
  16.     apt-get install libsoap-lite-perl
  17.     cpan -i XML::Entities

6. download OCSNG_UNIX_SERVER https://launchpad.net/ocsinventory-server/
7. Copy file to www of host install apacher. and use command wget form host.

8. tar -xvzf OCSNG_UNIX_SERVER-2.0.5.tar.gz
9. cd OCSNG_UNIX_SERVER-2.0.x
10. ./setup.sh
*ตอบตามขั้นตอน ถ้าติดตั้งโปรแกรมต่าง ๆ ไว้พร้อมแล้ว จะสามารถใช้ค่า default ได้เลย เสร็จแล้ว restart apache
*ดูรายละเอียดที่ http://wiki.ocsinventory-ng.org/index.php/Documentation:Server#Under_Linux_Operating_System
  1. Do you wish to continue ([y]/n)? y
  2. Which host is running database server [localhost] ? [enter]
  3. On which port is running database server [3306] ? [enter]
  4. Where is Apache daemon binary [/usr/sbin/apache2] ? [enter]
  5. Where is Apache main configuration file [/etc/apache2/apache2.conf] ? [enter]
  6. Which user account is running Apache web server [www-data] ? [enter]
  7. Which user group is running Apache web server [www-data] ? [enter]
  8. Where is Apache Include configuration directory [//etc/apache2/conf.d/] ? [enter]
  9. Where is PERL Intrepreter binary [/usr/bin/perl] ? [enter]
  10. Do you wish to setup Communication server on this computer ([y]/n)? y
  11.  
  12. เพิ่ม
  13. Enter 1 for mod_perl 1.99_21 or previous.
  14. Enter 2 for mod_perl 1.99_22 and higher.
  15. Which version of Apache mod_perl the computer is running ([1]/2) ?2
  16.  
  17. *** ที่ไม่มีให้ตอบ Y แล้วมันจะลงใหม่ Perl
  18. OCS setup.sh can install perl module from packages for you
  19. The script will use the native package from your operating system like apt or rpm
  20. Do you wish to continue (y/[n])?y
  21. ตอบ Y ลงตามตัวที่มันขาดไปเรื่อย ๆ ตามจำนวน packet ที่ขาด
  22.  
  23.  Where to put Communication server log directory [/var/log/ocsinventory-server] ? [enter]
  24. To ensure Apache loads mod_perl before OCS Inventory NG Communication Server, Setup can name Communication Server Apache configuration file 'z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'. Do you allow Setup renaming Communication Server Apache configuration fileto 'z-ocsinventory-server.conf' ([y]/n) ? y
  25. Do you wish to setup Administration Server (Web Administration Console) on this computer ([y]/n)? y
  26. Do you wish to continue ([y]/n)? y
  27.  
  28. Where to copy Administration Server static files for PHP Web Console [/usr/share/ocsinventory-reports] ? [enter]
  29. Where to create writable/cache directories for deployement packages and IPDiscover [/var/lib/ocsinventory-reports] ? [enter]

11. restart apache
  1. /etc/init.d/apache2 restart

12. test enter to host.
insert username and password for enter to SQL and Database.
13. click submit qurey
15. Click here to enter OCS-NG GUI
16. login เพื่อใช้งานครั้งแรก โดยใช้ user=admin password=admin (login ได้แล้วให้เปลี่ยน password ทันที)
17. Error red color top the page.
  1. SECURITY ALERT!
  2. Your install.php exists in your installation directory.
  3. The default SQL login/password is activate on your database: ocsweb
  4. The default login/password is activate on OCS-NG GUI


- delete file in directory install /usr/share/ocsinventory-reports/ocsreports/install.php
- cheng password admin login.
- Edit file dbconfig.inc.php by use command
  1. nano /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php

edit define("PSWD_BASE","...password you use...");
1.1 Enter to PHPmyadmin in Table mysql ---> User setup Function to Password and insert password as "PSWD_BASE" and save it.
1.2 click localhost top on the page. select Privileges and click reload the privileges on under the page text red color.
18. test program by download OCSNG-Windows-Agent-2.0.4.0.zip from http://intranet.sci.com/blog.php?u=3&b=666
18.1 Extrace file OCSNG-Windows-Agent-2.0.4.0.zip and install OCS-NG-Windows-Agent-Setup.exe in windows.
18.2 Insert IP in step setup SERVER URL. example : http://192.168.0.9/ocsinventory
18.3 Reload page see computer in program. Finish setup
*** After setup OCS-NG-Windows-Agent-Setup.exe is not show in programe.
user comnand
  1. /etc/apache2/conf.d/z-ocsinventory-server.conf

Edit password user connect to mysql

  1. # Password for user
  2.   PerlSetVar OCS_DB_PWD 123456


Or case other. we can see log file for OCS.
Launcher OcsLogon.exe always create a log file “OcsLogon.log” into temporary folder.
When launched through a computer GPO, this folder is usually “C:\Windows\Temp”.
When launched through a user GPO or login script, this folder is usually “C:\Documents and Settings\User Profile\Local settings\Temp” or “C:\Users\User Profile\AppData\Local\Temp”.

ไม่มีความคิดเห็น:

แสดงความคิดเห็น