Monday, December 22, 2014

How to install software or upgrade from an old unsupported release?

The repositories for older releases that are not supported (like 11.04, 11.10 and 13.04) get moved to an archive server. There are repositories available at http://old-releases.ubuntu.com
The reason for this is that it is now out of support and no longer receiving updates and security patches.
I would urge you to consider a supported distribution. If your computer is too old in terms of memory or processor then you should consider a distribution such as Lubuntu or Xubuntu.
If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com to old-releases.ubuntu.com
You can do this with sed
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
then update with
sudo apt-get update && sudo apt-get dist-upgrade
Sometimes, it might be faster to create backups of your system and reinstall using supported release instead.
source

To upgrade to a new release:

Once you have performed the above steps to switch to the old-releases mirrors, update the Update Manager and then do do-release-upgrade:
sudo apt-get update
sudo apt-get install update-manager-core
sudo do-release-upgrade
 
Source : http://askubuntu.com/questions/91815/how-to-install-software-or-upgrade-from-an-old-unsupported-release 

Managing Volume Groups

LVM – Volume Group Management on CentOS 6

LVM quickly explained:

In computer storage, logical volume management or LVM provides a method of allocating space on mass-storage devices that is more flexible than conventional partitioning schemes. In particular, a volume manager can concatenate, stripe together or otherwise combine partitions into larger virtual ones that administrators can re-size or move, potentially without interrupting system use.
As seen in the LVM design scheme, Physical Volumes (PV) are the bottom layer of LVM. The second layer are Volume Groups (VG) and the final, third layer are Logical Volumes (LV). In Part 1 (LVM – Physical Volume Management on CentOS 6) we learned how to manage PV’s and already prepared PV’s to be added to Volume Groups (VG’s). This example is continuation of Part 1 (LVM – Physical Volume Management on CentOS 6).
Here is the basic design scheme:
LVM Volume Groups scheme (source: RedHat.com)
LVM Volume Groups scheme (source: RedHat.com)

Volume Group Management is a part 2/3 of LVM Management on CentOS 6!

In this post we will learn how to create, delete, extend, reduce, rename, merge, split and change Volume Groups (VG). We will learn how to prepare Volume Groups for Logical Volumes.

Let’s start our Volume Group Management on CentOS 6 guide!

For this example we have 3 additional hard drives:/dev/sdb (1GB), /dev/sdc (2GB) and /dev/sdd (3GB). /dev/sda2 is a pre-existing PV on my system that holds the system root and swap partition.

1. Displaying Volume Groups

We can display all Volume Groups (VG’s) on the system with the “vgdisplay” command:
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

We can also display Volume Groups with “vgscan” or “vgs” commands, but as we see the output is a bit different – in following example i will be using “vgdisplay“, because it gives me the most info:
[root@foo ~]# vgscan
 Reading all physical volumes. This may take a while...
 Found volume group "vg_foo" using metadata type lvm2
[root@foo ~]# vgs
 VG #PV #LV #SN Attr VSize VFree
 vg_foo 1 2 0 wz--n- 14.51g 0

We see there is currently only one existing Volume Group present. This VG is called vg_foo and is the VG, that holds the system root and swap partition. With the “vgdisplay” command we se additional info – VG size, PE size, Total PE,… This is the Physical Extent. A number of Physical Extents builds the Physical Volume.

2. Adding a Physical Volume to Volume Groups

We add PV’s to Volume Groups (VG’s) using “vgcreate name /dev/harddisk” command. It is very simple, no additional parameters are needed. Let’s see an example of creating a new VG called “geekpeek” and add /dev/sdb and /dev/sdc PV’s to it:
[root@foo ~]# vgcreate geekpeek /dev/sdb /dev/sdc
 Volume group "geekpeek" successfully created
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 2
 Metadata Sequence No 1
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 2
 Act PV 2
 VG Size 2.99 GiB
 PE Size 4.00 MiB
 Total PE 766
 Alloc PE / Size 0 / 0
 Free PE / Size 766 / 2.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

We can see that VG was successfully created. We can also see the full state of the “geekpeek” VG – VG size, Total PE, PE size, …

3. Extending Volume Groups

We can extend a Volume Group with “vgextend” command. The simple syntax is “vgextend name /dev/harddisk“. By extending VG you add PV’s to it and extend VG’s size. In our example we will extend VG called “geekpeek” from 2.99GB to 5.99GB by adding /dev/sdd PV:
[root@foo ~]# vgextend geekpeek /dev/sdd
 Volume group "geekpeek" successfully extended
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 3
 Metadata Sequence No 2
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 3
 Act PV 3
 VG Size 5.99 GiB
 PE Size 4.00 MiB
 Total PE 1533
 Alloc PE / Size 0 / 0
 Free PE / Size 1533 / 5.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

4. Reducing Volume Groups

We can reduce a Volume Group with “vgreduce” command. The simple syntax is “vgreduce name /dev/harddisk“. By reducing VG you remove PV’s from it and reduce VG’s size. In our example we will reduce VG called “geekpeek” from 5.99GB to 2.99GB by removing /dev/sdd PV:
[root@foo ~]# vgreduce geekpeek /dev/sdd
 Removed "/dev/sdd" from volume group "geekpeek"
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 2
 Metadata Sequence No 5
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 2
 Act PV 2
 VG Size 2.99 GiB
 PE Size 4.00 MiB
 Total PE 766
 Alloc PE / Size 0 / 0
 Free PE / Size 766 / 2.99 GiB
 VG UUID i339tr-lqNb-OKra-1FE2-UZ82-A1TI-t8w7BT
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

5. Splitting Volume Groups

We can split Volume Group with “vgsplit” command. The simple syntax is “vgsplit name newname /dev/harddisk“. By splitting VG you remove PV’s from it and reduce VG’s size. In our example we will split VG called “geekpeek” and create a new VG called “splitgeek“:
[root@foo ~]# vgsplit geekpeek splitgeek /dev/sdd
 New volume group "splitgeek" successfully split from "geekpeek"
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name splitgeek
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 2
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 3.00 GiB
 PE Size 4.00 MiB
 Total PE 767
 Alloc PE / Size 0 / 0
 Free PE / Size 767 / 3.00 GiB
 VG UUID 1ZvPM3-3jgO-0t1e-r4I1-Sxw2-vhUM-clGQLg
--- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 2
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 2
 Act PV 2
 VG Size 2.99 GiB
 PE Size 4.00 MiB
 Total PE 766
 Alloc PE / Size 0 / 0
 Free PE / Size 766 / 2.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

6. Merging Volume Groups

In the next step we will merge the split Volume Groups (VG’s) back together. We can merge VG’s with “vgmerge” command. The simple syntax is “vgmerge name1 name2“:
[root@foo ~]# vgmerge geekpeek splitgeek
 Volume group "splitgeek" successfully merged into "geekpeek"
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 3
 Metadata Sequence No 4
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 3
 Act PV 3
 VG Size 5.99 GiB
 PE Size 4.00 MiB
 Total PE 1533
 Alloc PE / Size 0 / 0
 Free PE / Size 1533 / 5.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

7. Changing Volume Groups

We can change Volume Group parameters with “vgchange” command. The simple syntax is “vgchange name -parameter value“. By changing VG’s you can change VG’s parameters – check “vgchange –help” for more info. In our example we will change PE size of our VG called “geekpeek“:
[root@foo ~]# vgchange geekpeek -s 2048KB
 Volume group "geekpeek" successfully changed
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 3
 Metadata Sequence No 8
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 3
 Act PV 3
 VG Size 5.99 GiB
 PE Size 2.00 MiB
 Total PE 3066
 Alloc PE / Size 0 / 0
 Free PE / Size 3066 / 5.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

We can see that we have successfully changed Total PE size of VG from 4.00MBiB to 2.00MiB.

8. Remaning Volume Groups

We can rename Volume Group with “vgrename” command. The simple syntax is “vgrename name1 name2“. In our example we will rename our VG called “geekpeek” to “renamegeek“:
[root@foo ~]# vgrename geekpeek renamegeek
 Volume group "geekpeek" successfully renamed to "renamegeek"
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name renamegeek
 System ID
 Format lvm2
 Metadata Areas 3
 Metadata Sequence No 9
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 3
 Act PV 3
 VG Size 5.99 GiB
 PE Size 2.00 MiB
 Total PE 3066
 Alloc PE / Size 0 / 0
 Free PE / Size 3066 / 5.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

We can see that we have successfully renamed VG “geekpeek” to “renamegeek“.

9. Removing Volume Groups

We can remove Volume Groups (VG’s) with “vgremove” command. The simple syntax is “vgremove name“. In our example we will remove VG called “geekpeek“:
[root@foo ~]# vgremove geekpeek
 Volume group "geekpeek" successfully removed.
[root@foo ~]# vgdisplay
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

Before you manage your Volume Groups make appropriate reconfiguration of the Logical Volumes! If not, you can loose or corrput your data!


Source : http://geekpeek.net/lvm-volume-group-management/

Tuesday, April 15, 2014

Simple & easy way to jail users | Ubuntu

Jailkit is a set of utilities that can limit user accounts to a specific directory tree and to specific commands. Setting up a jail is much easier using the jailkit utilities that doing so 'by hand'. A jail is a directory tree that you create within your file system; the user cannot see any directories or files that are outside the jail directory. The user is jailed in that directory and it subdirectories.

Setup the compiler :
Centos       : yum groupinstall "Development Tools"

Ubuntu : apt-get install build-essential

Download & Install
# cd /tmp
# wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz
# tar -zxvf jailkit-2.11.tar.gz
# cd jailkit-2.11
# ./configure
# make
# make install
Setting up the jail
make clean
export LDFLAGS="-pthread"
./configure && make

Now it’s time to set up the jail directory. Jailed users will see this directory as the root directory of the server. I chose to use /home/jail:
# mkdir /home/jail
# chown root:root /home/jail
# jk_init -v /home/jail basicshell
# jk_init -v /home/jail netutils
# jk_init -v /home/jail ssh
# jk_init -v /home/jail jk_lsh
Add a user
Add a new user with a home directory and bash shell, and set the password:
# useradd -d /home/testuser -m testuser -s /bin/bash
# passwd testuser
Now it’s time to jail this user, use the following command:
# jk_jailuser -m -j /home/jail testuser
Your /etc/passwd should contain something like this now:
testuser:x:1001:1001::/home/jail/./home/testuser:/usr/sbin/jk_chrootsh
Enable bash
By using jk_cp the bash libraries are be copied to the jail:
# jk_cp -v -f /home/jail /bin/bash
Now edit the /home/jail/etc/passwd file and make sure it contains something like this:
testuser:x:1001:1001::/home/testuser:/bin/bash
Maintenance
By using jk_update updates on the real system can be updated in the jail. A dry-run will >show what’s going on:
# jk_update -j /home/jail -d
Help Taken
This is been checked & verified , Working Properly

Wednesday, March 12, 2014

Unlock Modem CDMA Huawei EC156 (Modem Esia Max-D)

Modem Huawei EC156 bundlingan Esia Max-D

Modem ini pun sekarang bisa di pakai untuk kartu flexi EVDO.

Bumbu Bumbu Masakan :
1. Modem Huawei EC156 bundlingan Esia Max-D
2. Rempah Rempah Penyedap

Selanjut nya setelah bumbu masakan sudah siap semua, marilah kita memasak :D

Langkah Langkah Penting :
1. Ekstrak file Rempah Rempah Penyedap.

2. Install program DFS 3.3 dari folder diatas.

3. Tancapkan modem Huawei EC156 ke komputer.

4. Buka program DFS 3.3 yang telah diinstal tadi, lalu tekan tombol "port" (di bagian kiri atas), lalu pilih lah "Huawei Mobile Connect - Application Interface"

5. Tekan tombol SPC (dibagian kiri atas di bawah tombol "port"), maka akan muncul tulisan error di bagian bawah.

6. Klik tab "Memory" lalu di pilihan "Type", pilih lah "CEFS", kemudian pilih tombol "Read"

7. Setelah proses read selesai, pilih lah kolom "SPC1", kemudian akan muncul daftar alamat SPC yang memungkinkan (akan muncul 6 kolom), pilih lah kolom paling terakhir sendiri, dan kode SPC akan muncul di jendela hitam tengah.

8. Masukkan kode SPC yang kita peroleh tersebut ke dalam kolom di sebelah  tombol SPC (dibagian kiri atas di bawah tombol "port")

9. Tekan lagi tombol SPC (dibagian kiri atas di bawah tombol "port"), kali ini akan muncul tulisan "DEVICE UNLOCKED" di bagian bawah.

10. Sekarang klik tab "Programming", lalu tekan tombol "READ" di kolom SPC, setelah itu gantilah kode SPC nya dengan "000000" (tanpa tanda petik). Kemudian tekan tombol "WRITE"

11. JANGAN lupa catat MEID modem tersebut (kalau tidak tahu, MEID ada di sticker di doos modem, atau bisa read dari kolom MEID di langkah 10)

12. Bukalah program CDMA FLASH, lalu masukkan MEID yang tadi telah di catat, lalu tekan tombol calculate flash. akan muncul password untuk dimasukkan ke langkah selanjutnya.

13. Tutup lah program DFS, lalu buka lah file hasil ekstrak tadi "EC156Update_11.106.00.06.000.B416.exe", ikuti petunjuk nya, di next next aja, sampai di suruh masukkan password, masukkanlah password yang telah diperoleh dari langkah 12.

14. Tunggu sampai proses update selesai, maka modem Huawei EC156 anda telah berhasil di unlock :)

Setelah di unlock, aplikasi dashboardnya tetap menggunakan dashboad AHA dan sinyal nya akan tetap muncul AHA meskipun menggunakan kartu flexi, dan modem tetap bisa di pakai ke portable router Hame A1.

Do It With Your Own Risk

Source : http://saux70.blogspot.com/2013/05/unlock-modem-cdma-huawei-ec156-modem.html

Monday, March 10, 2014

Old Repository Ubuntu Maverick

Karena dukungan mirror repo ubuntu lokal hanya 1 tahun dan artinya sekarang link sudah tidak berlaku, maka saya ambil repo old-release dari official ubuntu. Berikut langkah-langkahnya :

1. Backup file /etc/apt/sources.list. Open terminal and type command in below:

# cp /etc/apt/sources.list /etc/apt/sources.list.backup

2. Erase list repository and replace with this repository in below:

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ maverick main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ maverick-security main restricted universe multiverse

# Optional
#deb http://old-releases.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
#deb http://old-releases.ubuntu.com/ubuntu/ maverick-proposed main restricted universe multiverse 

3. Save and Finish! Now you type command in below:

# sudo apt-get update

Enjoy!

http://askubuntu.com/questions/82291/installing-packages-to-end-of-lifed-ubuntu-editions

Meggunakan Linux Screen

Ketika anda sedang meremote sebuah server melalui ssh dan sedang menjalankan proses yang tidak bisa ditinggal dan membutuhkan waktu lama, lalu tiba-tiba koneksi anda putus, tentunya itu akan sangat menjengkelkan, dan ketika kita kembali terhubung ke server melalui ssh, proses yang kita jalankan tadi tidak bisa kita lihat lagi. Untuk itu kita perlu menggunakan bantuan “linux screen”, utilitas ini berguna untuk melanjutkan kembali sesi terminal sebelumnya, sehingga anda bisa melanjutkan pekerjaan anda walaupun koneksi terputus. Berikut tutorial singkat penggunaan linux screen.

Instalasi Linux Screen

Debian/Ubuntu
#apt-get install screen
CentOS
#yum install screen.x86_64

Cara menggunakan screen

Untuk menjalan screen, cukup ketikkan perintah “screen”
#screen
ketika anda mengetikan perintah tersebut, tidak akan terlihat perubahan yang berarti, hanya akan terjadi perubahan di title terminal anda.
linux screen tutorial
Sekarang beberapa perintah dasar menggunakan screen, perintah screen dimulai dengan menekan tombol ctrl bersamaan dengan tombol yang diperlukan,
  • ctrl+a+c : membuat sebuah sesi screen baru, sehingga anda dapat menggunakan beberapa sesi screen.
  • ctrl+a+n : beralih ke sesi screen selanjutnya (tentunya jika anda membuat beberapa sesi)
  • ctrl+a+p : beralih ke sesi screen sebelumnya
  • ctrl+a+d : melepaskan sebuah sesi screen (tanpa menghentikan proses yang berjalan di dalam screen)
  • exit : untuk mengakhiri sebuah sesi screen
Sekarang kita akan sedikit mencoba mempraktekan teori tersebut, pertama tentunya remote server anda, kemudian ketik perintah “screen”, lalu jalankan perintah yang bisa kita lihat, dalam contoh ini saya menggunakan perintah “mtr” (my trace route).

screen 0: menjalankan perintah mtr
kemudian buat sesi screen baru lagi dengan menggunakan perintah “ctrl+a+c“, lalu jalankan perintah “ping” misalnya.

screen 1: menjalankan perintah ping
sekarang cobalah berganti sesi screen sebelumnya menggunakan perintah “ctrl+a+p“, dan coba ke screen selanjutnya dengan perintah “ctrl+a+n“.
Selanjutnya adalah coba kembali ke sesi SSH biasa atau dengan kata lain deattach (bukan menghentikan screen) dengan perintah “ctrl+a+d“.
Untuk melihat daftar screen yang ada, gunakan perintah
screen -ls

melihat daftar sesi screen
Untuk menghubungkan kembali ke salah satu screen, gunakan perintah “screen -r nomor_screen“, contoh
screen -r 21588.pts-1.vps
Lalu bagaimana jika koneksi saya terputus? Tinggal koneksi saja via ssh, lalu lihat screen yang ada, kemudian hubungkan seperti langkah diatas.
Semoga bermanfaat
Regards,
Source : http://hostuner.com/linux-screen/

Friday, March 7, 2014

Blok IP Kantor

Blok IPv4 Kantor
- 117.20.48.0/20
- 202.65.112.0/20
- 202.152.128.0/19

Blok IPv6 Kantor
- 2401:ee00::/32

Thursday, January 30, 2014

Installing Apache2 With PHP5 And MySQL Support On CentOS 5.3 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a CentOS 5.3 server with PHP5 support (mod_php) and MySQL support.
I do not issue any guarantee that this will work for you!

1 Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

2 Installing MySQL 5.0

To install MySQL, we do this:
yum install mysql mysql-server
Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
Run
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
to set a password for the user root (otherwise anybody can access your MySQL database!).

3 Installing Apache2

Apache2 is available as a CentOS package, therefore we can install it like this:
yum install httpd
Now configure your system to start Apache at boot time...
chkconfig --levels 235 httpd on
... and start Apache:
/etc/init.d/httpd start
Now direct your browser to http://192.168.0.100, and you should see the Apache2 placeholder page:

Apache's default document root is /var/www/html on CentOS, and the configuration file is /etc/httpd/conf/httpd.conf. Additional configurations are stored in the/etc/httpd/conf.d/ directory.

4 Installing PHP5

We can install PHP5 and the Apache PHP5 module as follows:
yum install php
We must restart Apache afterwards:
/etc/init.d/httpd restart

5 Testing PHP5 / Getting Details About Your PHP5 Installation

The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.
vi /var/www/html/info.php
<?php
phpinfo();
?>
Now we call that file in a browser (e.g. http://192.168.0.100/info.php):
Click to enlarge
As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet.

6 Getting MySQL Support In PHP5

To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:
yum search php
Pick the ones you need and install them like this:
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
Now restart Apache2:
/etc/init.d/httpd restart
Now reload http://192.168.0.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:
Click to enlarge

7 phpMyAdmin

phpMyAdmin is a web interface through which you can manage your MySQL databases.
First we enable the RPMforge repository on our CentOS system as phpMyAdmin is not available in the official CentOS 5.3 repositories:
On x86_64 systems:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
On i386 systems:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
phpMyAdmin can now be installed as follows:
yum install phpmyadmin
Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza):
vi /etc/httpd/conf.d/phpmyadmin.conf
#
#  Web application to manage MySQL
#
#<Directory "/usr/share/phpmyadmin">
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#</Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
Next we change the authentication in phpMyAdmin from cookie to http:
vi /usr/share/phpmyadmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
Restart Apache:
/etc/init.d/httpd restart
Afterwards, you can access phpMyAdmin under http://192.168.0.100/phpmyadmin/:

Source : http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-5.3-lamp

Monday, January 27, 2014

INSTALL AND CONFIGURE NTP SERVER ON CENTOS 5

Quick setup instructions to install and configure an NTP server:
# yum install ntp
# chkconfig ntpd on
Add the servers you want to sync from in /etc/ntp.conf. Sample:
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org
# service ntpd start
# ntpq -pn
-H