Oke setelah kemarin kita sudah mempersiapkan hardware dan software untuk
membuat ocs inventory agent. Sekarang kita lakukan instalasi dan
konfigurasinya.
#su
Download EPEL repositori
[root@localhost ~]# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@localhost ~]#rpm -ivh epel-release-6-8.noarch.rpm
[root@localhost ~]#yum update -y
[root@localhost ~]#yum groupinstall -y "Development tools"
[root@localhost ~]#yum install -y httpd httpd-devel mod_perl mod_php mod_ssl php-gd php-mysql php-mbstring php perl
[root@localhost ~]#yum install -y perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Net-IP perl-SOAP-Lite perl-Apache-DBI
[root@localhost ~]#yum install -y perl-Apache2-SOAP perl-XML-Entities
[root@localhost ~]#yum install -y mysql-server mysql make
[root@localhost ~]# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@localhost ~]#rpm -ivh epel-release-6-8.noarch.rpm
[root@localhost ~]#yum update -y
[root@localhost ~]#yum groupinstall -y "Development tools"
[root@localhost ~]#yum install -y httpd httpd-devel mod_perl mod_php mod_ssl php-gd php-mysql php-mbstring php perl
[root@localhost ~]#yum install -y perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Net-IP perl-SOAP-Lite perl-Apache-DBI
[root@localhost ~]#yum install -y perl-Apache2-SOAP perl-XML-Entities
[root@localhost ~]#yum install -y mysql-server mysql make
Buat apache dan mysql otomatis
berjalan ketika server hidup
[root@localhost ~]#chkconfig
httpd on && chkconfig mysqld on
Kita buat aturan iptables untuk
mengizinkan port 80 dibuka dan 3306 mysql
[root@localhost ~]#service iptables start
[root@localhost ~]#iptables -I INPUT -m multiport -ptcp --dport 80,3306 -j ACCEPT
[root@localhost ~]#service iptables save
[root@localhost ~]#service iptables restart
[root@localhost ~]#service iptables start
[root@localhost ~]#iptables -I INPUT -m multiport -ptcp --dport 80,3306 -j ACCEPT
[root@localhost ~]#service iptables save
[root@localhost ~]#service iptables restart
restart Service Apace & MySql
[root@localhost ~]#service httpd restart && service mysqld restart
[root@localhost ~]#service httpd restart && service mysqld restart
Login to mysql untuk membuat database ocs
[root@localhost ~]#mysql –u root -p
mysql>create database ocsweb;
mysql>grant all privileges on ocsweb.* to ocs@localhost identified by "password_anda";
mysql>exit
[root@localhost ~]#mysql –u root -p
mysql>create database ocsweb;
mysql>grant all privileges on ocsweb.* to ocs@localhost identified by "password_anda";
mysql>exit
Download
OCS SERVER for Linux
[root@localhost ~]#wget https://launchpad.net/ocsinventory-server/stable-2.1/2.1/+download/OCSNG_UNIX_SERVER-2.1.tar.gz
[root@localhost ~]#tar zxvf OCSNG_UNIX_SERVER-2.1.tar.gz
[root@localhost ~]#cd OCSNG_UNIX_SERVER-2.1
[root@localhost ~]#sh setup.sh
[root@localhost ~]#wget https://launchpad.net/ocsinventory-server/stable-2.1/2.1/+download/OCSNG_UNIX_SERVER-2.1.tar.gz
[root@localhost ~]#tar zxvf OCSNG_UNIX_SERVER-2.1.tar.gz
[root@localhost ~]#cd OCSNG_UNIX_SERVER-2.1
[root@localhost ~]#sh setup.sh
Tekan “enter” saja di setiap questionnya, setelah itu restart
apachenya
[root@localhost ~]#service httpd restart
[root@localhost ~]#setenforce 0
[root@localhost ~]#chmod 775 /usr/share/ocsinventory-reports/ocsreports
[root@localhost ~]#chmod 775 /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
[root@localhost ~]#setenforce 0
[root@localhost ~]#chmod 775 /usr/share/ocsinventory-reports/ocsreports
[root@localhost ~]#chmod 775 /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
Masuk ke ocs inventory server lewat browser
http://localhost_atau_ip_address_ocsreports/ocsreports/
lalu isikan:
MySQL Login ocs mySQLpassword password_ocs_anda DatabaseName ocsweb Mysql HostName localhostuser admin password admin
Buang file install.php di
/usr/share/ocsinventory-reposrts/ocsreposrts/install.php agar ocs tidak mudah
di hack
[root@localhost ~]#rm
/usr/share/ocsinventory-reports/ocsreports/install.php
***Penting****
jika ada error cek kembali settingan database username dan passwordnya di z-ocsinventory-serv.conf
[root@localhost ~]#vi /etc/httpd/conf.d/z-ocsinventory-serv.confjika ada error cek kembali settingan database username dan passwordnya di z-ocsinventory-serv.conf
0 Response to " Install dan Konfigurasi OCS Inventory NG 2 Di Centos "
Post a Comment