Rabu, 25 Januari 2017

[Solved] Bad Request This web server is running in SSL mode – Webmin –centos 7

With SSL disabled, you can access the Webmin panel over a standard HTTP connection.
Here I’m explaining the steps to disable SSL from server backend (Command Line Interface). See the steps explained below:

Step 1: SSH to server as root user

# ssh root@IPaddress
 
Step 2: Open the configuration file with your favorite text editor. The configuration file for Miniserv is “/etc/webmin/miniserv.conf.”

[root@crybit #] vim /etc/webmin/miniserv.conf
 
Step 3:  Change the value of  “ssl” entry from 1 to 0

ssl=1 to enable
ssl=0 to disable 
 
Step 4: Restart Webmin service.

[root@crybit #] systemctl restart webmin
 
Step 5: Restart Apache

[root@crybit #] systemctl restart httpd
 
 
 
sumber :https://crybit.com/how-to-disable-ssl-on-webmin/ 

install webmin menggunakan repository

Pertama kita perlu membuat file repository:
tuliskan perintah dibawah pada terminal: 


#vi /etc/yum.repos.d/webmin.repo

isikan file dengan script berikut (bisa langsung di copy) :

[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1


setelah itu simpan file tersebut dengan menekan tombol :wq!

selanjutnya ketik (copy) perintah berikut di terminal linux:

wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc


langkah terakhir ketik perintah berikut di terminal linux:
 
yum install webmin

silahkan tunggu proses sampai complete!!

terima kasih..

sumber : http://www.webmin.com/rpm.html

cara-menginstall-linux-apache-mysql-php-lamp-di-centos-7


LAMP merupakan singkatan dari Linux, Apache, MySQL dan PHP adalah sebuah set instalasi yang sangat populer untuk sebuah web server yang mendukung PHP dan MySQL.
Untuk masuk ke dalam root pada CentOS 7 VM anda, silahkan mengikuti tutorial kami berikut :
SSH
http://faq.biznetgiocloud.com/index.php?action=artikel&cat=11&id=104&artlang=id&highlight=ssh
Langkah Pertama – Install Apache
Apache adalah open source software gratis yang berjalan pada lebih dari 50 % web server di dunia.Untuk menginstall Apache, buka terminal dan ketikkan command berikut:
yum install httpd -y
Setelah menginstall itu , anda dapat mulai menjalanka service apache dengan command berikut:
systemctl start.httpd service
Untuk memeriksa apakah apache sudah terinstall dengan baik, buka browser dengan IP publik VM anda (contoh: http://103.58.100.12). Berikut tampilan yang akan tampil jika apache berhasil terinstall:
centos7-apache_compressed
Anda melihat IP publik yang digunakan oleh VM anda, jalankan command berikut:
curl ifconfig.co
Langkah Kedua – Install MySQL (MariaDB)
MySQL adalah sistem manajemen database yang kuat digunakan untuk mengatur dan mengambil data pada server virtual.
Untuk menginstal MySQL (MariaDB), buka terminal dan ketik perintah ini :
yum install mariadb-server mariadb
Jalankan perintah berikut ini:
systemctl start mariadb
Setelah itu, jalankan perintah ini:
sudo /usr/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Sorry, passwords do not match.

New password:
Re-enter new password:
Sorry, passwords do not match.

New password:
Re-enter new password:
Sorry, passwords do not match.

New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
Agar dapat langsung digunakan setelah boot, jalankan command berikut:
systemctl enable mariadb.service
Langkah Ketiga – Install PHP
PHP merupakan open source web dengan bahasa script yang banyak digunakan untuk membangun halaman web dinamis.
Untuk menginstal PHP pada VM, ketik perintah ini:
yum install php php-mysql –y
Silahkan restart service apache dengan perintah ini:
systemctl restart httpd.service
PHP juga memiliki berbagai library yang berguna dan modul yang dapat ditambahkan ke server Anda . Anda dapat melihat library yang tersedia dengan mengetik :
yum search php-
Terminal kemudian akan menampilkan daftar modul PHP yang sudah terinstall. Maka akan terlihat seperti ini:
============================== N/S matched: php- ===============================
php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php-cli.x86_64 : Command-line interface for PHP
php-common.x86_64 : Common files for PHP
php-dba.x86_64 : A database abstraction layer module for PHP applications
php-devel.x86_64 : Files needed for building PHP extensions
php-embedded.x86_64 : PHP library for embedding in applications
php-enchant.x86_64 : Enchant spelling extension for PHP applications
php-fpm.x86_64 : PHP FastCGI Process Manager
php-gd.x86_64 : A module for PHP applications for using the gd graphics library
php-intl.x86_64 : Internationalization extension for PHP applications
php-ldap.x86_64 : A module for PHP applications that use LDAP
php-mbstring.x86_64 : A module for PHP applications which need multi-byte string
: handling
php-mysql.x86_64 : A module for PHP applications that use MySQL databases
php-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases
php-odbc.x86_64 : A module for PHP applications that use ODBC databases
php-pdo.x86_64 : A database access abstraction module for PHP applications
php-pear.noarch : PHP Extension and Application Repository framework
php-pecl-memcache.x86_64 : Extension to work with the Memcached caching daemon
php-pgsql.x86_64 : A PostgreSQL database module for PHP
php-process.x86_64 : Modules for PHP script using system process interfaces
php-pspell.x86_64 : A module for PHP applications for using pspell interfaces
php-recode.x86_64 : A module for PHP applications for using the recode library
php-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices
php-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php-xml.x86_64 : A module for PHP applications which use XML
php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol

Name and summary matches only, use "search all" for everything.
Langkah Keempat
Untuk membuat sebuah file php, buatlah file baru:
vi /var/www/html/info.php
Tambahkan perintah berikut:
 <?php phpinfo(); ?>
Setelah itu simpan dan keluar.
Lalu akses ip publik anda melalui browser http://103.58.100.12/info.php
php-centos-7
Demikian langkah-langkah menginstall lamp pada CentOS 7


sumber : http://www.biznetgiocloud.com/cara-menginstall-linux-apache-mysql-php-lamp-di-centos-7/

Minggu, 27 November 2016

cara mengatasi MySQL Daemon failed to start. Starting mysqld: [FAILED]

Error sewaktu menjalankan MySQL
$ service mysql start[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
tidak ada pesan lain selain failed. Untuk melihat log error MySQL di Debian, jalankan perintah
$ sudo -u mysql mysqld
output perintah diatas
140416 16:59:47 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140416 16:59:47 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140416 16:59:47 [Note] Plugin 'FEDERATED' is disabled.
140416 16:59:47 InnoDB: The InnoDB memory heap is disabled
140416 16:59:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140416 16:59:47 InnoDB: Compressed tables use zlib 1.2.7
140416 16:59:47 InnoDB: Using Linux native AIO
140416 16:59:47 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140416 16:59:47 InnoDB: Completed initialization of buffer pool
140416 16:59:47 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140416 16:59:47 [ERROR] Plugin 'InnoDB' init function returned error.
140416 16:59:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140416 16:59:47 [ERROR] Unknown/unsupported storage engine: InnoDB
140416 16:59:47 [ERROR] Aborting
140416 16:59:47 [Note] mysqld: Shutdown complete
InnoDB, yang mengakibatkan error. Karena saya tidak menggunakan InnoDB, maka di file konfigurasi MySQL (/etc/mysql/my.cnf tambahkan
skip-innodb
default-storage-engine=MyISAM
dibawah [mysqld]. Contoh file my.cnf saya setelah di ubah
[mysqld]
user  = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket  = /var/run/mysqld/mysqld.sock
port  = 3306
basedir  = /usr
datadir  = /var/lib/mysql
tmpdir  = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
skip-innodb
default-storage-engine=MyISAM
setelah selesai, restart MySQL
$ service mysql restart[ ok ] Stopping MySQL database server: mysqld.
[ ok ] Starting MySQL database server: mysqld.
[info] Checking for tables which need an upgrade, are corrupt or were 
not closed cleanly..
Proses berhasil dijalankan.

sumber : http://jaranguda.com/mengatasi-error-mysql-unknownunsupported-storage-engine-innodb/

Senin, 29 Agustus 2016

mengatasi Kernel Panic - not syncing: Attempted to kill init!

Hari ini tanggal 29 agustus 2016, server SIMPEG dengan OS linux redhat versi 4.1.18 error. saat booting tidak bisa selesai sampai tampilan login. pesan error nya :

BUFFER I/O ERROR ON DEVICE HDA, LOGICAL BLOCK 0
REDHAT NASH VERSION 4.1.18 STARTING
READING ALL PHSICAL VOLUMES. THIS MAY TAKE A WHILE...
NO VOLUME GROUPS FOUND
NO VOLUME GROUPS FOUND
NO VOLUME GROUPS FOUND
MOUNT: ERROR 6 MOUNTING EXT3
MOUNT: ERROR 2 MOUNTING NONE
SWITCHROOT: MOUNT FAILED:22
UNMOUNT /INITRD/DEV FAILED: 2
KERNEL PANIC - NOT SYNCING: ATTEMPTED TO KILL INIT!

Server kami angkat keluar dari kandang nya (Rak server), kami coba perbaiki dengan mencari beberapa referensi di Google.

Beberapa hal yang menyebabkan kami kelabakan adalah database SIMPEG belum sempat kami backup, sedangkan beberapa bidang memerlukan data terbaru. Kami mencoba melakukan perbaikan, sampai sore dan sampai processor nya terasa panas, sehingga kami putuskan untuk BERHENTI sementara waktu.

Di hari berikutnya, kami mencoba menyalakan kembali server SIMPEG, tetapi pesan error masihlah sama. Kami browsing KESANA dan KESINI, tetep saja belum membuahkan hasil. Hanya membuahkan KERINGAT saja sampai waktu menunjukkan pukul 11.00. Tapi kami terus mencoba memperbaiki, sampai akhirnya BERHASIL.

beberapa yang kami lakukan adalah
  1. saat booting awal dan masuk di GRUB append > dengan menekan 'a', terutama di pilihan  ro root=LABEL=/ rhgb quiet
  2.  GRUB append> ro root=LABEL=/ rhgb quiet
  3. kemudian kami enter 
maka sistem akan reboot, dan kemudian kami perhatikan sampai di posisi yang error awal, dan syukur alhamdulillah bisa dilewati pesan error tersebut dan sistem pun bisa berjalan seperti semula.

Tidak menunggu lama, langsung saja database SIMPEG kami backup full. Lega terasa dada kami. Dan server kami masukan kembali ke Rak server. Kami instalasi seperti semula dan kami nyalakan kembali. SUKSES..!

Rabu, 27 Juli 2016

Install dan konfigurasi Server LPSE di Centos

Install dan konfigurasi Server LPSE di Centos

Berikut langkah – langkah untuk instalasi dan konfigurasi SPSE v36sp3 dan v40 di centos
  1. Diasumsikan server sudah terinstall OS Centos ( saya menggunakan centos 6.5 x86_64)
  2. Aplikasi yang dibutuhkan SPSE adalah httpd (Apache), Postgresql (minimal versi 8), Postfix (sebagai pelempar email), JDK8(jdk1.8.0 versi source code), modsecurity2, modevasive, Aplikasi web SPSE versi terbaru (3.6sp3 dan 4.0) yang didapat dari LKPP.
  3. Asumsi IP Address server 192.168.1.5
  4. Semua pekerjaan menggunakan CLI
  5. Gunakan selalu user root untuk konfigurasi, ditandai dg “ # “
  6. Instalasi ini digunakan untuk server latihan, maka ada beberapa bagian yg tidak saya postingkan detail misalnya dalam pembuatan database saya tinggal import dari database dari LKPP
Setelah server terinstall centos, setting ip address dengan perintah
# nano /etc/sysconfig/network-scripts/ifcfg-eth0




Lalu restart service networknya
# /etc/init.d/network restart
atau menggunakan
# service network restart
Lakukan update yum
# yum update
Install service Apache
# yum install httpd httpd-devel
Install service postgresql
# yum install postgresql-server
Install file2 pendukung lainnya
# yum install pcre* libxml2* libcurl* lua* libtool make wget
Start semua service
# service httpd start
# chkconfig httpd on
# service postgresql initdb
# service postgresql start
# chkconfig postgresql on
Persiapkan folder utk source, SPSE dan File Upload
# mkdir  -p /home/source
# mkdir  -p /home/appserv
# mkdir  -p /home/file
# mkdir  -p /home/file/file_latihan
Masukkan semua source yang didapat dari LKPP ke dalam folder /home/source menggunakan aplikasi remote winscp diantaranya jdk1.8.0, play-1.3.3, jce_policy-8.zip dan hasil pg_dump dari database server latihan lkpp (misal epns-latihan.backup) serta aplikasi web spse( epns-lat-36sp3 dan spse-lat-40).
Copykan file jdk1.8.0 dan play-1.3.3 ke folder /usr/local/src
# cp -R /home/source/jdk1.8.0  /usr/local/src/
# cp -R /home/source/play-1.3.3  /usr/local/src/
# cd /home/source
# unzip jce_policy-8.zip
# cp -vr /home/source/UnlimitedJCEPolicyJDK8/*   /usr/local/src/jdk1.8.0/jre/lib/security/
# chmod 755 -R  /usr/local/src/*
Copykan epns-lat-36sp3 dan spse-lat-40 ke /home/appserv
# cp -R /home/source/epns-lat-36sp3   /home/appserv/
# cp -R /home/source/spse-lat-40   /home/appserv/
Import database hasil dari pg_dump yang ada di folder source
# su postgres
$ createdb -U postgres -O epns epns-latihan
$ pg_restore -U postgres -Fc -vd epns-latihan /home/source/epns-latihan.backup
$ exit
Install modsecurity dan modevasive nya
# cd /usr/src
# wget http://www.modsecurity.org/download/modsecurity-apache_2.6.8.tar.gz
# tar xzf modsecurity-apache_2.6.8.tar.gz
# cd modsecurity-apache_2.6.8
# ./configure
# make && make install
# cp modsecurity.conf-recommended  /etc/httpd/conf.d/modsecurity.conf
# cd /usr/src
# wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz
# tar xzf mod_evasive_1.10.1.tar.gz
# cd mod_evasive
# apxs -cia mod_evasive20.c
Tambahkan konfigurasi pendukung utk spse kedalam httpd.conf.
# nano /etc/httpd/conf/httpd.conf
Alias /latihan /home/appserv/epns-lat-36sp3
Alias /file_latihan /home/file/file_latihan
<DirectoryMatch /home/appserv/epns-lat-36sp3/webapp/WEB-INF>
AllowOverride None
Order deny,allow
deny from all
</DirectoryMatch>
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
ProxyTimeout 6000
ProxyPass /latihan http://localhost:8009/latihan
ProxyPassReverse /latihan http://localhost:8009/latihan
ProxyPass /eproc4lat http://localhost:9009/eproc4lat
ProxyPassReverse /eproc4lat http://localhost:9009/eproc4lat
SetOutputFilter DEFLATE
DeflateBufferSize 65536
DeflateCompressionLevel 9
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
DeflateMemLevel 9
DeflateWindowSize 15
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch “Windows 98” gzip-only-text/html
BrowserMatch “MSIE [45]” gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpeg|jpe|jpg|png|ico|t?gz|zip|rar|pdf|doc|xls|dat)$ no-gzip dont-vary
LogFormat ‘”%r” %{outstream}n/%{instream}n (%{ratio}n%%)’ deflate
CustomLog /var/log/httpd/deflate_log deflate
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
<VirtualHost *:80>
LogLevel warn
CustomLog /var/log/httpd/access.log combined
RedirectMatch ^/$ /eproc4lat
RedirectMatch ^/latihan$ /latihan/
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/x-httpd-php
SetInputFilter DEFLATE
SetOutputFilter DEFLATE
</VirtualHost>
<IfModule mod_evasive20.c>
DOSHashTableSize    6194
DOSPageCount        25
DOSSiteCount        80
DOSPageInterval     1
DOSSiteInterval     1
DOSBlockingPeriod   10
</IfModule>
SecAuditEngine RelevantOnly
SecRequestBodyAccess On
SecResponseBodyAccess On
SecAuditLogParts ABCFHZ
SecAuditLog /var/log/httpd/audit_apache.log
SecDebugLog /var/log/httpd/modsec_debug.log
SecDebugLogLevel 3
SecDefaultAction log,auditlog,deny,status:403,phase:2,t:none
SecRuleEngine On
SecServerSignature “Netscape-Enterprise/6.0 PHP5.2.0 mod_asp/3.4.5”
SecRule ARGS “\.\./”
SecRule ARGS “<[[:space:]]*script”
#SecRule ARGS “<(.|\n)+>”
SecRule REQUEST_BODY “(document\.cookie|Set-Cookie|SessionID=)”
SecRule REQUEST_BODY “<[^>]*meta*\”?[^>]*>”
SecRule REQUEST_BODY “<[^>]*style*\”?[^>]*>”
SecRule REQUEST_BODY “<[^>]*script*\”?[^>]*>”
SecRule REQUEST_BODY “<[^>]*iframe*\”?[^>]*>”
SecRule REQUEST_BODY “<[^>]*object*\”?[^>]*>”
SecRule REQUEST_BODY “<[^>]*img*\”?[^>]*>”
SecRule REQUEST_BODY “<[^>]*applet*\”?[^>]*>”
SecRule REQUEST_BODY “<[^>]*form*\”?[^>]*>”
SecRule REQUEST_HEADERS:User-Agent “Nikto” “log,deny,status:403,msg:’Nikto Scanners Identified’”
SecRule HTTP_HOST “\x25”
SecRule HTTP_HOST “^$” “log,allow,msg:’no http host’”
SecRule HTTP_USER_AGENT “^$” “log,allow,msg:’No user agent’”
SecRule REQUEST_BODY “/^(etc|bin|sbin|tmp|var|opt|dev|kernel|exe)$/”
SecRule ARGS “delete[[:space:]]+from”
SecRule ARGS “insert[[:space:]]+into”
SecRule ARGS “select.+from”
SecRule ARGS “\<\!–\#”
#SecRule ARGS “((=))[^\n]*(<)[^\n]+(>)”
SecRule REQUEST_BODY “(\’|\”)”
#SecRule REQUEST_BODY “!^[\x20-\x7f]+$”
SecRule REQUEST_URI “^/(bin|cgi|cgi(\.cgi|-91[45]|-sys|-local|s|-win|-exe|-home|-perl)|(mp|web)cgi|(ht|ows-)bin|scripts|fcgi-bin)/”
SecRule REQUEST_BODY “/bin/ps”
SecRule ARGS “wget\x20”
SecRule ARGS “uname\x20-a”
SecRule REQUEST_BODY “/nessus_is_probing_you_”
SecRule REQUEST_URI “^OR 1=1–*”
SecRequestBodyLimit 800000000
SecResponseBodyLimit 800000000
<LocationMatch /cgi-bin/>
SecRule REQUEST_URI “!(script1\.cgi|script2\.cgi|custom_email\.pl|form\.cgi\.exe)”
</LocationMatch>
#SecRule RESPONSE_STATUS “@streq 408” “phase:5,t:none,nolog,pass,setvar:ip.slow_dos_counter=+1,expirevar:ip.slow_dos_counter=60”
#SecRule IP:SLOW_DOS_COUNTER “@gt 25” “phase:1,t:none,log,drop,msg:’Client Connection Dropped due to high # of slow DoS alerts’”
# nano /var/lib/pgsql/data/pg_hba.conf  ==> (ubah methode ident menjadi trust)
TYPE DATABASE USER CIDR-ADDRESS METHOD# “local” is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# nano /home/appserv/epns-lat-36sp3/webapp/WEB-INF/classes/application.properties
(sesuaikan nama databasenya)
jdbc.url=jdbc:postgresql://localhost:5432/epns-latihan
# nano /home/appserv/epns-lat-36sp3/spse3
#JAVA_HOME : sesuaikan lokasi Java (jdk1.8.0)
JAVA_HOME=/usr/local/src/jdk1.8.0
#APP_HOME : sesuaikan lokasi folder SPSE 36sp3
APP_HOME=/home/appserv/epns-lat-36sp3
#Sesuaikan port proxy yg telah di konfigurasi pada httpd.conf
PORT=8009
#Sesuaikan dengan nama alias yg telah di konfigurasi pada httpd.conf
CONTEXT=/latihan
# nano /home/appserv/epns-lat-36sp3/update.sh
#APP_HOME : sesuaikan lokasi aplikasi SPSE 36sp3
APP_HOME=/home/appserv/epns-lat-36sp3
#setting JAVA_HOME dan PLAY_HOME
#JAVA_HOME : sesuaikan lokasi Java (jdk1.8.0)
if [ ! ${JAVA_HOME} ]; then
JAVA_HOME=/usr/local/src/jdk1.8.0
Lalu setelah konfigurasi diatas di simpan, beri hak akses pada file spse3 dan update.sh lalu jalankan semua aplikasi pendukungnya serta jalankan aplikasi spse nya
# cd /home/appserv/epns-lat-36sp3/
# chmod +x spse3
# chmod +x update.sh
# service httpd restart
# service postgresql restart
# ./update.sh       (tetap dlm folder /home/appserv/epns-lat-36sp3. utk mengetahui kita berada di folder mana, ketik pwd)
# ./spse3 start    ( setelah muncul notifikasi spse sedang jalan, tekan control + c (ctrl + c) untuk meneruskan konfig spse v40)
Setelah itu, cek apakah spse v36 sudah running melalui browser client. Apabila telah running, kita lanjutkan dengan konfigurasi spse v40. cari dan sesuaikan seperti yg tertera di bawah ini..
# cd /home/appserv/spse-lat-40
# nano conf/application.conf
http.path=/eproc4lat
http.port=9009
db.url=jdbc:postgresql://localhost:5432/epns-latihan
sirup.url=http://sirup.lkpp.go.id/sirup-lat
sikap.url=http://latihan-lpse.lkpp.go.id/sikap
spse3.url=http://192.168.1.5/latihan   (sesuaikan dg ip / host domain tempat spse v36 latihan digunakan)
# nano spse4
#JAVA_HOME : sesuaikan lokasi Java (jdk1.8.0)
JAVA_HOME=/usr/local/src/jdk1.8.0
#APP_HOME : sesuaikan dengan lokasi folder aplikasi SPSE v40
APP_HOME=/home/appserv/spse-lat-40
#Play Home : sesuaikan dengan lokasi folder Play
PLAY_HOME=/usr/local/src/play-1.3.3
#Play Version
PLAY_VERSION=play-1.3.3
#sesuaikan dengan port proxy untuk spse v40 latihan pada konfigurasi httpd.conf
PORT=9009
Setelah di simpan, beri hak akses pada file spse4 lalu jalankan
# chmod +x spse4
# ./spse4 start
Apabila tidak ada kendala atau error pada aplikasi spse4 diatas, silahkan dicoba melalui browser client
Jika ada kendala / error, bisa di cek errornya pada file log
# tail -f /home/appserv/epns-lat-36sp3/logs/system.out  ==> (untuk spse v36)
# tail -f /home/appserv/spse-lat-40/logs/system.out  ==> (untuk spse 40)
Dari file tersebut bisa di ketahui berjalan atau tidaknya aplikasi spse kita. Apabila aplikasi sudah berjalan normal, step terakhir kita masukkan service spse ke dalam file rc.local
# nano /etc/rc.local
/home/appserv/spse-lat-40/spse4 stop
/home/appserv/epns-lat-36sp3/spse3 stop
/home/appserv/spse-lat-40/spse4 start
/home/appserv/epns-lat-36sp3/spse3 start
touch /var/lock/subsys/local
Pastikan file tersebut sudah dapat dieksekusi oleh sistem apabila OS kita reboot atau karena pemadaman listrik sehingga server harus kita hidupkan ulang..
# chmod +x /etc/rc.d/rc.local
Alhamdulillah, instalasi dan konfigurasi telah selesai. Selanjutnya saya beri sedikit tips & trik untuk OS Centos, karena default dari os ini, security berada pada kondisi menutup semua port. Ini bisa dilakukan pada awal sebelum install dan konfigurasi spse, namun saya letakkan pada bagian bawah karena diharapkan teman2 lebih mengetahui terlebih dahulu security2 pada setiap OS sebelum melakukan peng instalan ataupun konfigurasi. Sangat disarankan, jangan mendisable iptables (firewall) namun sesuaikan…
Disabled selinux dengan cara
# nano /etc/sysconfig/selinux
SELINUX=disabled
Lalu konfigurasi firewall kita agar aplikasi dapat di akses dr luar. Untuk memudahkan, kita install dulu system-config-firewall-tui beserta depedensinya
# yum -y install dbus dbus-python system-config-firewall-tui
# service messagebus start
# system-config-firewall-tui
akan muncul seperti ini
 pilih customize lalu pilih www (http) menggunakan tab



lalu close dan ok. lakukan penyesuaian firewall dengan menggunakan fasilitas tsb untuk memudahkan kita.
Selesai sudah perjumpaan kita untuk Install dan Konfigurasi SPSE pada OS Centos, mudah mudahan bermanfaat untuk kita semua.

sumber : http://infolpse.pasuruankab.go.id/home/?p=23

Merekam "Error" LPSE

Mulai 2016 ini saya mulai diikutkan dalam Team IT untuk menangani LPSE Kabupaten Temanggung. dan memang tidak mudah untuk menangani beberapa permasalahan yang terjadi di LPSE karena memang dari sisi Coding yang di pake menggunakan Java, nah ini belum saya kuasai. ditambah lagi tools pendukung menggunakan tomcat, dsb..

dari beberapa permasalahan yang terjadi, saya coba dokumentasikan :

1. kesalahan :

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

ini disebabkan Tomcatnya tidak jalan :
maka untuk menangani nya :

#/usr/local/src/apache-tomcat-production/bin/startup.sh run

2. ada lagi kesalahan java.net UnknownHostException www.inaproc.lkpp.go.id

ini disebabkan DNS yang ada diserver tidak sesuai.
maka solusinya menyesuaikan DNS yang ada diserver dengan DNS ISP yang digunakan untuk sambungan internet.

#vi /etc/sysconfig/network-scripts/ifcfg-Auto_eth0

TYPE=Ethernet
BOOTPROTO=none
IPADDR=*.*.*.*
PREFIX=24
GATEWAY=

*.*.*.*DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Auto eth0"
UUID=f3dab7f3-e10e-4887-8407-7b5982e2ff1e
ONBOOT=yes
DNS1=
*.*.*.1
DNS2=8.8.8.8
HWADDR=DC:FE:07:0C:CE:EB
LAST_CONNECT=1469405087
 



 

Concat tidak berfungsi untuk indexing

 $sql = "SELECT a.* , CONCAT(a.Kode_Barang,'<br><b>',b.Nm_Aset5,'</b>') as Nm_Aset5, CONCAT(a.latitud...