วิธีการติดตั้ง OCS Server สำหรับจัดเก็บข้อมูลอุปกรณ์คอมพิวเตอร์
Other linkhttp://intranet.sci.com/blog.php?u=3&b=206http://intranet.sci.com/blog.php?u=3&b=6661.Install Ubuntu 10.04 Server
2.Edit sourlist
3.update and upgrade
4.Edit network/interface ใส่ตั้งค่า ip
- nano /etc/network/interfaces
4.1 Insert Code in file replace iface.
- iface eth0 inet static
- address 192.168.0.9
- netmask 255.255.255.0
- network 192.168.0.0
- broadcast 192.168.0.255
- gateway 192.168.0.2
4.2 restart network by use command
- /etc/init.d/networking restart
4.3 edit file hosts
by insert
- 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
- apt-get install apache2
- apt-get install php5 libapache2-mod-php5 php5-gd
- apt-get install mysql-server
- apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
-
- apt-get install make
- sudo aptitude install libc6-dev
-
- #PERL module
- apt-get install libxml-simple-perl
- apt-get install libcompress-zlib-perl
- apt-get install libdbi-perl
- apt-get install libdbd-mysql-perl
- apt-get install libapache-dbi-perl
- apt-get install libnet-ip-perl
- apt-get install libsoap-lite-perl
- 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- Do you wish to continue ([y]/n)? y
- Which host is running database server [localhost] ? [enter]
- On which port is running database server [3306] ? [enter]
- Where is Apache daemon binary [/usr/sbin/apache2] ? [enter]
- Where is Apache main configuration file [/etc/apache2/apache2.conf] ? [enter]
- Which user account is running Apache web server [www-data] ? [enter]
- Which user group is running Apache web server [www-data] ? [enter]
- Where is Apache Include configuration directory [//etc/apache2/conf.d/] ? [enter]
- Where is PERL Intrepreter binary [/usr/bin/perl] ? [enter]
- Do you wish to setup Communication server on this computer ([y]/n)? y
-
- เพิ่ม
- Enter 1 for mod_perl 1.99_21 or previous.
- Enter 2 for mod_perl 1.99_22 and higher.
- Which version of Apache mod_perl the computer is running ([1]/2) ?2
-
- *** ที่ไม่มีให้ตอบ Y แล้วมันจะลงใหม่ Perl
- OCS setup.sh can install perl module from packages for you
- The script will use the native package from your operating system like apt or rpm
- Do you wish to continue (y/[n])?y
- ตอบ Y ลงตามตัวที่มันขาดไปเรื่อย ๆ ตามจำนวน packet ที่ขาด
-
- Where to put Communication server log directory [/var/log/ocsinventory-server] ? [enter]
- 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
- Do you wish to setup Administration Server (Web Administration Console) on this computer ([y]/n)? y
- Do you wish to continue ([y]/n)? y
-
- Where to copy Administration Server static files for PHP Web Console [/usr/share/ocsinventory-reports] ? [enter]
- Where to create writable/cache directories for deployement packages and IPDiscover [/var/lib/ocsinventory-reports] ? [enter]
11. restart apache
- /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.
- SECURITY ALERT!
- Your install.php exists in your installation directory.
- The default SQL login/password is activate on your database: ocsweb
- 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
- 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=66618.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/ocsinventory18.3 Reload page see computer in program. Finish setup
*** After setup OCS-NG-Windows-Agent-Setup.exe is not show in programe.
user comnand- /etc/apache2/conf.d/z-ocsinventory-server.conf
Edit password user connect to mysql- # Password for user
- 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”.