List mirror CentOS ID

Daftar mirror CentOS Indonesia

List mirror CentOS IDSetelah backend storage saya naik, akhirnya project mirror opensource bisa dilanjutkan. Mirror CentOS di Indonesia sebenarnya sudah ada 9 yang tersebar di Jakarta, Surabaya, Jember. Tujuan membuat cermin repository FOSS adalah untuk mendukung perkembangan FOSS di tanah dan menyediakan akses download repositori yang diinginkan secara cepat karena menggunakan koneksi internet lokal Indonesia. read more…


nas

How to configure NAS using NFS on CentOS

NFS (Network File System) is a network file system protocol originally developed by Sun Microsystems in 1984, NFS allows clients to access files over the network in the same way as when accessing local storage. NFS is built on Open Network Computing Remote Procedure Call (ONC RPC) system.
NFS (Network File System) has several versions, namely:
NFS v2: version 2 was originally only uses UDP protocol and can only be allowed to read files of 2GB.
NFS v3: It supports TCP protocol and added several features that can be used to read the file more than 2GB, such as support for 64-bit offset. TCP is added in version 3 is to improve data transfer speeds on the WAN, because if you use UDP data transfer process tends to be slow.
NFS v4: Version 4 is more emphasis on security features and support for clustering as well as access to NFS in parallel over the network. Currently, the NFS version 4 is the latest version.
This article described “how to configure a NAS (Network Attach Storage) using CentOS and NFS v3, follow this step:
CentOS installation using minimal installation mode, can be read in the post “Installing CentOS minimal mode”

If the internet connection is quite large> 512 / if patiently waiting for her please update CentOS:

$ sudo yum update -y $ Sudo yum-y update

Install NFS Install NFS

$ sudo yum install nfs* $ Sudo yum install nfs *

Create a directory to be used or accessed by the client, here I make the partition “/ data” as the drive used for storage servers:

$ sudo mkdir /data/node1 $ Sudo mkdir / data/node1
$ sudo chmod -R 777 /data/node1 $ Sudo chmod-R 777 / data/node1

Kemudian setting hak akses network ke NFS server, untuk parameter seperti ini “/path-server      ip-network-allowed(privileges)” Then setting network access rights to the NFS server, for the parameter like this “/ path-server ip-network-allowed (privileges)”

$ sudo vi /etc/export $ Sudo vi / etc / export
/data/node2       10.10.1.10(rw,sync,no_subtree_check) / Data/node2 10.10.1.10 (rw, sync, no_subtree_check)

Eksport hasil konfigurasi diatas: Export results above configuration:

$ sudo /usr/sbin/exportfs -avr $ Sudo / usr / sbin / exportfs-avr
$ sudo /etc/init.d/portmap restart $ Sudo / etc / init.d / portmap restart
$ sudo /etc/init.d/nfs restart $ Sudo / etc / init.d / nfs restart
$ sudo /sbin/chkconfig –level 35 portmap on $ Sudo / sbin / chkconfig-level 35 portmap on
$ sudo /sbin/chkconfig –level 35 nfs on $ Sudo / sbin / chkconfig-level 35 nfs on

For a security feature can use permissions in the “hosts.allow”:

$ sudo vi /etc/hosts.allow $ Sudo vi / etc / hosts.allow
portmap: 10.10.1.10, 192.168.10.2 portmap: 10.10.1.10, 192.168.10.2

Then the client side that needs to be done is to install the client nfs and portmap. Portmap is used in the NFS version 3 but version 4 does not need it because it can use the authentication method. I use CentOS 5.5 as client:

$ sudo yum install nfs $ Sudo yum install nfs
$ sudo yum install portmap $ Sudo yum install portmap
$ sudo /etc/init.d/portmap start $ Sudo / etc / init.d / portmap start
$ sudo /sbin/chkcongfig –level 35 portmap on $ Sudo / sbin / chkcongfig-level 35 portmap on

Check if the export on the NFS server is working and see also the right aksesya:

$ sudo showmount -e nas-server $ Sudo showmount-e nas-server
Export list for nas-server: Export list for nas-server:
/data/node1    10.10.1.10 / Data/node1 10.10.1.10

Okay, then mount to a local directory (client), but first create a local directory that will be used as a mount point to the NAS, be careful if you use the following options, because the local directory under / (root partition), then if the mountin to loose nas then all activity data from the client will be write to local directory (/ mynas) so that if a small root partition rather risky. Saya sendiri menggunakan partisi / (root) hanya berkisar antara 8-10GB saya tetap melakukan mounting dengan local directory dibawah root :D, like this: I myself use a partition / (root) only ranges between 8-10GB I want to do with mounting a local directory under the root: D, like this:

$ sudo mkdir /mynas $ Sudo mkdir / mynas
$ sudo mount nas-server:/data/node1 /mynas $ Sudo mount nas-server: / data/node1 / mynas
$ df -h $ Df-h
Filesystem            Size  Used Avail Use% Mounted on Filesystem Size Used Avail Use% Mounted on
/dev/md1              9.5G  691M  8.3G   8% / / Dev/md1 9.5G 691M 8.3G 8% /
/dev/md7              292G   86G  192G  31% /home / Dev/md7 292G 86G 192G 31% / home
/dev/md6               95G   32G   59G  35% /backup / Dev/md6 32g 95G 59G 35% / backup
/dev/md5              2.0G  170M  1.7G  10% /tmp / Dev/md5 170m 2.0G 1.7G 10% / tmp
/dev/md3               38G  3.6G   33G  10% /var / Dev/md3 33g 38G 3.6G 10% / var
/dev/md2               15G  3.9G  9.7G  29% /usr / Dev/md2 15G 3.9G 9.7G 29% / usr
/dev/md0              243M   24M  207M  11% /boot / Dev/md0 243M 207M 24m 11% / boot
tmpfs                 2.0G     0  2.0G   0% /dev/shm tmpfs 2.0G 0 2.0G 0% / dev / shm
nas-server:/data/node1      857G  696G  117G  86% /mynas nas-server: / data/node1 857G 696G 117G 86% / mynas

Here the process of setting and configuration of NAS with NFS server has been completed, may be useful:)


Problem installing ruby rails on CentOS 5.5

I try to install ruby on rails using a repository CentOS 5.5 rubyworks:

[rubyworks]
name=RubyWorks
baseurl=http://rubyworks.rubyforge.org/redhat/$releasever/RPMS/$basearch
enabled=1
gpgcheck=1
gpgkey=http://rubyworks.rubyforge.org/RubyWorks.GPG.key
priority=1

I using yum to install ruby and rubygems

# yum install ruby ruby-devel ruby-libs ruby-irb ruby-rdoc ruby-mysql rubygems

And I need to install rails using gem

# gem install rails

But I had the following error that can’t solve :(

# gem install rails –source http://gems.opscode.com
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
ERROR:  could not find rails locally or in a repository
# gem source -a http://gems.opscode.com
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
http://gems.opscode.com added to sources
# gem install rails
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
ERROR:  could not find rails locally or in a repository
# gem update –system
Updating RubyGems…
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
Attempting remote update of rubygems-update
ERROR:  could not find rubygems-update locally or in a repository
ERROR:  While executing gem … (NoMethodError)
undefined method `version’ for nil:NilClass
# gem –source http://gems.github.com
ERROR:  Invalid option: –source.  See ‘gem –help’.
# gem –source http://gemcutter.org/
ERROR:  Invalid option: –source.  See ‘gem –help’.
# gem source -a http://gemcutter.org/
ERROR:  While executing gem … (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gemcutter.org/yaml
# gem source -a http://gems.github.com
Bulk updating Gem source index for: http://gems.github.com
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
http://gems.github.com added to sources
# gem install rails
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
Bulk updating Gem source index for: http://gems.github.com
ERROR:  could not find rails locally or in a repository

search results suggest to reinstall rubygems from source:

# wget wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz

# tar -zxvf rubygems-1.3.7.tgz

# cd rubygems-1.3.7

# ruby setup.rb

# gem update –system

# update_rubygems

# gem sources -a http://gems.opscode.com
# gem sources -a http://rubygems.org

# gem update –system

# gem install rails

And I still get the following error message:

ERROR:  could not find gem rails locally or in a repository

How can fix it?


service-setup

CentOS Minimal Service

Tips dibawah ini saya peroleh sekitar 2 tahun lalu dan sepertinya pernah saya posting di forum dan main blog saya here, dan disini saya posting ulang karena memang dalam rangka migrasi blog berbahasa lokal ke bahasa barat (masih nyari translater yg yahud) :P. CentOS minimal service diperlukan untuk mengoptimalkan resource system agar tidak ada useless service yang memperberat system. Tips CentOS minimum service dibawah ini biasa saya gunakan mengurangi service yang tidak berguna, dan bisa digunakan untuk varian linux lainnya :)

Check service yang running saat booting di chkconfig:

sudo /sbin/chkconfig –list |grep “3:on” |awk ‘{print $1}’ |sort

Matikan service yang tidak perlu running di runlevel 35:

sudo /sbin/chkconfig anacron off
sudo /sbin/chkconfig apmd off
sudo /sbin/chkconfig atd off
sudo /sbin/chkconfig autofs off
sudo /sbin/chkconfig avahi-daemon off
sudo /sbin/chkconfig bluetooth off
sudo /sbin/chkconfig cpuspeed off
sudo /sbin/chkconfig cups off
sudo /sbin/chkconfig firstboot off
sudo /sbin/chkconfig gpm off
sudo /sbin/chkconfig haldaemon off
sudo /sbin/chkconfig hidd off
sudo /sbin/chkconfig ip6tables off
sudo /sbin/chkconfig isdn off
sudo /sbin/chkconfig mcstrans off
sudo /sbin/chkconfig mdmonitor off
sudo /sbin/chkconfig messagebus off
sudo /sbin/chkconfig netfs off
sudo /sbin/chkconfig nfslock off
sudo /sbin/chkconfig openibd off
sudo /sbin/chkconfig pcmcia off
sudo /sbin/chkconfig pcscd off
sudo /sbin/chkconfig portmap off
sudo /sbin/chkconfig rawdevices off
sudo /sbin/chkconfig readahead_early off
sudo /sbin/chkconfig rpcgssd off
sudo /sbin/chkconfig rpcidmapd off
sudo /sbin/chkconfig smartd off
sudo /sbin/chkconfig sendmail off
sudo /sbin/chkconfig xinetd off
sudo /sbin/chkconfig xfs off
sudo /sbin/chkconfig yum-updatesd off

*disable service di runlevel 3 – 5 dapat meringankan beban pikiran :D


bridge

Linux Ethernet Bridging

Bridge adalah jembatan, begitu pula fungsi ethernet bridging di sistem operasi yaitu untuk menghubungkan paket data dan meneruskannya ke tujuan layaknya mobil yang melewati jembatan, ethernet bridging biasanya diimplementasikan sebagai transparent firewall atau traffic shapper sedangkan saya sendiri menggunakan ethernet bridging ini untuk kedua fungsi diatas. Berikut kutipan dari websitenya:

Ethernet bridging is a way to connect networks together to form a larger network. The standard for bridging is ANSI/IEEE 802.1d. A bridge is a way to connect two separate network segments together in a protocol-independent way. Packets are forwarded based on Ethernet address, rather than IP address (like a router). Since forwarding is done at Layer 2, all protocols can go transparently through a bridge.

Lagi-lagi hal ini saya lakukan under CentOS 5.5 Final release dengan menggunakan intel Pentium 3 880Mhz RAM 256 HDD 10GB 2 buah lancard intel gigabyte. Paket aplikasi yang diinstall adalah bridge-utils, let’s do it:

# yum install bridge-utils
Setelah menyimpan semua konfigurasi diatas sebaiknya create dulu interface untuk bridging yang akan dinamai br0, dan kita assign eth0 dan eth1 ke bridge interface br0.
# brctl addbr br0
# brctl addif br0 eth0
# brctl addif br0 eth1
Buat konfigurasi bridge interface /etc/sysconfig/network-scripts/ifcfg-br0:
# vi  /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
IPADDR=10.173.65.5
GATEWAY=10.173.65.1
NETMASK=255.255.255.248
ONBOOT=yes
Kemudian ubah konfigurasi eth0 dan eth1
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=ETHER
BRIDGE=br0
ONBOOT=yes
# vi etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
TYPE=ETHER
BRIDGE=br0
ONBOOT=yes
Selanjutnya restart service network:
# /etc/init.d/network restart
Selanjutnya lihat konfigurasi IP address dengan ifconfig seharusnya muncul parameter bro sesuai dengan konfigurasi bridge interface diatas:
# ifconfig |more
br0       Link encap:Ethernet  HWaddr 00:22:9A:5C:0T:2D
inet addr:10.173.65.5  Bcast:10.173.65.7  Mask:255.255.255.248
inet6 addr: fe80::226:5aff:fe6c:e2c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:6035 errors:0 dropped:0 overruns:0 frame:0
TX packets:357 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:338318 (330.3 KiB)  TX bytes:46389 (45.3 KiB)
Hope this useful :)
Originally posted at http://pnyet.web.id