Test Block Top

The Blog...
Articles, Tips & Trick and Other Interesting Information...
Tampilkan postingan dengan label Unix. Tampilkan semua postingan
Tampilkan postingan dengan label Unix. Tampilkan semua postingan
29 April 2012

Install PHP Pada CentOS

Pada artikel kali ini saya akan coba share cara paling gampang install php pada CentOS. Diasumsikan anda install CentOS dengan pilihan minimal install dan anda sudah setup local yum repository.

Untuk mulai install php, ketikkan command; yum install php*.


[root@linggih ~]# yum install php*
...
...
...
---> Package enchant.x86_64 1:1.5.0-4.el6 will be installed
--> Processing Dependency: libhunspell-1.2.so.0()(64bit) for package: 1:enchant-1.5.0-4.el6.x86_64
---> Package libc-client.x86_64 0:2007e-11.el6 will be installed
---> Package libedit.x86_64 0:2.11-4.20080712cvs.1.el6 will be installed
---> Package libtidy.x86_64 0:0.99.0-19.20070615.1.el6 will be installed
---> Package libxslt.x86_64 0:1.1.26-2.el6 will be installed
---> Package net-snmp.x86_64 1:5.5-37.el6_2.1 will be installed
--> Processing Dependency: libsensors.so.4()(64bit) for package: 1:net-snmp-5.5-37.el6_2.1.x86_64
---> Package net-snmp-libs.x86_64 1:5.5-37.el6_2.1 will be installed
---> Package postgresql-libs.x86_64 0:8.4.9-1.el6_1.1 will be installed
---> Package recode.x86_64 0:3.6-28.1.el6 will be installed
---> Package unixODBC.x86_64 0:2.2.14-11.el6 will be installed
--> Processing Dependency: libltdl.so.7()(64bit) for package: unixODBC-2.2.14-11.el6.x86_64
--> Running transaction check
---> Package hunspell.x86_64 0:1.2.8-16.el6 will be installed
---> Package libtool-ltdl.x86_64 0:2.2.6-15.5.el6 will be installed
---> Package lm_sensors-libs.x86_64 0:3.1.1-10.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package              Arch      Version                        Repository  Size
================================================================================
Installing:
php                  x86_64    5.3.3-3.el6_2.6                updates    1.1 M
php-bcmath           x86_64    5.3.3-3.el6_2.6                updates     32 k
php-cli              x86_64    5.3.3-3.el6_2.6                updates    2.2 M
php-common           x86_64    5.3.3-3.el6_2.6                updates    522 k
php-dba              x86_64    5.3.3-3.el6_2.6                updates     38 k
php-devel            x86_64    5.3.3-3.el6_2.6                updates    505 k
php-embedded         x86_64    5.3.3-3.el6_2.6                updates    1.1 M
php-enchant          x86_64    5.3.3-3.el6_2.6                updates     27 k
php-gd               x86_64    5.3.3-3.el6_2.6                updates    104 k
php-imap             x86_64    5.3.3-3.el6_2.6                updates     48 k
php-intl             x86_64    5.3.3-3.el6_2.6                updates     68 k
php-ldap             x86_64    5.3.3-3.el6_2.6                updates     36 k
php-mbstring         x86_64    5.3.3-3.el6_2.6                updates    453 k
php-mysql            x86_64    5.3.3-3.el6_2.6                updates     79 k
php-odbc             x86_64    5.3.3-3.el6_2.6                updates     48 k
php-pdo              x86_64    5.3.3-3.el6_2.6                updates     73 k
php-pear             noarch    1:1.9.4-4.el6                  base       393 k
php-pecl-apc         x86_64    3.1.3p1-1.2.el6.1              base        93 k
php-pecl-memcache    x86_64    3.0.5-3.el6                    base        60 k
php-pgsql            x86_64    5.3.3-3.el6_2.6                updates     68 k
php-process          x86_64    5.3.3-3.el6_2.6                updates     37 k
php-pspell           x86_64    5.3.3-3.el6_2.6                updates     26 k
php-recode           x86_64    5.3.3-3.el6_2.6                updates     23 k
php-snmp             x86_64    5.3.3-3.el6_2.6                updates     28 k
php-soap             x86_64    5.3.3-3.el6_2.6                updates    138 k
php-tidy             x86_64    5.3.3-3.el6_2.6                updates     34 k
php-xml              x86_64    5.3.3-3.el6_2.6                updates    100 k
php-xmlrpc           x86_64    5.3.3-3.el6_2.6                updates     50 k
php-zts              x86_64    5.3.3-3.el6_2.6                updates    1.2 M
Installing for dependencies:
aspell               x86_64    12:0.60.6-12.el6               base       648 k
enchant              x86_64    1:1.5.0-4.el6                  base        49 k
hunspell             x86_64    1.2.8-16.el6                   base       177 k
libc-client          x86_64    2007e-11.el6                   base       515 k
libedit              x86_64    2.11-4.20080712cvs.1.el6       base        74 k
libtidy              x86_64    0.99.0-19.20070615.1.el6       base       127 k
libtool-ltdl         x86_64    2.2.6-15.5.el6                 base        44 k
libxslt              x86_64    1.1.26-2.el6                   base       450 k
lm_sensors-libs      x86_64    3.1.1-10.el6                   base        37 k
net-snmp             x86_64    1:5.5-37.el6_2.1               updates    300 k
net-snmp-libs        x86_64    1:5.5-37.el6_2.1               updates    1.5 M
postgresql-libs      x86_64    8.4.9-1.el6_1.1                base       198 k
recode               x86_64    3.6-28.1.el6                   base       712 k
unixODBC             x86_64    2.2.14-11.el6                  base       378 k

Transaction Summary
================================================================================
Install      43 Package(s)

Total download size: 14 M
Installed size: 47 M
Is this ok [y/N]: y
Downloading Packages:
(1/43): aspell-0.60.6-12.el6.x86_64.rpm                  | 648 kB     00:28
(2/43): enchant-1.5.0-4.el6.x86_64.rpm                   |  49 kB     00:02
(3/43): hunspell-1.2.8-16.el6.x86_64.rpm                 | 177 kB     00:06
(4/43): libc-client-2007e-11.el6.x86_64.rpm              | 515 kB     00:26
(5/43): libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm      |  74 kB     00:04
(6/43): libtidy-0.99.0-19.20070615.1.el6.x86_64.rpm      | 127 kB     00:05
(7/43): libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm           |  44 kB     00:01
(8/43): libxslt-1.1.26-2.el6.x86_64.rpm                  | 450 kB     00:29
(9/43): lm_sensors-libs-3.1.1-10.el6.x86_64.rpm          |  37 kB     00:01
(10/43): net-snmp-5.5-37.el6_2.1.x86_64.rpm              | 300 kB     00:14
(11/43): net-snmp-libs-5.5-37.el6_2.1.x86_64.rpm         | 1.5 MB     01:11
(12/43): php-5.3.3-3.el6_2.6.x86_64.rpm                  | 1.1 MB     01:04
(13/43): php-bcmath-5.3.3-3.el6_2.6.x86_64.rpm           |  32 kB     00:01
(14/43): php-cli-5.3.3-3.el6_2.6.x86_64.rpm              | 2.2 MB     01:45
(15/43): php-common-5.3.3-3.el6_2.6.x86_64.rpm           | 522 kB     00:21
(16/43): php-dba-5.3.3-3.el6_2.6.x86_64.rpm              |  38 kB     00:00
(17/43): php-devel-5.3.3-3.el6_2.6.x86_64.rpm            | 505 kB     00:19
(18/43): php-embedded-5.3.3-3.el6_2.6.x86_64.rpm         | 1.1 MB     00:50
(19/43): php-enchant-5.3.3-3.el6_2.6.x86_64.rpm          |  27 kB     00:00
(20/43): php-gd-5.3.3-3.el6_2.6.x86_64.rpm               | 104 kB     00:04
(21/43): php-imap-5.3.3-3.el6_2.6.x86_64.rpm             |  48 kB     00:04
(22/43): php-intl-5.3.3-3.el6_2.6.x86_64.rpm             |  68 kB     00:02
(23/43): php-ldap-5.3.3-3.el6_2.6.x86_64.rpm             |  36 kB     00:01
(24/43): php-mbstring-5.3.3-3.el6_2.6.x86_64.rpm         | 453 kB     00:20
(25/43): php-mysql-5.3.3-3.el6_2.6.x86_64.rpm            |  79 kB     00:03
(26/43): php-odbc-5.3.3-3.el6_2.6.x86_64.rpm             |  48 kB     00:03
(27/43): php-pdo-5.3.3-3.el6_2.6.x86_64.rpm              |  73 kB     00:03
(28/43): php-pear-1.9.4-4.el6.noarch.rpm                 | 393 kB     00:32
(29/43): php-pecl-apc-3.1.3p1-1.2.el6.1.x86_64.rpm       |  93 kB     00:04
(30/43): php-pecl-memcache-3.0.5-3.el6.x86_64.rpm        |  60 kB     00:02
(31/43): php-pgsql-5.3.3-3.el6_2.6.x86_64.rpm            |  68 kB     00:04
(32/43): php-process-5.3.3-3.el6_2.6.x86_64.rpm          |  37 kB     00:01
(33/43): php-pspell-5.3.3-3.el6_2.6.x86_64.rpm           |  26 kB     00:01
(34/43): php-recode-5.3.3-3.el6_2.6.x86_64.rpm           |  23 kB     00:02
(35/43): php-snmp-5.3.3-3.el6_2.6.x86_64.rpm             |  28 kB     00:00
(36/43): php-soap-5.3.3-3.el6_2.6.x86_64.rpm             | 138 kB     00:06
(37/43): php-tidy-5.3.3-3.el6_2.6.x86_64.rpm             |  34 kB     00:01
(38/43): php-xml-5.3.3-3.el6_2.6.x86_64.rpm              | 100 kB     00:16
(39/43): php-xmlrpc-5.3.3-3.el6_2.6.x86_64.rpm           |  50 kB     00:07
(40/43): php-zts-5.3.3-3.el6_2.6.x86_64.rpm              | 1.2 MB     01:54
(41/43): postgresql-libs-8.4.9-1.el6_1.1.x86_64.rpm      | 198 kB     00:07
(42/43): recode-3.6-28.1.el6.x86_64.rpm                  | 712 kB     00:25
(43/43): unixODBC-2.2.14-11.el6.x86_64.rpm               | 378 kB     00:16
--------------------------------------------------------------------------------
Total                                            19 kB/s |  14 MB     12:34
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : php-common-5.3.3-3.el6_2.6.x86_64                           1/43
Installing : php-pdo-5.3.3-3.el6_2.6.x86_64                              2/43
Installing : lm_sensors-libs-3.1.1-10.el6.x86_64                         3/43
Installing : 1:net-snmp-libs-5.5-37.el6_2.1.x86_64                       4/43
Installing : 1:net-snmp-5.5-37.el6_2.1.x86_64                            5/43
Installing : postgresql-libs-8.4.9-1.el6_1.1.x86_64                      6/43
Installing : libedit-2.11-4.20080712cvs.1.el6.x86_64                     7/43
Installing : php-cli-5.3.3-3.el6_2.6.x86_64                              8/43
Installing : 1:php-pear-1.9.4-4.el6.noarch                               9/43
Installing : php-5.3.3-3.el6_2.6.x86_64                                 10/43
Installing : recode-3.6-28.1.el6.x86_64                                 11/43
Installing : 12:aspell-0.60.6-12.el6.x86_64                             12/43
Installing : libxslt-1.1.26-2.el6.x86_64                                13/43
Installing : libc-client-2007e-11.el6.x86_64                            14/43
Installing : libtidy-0.99.0-19.20070615.1.el6.x86_64                    15/43
Installing : libtool-ltdl-2.2.6-15.5.el6.x86_64                         16/43
Installing : unixODBC-2.2.14-11.el6.x86_64                              17/43
Installing : hunspell-1.2.8-16.el6.x86_64                               18/43
Installing : 1:enchant-1.5.0-4.el6.x86_64                               19/43
Installing : php-enchant-5.3.3-3.el6_2.6.x86_64                         20/43
Installing : php-odbc-5.3.3-3.el6_2.6.x86_64                            21/43
Installing : php-tidy-5.3.3-3.el6_2.6.x86_64                            22/43
Installing : php-imap-5.3.3-3.el6_2.6.x86_64                            23/43
Installing : php-xml-5.3.3-3.el6_2.6.x86_64                             24/43
Installing : php-pspell-5.3.3-3.el6_2.6.x86_64                          25/43
Installing : php-recode-5.3.3-3.el6_2.6.x86_64                          26/43
Installing : php-devel-5.3.3-3.el6_2.6.x86_64                           27/43
Installing : php-pecl-apc-3.1.3p1-1.2.el6.1.x86_64                      28/43
Installing : php-pecl-memcache-3.0.5-3.el6.x86_64                       29/43
Installing : php-pgsql-5.3.3-3.el6_2.6.x86_64                           30/43
Installing : php-snmp-5.3.3-3.el6_2.6.x86_64                            31/43
Installing : php-mysql-5.3.3-3.el6_2.6.x86_64                           32/43
Installing : php-gd-5.3.3-3.el6_2.6.x86_64                              33/43
Installing : php-mbstring-5.3.3-3.el6_2.6.x86_64                        34/43
Installing : php-zts-5.3.3-3.el6_2.6.x86_64                             35/43
Installing : php-intl-5.3.3-3.el6_2.6.x86_64                            36/43
Installing : php-embedded-5.3.3-3.el6_2.6.x86_64                        37/43
Installing : php-soap-5.3.3-3.el6_2.6.x86_64                            38/43
Installing : php-process-5.3.3-3.el6_2.6.x86_64                         39/43
Installing : php-bcmath-5.3.3-3.el6_2.6.x86_64                          40/43
Installing : php-ldap-5.3.3-3.el6_2.6.x86_64                            41/43
Installing : php-dba-5.3.3-3.el6_2.6.x86_64                             42/43
Installing : php-xmlrpc-5.3.3-3.el6_2.6.x86_64                          43/43

Installed:
php.x86_64 0:5.3.3-3.el6_2.6
php-bcmath.x86_64 0:5.3.3-3.el6_2.6
php-cli.x86_64 0:5.3.3-3.el6_2.6
php-common.x86_64 0:5.3.3-3.el6_2.6
php-dba.x86_64 0:5.3.3-3.el6_2.6
php-devel.x86_64 0:5.3.3-3.el6_2.6
php-embedded.x86_64 0:5.3.3-3.el6_2.6
php-enchant.x86_64 0:5.3.3-3.el6_2.6
php-gd.x86_64 0:5.3.3-3.el6_2.6
php-imap.x86_64 0:5.3.3-3.el6_2.6
php-intl.x86_64 0:5.3.3-3.el6_2.6
php-ldap.x86_64 0:5.3.3-3.el6_2.6
php-mbstring.x86_64 0:5.3.3-3.el6_2.6
php-mysql.x86_64 0:5.3.3-3.el6_2.6
php-odbc.x86_64 0:5.3.3-3.el6_2.6
php-pdo.x86_64 0:5.3.3-3.el6_2.6
php-pear.noarch 1:1.9.4-4.el6
php-pecl-apc.x86_64 0:3.1.3p1-1.2.el6.1
php-pecl-memcache.x86_64 0:3.0.5-3.el6
php-pgsql.x86_64 0:5.3.3-3.el6_2.6
php-process.x86_64 0:5.3.3-3.el6_2.6
php-pspell.x86_64 0:5.3.3-3.el6_2.6
php-recode.x86_64 0:5.3.3-3.el6_2.6
php-snmp.x86_64 0:5.3.3-3.el6_2.6
php-soap.x86_64 0:5.3.3-3.el6_2.6
php-tidy.x86_64 0:5.3.3-3.el6_2.6
php-xml.x86_64 0:5.3.3-3.el6_2.6
php-xmlrpc.x86_64 0:5.3.3-3.el6_2.6
php-zts.x86_64 0:5.3.3-3.el6_2.6

Dependency Installed:
aspell.x86_64 12:0.60.6-12.el6
enchant.x86_64 1:1.5.0-4.el6
hunspell.x86_64 0:1.2.8-16.el6
libc-client.x86_64 0:2007e-11.el6
libedit.x86_64 0:2.11-4.20080712cvs.1.el6
libtidy.x86_64 0:0.99.0-19.20070615.1.el6
libtool-ltdl.x86_64 0:2.2.6-15.5.el6
libxslt.x86_64 0:1.1.26-2.el6
lm_sensors-libs.x86_64 0:3.1.1-10.el6
net-snmp.x86_64 1:5.5-37.el6_2.1
net-snmp-libs.x86_64 1:5.5-37.el6_2.1
postgresql-libs.x86_64 0:8.4.9-1.el6_1.1
recode.x86_64 0:3.6-28.1.el6
unixODBC.x86_64 0:2.2.14-11.el6

Complete!
[root@linggih ~]#

Setelah php terinstall, restart apache dengan command: /etc/init.d/httpd restart atau service httpd restart



[root@linggih ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@linggih ~]#

Untuk cek info php, buat file php baru dengan nama terserah (misalnya: phpinfo.php). Kemudian isikan code php berikut pada file php:



<?php phpinfo(); ?>



[root@linggih ~]# cd /var/www/html
[root@linggih html]# touch phpinfo.php
[root@linggih html]# nano phpinfo.php
[root@linggih html]#

Buka dokumen halaman php yang baru saja dibuat pada halaman web browser (http://domain-anda/phpinfo.php)

Install PHP: PHP Info

Install PHP: PHP Info

Selesai. Semoga bermanfaat.
:D

Install MySQL Server Pada CentOS

MySQL Database Server merupakan database web hosting yang digunakan untuk menyimpan berbagai macam data informasi seperti blog post, detail informasi user, comment dlsb. MySQL merupakan database server yang paling populer dan banyak digunakan oleh webmaster saat ini, dikarenakan selain gratis namun juga sangat fleksibel dan mampu handle berbagai macam tipe dinamic web (PHP, ASP, Perl dlsb).

Install MySQL Database Pada OS CentOS

Berikut cara simpel install MySQL Database Server pada CentOS:. Ketikkan command yum install mysql-server mysql php-mysql



[root@server5 ~]# yum install mysql-server mysql php-mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.biz.net.id
* extras: centos.biz.net.id
* updates: mirror.averse.net
Setting up Install Process
Package mysql-5.1.61-1.el6_2.1.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.x86_64 0:5.1.61-1.el6_2.1 will be installed
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.61-1.el6_2.1.x86_64
---> Package php-mysql.x86_64 0:5.3.3-3.el6_2.6 will be installed
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-mysql-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-pdo for package: php-mysql-5.3.3-3.el6_2.6.x86_64
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
---> Package php-common.x86_64 0:5.3.3-3.el6_2.6 will be installed
---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package              Arch         Version                  Repository     Size
================================================================================
Installing:
mysql-server         x86_64       5.1.61-1.el6_2.1         updates       8.1 M
php-mysql            x86_64       5.3.3-3.el6_2.6          updates        79 k
Installing for dependencies:
perl-DBD-MySQL       x86_64       4.013-3.el6              base          134 k
perl-DBI             x86_64       1.609-4.el6              base          705 k
php-common           x86_64       5.3.3-3.el6_2.6          updates       522 k
php-pdo              x86_64       5.3.3-3.el6_2.6          updates        73 k

Transaction Summary
================================================================================
Install       6 Package(s)

Total download size: 9.6 M
Installed size: 29 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): mysql-server-5.1.61-1.el6_2.1.x86_64.rpm          | 8.1 MB     00:35
http://centos.biz.net.id/6.2/os/x86_64/Packages/perl-DBD-MySQL-4.013-3.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
(2/6): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm             | 134 kB     00:00
(3/6): perl-DBI-1.609-4.el6.x86_64.rpm                   | 705 kB     00:03
(4/6): php-common-5.3.3-3.el6_2.6.x86_64.rpm             | 522 kB     00:02
(5/6): php-mysql-5.3.3-3.el6_2.6.x86_64.rpm              |  79 kB     00:00
(6/6): php-pdo-5.3.3-3.el6_2.6.x86_64.rpm                |  73 kB     00:00
--------------------------------------------------------------------------------
Total                                           225 kB/s | 9.6 MB     00:43
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common-5.3.3-3.el6_2.6.x86_64                            1/6
Installing : perl-DBI-1.609-4.el6.x86_64                                  2/6
Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                            3/6
Installing : php-pdo-5.3.3-3.el6_2.6.x86_64                               4/6
Installing : php-mysql-5.3.3-3.el6_2.6.x86_64                             5/6
Installing : mysql-server-5.1.61-1.el6_2.1.x86_64                         6/6

Installed:
mysql-server.x86_64 0:5.1.61-1.el6_2.1   php-mysql.x86_64 0:5.3.3-3.el6_2.6

Dependency Installed:
perl-DBD-MySQL.x86_64 0:4.013-3.el6      perl-DBI.x86_64 0:1.609-4.el6
php-common.x86_64 0:5.3.3-3.el6_2.6      php-pdo.x86_64 0:5.3.3-3.el6_2.6

Complete!
[root@server5 ~]#

Untuk load MySQL service ketika mesin server boot (start up), ketikkan command berikut; chkconfig mysqld on



[root@server5 ~]# chkconfig mysqld on
[root@server5 ~]#

Jalankan MySQL Dengan Command; service mysqld start



[root@server5 ~]# service mysqld start
Initializing MySQL database:  WARNING: The host 'server5' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h server5 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

[  OK  ]
Starting mysqld:                                           [  OK  ]
[root@server5 ~]#

Set password MySQL root; ketikkan command; mysql -u root. Jika selesai, tekan tombol "Ctrl + C" untuk keluar.



[root@server5 ~]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('testingpassword');
Query OK, 0 rows affected (0.00 sec)

mysql> SET PASSWORD FOR 'root'@'server5' = PASSWORD('testingpassword');
Query OK, 0 rows affected (0.00 sec)

mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('testingpassword');
Query OK, 0 rows affected (0.00 sec)

mysql>

mysql> Ctrl-C -- exit!
Aborted
[root@server5 ~]#

Untuk cek versi MySQL, ketikkan command mysql --version



[root@server5 ~]# mysql --version
mysql  Ver 14.14 Distrib 5.1.61, for redhat-linux-gnu (x86_64) using readline 5.1
[root@server5 ~]#

Selesai. Semoga bermanfaat.
:)

Install Apache Webserver Pada CentOS

Sebelum konten halaman web dinamic (PHP, ASP, Perl, dlsb) dapat ditampilkan pada halaman web browser, web server (misalnya: apache) harus terlebih dahulu terinstall pada mesin server. Apache merupakan salah satu webserver gratis paling poluler yang banyak digunakan oleh webmaster dan juga dapat handle bermacam tipe website (PHP, ASP, Perl, dlsb). Pada artikel kali ini akan mengulas tentang cara install apache webserver pada sistem operasi CentOS.

Berikut cara simpel install Apache Webserver pada OS CentOS:
Buka terminal atau connect ke webserver menggunakan putty atau program sejenis lainnya, kemudian ketikkan command yum -y groupinstall "Web Server"



[root@server5 ~]# yum -y groupinstall "Web Server"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.biz.net.id
* extras: centos.biz.net.id
* updates: mirror.averse.net
Setting up Group Process
Checking for new repos for mirrors
http://centos.biz.net.id/6.2/os/x86_64/repodata/badeded316fc87571779d92c5cde816fdc357646b84cb191c4611e05c981ffa1-c6-x86_64-comps.xml.gz: [Errno 14] PYCURL ERROR 18 - "transfer closed with 203863 bytes remaining to read"
Trying other mirror.
base/group_gz                                            | 199 kB     00:00
Warning: Group MySQL Database does not exist.
Resolving Dependencies
--> Running transaction check
---> Package crypto-utils.x86_64 0:2.4.1-24.2.el6 will be installed
--> Processing Dependency: perl(Newt) for package: crypto-utils-2.4.1-24.2.el6.x86_64
---> Package httpd.x86_64 0:2.2.15-15.el6.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos.1 for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
---> Package httpd-manual.noarch 0:2.2.15-15.el6.centos.1 will be installed
---> Package mod_perl.x86_64 0:2.0.4-10.el6 will be installed
--> Processing Dependency: perl(ExtUtils::MakeMaker) for package: mod_perl-2.0.4-10.el6.x86_64
--> Processing Dependency: perl(BSD::Resource) for package: mod_perl-2.0.4-10.el6.x86_64
---> Package mod_ssl.x86_64 1:2.2.15-15.el6.centos.1 will be installed
---> Package mod_wsgi.x86_64 0:3.2-1.el6 will be installed
---> Package webalizer.x86_64 0:2.21_02-3.3.el6 will be installed
--> Processing Dependency: libgd.so.2()(64bit) for package: webalizer-2.21_02-3.3.el6.x86_64
--> Processing Dependency: libpng12.so.0()(64bit) for package: webalizer-2.21_02-3.3.el6.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.3.9-3.el6_1.2 will be installed
---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package gd.x86_64 0:2.0.35-10.el6 will be installed
--> Processing Dependency: libXpm.so.4()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libfontconfig.so.1()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libfreetype.so.6()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libjpeg.so.62()(64bit) for package: gd-2.0.35-10.el6.x86_64
---> Package httpd-tools.x86_64 0:2.2.15-15.el6.centos.1 will be installed
---> Package libpng.x86_64 2:1.2.48-1.el6_2 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
---> Package perl-BSD-Resource.x86_64 0:1.29.03-3.el6 will be installed
---> Package perl-ExtUtils-MakeMaker.x86_64 0:6.55-119.el6_1.1 will be installed
--> Processing Dependency: perl(Test::Harness) for package: perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64
--> Processing Dependency: perl-devel for package: perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64
---> Package perl-Newt.x86_64 0:1.08-26.el6 will be installed
--> Running transaction check
---> Package fontconfig.x86_64 0:2.8.0-3.el6 will be installed
---> Package freetype.x86_64 0:2.3.11-6.el6_2.9 will be installed
---> Package libX11.x86_64 0:1.3-2.el6 will be installed
--> Processing Dependency: libX11-common = 1.3-2.el6 for package: libX11-1.3-2.el6.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.3-2.el6.x86_64
---> Package libXpm.x86_64 0:3.5.8-2.el6 will be installed
---> Package libjpeg.x86_64 0:6b-46.el6 will be installed
---> Package perl-Test-Harness.x86_64 0:3.17-119.el6_1.1 will be installed
---> Package perl-devel.x86_64 4:5.10.1-119.el6_1.1 will be installed
--> Processing Dependency: perl(ExtUtils::ParseXS) for package: 4:perl-devel-5.10.1-119.el6_1.1.x86_64
--> Running transaction check
---> Package libX11-common.noarch 0:1.3-2.el6 will be installed
---> Package libxcb.x86_64 0:1.5-1.el6 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.5-1.el6.x86_64
---> Package perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-119.el6_1.1 will be installed
--> Running transaction check
---> Package libXau.x86_64 0:1.0.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package                   Arch     Version                     Repository
Size
================================================================================
Installing:
crypto-utils              x86_64   2.4.1-24.2.el6              base       76 k
httpd                     x86_64   2.2.15-15.el6.centos.1      updates   813 k
httpd-manual              noarch   2.2.15-15.el6.centos.1      updates   781 k
mod_perl                  x86_64   2.0.4-10.el6                base      3.2 M
mod_ssl                   x86_64   1:2.2.15-15.el6.centos.1    updates    87 k
mod_wsgi                  x86_64   3.2-1.el6                   base       66 k
webalizer                 x86_64   2.21_02-3.3.el6             base      128 k
Installing for dependencies:
apr                       x86_64   1.3.9-3.el6_1.2             base      123 k
apr-util                  x86_64   1.3.9-3.el6_0.1             base       87 k
apr-util-ldap             x86_64   1.3.9-3.el6_0.1             base       15 k
fontconfig                x86_64   2.8.0-3.el6                 base      186 k
freetype                  x86_64   2.3.11-6.el6_2.9            updates   359 k
gd                        x86_64   2.0.35-10.el6               base      142 k
httpd-tools               x86_64   2.2.15-15.el6.centos.1      updates    70 k
libX11                    x86_64   1.3-2.el6                   base      582 k
libX11-common             noarch   1.3-2.el6                   base      188 k
libXau                    x86_64   1.0.5-1.el6                 base       22 k
libXpm                    x86_64   3.5.8-2.el6                 base       59 k
libjpeg                   x86_64   6b-46.el6                   base      134 k
libpng                    x86_64   2:1.2.48-1.el6_2            updates   181 k
libxcb                    x86_64   1.5-1.el6                   base      100 k
mailcap                   noarch   2.1.31-2.el6                base       27 k
perl-BSD-Resource         x86_64   1.29.03-3.el6               base       35 k
perl-ExtUtils-MakeMaker   x86_64   6.55-119.el6_1.1            base      290 k
perl-ExtUtils-ParseXS     x86_64   1:2.2003.0-119.el6_1.1      base       42 k
perl-Newt                 x86_64   1.08-26.el6                 base       72 k
perl-Test-Harness         x86_64   3.17-119.el6_1.1            base      229 k
perl-devel                x86_64   4:5.10.1-119.el6_1.1        base      420 k

Transaction Summary
================================================================================
Install      28 Package(s)

Total download size: 8.3 M
Installed size: 24 M
Downloading Packages:
(1/28): apr-1.3.9-3.el6_1.2.x86_64.rpm                   | 123 kB     00:00
(2/28): apr-util-1.3.9-3.el6_0.1.x86_64.rpm              |  87 kB     00:00
(3/28): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm         |  15 kB     00:00
(4/28): crypto-utils-2.4.1-24.2.el6.x86_64.rpm           |  76 kB     00:00
(5/28): fontconfig-2.8.0-3.el6.x86_64.rpm                | 186 kB     00:00
(6/28): freetype-2.3.11-6.el6_2.9.x86_64.rpm             | 359 kB     00:01
(7/28): gd-2.0.35-10.el6.x86_64.rpm                      | 142 kB     00:00
(8/28): httpd-2.2.15-15.el6.centos.1.x86_64.rpm          | 813 kB     00:03
(9/28): httpd-manual-2.2.15-15.el6.centos.1.noarch.rpm   | 781 kB     00:03
(10/28): httpd-tools-2.2.15-15.el6.centos.1.x86_64.rpm   |  70 kB     00:00
(11/28): libX11-1.3-2.el6.x86_64.rpm                     | 582 kB     00:02
(12/28): libX11-common-1.3-2.el6.noarch.rpm              | 188 kB     00:00
(13/28): libXau-1.0.5-1.el6.x86_64.rpm                   |  22 kB     00:00
(14/28): libXpm-3.5.8-2.el6.x86_64.rpm                   |  59 kB     00:00
(15/28): libjpeg-6b-46.el6.x86_64.rpm                    | 134 kB     00:00
(16/28): libpng-1.2.48-1.el6_2.x86_64.rpm                | 181 kB     00:00
(17/28): libxcb-1.5-1.el6.x86_64.rpm                     | 100 kB     00:00
(18/28): mailcap-2.1.31-2.el6.noarch.rpm                 |  27 kB     00:00
(19/28): mod_perl-2.0.4-10.el6.x86_64.rpm                | 3.2 MB     00:13
(20/28): mod_ssl-2.2.15-15.el6.centos.1.x86_64.rpm       |  87 kB     00:00
(21/28): mod_wsgi-3.2-1.el6.x86_64.rpm                   |  66 kB     00:00
(22/28): perl-BSD-Resource-1.29.03-3.el6.x86_64.rpm      |  35 kB     00:00
(23/28): perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64 | 290 kB     00:01
(24/28): perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_ |  42 kB     00:00
(25/28): perl-Newt-1.08-26.el6.x86_64.rpm                |  72 kB     00:00
(26/28): perl-Test-Harness-3.17-119.el6_1.1.x86_64.rpm   | 229 kB     00:01
(27/28): perl-devel-5.10.1-119.el6_1.1.x86_64.rpm        | 420 kB     00:01
(28/28): webalizer-2.21_02-3.3.el6.x86_64.rpm            | 128 kB     00:00
--------------------------------------------------------------------------------
Total                                           217 kB/s | 8.3 MB     00:39
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : apr-1.3.9-3.el6_1.2.x86_64                                  1/28
Installing : apr-util-1.3.9-3.el6_0.1.x86_64                             2/28
Installing : 2:libpng-1.2.48-1.el6_2.x86_64                              3/28
Installing : freetype-2.3.11-6.el6_2.9.x86_64                            4/28
Installing : fontconfig-2.8.0-3.el6.x86_64                               5/28
Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                        6/28
Installing : httpd-tools-2.2.15-15.el6.centos.1.x86_64                   7/28
Installing : 1:perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_64         8/28
Installing : 4:perl-devel-5.10.1-119.el6_1.1.x86_64                      9/28
Installing : perl-Test-Harness-3.17-119.el6_1.1.x86_64                  10/28
Installing : perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64            11/28
Installing : libXau-1.0.5-1.el6.x86_64                                  12/28
Installing : libxcb-1.5-1.el6.x86_64                                    13/28
Installing : libjpeg-6b-46.el6.x86_64                                   14/28
Installing : mailcap-2.1.31-2.el6.noarch                                15/28
Installing : httpd-2.2.15-15.el6.centos.1.x86_64                        16/28
Installing : perl-Newt-1.08-26.el6.x86_64                               17/28
Installing : perl-BSD-Resource-1.29.03-3.el6.x86_64                     18/28
Installing : libX11-common-1.3-2.el6.noarch                             19/28
Installing : libX11-1.3-2.el6.x86_64                                    20/28
Installing : libXpm-3.5.8-2.el6.x86_64                                  21/28
Installing : gd-2.0.35-10.el6.x86_64                                    22/28
Installing : webalizer-2.21_02-3.3.el6.x86_64                           23/28
Installing : mod_perl-2.0.4-10.el6.x86_64                               24/28
Installing : crypto-utils-2.4.1-24.2.el6.x86_64                         25/28
Installing : httpd-manual-2.2.15-15.el6.centos.1.noarch                 26/28
Installing : mod_wsgi-3.2-1.el6.x86_64                                  27/28
Installing : 1:mod_ssl-2.2.15-15.el6.centos.1.x86_64                    28/28

Installed:
crypto-utils.x86_64 0:2.4.1-24.2.el6
httpd.x86_64 0:2.2.15-15.el6.centos.1
httpd-manual.noarch 0:2.2.15-15.el6.centos.1
mod_perl.x86_64 0:2.0.4-10.el6
mod_ssl.x86_64 1:2.2.15-15.el6.centos.1
mod_wsgi.x86_64 0:3.2-1.el6
webalizer.x86_64 0:2.21_02-3.3.el6

Dependency Installed:
apr.x86_64 0:1.3.9-3.el6_1.2
apr-util.x86_64 0:1.3.9-3.el6_0.1
apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1
fontconfig.x86_64 0:2.8.0-3.el6
freetype.x86_64 0:2.3.11-6.el6_2.9
gd.x86_64 0:2.0.35-10.el6
httpd-tools.x86_64 0:2.2.15-15.el6.centos.1
libX11.x86_64 0:1.3-2.el6
libX11-common.noarch 0:1.3-2.el6
libXau.x86_64 0:1.0.5-1.el6
libXpm.x86_64 0:3.5.8-2.el6
libjpeg.x86_64 0:6b-46.el6
libpng.x86_64 2:1.2.48-1.el6_2
libxcb.x86_64 0:1.5-1.el6
mailcap.noarch 0:2.1.31-2.el6
perl-BSD-Resource.x86_64 0:1.29.03-3.el6
perl-ExtUtils-MakeMaker.x86_64 0:6.55-119.el6_1.1
perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-119.el6_1.1
perl-Newt.x86_64 0:1.08-26.el6
perl-Test-Harness.x86_64 0:3.17-119.el6_1.1
perl-devel.x86_64 4:5.10.1-119.el6_1.1

Complete!
[root@server5 ~]#

Kemudian jalankan apache webserver dengan mengetikkan command service httpd start.



[root@server5 ~]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for server5
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[  OK  ]
[root@server5 src]#

Untuk load apache ketika mesin boot (start up), ketikkan command chkconfig httpd on.



[root@server5 ~]# chkconfig httpd on
[root@server5 ~]#

Untuk cek versi apache, ketikkan command rpm -q httpd.



[root@server5 ~]# rpm -q httpd
httpd-2.2.15-15.el6.centos.1.x86_64
[root@server5 ~]#

Screenshot tampilan halaman default apache:
Apache Default Page

Apache Default Page

Selesai. Semoga Membantu...
:)
24 April 2012

Disable Iptables Firewall CentOS

Ada kalanya Iptables Firewall pada sistem operasi UNIX perlu di non-aktifkan (disable) dengan beberapa alasan, salah satunya jika sistem operasi digunakan untuk keperluan testing & development. Pada artikel kali ini menyajikan cara disable Iptables Firewall pada CentOS, dengan tahapan sebagai berikut:
  1. Simpan setting Firewall sebelum disable Iptables dengan mengetikkan command:

    service iptables save



    [root@rhel6 ~]# service iptables save
    iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

    service ip6tables save



    [root@server5 ~]# service ip6tables save
    ip6tables: Saving firewall rules to /etc/sysconfig/ip6table[  OK  ]

  2. Stop Iptables. Command:

    service iptables stop



    [root@server5 ~]# service iptables stop
    iptables: Flushing firewall rules:                         [  OK  ]
    iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
    iptables: Unloading modules:                               [  OK  ]
    [root@server5 ~]#

    service ip6tables stop



    [root@server5 ~]# service ip6tables stop
    ip6tables: Flushing firewall rules:                        [  OK  ]
    ip6tables: Setting chains to policy ACCEPT: filter         [  OK  ]
    ip6tables: Unloading modules:                              [  OK  ]
    [root@server5 ~]#

  3. Disable Start Up Booting Iptables. Command:

    chkconfig iptables off



    [root@server5 ~]# chkconfig iptables off
    [root@server5 ~]#

    chkconfig ip6tables off



    [root@server5 ~]# chkconfig ip6tables off
    [root@server5 ~]#

Semoga bermanfaat
:)
23 April 2012

Install Webmin Pada CentOS 6.2

Webmin merupakan web interface yang digunakan oleh sistem administrator pada OS Unix. Webmin dapat diakses menggunakan hampir semua web browser yang ada saat ini, dengan syarat browser harus sudah support tabel, form dan Java (Java untuk module File Manager). Dengan menggunakan webmin, sistem administrator dapat setup user account, DNS, Apache, Database dan lain sebagainya.

Install webmin sangatlah mudah. Berikut panduan singkat install Webmin (OS menggunakan CentOS 6.2):

Install Package "perl-Net-SSLeay" menggunakan command:


yum -y install perl-Net-SSLeay



[root@server5 ~]# yum -y install perl-Net-SSLeay
Loaded plugins: fastestmirror
base                                                     | 3.7 kB     00:00
http://centos.biz.net.id/6.2/os/x86_64/repodata/ceb77f94eaccd4b2ec5546135bdd06692393e7deb6e8aaf86d6f479b84bec06b-primary.sqlite.bz2: [Errno 14] PYCURL ERROR 18 - "transfer closed with 4683564 bytes remaining to read"
Trying other mirror.
base/primary_db                                          | 4.5 MB     00:19
extras                                                   | 3.5 kB     00:00
http://centos.biz.net.id/6.2/extras/x86_64/repodata/b1cda4f460b583687346e0a7ce7bed67049498506434134bdd172f7b59f2b271-primary.sqlite.bz2: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403"
Trying other mirror.
extras/primary_db                                        | 6.3 kB     00:00
updates                                                  | 3.5 kB     00:00
updates/primary_db                                       | 2.9 MB     00:12
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-Net-SSLeay.x86_64 0:1.35-9.el6 will be installed
--> Processing Dependency: perl >= 5.005_03 for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Processing Dependency: perl(:MODULE_COMPAT_5.10.1) for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Processing Dependency: perl(Errno) for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Processing Dependency: perl(strict) for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Processing Dependency: perl(AutoLoader) for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Processing Dependency: perl(vars) for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Processing Dependency: perl(Exporter) for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Processing Dependency: perl(Socket) for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Processing Dependency: perl(Carp) for package: perl-Net-SSLeay-1.35-9.el6.x86_64
--> Running transaction check
---> Package perl.x86_64 4:5.10.1-119.el6_1.1 will be installed
--> Processing Dependency: perl-libs = 4:5.10.1-119.el6_1.1 for package: 4:perl-5.10.1-119.el6_1.1.x86_64
--> Processing Dependency: perl-libs for package: 4:perl-5.10.1-119.el6_1.1.x86_64
--> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-119.el6_1.1.x86_64
--> Processing Dependency: perl(version) for package: 4:perl-5.10.1-119.el6_1.1.x86_64
--> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-119.el6_1.1.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.10.1-119.el6_1.1.x86_64
--> Running transaction check
---> Package perl-Module-Pluggable.x86_64 1:3.90-119.el6_1.1 will be installed
---> Package perl-Pod-Simple.x86_64 1:3.13-119.el6_1.1 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-119.el6_1.1.x86_64
---> Package perl-libs.x86_64 4:5.10.1-119.el6_1.1 will be installed
---> Package perl-version.x86_64 3:0.77-119.el6_1.1 will be installed
--> Running transaction check
---> Package perl-Pod-Escapes.x86_64 1:1.04-119.el6_1.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch       Version                    Repository
                                                                           Size
================================================================================
Installing:
 perl-Net-SSLeay           x86_64     1.35-9.el6                 base     173 k
Installing for dependencies:
 perl                      x86_64     4:5.10.1-119.el6_1.1       base      10 M
 perl-Module-Pluggable     x86_64     1:3.90-119.el6_1.1         base      37 k
 perl-Pod-Escapes          x86_64     1:1.04-119.el6_1.1         base      30 k
 perl-Pod-Simple           x86_64     1:3.13-119.el6_1.1         base     209 k
 perl-libs                 x86_64     4:5.10.1-119.el6_1.1       base     575 k
 perl-version              x86_64     3:0.77-119.el6_1.1         base      49 k

Transaction Summary
================================================================================
Install       7 Package(s)

Total download size: 11 M
Installed size: 36 M
Downloading Packages:
(1/7): perl-5.10.1-119.el6_1.1.x86_64.rpm                |  10 MB     00:44
(2/7): perl-Module-Pluggable-3.90-119.el6_1.1.x86_64.rpm |  37 kB     00:00
(3/7): perl-Net-SSLeay-1.35-9.el6.x86_64.rpm             | 173 kB     00:00
(4/7): perl-Pod-Escapes-1.04-119.el6_1.1.x86_64.rpm      |  30 kB     00:00
(5/7): perl-Pod-Simple-3.13-119.el6_1.1.x86_64.rpm       | 209 kB     00:00
(6/7): perl-libs-5.10.1-119.el6_1.1.x86_64.rpm           | 575 kB     00:02
(7/7): perl-version-0.77-119.el6_1.1.x86_64.rpm          |  49 kB     00:00
--------------------------------------------------------------------------------
Total                                           232 kB/s |  11 MB     00:49
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) 
 Package: centos-release-6-2.el6.centos.7.x86_64 (@anaconda-CentOS-201112091719.x86_64/6.2)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:perl-Pod-Escapes-1.04-119.el6_1.1.x86_64                   1/7
  Installing : 1:perl-Module-Pluggable-3.90-119.el6_1.1.x86_64              2/7
  Installing : 4:perl-libs-5.10.1-119.el6_1.1.x86_64                        3/7
  Installing : 1:perl-Pod-Simple-3.13-119.el6_1.1.x86_64                    4/7
  Installing : 3:perl-version-0.77-119.el6_1.1.x86_64                       5/7
  Installing : 4:perl-5.10.1-119.el6_1.1.x86_64                             6/7
  Installing : perl-Net-SSLeay-1.35-9.el6.x86_64                            7/7

Installed:
  perl-Net-SSLeay.x86_64 0:1.35-9.el6

Dependency Installed:
  perl.x86_64 4:5.10.1-119.el6_1.1
  perl-Module-Pluggable.x86_64 1:3.90-119.el6_1.1
  perl-Pod-Escapes.x86_64 1:1.04-119.el6_1.1
  perl-Pod-Simple.x86_64 1:3.13-119.el6_1.1
  perl-libs.x86_64 4:5.10.1-119.el6_1.1
  perl-version.x86_64 3:0.77-119.el6_1.1

Complete!
[root@server5 ~]#

Download & Install Webmin Distribution Package



[root@server5 ~]# cd /usr/src
[root@server5 src]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.580-1.noarch.rpm
--2012-04-21 21:06:20--  http://prdownloads.sourceforge.net/webadmin/webmin-1.580-1.noarch.rpm
Resolving prdownloads.sourceforge.net... 216.34.181.59
Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/webadmin/webmin/1.580/webmin-1.580-1.noarch.rpm [following]
--2012-04-21 21:06:20--  http://downloads.sourceforge.net/project/webadmin/webmin/1.580/webmin-1.580-1.noarch.rpm
Resolving downloads.sourceforge.net... 216.34.181.59
Reusing existing connection to prdownloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://nchc.dl.sourceforge.net/project/webadmin/webmin/1.580/webmin-1.580-1.noarch.rpm [following]
--2012-04-21 21:06:21--  http://nchc.dl.sourceforge.net/project/webadmin/webmin/1.580/webmin-1.580-1.noarch.rpm
Resolving nchc.dl.sourceforge.net... 211.79.60.17, 2001:e10:ffff:1f02::17
Connecting to nchc.dl.sourceforge.net|211.79.60.17|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17112780 (16M) [application/octet-stream]
Saving to: âwebmin-1.580-1.noarch.rpmâ

100%[============================================================================>] 17,112,780   235K/s   in 74s

2012-04-21 21:07:36 (225 KB/s) - âwebmin-1.580-1.noarch.rpmâ

[root@server5 src]# rpm -i webmin-1.580-1.noarch.rpm
warning: webmin-1.580-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 11f63c51: NOKEY
Operating system is CentOS Linux
Webmin install complete. You can now login to https://server5:10000/
as root with your root password.
[root@server5 src]#

Jika CentOS 6.2 anda sebelumnya diinstall dengan minimal installation, terlebih dahulu sebelum webmin dapat diakses pada web browser, apache webserver harus terinstall dan aktif. Install Group Apache & MySQL databases dengan menggunakan command berikut:

yum -y groupinstall "Web Server" "MySQL Database"



[root@server5 src]# yum -y groupinstall "Web Server" "MySQL Database"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.biz.net.id
 * extras: centos.biz.net.id
 * updates: mirror.averse.net
Setting up Group Process
Checking for new repos for mirrors
http://centos.biz.net.id/6.2/os/x86_64/repodata/badeded316fc87571779d92c5cde816fdc357646b84cb191c4611e05c981ffa1-c6-x86_64-comps.xml.gz: [Errno 14] PYCURL ERROR 18 - "transfer closed with 203863 bytes remaining to read"
Trying other mirror.
base/group_gz                                            | 199 kB     00:00
Warning: Group MySQL Database does not exist.
Resolving Dependencies
--> Running transaction check
---> Package crypto-utils.x86_64 0:2.4.1-24.2.el6 will be installed
--> Processing Dependency: perl(Newt) for package: crypto-utils-2.4.1-24.2.el6.x86_64
---> Package httpd.x86_64 0:2.2.15-15.el6.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos.1 for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
---> Package httpd-manual.noarch 0:2.2.15-15.el6.centos.1 will be installed
---> Package mod_perl.x86_64 0:2.0.4-10.el6 will be installed
--> Processing Dependency: perl(ExtUtils::MakeMaker) for package: mod_perl-2.0.4-10.el6.x86_64
--> Processing Dependency: perl(BSD::Resource) for package: mod_perl-2.0.4-10.el6.x86_64
---> Package mod_ssl.x86_64 1:2.2.15-15.el6.centos.1 will be installed
---> Package mod_wsgi.x86_64 0:3.2-1.el6 will be installed
---> Package webalizer.x86_64 0:2.21_02-3.3.el6 will be installed
--> Processing Dependency: libgd.so.2()(64bit) for package: webalizer-2.21_02-3.3.el6.x86_64
--> Processing Dependency: libpng12.so.0()(64bit) for package: webalizer-2.21_02-3.3.el6.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.3.9-3.el6_1.2 will be installed
---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package gd.x86_64 0:2.0.35-10.el6 will be installed
--> Processing Dependency: libXpm.so.4()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libfontconfig.so.1()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libfreetype.so.6()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libjpeg.so.62()(64bit) for package: gd-2.0.35-10.el6.x86_64
---> Package httpd-tools.x86_64 0:2.2.15-15.el6.centos.1 will be installed
---> Package libpng.x86_64 2:1.2.48-1.el6_2 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
---> Package perl-BSD-Resource.x86_64 0:1.29.03-3.el6 will be installed
---> Package perl-ExtUtils-MakeMaker.x86_64 0:6.55-119.el6_1.1 will be installed
--> Processing Dependency: perl(Test::Harness) for package: perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64
--> Processing Dependency: perl-devel for package: perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64
---> Package perl-Newt.x86_64 0:1.08-26.el6 will be installed
--> Running transaction check
---> Package fontconfig.x86_64 0:2.8.0-3.el6 will be installed
---> Package freetype.x86_64 0:2.3.11-6.el6_2.9 will be installed
---> Package libX11.x86_64 0:1.3-2.el6 will be installed
--> Processing Dependency: libX11-common = 1.3-2.el6 for package: libX11-1.3-2.el6.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.3-2.el6.x86_64
---> Package libXpm.x86_64 0:3.5.8-2.el6 will be installed
---> Package libjpeg.x86_64 0:6b-46.el6 will be installed
---> Package perl-Test-Harness.x86_64 0:3.17-119.el6_1.1 will be installed
---> Package perl-devel.x86_64 4:5.10.1-119.el6_1.1 will be installed
--> Processing Dependency: perl(ExtUtils::ParseXS) for package: 4:perl-devel-5.10.1-119.el6_1.1.x86_64
--> Running transaction check
---> Package libX11-common.noarch 0:1.3-2.el6 will be installed
---> Package libxcb.x86_64 0:1.5-1.el6 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.5-1.el6.x86_64
---> Package perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-119.el6_1.1 will be installed
--> Running transaction check
---> Package libXau.x86_64 0:1.0.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch     Version                     Repository
                                                                           Size
================================================================================
Installing:
 crypto-utils              x86_64   2.4.1-24.2.el6              base       76 k
 httpd                     x86_64   2.2.15-15.el6.centos.1      updates   813 k
 httpd-manual              noarch   2.2.15-15.el6.centos.1      updates   781 k
 mod_perl                  x86_64   2.0.4-10.el6                base      3.2 M
 mod_ssl                   x86_64   1:2.2.15-15.el6.centos.1    updates    87 k
 mod_wsgi                  x86_64   3.2-1.el6                   base       66 k
 webalizer                 x86_64   2.21_02-3.3.el6             base      128 k
Installing for dependencies:
 apr                       x86_64   1.3.9-3.el6_1.2             base      123 k
 apr-util                  x86_64   1.3.9-3.el6_0.1             base       87 k
 apr-util-ldap             x86_64   1.3.9-3.el6_0.1             base       15 k
 fontconfig                x86_64   2.8.0-3.el6                 base      186 k
 freetype                  x86_64   2.3.11-6.el6_2.9            updates   359 k
 gd                        x86_64   2.0.35-10.el6               base      142 k
 httpd-tools               x86_64   2.2.15-15.el6.centos.1      updates    70 k
 libX11                    x86_64   1.3-2.el6                   base      582 k
 libX11-common             noarch   1.3-2.el6                   base      188 k
 libXau                    x86_64   1.0.5-1.el6                 base       22 k
 libXpm                    x86_64   3.5.8-2.el6                 base       59 k
 libjpeg                   x86_64   6b-46.el6                   base      134 k
 libpng                    x86_64   2:1.2.48-1.el6_2            updates   181 k
 libxcb                    x86_64   1.5-1.el6                   base      100 k
 mailcap                   noarch   2.1.31-2.el6                base       27 k
 perl-BSD-Resource         x86_64   1.29.03-3.el6               base       35 k
 perl-ExtUtils-MakeMaker   x86_64   6.55-119.el6_1.1            base      290 k
 perl-ExtUtils-ParseXS     x86_64   1:2.2003.0-119.el6_1.1      base       42 k
 perl-Newt                 x86_64   1.08-26.el6                 base       72 k
 perl-Test-Harness         x86_64   3.17-119.el6_1.1            base      229 k
 perl-devel                x86_64   4:5.10.1-119.el6_1.1        base      420 k

Transaction Summary
================================================================================
Install      28 Package(s)

Total download size: 8.3 M
Installed size: 24 M
Downloading Packages:
(1/28): apr-1.3.9-3.el6_1.2.x86_64.rpm                   | 123 kB     00:00
(2/28): apr-util-1.3.9-3.el6_0.1.x86_64.rpm              |  87 kB     00:00
(3/28): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm         |  15 kB     00:00
(4/28): crypto-utils-2.4.1-24.2.el6.x86_64.rpm           |  76 kB     00:00
(5/28): fontconfig-2.8.0-3.el6.x86_64.rpm                | 186 kB     00:00
(6/28): freetype-2.3.11-6.el6_2.9.x86_64.rpm             | 359 kB     00:01
(7/28): gd-2.0.35-10.el6.x86_64.rpm                      | 142 kB     00:00
(8/28): httpd-2.2.15-15.el6.centos.1.x86_64.rpm          | 813 kB     00:03
(9/28): httpd-manual-2.2.15-15.el6.centos.1.noarch.rpm   | 781 kB     00:03
(10/28): httpd-tools-2.2.15-15.el6.centos.1.x86_64.rpm   |  70 kB     00:00
(11/28): libX11-1.3-2.el6.x86_64.rpm                     | 582 kB     00:02
(12/28): libX11-common-1.3-2.el6.noarch.rpm              | 188 kB     00:00
(13/28): libXau-1.0.5-1.el6.x86_64.rpm                   |  22 kB     00:00
(14/28): libXpm-3.5.8-2.el6.x86_64.rpm                   |  59 kB     00:00
(15/28): libjpeg-6b-46.el6.x86_64.rpm                    | 134 kB     00:00
(16/28): libpng-1.2.48-1.el6_2.x86_64.rpm                | 181 kB     00:00
(17/28): libxcb-1.5-1.el6.x86_64.rpm                     | 100 kB     00:00
(18/28): mailcap-2.1.31-2.el6.noarch.rpm                 |  27 kB     00:00
(19/28): mod_perl-2.0.4-10.el6.x86_64.rpm                | 3.2 MB     00:13
(20/28): mod_ssl-2.2.15-15.el6.centos.1.x86_64.rpm       |  87 kB     00:00
(21/28): mod_wsgi-3.2-1.el6.x86_64.rpm                   |  66 kB     00:00
(22/28): perl-BSD-Resource-1.29.03-3.el6.x86_64.rpm      |  35 kB     00:00
(23/28): perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64 | 290 kB     00:01
(24/28): perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_ |  42 kB     00:00
(25/28): perl-Newt-1.08-26.el6.x86_64.rpm                |  72 kB     00:00
(26/28): perl-Test-Harness-3.17-119.el6_1.1.x86_64.rpm   | 229 kB     00:01
(27/28): perl-devel-5.10.1-119.el6_1.1.x86_64.rpm        | 420 kB     00:01
(28/28): webalizer-2.21_02-3.3.el6.x86_64.rpm            | 128 kB     00:00
--------------------------------------------------------------------------------
Total                                           217 kB/s | 8.3 MB     00:39
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : apr-1.3.9-3.el6_1.2.x86_64                                  1/28
  Installing : apr-util-1.3.9-3.el6_0.1.x86_64                             2/28
  Installing : 2:libpng-1.2.48-1.el6_2.x86_64                              3/28
  Installing : freetype-2.3.11-6.el6_2.9.x86_64                            4/28
  Installing : fontconfig-2.8.0-3.el6.x86_64                               5/28
  Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                        6/28
  Installing : httpd-tools-2.2.15-15.el6.centos.1.x86_64                   7/28
  Installing : 1:perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_64         8/28
  Installing : 4:perl-devel-5.10.1-119.el6_1.1.x86_64                      9/28
  Installing : perl-Test-Harness-3.17-119.el6_1.1.x86_64                  10/28
  Installing : perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64            11/28
  Installing : libXau-1.0.5-1.el6.x86_64                                  12/28
  Installing : libxcb-1.5-1.el6.x86_64                                    13/28
  Installing : libjpeg-6b-46.el6.x86_64                                   14/28
  Installing : mailcap-2.1.31-2.el6.noarch                                15/28
  Installing : httpd-2.2.15-15.el6.centos.1.x86_64                        16/28
  Installing : perl-Newt-1.08-26.el6.x86_64                               17/28
  Installing : perl-BSD-Resource-1.29.03-3.el6.x86_64                     18/28
  Installing : libX11-common-1.3-2.el6.noarch                             19/28
  Installing : libX11-1.3-2.el6.x86_64                                    20/28
  Installing : libXpm-3.5.8-2.el6.x86_64                                  21/28
  Installing : gd-2.0.35-10.el6.x86_64                                    22/28
  Installing : webalizer-2.21_02-3.3.el6.x86_64                           23/28
  Installing : mod_perl-2.0.4-10.el6.x86_64                               24/28
  Installing : crypto-utils-2.4.1-24.2.el6.x86_64                         25/28
  Installing : httpd-manual-2.2.15-15.el6.centos.1.noarch                 26/28
  Installing : mod_wsgi-3.2-1.el6.x86_64                                  27/28
  Installing : 1:mod_ssl-2.2.15-15.el6.centos.1.x86_64                    28/28

Installed:
  crypto-utils.x86_64 0:2.4.1-24.2.el6
  httpd.x86_64 0:2.2.15-15.el6.centos.1
  httpd-manual.noarch 0:2.2.15-15.el6.centos.1
  mod_perl.x86_64 0:2.0.4-10.el6
  mod_ssl.x86_64 1:2.2.15-15.el6.centos.1
  mod_wsgi.x86_64 0:3.2-1.el6
  webalizer.x86_64 0:2.21_02-3.3.el6

Dependency Installed:
  apr.x86_64 0:1.3.9-3.el6_1.2
  apr-util.x86_64 0:1.3.9-3.el6_0.1
  apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1
  fontconfig.x86_64 0:2.8.0-3.el6
  freetype.x86_64 0:2.3.11-6.el6_2.9
  gd.x86_64 0:2.0.35-10.el6
  httpd-tools.x86_64 0:2.2.15-15.el6.centos.1
  libX11.x86_64 0:1.3-2.el6
  libX11-common.noarch 0:1.3-2.el6
  libXau.x86_64 0:1.0.5-1.el6
  libXpm.x86_64 0:3.5.8-2.el6
  libjpeg.x86_64 0:6b-46.el6
  libpng.x86_64 2:1.2.48-1.el6_2
  libxcb.x86_64 0:1.5-1.el6
  mailcap.noarch 0:2.1.31-2.el6
  perl-BSD-Resource.x86_64 0:1.29.03-3.el6
  perl-ExtUtils-MakeMaker.x86_64 0:6.55-119.el6_1.1
  perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-119.el6_1.1
  perl-Newt.x86_64 0:1.08-26.el6
  perl-Test-Harness.x86_64 0:3.17-119.el6_1.1
  perl-devel.x86_64 4:5.10.1-119.el6_1.1

Complete!
[root@server5 src]#

Login ke webmin pada alamat URL https://[Alamat IP]:10000/ menggunakan detail login user & password root. Jika web browser menampilkan pesan peringatan This Connection is Untrusted, klik tombol Add Exception..., kemudian centang checkbox Permanently store this exception klik tombol Confirm Security Exception.

Install Webmin

Install Webmin: Untrusted Connection

Install Webmin 2

Install Webmin: Confirm Security Exception

Install Webmin 3

Install Webmin: Login Webmin Server


Install Webmin 4

Install Webmin: Webmin Web Interface


Uninstall Webmin

Untuk uninstall webmin, ketikkan command;

/etc/webmin/uninstall.sh.



[root@server5 ~]# /etc/webmin/uninstall.sh
Are you sure you want to uninstall Webmin? (y/n) : y

Removing webmin RPM ..
Running uninstall scripts ..
Deleted init script /etc/rc.d/init.d/webmin
Subroutine list_servers redefined at /usr/libexec/webmin/servers/servers-lib.pl line 91.
Subroutine list_servers_sorted redefined at /usr/libexec/webmin/servers/servers-lib.pl line 110.
Subroutine get_server redefined at /usr/libexec/webmin/servers/servers-lib.pl line 142.
Subroutine save_server redefined at /usr/libexec/webmin/servers/servers-lib.pl line 157.
Subroutine delete_server redefined at /usr/libexec/webmin/servers/servers-lib.pl line 174.
Subroutine can_use_server redefined at /usr/libexec/webmin/servers/servers-lib.pl line 187.
Subroutine list_all_groups redefined at /usr/libexec/webmin/servers/servers-lib.pl line 207.
Subroutine logged_in redefined at /usr/libexec/webmin/servers/servers-lib.pl line 275.
Subroutine get_server_types redefined at /usr/libexec/webmin/servers/servers-lib.pl line 300.
Subroutine this_server redefined at /usr/libexec/webmin/servers/servers-lib.pl line 310.
Subroutine get_my_address redefined at /usr/libexec/webmin/servers/servers-lib.pl line 329.
Subroutine address_to_broadcast redefined at /usr/libexec/webmin/servers/servers-lib.pl line 358.
Subroutine test_server redefined at /usr/libexec/webmin/servers/servers-lib.pl line 372.
Subroutine find_cron_job redefined at /usr/libexec/webmin/servers/servers-lib.pl line 391.
Subroutine find_servers redefined at /usr/libexec/webmin/servers/servers-lib.pl line 404.
Done!
[root@server5 ~]#

Selesai. Semoga bermanfaat.
:)
19 April 2012

Membuat File Menggunakan Command "touch" Pada OS Berbasis Linux

Command "touch" pada OS berbasis linux adalah merupakan cara termudah untuk membuat file serta update detail tanggal dan waktu (timestamps) file/folder dimodifikasi.

Syntax command touch adalah:

touch [option] nama_file

[bash]
[linggih@localhost ~]$ touch testingfile
[linggih@localhost ~]$ ls -l
total 0
-rw-rw-r-- 1 linggih linggih 0 Apr 19 22:23 testingfile
[linggih@localhost ~]$
[/bash]

Contoh di atas tanpa menggunakan opsi (option), touch akan membuat file dengan nama sesuai argumen/input data (testingfile) jika file sesuai input data (testingfile) tidak ada pada direktori file dibuat. Command touch juga dapat digunakan untuk membuat file lebih dari satu, contoh: command berikut ini akan membuat tiga file dengan nama testingfile1, testingfile2 dan testingfile3:

Command:

touch testingfile1 testingfile2 testingfile3

[bash]
[linggih@localhost ~]$ touch testingfile1 testingfile2 testingfile3
[linggih@localhost ~]$ ls -l
total 0
-rw-rw-r-- 1 linggih linggih 0 Apr 19 22:23 testingfile
-rw-rw-r-- 1 linggih linggih 0 Apr 19 22:29 testingfile1
-rw-rw-r-- 1 linggih linggih 0 Apr 19 22:29 testingfile2
-rw-rw-r-- 1 linggih linggih 0 Apr 19 22:29 testingfile3
[linggih@localhost ~]$
[/bash]

Modifikasi tanggal dan waktu (timestamps) menggunakan command touch

Command touch dapat digunakan untuk update tanggal dan waktu mundur (masa lampau) atau maju (masa depan). Contoh:


  1. Modifikasi tanggal dan waktu ke masa lalu:

    [bash]
    [linggih@localhost ~]$ touch -t 0705151700 testingfile1
    [linggih@localhost ~]$ ls -l --full-time testingfile1
    -rw-rw-r-- 1 linggih linggih 0 2007-05-15 17:00:00.000000000 +0700 testingfile1
    [linggih@localhost ~]$ ls -l
    total 0
    -rw-rw-r-- 1 linggih linggih 0 Apr 19 22:23 testingfile
    -rw-rw-r-- 1 linggih linggih 0 May 15 2007 testingfile1
    -rw-rw-r-- 1 linggih linggih 0 Apr 19 22:29 testingfile2
    -rw-rw-r-- 1 linggih linggih 0 Apr 19 22:29 testingfile3
    [linggih@localhost ~]$
    [/bash]

    Opsi (option) --full-time → timestamp testingfile1 15 Mei 2007 jam 5 sore (17:00:00).


  2. Modifikasi tanggal dan waktu ke masa depan:

    [bash]
    [linggih@localhost ~]$ touch -t 1509171900 testingfile2
    [linggih@localhost ~]$ ls -l --full-time testingfile2
    -rw-rw-r-- 1 linggih linggih 0 2015-09-17 19:00:00.000000000 +0700 testingfile2
    [linggih@localhost ~]$ ls -l
    total 0
    -rw-rw-r-- 1 linggih linggih 0 Apr 19 22:23 testingfile
    -rw-rw-r-- 1 linggih linggih 0 May 15 2007 testingfile1
    -rw-rw-r-- 1 linggih linggih 0 Sep 17 2015 testingfile2
    -rw-rw-r-- 1 linggih linggih 0 Apr 19 22:29 testingfile3
    [linggih@localhost ~]$
    [/bash]

    Opsi (option) --full-time → timestamp testingfile2 17 September 2015 jam 7 malam (19:00:00).



Selesai. Semoga bermanfaat...
:D
28 Februari 2012

Varnish Cache Install Error "Missing Dependency: libedit.so.0()" (RedHat/CentOS)

"Varnish Cache Install Error "Missing Dependency: libedit.so.0()" (RedHat/CentOS)"

Cara mengatasi, install rpm epel >> http://fedoraproject.org/wiki/EPEL

[bash collapse="false"]
[root@server5 ~]# cd /tmp
[root@server5 tmp]# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
[root@server5 tmp]# rpm -ivh epel-release-6-5.noarch.rpm
[/bash]

Kemudian jalankan command install varnish cache:

[bash collapse="false"]
[root@server5 tmp]# yum install varnish
[/bash]

Referensi Panduan Install Varnish Cache:


  1. https://www.varnish-cache.org/docs

500 Internal Server Error (Incorrect File Ownership)

Cara mengatasi 500 Internal Server Error dikarenakan ownership file ('index.php' misalnya) berbeda/tidak sama dengan ownership domain, adalah dengan cara mengganti ownership file yang error ke username domain:


  1. Buka Putty & login sebagai root

  2. Ketikkan Command Berikut ini (asumsi control panel web cPanel/sesuaikan dengan direktori error file):


    [bash collapse="false"]
    [root@localhost ~]# chown -R username:username /home/username/public_html
    [root@localhost ~]# chown username:nobody /home/username/public_html
    [/bash]

    Ganti "username" dengan aktual username.

  3. Selesai. Refresh ulang halaman yang error.

26 Februari 2012

Install PDO MySQL Pada Centos

Apa itu PDO MySQL? PDO adalah singkatan dari PHP Data Objects, berdasarkan wiki mysql.com, PDO adalah...

PDO_MYSQL is the MySQL driver for PDO (PHP Data Objects). Under the name PDO_MYSQLND a patch which allows to compile PDO_MYSQL against the MySQL native driver for PHP (mysqlnd) or the mysql client library (like ever since) has been developed.


Pada artikel tidak akan mengulas apa itu PDO, namun cara install PDO MySQL pada OS CentOS. Untuk mulai install PDO MySQL, ketikkan command:

yum install php-devel php-pear mysql-devel httpd-devel

[bash]
[root@linggih ~]# yum install php-devel php-pear mysql-devel httpd-devel
...
...
--> Processing Dependency: libapr-1.so.0()(64bit) for package: apr-devel-1.3.9-3.el6_1.2.x86_64
---> Package apr-util-devel.x86_64 0:1.3.9-3.el6_0.1 will be installed
--> Processing Dependency: apr-util = 1.3.9-3.el6_0.1 for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: openldap-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: db4-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: expat-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
---> Package httpd.x86_64 0:2.2.15-15.el6.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos.1 for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.1.x86_64
---> Package mysql.x86_64 0:5.1.61-1.el6_2.1 will be installed
---> Package openssl-devel.x86_64 0:1.0.0-20.el6_2.4 will be installed
--> Processing Dependency: zlib-devel for package: openssl-devel-1.0.0-20.el6_2.4.x86_64
--> Processing Dependency: krb5-devel for package: openssl-devel-1.0.0-20.el6_2.4.x86_64
---> Package php.x86_64 0:5.3.3-3.el6_2.8 will be installed
--> Processing Dependency: php-common = 5.3.3-3.el6_2.8 for package: php-5.3.3-3.el6_2.8.x86_64
---> Package php-cli.x86_64 0:5.3.3-3.el6_2.8 will be installed
--> Processing Dependency: libedit.so.0()(64bit) for package: php-cli-5.3.3-3.el6_2.8.x86_64
---> Package pkgconfig.x86_64 1:0.23-9.1.el6 will be installed
--> Running transaction check
---> Package apr.x86_64 0:1.3.9-3.el6_1.2 will be installed
---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package db4-devel.x86_64 0:4.7.25-16.el6 will be installed
--> Processing Dependency: db4-cxx = 4.7.25-16.el6 for package: db4-devel-4.7.25-16.el6.x86_64
--> Processing Dependency: libdb_cxx-4.7.so()(64bit) for package: db4-devel-4.7.25-16.el6.x86_64
---> Package expat-devel.x86_64 0:2.0.1-9.1.el6 will be installed
---> Package httpd-tools.x86_64 0:2.2.15-15.el6.centos.1 will be installed
---> Package krb5-devel.x86_64 0:1.9-22.el6_2.1 will be installed
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.9-22.el6_2.1.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.9-22.el6_2.1.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.9-22.el6_2.1.x86_64
---> Package libedit.x86_64 0:2.11-4.20080712cvs.1.el6 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
---> Package openldap-devel.x86_64 0:2.4.23-20.el6 will be installed
--> Processing Dependency: cyrus-sasl-devel >= 2.1 for package: openldap-devel-2.4.23-20.el6.x86_64
---> Package php-common.x86_64 0:5.3.3-3.el6_2.8 will be installed
---> Package zlib-devel.x86_64 0:1.2.3-27.el6 will be installed
--> Running transaction check
---> Package cyrus-sasl-devel.x86_64 0:2.1.23-13.el6 will be installed
---> Package db4-cxx.x86_64 0:4.7.25-16.el6 will be installed
---> Package keyutils-libs-devel.x86_64 0:1.4-3.el6 will be installed
---> Package libcom_err-devel.x86_64 0:1.41.12-11.el6 will be installed
---> Package libselinux-devel.x86_64 0:2.0.94-5.2.el6 will be installed
--> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-5.2.el6.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-5.2.el6.x86_64
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
httpd-devel x86_64 2.2.15-15.el6.centos.1 updates 147 k
mysql-devel x86_64 5.1.61-1.el6_2.1 updates 127 k
php-devel x86_64 5.3.3-3.el6_2.8 updates 506 k
php-pear noarch 1:1.9.4-4.el6 base 393 k
Installing for dependencies:
apr x86_64 1.3.9-3.el6_1.2 base 123 k
apr-devel x86_64 1.3.9-3.el6_1.2 base 176 k
apr-util x86_64 1.3.9-3.el6_0.1 base 87 k
apr-util-devel x86_64 1.3.9-3.el6_0.1 base 69 k
apr-util-ldap x86_64 1.3.9-3.el6_0.1 base 15 k
cyrus-sasl-devel x86_64 2.1.23-13.el6 base 302 k
db4-cxx x86_64 4.7.25-16.el6 base 590 k
db4-devel x86_64 4.7.25-16.el6 base 6.6 M
expat-devel x86_64 2.0.1-9.1.el6 base 119 k
httpd x86_64 2.2.15-15.el6.centos.1 updates 813 k
httpd-tools x86_64 2.2.15-15.el6.centos.1 updates 70 k
keyutils-libs-devel x86_64 1.4-3.el6 base 28 k
krb5-devel x86_64 1.9-22.el6_2.1 updates 1.2 M
libcom_err-devel x86_64 1.41.12-11.el6 base 31 k
libedit x86_64 2.11-4.20080712cvs.1.el6 base 74 k
libselinux-devel x86_64 2.0.94-5.2.el6 base 136 k
libsepol-devel x86_64 2.0.41-4.el6 base 64 k
mailcap noarch 2.1.31-2.el6 base 27 k
mysql x86_64 5.1.61-1.el6_2.1 updates 881 k
openldap-devel x86_64 2.4.23-20.el6 base 1.1 M
openssl-devel x86_64 1.0.0-20.el6_2.4 updates 1.1 M
php x86_64 5.3.3-3.el6_2.8 updates 1.1 M
php-cli x86_64 5.3.3-3.el6_2.8 updates 2.2 M
php-common x86_64 5.3.3-3.el6_2.8 updates 522 k
pkgconfig x86_64 1:0.23-9.1.el6 base 70 k
zlib-devel x86_64 1.2.3-27.el6 base 44 k

Transaction Summary
================================================================================
Install 30 Package(s)

Total download size: 19 M
Installed size: 64 M
Is this ok [y/N]: y
Downloading Packages:
http://centos.biz.net.id/6.2/os/x86_64/Packages/apr-1.3.9-3.el6_1.2.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
(1/30): apr-1.3.9-3.el6_1.2.x86_64.rpm | 123 kB 00:00
(2/30): apr-devel-1.3.9-3.el6_1.2.x86_64.rpm | 176 kB 00:00
(3/30): apr-util-1.3.9-3.el6_0.1.x86_64.rpm | 87 kB 00:00
(4/30): apr-util-devel-1.3.9-3.el6_0.1.x86_64.rpm | 69 kB 00:00
(5/30): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm | 15 kB 00:00
(6/30): cyrus-sasl-devel-2.1.23-13.el6.x86_64.rpm | 302 kB 00:01
(7/30): db4-cxx-4.7.25-16.el6.x86_64.rpm | 590 kB 00:02
(8/30): db4-devel-4.7.25-16.el6.x86_64.rpm | 6.6 MB 00:29
(9/30): expat-devel-2.0.1-9.1.el6.x86_64.rpm | 119 kB 00:00
(10/30): httpd-2.2.15-15.el6.centos.1.x86_64.rpm | 813 kB 00:03
(11/30): httpd-devel-2.2.15-15.el6.centos.1.x86_64.rpm | 147 kB 00:00
(12/30): httpd-tools-2.2.15-15.el6.centos.1.x86_64.rpm | 70 kB 00:00
(13/30): keyutils-libs-devel-1.4-3.el6.x86_64.rpm | 28 kB 00:00
(14/30): krb5-devel-1.9-22.el6_2.1.x86_64.rpm | 1.2 MB 00:05
(15/30): libcom_err-devel-1.41.12-11.el6.x86_64.rpm | 31 kB 00:00
(16/30): libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm | 74 kB 00:00
(17/30): libselinux-devel-2.0.94-5.2.el6.x86_64.rpm | 136 kB 00:00
(18/30): libsepol-devel-2.0.41-4.el6.x86_64.rpm | 64 kB 00:00
(19/30): mailcap-2.1.31-2.el6.noarch.rpm | 27 kB 00:00
(20/30): mysql-5.1.61-1.el6_2.1.x86_64.rpm | 881 kB 00:03
(21/30): mysql-devel-5.1.61-1.el6_2.1.x86_64.rpm | 127 kB 00:00
(22/30): openldap-devel-2.4.23-20.el6.x86_64.rpm | 1.1 MB 00:04
(23/30): openssl-devel-1.0.0-20.el6_2.4.x86_64.rpm | 1.1 MB 00:05
(24/30): php-5.3.3-3.el6_2.8.x86_64.rpm | 1.1 MB 00:04
(25/30): php-cli-5.3.3-3.el6_2.8.x86_64.rpm | 2.2 MB 00:09
(26/30): php-common-5.3.3-3.el6_2.8.x86_64.rpm | 522 kB 00:02
(27/30): php-devel-5.3.3-3.el6_2.8.x86_64.rpm | 506 kB 00:02
(28/30): php-pear-1.9.4-4.el6.noarch.rpm | 393 kB 00:01
(29/30): pkgconfig-0.23-9.1.el6.x86_64.rpm | 70 kB 00:00
(30/30): zlib-devel-1.2.3-27.el6.x86_64.rpm | 44 kB 00:00
--------------------------------------------------------------------------------
Total 228 kB/s | 19 MB 01:23
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:pkgconfig-0.23-9.1.el6.x86_64 1/30
Installing : apr-1.3.9-3.el6_1.2.x86_64 2/30
Installing : apr-util-1.3.9-3.el6_0.1.x86_64 3/30
Installing : apr-devel-1.3.9-3.el6_1.2.x86_64 4/30
Installing : php-common-5.3.3-3.el6_2.8.x86_64 5/30
Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64 6/30
Installing : httpd-tools-2.2.15-15.el6.centos.1.x86_64 7/30
Installing : zlib-devel-1.2.3-27.el6.x86_64 8/30
Installing : libcom_err-devel-1.41.12-11.el6.x86_64 9/30
Installing : libsepol-devel-2.0.41-4.el6.x86_64 10/30
Installing : libselinux-devel-2.0.94-5.2.el6.x86_64 11/30
Installing : expat-devel-2.0.1-9.1.el6.x86_64 12/30
Installing : cyrus-sasl-devel-2.1.23-13.el6.x86_64 13/30
Installing : openldap-devel-2.4.23-20.el6.x86_64 14/30
Installing : libedit-2.11-4.20080712cvs.1.el6.x86_64 15/30
Installing : php-cli-5.3.3-3.el6_2.8.x86_64 16/30
Installing : mailcap-2.1.31-2.el6.noarch 17/30
Installing : httpd-2.2.15-15.el6.centos.1.x86_64 18/30
Installing : php-5.3.3-3.el6_2.8.x86_64 19/30
Installing : db4-cxx-4.7.25-16.el6.x86_64 20/30
Installing : db4-devel-4.7.25-16.el6.x86_64 21/30
Installing : apr-util-devel-1.3.9-3.el6_0.1.x86_64 22/30
Installing : mysql-5.1.61-1.el6_2.1.x86_64 23/30
Installing : keyutils-libs-devel-1.4-3.el6.x86_64 24/30
Installing : krb5-devel-1.9-22.el6_2.1.x86_64 25/30
Installing : openssl-devel-1.0.0-20.el6_2.4.x86_64 26/30
Installing : mysql-devel-5.1.61-1.el6_2.1.x86_64 27/30
Installing : httpd-devel-2.2.15-15.el6.centos.1.x86_64 28/30
Installing : php-devel-5.3.3-3.el6_2.8.x86_64 29/30
Installing : 1:php-pear-1.9.4-4.el6.noarch 30/30

Installed:
httpd-devel.x86_64 0:2.2.15-15.el6.centos.1
mysql-devel.x86_64 0:5.1.61-1.el6_2.1
php-devel.x86_64 0:5.3.3-3.el6_2.8
php-pear.noarch 1:1.9.4-4.el6

Dependency Installed:
apr.x86_64 0:1.3.9-3.el6_1.2
apr-devel.x86_64 0:1.3.9-3.el6_1.2
apr-util.x86_64 0:1.3.9-3.el6_0.1
apr-util-devel.x86_64 0:1.3.9-3.el6_0.1
apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1
cyrus-sasl-devel.x86_64 0:2.1.23-13.el6
db4-cxx.x86_64 0:4.7.25-16.el6
db4-devel.x86_64 0:4.7.25-16.el6
expat-devel.x86_64 0:2.0.1-9.1.el6
httpd.x86_64 0:2.2.15-15.el6.centos.1
httpd-tools.x86_64 0:2.2.15-15.el6.centos.1
keyutils-libs-devel.x86_64 0:1.4-3.el6
krb5-devel.x86_64 0:1.9-22.el6_2.1
libcom_err-devel.x86_64 0:1.41.12-11.el6
libedit.x86_64 0:2.11-4.20080712cvs.1.el6
libselinux-devel.x86_64 0:2.0.94-5.2.el6
libsepol-devel.x86_64 0:2.0.41-4.el6
mailcap.noarch 0:2.1.31-2.el6
mysql.x86_64 0:5.1.61-1.el6_2.1
openldap-devel.x86_64 0:2.4.23-20.el6
openssl-devel.x86_64 0:1.0.0-20.el6_2.4
php.x86_64 0:5.3.3-3.el6_2.8
php-cli.x86_64 0:5.3.3-3.el6_2.8
php-common.x86_64 0:5.3.3-3.el6_2.8
pkgconfig.x86_64 1:0.23-9.1.el6
zlib-devel.x86_64 0:1.2.3-27.el6

Complete!
[root@linggih ~]#
[/bash]

yum install php-pdo

[bash]
[root@linggih ~]# yum install php-pdo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.biz.net.id
* extras: centos.biz.net.id
* updates: centos.idrepo.or.id
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-pdo x86_64 5.3.3-3.el6_2.8 updates 73 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 73 k
Installed size: 168 k
Is this ok [y/N]: y
Downloading Packages:
php-pdo-5.3.3-3.el6_2.8.x86_64.rpm | 73 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-pdo-5.3.3-3.el6_2.8.x86_64 1/1

Installed:
php-pdo.x86_64 0:5.3.3-3.el6_2.8

Complete!
[root@linggih ~]#
[/bash]

PHP_PDO_SHARED=1 yum install php-pdo_mysql

[bash]
[root@linggih ~]# PHP_PDO_SHARED=1 yum install php-pdo_mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.biz.net.id
* extras: centos.biz.net.id
* updates: centos.idrepo.or.id
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.3.3-3.el6_2.8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-mysql x86_64 5.3.3-3.el6_2.8 updates 79 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 79 k
Installed size: 215 k
Is this ok [y/N]: y
Downloading Packages:
php-mysql-5.3.3-3.el6_2.8.x86_64.rpm | 79 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-mysql-5.3.3-3.el6_2.8.x86_64 1/1

Installed:
php-mysql.x86_64 0:5.3.3-3.el6_2.8

Complete!
[root@linggih ~]#
[/bash]

Restart Apache

service httpd restart atau /etc/init.d/httpd restart

[bash collapse="false"]
[root@linggih ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using linggih.sytes.net for ServerName
[ OK ]
[root@linggih ~]#
[/bash]

Cek php extention. pdo_mysql (lihat pada baris ke-26)

php -me

[bash highlight="26"]
[root@linggih ~]# php -me
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
zip
zlib

[Zend Modules]

[root@linggih ~]#
[/bash]

Semoga bermanfaat...
:D
Loncat ke Atas ↑