Wednesday, October 7, 2015

INFO VERSI CENTOS/REDHAT

# cat /etc/redhat =release
atau
# uname -a

MENGAKTIFKAN KONEKSI INTERNET DI CENTOS

Dengan asumsi bahwa Gateway internet di IP Address 192.168.5.240 dengan IP CLIENT STATIC

KONFIGURASI FILE :
# vi /etc/sysconfig/network
tambahkan : GATEWAY 192.168.5.240

# vi /etc/sysconfig/network-scripts/ifcfg-eth0
ubah BOOTPROTO = static

# vi /etc/resolv.conf
tambahkan :
nameserver : 192.168.5.240
nameserver : 8.8.8.8

#/etc/init.d/network restart

KONFIGURASI ASTERISK DI UBUNTU (IMPLEMENTASI VOIP)

FILE KONFIGURASI :
 # vi /etc/asterisk/sip.conf
[dany]
type=friend
context=kktvoip
username=dany
secret=asdfg
host=dynamic

# vi /etc/asterisk/extensions.conf
[kktvoip]
exten => 111,1,Dial(SIP/dany)


RESTART SERVICE :
/etc/init.d/asterisk restart

Mengaktifkan mod_rewrite Apache di CentOs 5.8

1. Buka config httpd dengan editor pada direktori /etc/httpd/conf/httpd.conf
# vi /etc/httpd/conf/httpd.conf


2. Pastikan modul rewrite aktif (tidak ada tanda # di awal baris) dengan memeriksa baris berikut
LoadModule rewrite_module modules/mod_rewrite.so

3. Scroll ke bawah, dan cari bagian <Directory "/var/www/html"> lalu ganti
AllowOverride None
    Menjadi
AllowOverride All

4. Simpan file hasil perubahan.

5. Restart apache/httpd dengan perintah
service httpd restart

PHP Increase Upload File Size Limit

Your php installation putting limits on upload file size. The default will restrict you to a max 2 MB upload file size. You need to set the following two configuration options:

  1. upload_max_filesize - The maximum size of an uploaded file.
  2. memory_limit - This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.
  3. post_max_size - Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size.
  4. There are two methods two fix this problem.

Method # 1: Edit php.ini

# vi /etc/php.ini

memory_limit = 32M
upload_max_filesize = 10M
post_max_size = 20M

 

Method #2: Edit .htaccess

# vi /home/httpd/html/.htaccess 

php_value upload_max_filesize 10M
php_value post_max_size 20M
php_value memory_limit 32M

 

 

    PhpMyAdmin 4.2.2 Released – Install for Apache or Nginx on RHEL/CentOS 6.5/5.9 Fedora 20-12

    Step 1: Install Required Repositories for PhpMyAdmin 4.2.2

    [For RHEL/CentOS 6.5/5.9 – 32 Bit OS]
    ## Epel Dependency on RHEL/CentOS 6 ##
    # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    
    ## Remi Dependency on RHEL/CentOS 6 ##
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    
    ## Epel Dependency on RHEL/CentOS 5 ##
    # rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
    
    ## Remi Dependency on RHEL/CentOS 5 ##
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
     
    [For RHEL/CentOS 6.5/5.9 – 64 Bit OS]
    ## Epel Dependency on RHEL/CentOS 6 ##
    # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    
    ## Remi Dependency on RHEL/CentOS 6 ##
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    
    ## Epel Dependency on RHEL/CentOS 5 ##
    # rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
    
    ## Remi Dependency on RHEL/CentOS 5 ##
    # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
     
    [For Fedora 20-12]
    ## Remi Dependency on Fedora 20,19,18,17,16,15,14,13,12 ##
    # rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm 
    # rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
    
    ## Remi Dependency on Fedora 20 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-20.rpm
    
    ## Remi Dependency on Fedora 19 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-19.rpm
    
    ## Remi Dependency on Fedora 18 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-18.rpm
    
    ## Remi Dependency on Fedora 17 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-17.rpm
    
    ## Remi Dependency on Fedora 16 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-16.rpm
    
    ## Remi Dependency on Fedora 15 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-15.rpm
    
    ## Remi Dependency on Fedora 14 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm
    
    ## Remi Dependency on Fedora 13 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm
    
    ## Remi Dependency on Fedora 12 ##
    rpm -Uvh http://rpms.famillecollet.com/remi-release-12.rpm
     

    Step 2: Install PhpMyAdmin 4.2.2

    # yum --enablerepo=remi install phpmyadmin
     
    Note : If your are using PHP 5.4 on RHEL/CentOS systems, then you need to run the below command to install it.
    # yum --enablerepo=remi,remi-test install phpmyadmin
     

    Step 3: Configuring PhpMyAdmin for Apache 

    In Apache you don’t need to setup any Virtual Host for phpMyAdmin, because you will get working phpMyAdmin automatically. The main configuration file is located under /etc/httpd/conf.d/phpMyAdmin.conf.

    Step 4: Restarting Apache 

    # /etc/init.d/httpd restart
    OR
    # service httpd restart
     

    Step 5: Starting PhpMyAdmin

    http://localhost/phpmyadmin.

     

     

     

     

     

    Install Apache 2.2.15, MySQL 5.5.34 & PHP 5.5.4 on RHEL/CentOS 6.4/5.9 & Fedora 19-12

    Step 1: Installing Remi Repository

    ## Install Remi Repository on Fedora 19, 18, 17, 16, 15 ##
    rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm 
    rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
    
    
    ## Fedora 19 ##
    # rpm -Uvh http://rpms.famillecollet.com/remi-release-19.rpm
    
    ## Fedora 18 ##
    # rpm -Uvh http://rpms.famillecollet.com/remi-release-18.rpm
    
    ## Fedora 17 ##
    # rpm -Uvh http://rpms.famillecollet.com/remi-release-17.rpm
    
    ## Fedora 16 ##
    # rpm -Uvh http://rpms.famillecollet.com/remi-release-16.rpm
    
    ## Fedora 15 ##
    # rpm -Uvh http://rpms.famillecollet.com/remi-release-15.rpm
    
    ## Fedora 14 ##
    # rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm
    
    ## Fedora 13 ##
    # rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm
    
    ## Fedora 12 ##
    # rpm -Uvh http://rpms.famillecollet.com/remi-release-12.rpm
    
    ## Install Remi & Epel Repository on RHEL/CentOS 6.4-6.0 - 32 Bit ##
    rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 
    
    ## Install Remi & Epel Repository on RHEL/CentOS 6.4-6.0 - 64 Bit ##
    rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 
    
    ## Install Remi Repository on RHEL/CentOS 5.9-5.0 - 32 Bit ##
    rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
    rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
    
    ## Install Remi Repository on RHEL/CentOS 5.9-5.0 - 64 Bit ##
    rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
    rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
     
    
    

    Step 2: Installing Apache 2.2.15, MySQL 5.5.34 & PHP 5.5.4

    ## Installing on Fedora 12, 13, 14, 15, 16, 17, 18, 19 ##
    # yum --enablerepo=remi install httpd mysql mysql-server php php-common
    
    ## Installing on RHEL/CentOS 5-6 ##
    # yum --enablerepo=remi,remi-test install httpd mysql mysql-server php php-common
     

    Step 3: Installing PHP 5.5.4 Modules

    ## Installing on Fedora 12, 13, 14, 15, 16, 17, 18, 19 ##
    # yum --enablerepo=remi install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo
    
    ## Installing on RHEL/CentOS 5-6 ##
    # yum --enablerepo=remi,remi-test install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo

     

    Step 4: Starting/Stopping Apache & MySQL

    ## Enable Apache and MySQL on Run-Levels ##
    # chkconfig --levels 235 httpd on
    # chkconfig --levels 235 mysqld on
    
    ## Apache Commands ## 
    # /etc/init.d/httpd start
    # /etc/init.d/httpd stop
    # /etc/init.d/httpd status
    
    ## MySQL Commands ## 
    # /etc/init.d/mysqld start
    # /etc/init.d/mysqld stop
    # /etc/init.d/mysqld status
     

    Step 5: Verifying Apache 2.2.15, MySQL 5.5.34 & PHP 5.5.4

    <?php
    
         phpinfo ();
    ?>