Blogger news

Social Media

Showing posts with label VPS dan Server. Show all posts
Showing posts with label VPS dan Server. Show all posts

Tuesday, June 19, 2012

[Tutorial] Error Tidak jelas pada "YUM" di Centos Linux

kemarin, saya membeli VPS Centos di salah satu vps provider, bisa dibilang harga nya murah, tapi spesifikasi nya kurang memuaskan.. sewaktu saya ingin install program-program semacam PHP, MySQL,Apache, dll. saya mendapatkan error yang tidak jelas untuk orang awam seperti saya, kurang lebih seperti ini error nya :

[root@linux ~]# yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 178, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 345, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 662, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 502, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 232, in populateSack
self.doSetup()
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 79, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 181, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 333, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 376, in _poll_mirrors
pollThread.start()
File "/usr/lib/python2.4/threading.py", line 416, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
 setelah submit ticket ke yang jual VPS dikasih tau dimana error nya, ternyata error di konfigurasi nya, yaitu di /etc/yum.conf  pada baris ke 11 (plugins=1). disuruh ganti menjadi plugins=0 .
dan, selesai... error pun hilang.

mohon maaf kalau artikel nya nggak jelas yah, karna lagi malas ngeblog juga nih..

terima kasih.

Sunday, May 27, 2012

[Newbie Only] Cara Install WinRAR (unrar) untuk linux centos

Update.. cara ini khusus newbie yah... buat yang udah expert jangan sombong ya buat yang baru belajar. :D

gampang kok...

login via putty ke vps lalu ikuti langkah di bawah ini.

1. wget http://rarlab.com/rar/rarlinux-3.7.1.tar.gz
2. tar xvzf rarlinux*
3. cd rar
4.  make
5. make install

selesai.. gampang toh :D ? untuk unrar nya googling yah :D, artike ini buat installasi aja :D

[Share] Install Remote Desktop Di CentOS 5

Ok, hampir sebulan nggak ngepos nih.. jadi langsung aja yah... kali ini gw pgn ngasih tutorial installasi VNC di centos linux 5.x  step nya cukup panjang... terserah mao versi download PDF juga boleh :

Persiapan :
- Sebuah VPS ber os linux Centos 5.x (yg gw pake 5.8)
- PuttY (Koneksi SSH ke VPS anda)

Steps :
1. Konek ke VPS anda menggunakan PuttY seperti biasa, masukan username & password setelah selesai Lanjut ke langkah 2


2. ketik command di bawah ini pada PuTTY
Code:
 yum groupinstall "X Window System"
yum groupinstall "GNOME Desktop Environment"
jika di step ini ente mendapatkan error “Error: Missing Dependency: libgaim.so.0 is needed by package nautilus-sendto” ketika menginstall GNOME Desktop Enviroment, silakhan install manual nautilus-sendto cara :
Code:
 yum install yum-utils
yumdownloader nautilus-sendto
rpm -Uvh --nodeps nautilus-sendto [Tekan TAB]
3. VNC Server akan terinstall dgn X-Windows System. trus, langkah akhir yaitu edit config VNC nya, dgn cara :
Code:
 vi /etc/sysconfig/vncservers 
dan lihat baris :
Code:
 VNCSERVERS="2:root" 
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost 
Di baris pertama, menunjukkan "VNCSERVER="2:root" yang berarti ente akan connect ke vps via port 2 . baris kedua menunjukkan resolusin nya.. bisa di edit sesuai selera.

4.  Sekarang,VNC Server hampir selesai. sekarang kita akan memberikan password utk keamanan :
Code:
 vncpasswd 
Berikan password sesuai selera. saja..

5. Jalankan VNC :
Code:
 vncserver :2 
inget :2 itu port yang akan digunakan utk connect, pastikan available dan ga digunakan ya. 6. Upps... ga secepat itu.. sekarang kita kill dulu process VNC nya.. kita menjalankan VNC hanya utk benar2 work atau tidak. :
Code:
 vncserver -kill :2 
7. sekarang, edit local config file di root folder
Code:
 vi ~/.vnc/xstartup 
Cari baris yang bertuliskan " twm & " rubah menjadi " gnome-session & ". simpan file nya. 8. ok.. sekarang kita start lagi vnc nya :
Code:
 vncserver :2 
9. ok.. sekarang kita udah bisa connect ke server.. connect pake software bernama "RealVNC" jadi konek via soft vnc nya :
Code:
 Ipanda:2 
oke.. sampe sini dulu ya.. kalo ada yang gak dimengerti tanya saja ya. Next Akan di Share untuk CentOS 6

Thursday, April 26, 2012

setting VPS dari nol(awal)…. Khusus Pemula

oke... kali ini ane akan membahas gimana cara  Setting VPS / VDS Dari Awal, (Basic Installation). Server Yang Saya Pake CentOS 5.7 , bisa versi berapa saja. oke langsung aja  :

1.Install WebMin ( kalau punya duid sewa CPanel/WHM lebih enak dan mudah dipakai untuk awal.
Webmin ini digunakan untuk memanage server dengan mudah tanpa kita harus selalu ketik command di shell. Cek RPM Webmin terbaru di website resmi webmin. Login ke Shell. Gunakan Putty atau program lainnya yang support dan secure.
yum -y install perl-Net-SSLeay
cd /tmp
wget http://internode.dl.sourceforge.net/sourceforge/webadmin/webmin-1.430-1.noarch.rpm
rpm – i webmin-1.430-1.noarch.rpm
/etc/init.d/webmin start
/usr/libexec/webmin/changepass.pl /etc/webmin admin password_baru
2. Buka browser masuk ke : http://ipkamu:10000
Login dengan username admin dan password sesuai dengan password_baru.
3. Install Apache
Klik menu Server->Apache Webserver. Ada bagian bertuliskan
“Click here to have it downloaded and installed using YUM.”
Klik disana dan Apache akan diinstallkan dengan cepat dan otomatis.
Klik tombol Start setelah konfirmasi installasi sukses.
4. Install MySQL
Klik menu Server->MySQL Database Server. Ada bagian bertuliskan
“Click here to have it downloaded and installed using YUM.”
Klik disana dan MySQL Server akan diinstallkan dengan cepat dan otomatis.
Klik tombol Start setelah konfirmasi installasi sukses.
5. Install PHP5
Kembali ke Putty dan masukkan perintah berikut.
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
/etc/init.d/httpd restart
6. Test PHP
Buat 1 file PHP dan test apakah semua yang kita install sudah berhasil dan berjalan dengan baik.
vi /var/www/html/index.php
Masuk di vi text editor. Untuk memulai penulisan ketik tombol huruf i sekali dan dibagian bawah ada tulisan –INSERT–
Ketikkan
<?
phpinfo();
?>
Pencet ESC
:w ENTER
:q ENTER
7. Kembali ke browser dan masuk ke http://ipkamu/
Jika melihat tampilan Info dari PHP maka semua installasi diatas sudah selesai dengan sukses.
Istirahat dulu atau langsung lanjut ke installasi Bind DNS dan setting Virtual Host
8. Install Bind DNS
Kembali ke halaman Webmin. Masuk ke menu Server->Bind DNS. Ada tulisan
“Click here to have it downloaded and installed using YUM.”
Klik disana dan Bind akan diinstallkan dengan cepat dan otomatis. Setelah selesai ada pilihan jawaban, pilih jawaban nomor 2 atau nomor lain yang artinya “Digunakan untuk DNS internet dan Download Zone”. Kemudian tekan tombol Start.
9. Setting nama domain
Diasumsikan sudah terdaftar nama domain : namadomainku.com
Registerkan ns1.namadomainku.com dan ns2.namadomainku.com ke dedicated IP yang diberikan. Registerkan di registrar tempat domain terdaftar. Setelah itu arahkan name server namadomainku.com ke ns1.namadomainku.com dan ns2.namadomainku.com
10. Kembali ke halaman Webmin
Klik menu Server->Bind DNS
Klik “Edit Config File” dan tambahakan berikut ini ke dalamnya dan tekan SAVE
zone “namadomainku.com” {
type master;
file “namadomainku.com.hosts”;
};
11. Kembali ke Shell. Buat file baru seperti contoh nomor 6 dengan nama namadomainku.com.host di  /etc/
vi /etc/namadomainku.com.hosts
Isi file
$TTL 86400
@ IN SOA ns1.namadomainku.com. server.namadomainku.com. (
2008081301 ; serial, todays date + todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds;
namadomainku.com. NS ns1.namadomainku.com.
namadomainku.com. NS ns2.namadomainku.com.
ns1 A 123.123.123.123
ns2 A 123.123.123.123
namadomainku.com. A 123.123.123.123
www A 123.123.123.123
ftp A 123.123.123.123
Ganti server.namadomainku.com sesuai dengan name server yang tersetting dan 123.123.123.123 dengan dedicated IP yang diberikan. Save dan restart Bind
/etc/init.d/named restart
12. Install Virtual Host.
Kembali ke Webmin dan klik menu Server-Apache WebServer – Global Configuratin.
Klik icon Edit Config File. Tambahkan dibagian paling bawah isian ini
NameVirtualHost *:80
<VirtualHost  *:80>
DocumentRoot /var/www/html/namadomainkucom
ServerAdmin admin@namadomainku.com
ServerName www.namadomainku.com
ServerAlias namadomainku.com
DirectoryIndex index.html index.htm index.shtml index.php
<Directory “/var/www/html/namadomainkucom”>
Options all
AllowOverride none
</Directory>
LogLevel debug
HostNameLookups off
</VirtualHost>
Save dan restart Apache Server.
13. Membuat file Index untuk namadomainku.com
Ke Putty. Buat file baru seperti contoh di nomor 6 dengan nama index.php di folder /var/www/html/namadomainkucom
cd /var/www/html
mkdir namadomainkucom
vi /var/www/html/namadomainkucom/index.php
Isi file
<?
echo “Ini file index di namadomainku.com”;
?>
Save file yang baru saja dibuat.
14. Test semua hasil.
Ulangi langkah 7. Jika tampilan browser berubah menjadi tulisan Ini file index di namadomainku.com maka semua langkah diatas sudah 99% sukses.
Masukkan dibrowser http://namadomainku.com atau http://www.namadomainku.com/
Seharusnya tampilan di browser akan tetap menunjukkan tulisan Ini file index di namadomainku.com. Jika keluar Server Not Found jangan keburu khawatir. Kemungkinan nama domain yang baru disetting di nomor 9 dan Bind DNS masih belum resolve. Tunggu aja sekitar 2-6 jam dan coba lagi. Jika setelah 24 jam masih juga Server not Found, baru saatnya untuk khawatir mencari salahnya dimana.
Enjoy your VPS.
Artikel ini masih mengabaikan berbagai hole security yang terjadi karena setting PHP dan MySQL masih standart. Untuk masalah sekuriti om Google punya banyak cerita dan artikel.

Source : ridosandiatmanto.wordpress.com

Monday, April 23, 2012

[SHARE] Cara Install Windows Di VPS CentOS

Disclaimer:
1) I am still researching on how to make the windows's networking work, so if anyone know please tell us so everyone know how to
2) If your vps/server get banned from your provider, this is not my fault
3) If your vps/server only have 1 core, don't try it or it will eat up main server's core (virtual machine always eat core)

Requirement for Win 98:
RAM: At least 64MB
Burst: At least 128MB
Space: At least 1GB
OS: Currently Centos 5 32bit (Will try to research other version for you guys Big Grin)
Virtualization: OpenVZ , KVM, Xen

Requirement for Win XP:
RAM: At least 128MB
Burst: 256MB
Space: At least 3GB
OS: Currently Centos 5 32bit (Will try to research other version for you guys Big Grin)
Virtualization: OpenVZ, KVM, Xen

Let start!






STEP 1

Code:
wget http://pkgs.repoforge.org/icewm/icewm-1.2.30-1.el5.rf.i386.rpm http://pkgs.repoforge.org/qemu/qemu-0.14.1-2.el5.rfx.i386.rpm http://pkgs.repoforge.org/qemu/qemu-img-0.14.1-2.el5.rfx.i386.rpm http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/imlib-1.9.13-1.el5.rf.i386.rpm

STEP 2 Damn long Tongue
Code:
yum install libICE.so.6 libImlib.so.1 libORBit-2.so.0 libSM.so.6 libX11.so.6 libXext.so.6 libXft.so.2 libXinerama.so.1 libXrandr.so.2 libXrender.so.1 libart_lgpl_2.so.2 libatk-1.0.so.0 libbonobo-2.so.0 libbonobo-activation.so.4 libbonoboui-2.so.0 libcairo.so.2 libfontconfig.so.1 libfreetype.so.6 libgconf-2.so.4 libgdk-x11-2.0.so.0 libgdk_pixbuf-2.0.so.0 libgnome-2.so.0 libgnome-desktop-2.so.2 libgnome-keyring.so.0 libgnomecanvas-2.so.0 libgnomeui-2.so.0 libgnomevfs-2.so.0 libgtk-x11-2.0.so.0 libpango-1.0.so.0 libpangocairo-1.0.so.0 libpangoft2-1.0.so.0 libstartup-notification-1.so.0 libungif.so.4 gtk+ libgdk-1.2.so.0 libglib-1.2.so.0 libgmodule-1.2.so.0 libgtk-1.2.so.0 libSDL-1.2.so.0 libX11.so.6 libasound.so.2 libbluetooth.so.2 libesd.so.0 vnc-server xterm

STEP 3
Code:
rpm -i imlib-1.9.13-1.el5.rf.i386.rpm
rpm -i icewm-1.2.30-1.el5.rf.i386.rpm
rpm -i qemu-img-0.14.1-2.el5.rfx.i386.rpm
rpm -i qemu-0.14.1-2.el5.rfx.i386.rpm

STEP 4
Code:
vncserver

STEP 5
Code:
nano /root/.vnc/xstartup

STEP 6
add the following below the xstartup:
Code:
# start icewm-session
exec icewm-session
xterm

STEP 7
Code:
vncserver -kill :1

STEP 8
Code:
vncserver

STEP 9
Upload your own windows image (.iso) or download from the internet (illegal Tongue)

If your windows image is in .rar type, unrar it with the following way:
Code:
1) cd /tmp
2) wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
3) tar -zxvf rarlinux-3.6.0.tar.gz
4) cd rar
5) ./unrar
6) cp rar unrar /bin
7) cd
8) unrar x YOURRARFILENAME.rar

STEP 10
Open your vnc with vnc viewer

STEP 11
You will see a terminal box named "xterm"
Type the following into the terminal:
Quote:qemu-img create -f qcow WIN.img [----]
* Replace the [----] with the following size you want to allocate for your windows:
3000mb = 3G
4000mb = 4G
5000mb = 5G

STEP 12
Type the following into the xterm:
Quote:qemu -localtime -cdrom YOURWINDOWSISONAME.iso -m [----] -boot d WIN.img
* Replace the [----] with the following size you want to allocate for your windows:
64mb = 64
96mb = 96
128mb = 128
Note: 64mb RAM actually used about 90mb RAM (qemu require memory to run)
Installation for windows xp require about 1-2 hours to complete (128mb ram)

STEP 13
Next time run this to boot your OS Big Grin
Quote:qemu -hda WIN.img -boot c -m [----] -localtime -k de -usb
* Replace the [----] with the following size you want to allocate for your windows:
64mb = 64
96mb = 96
128mb = 128
Note: 64mb RAM actually used about 90mb RAM (qemu require memory to run)
Boot up windows xp just require about 3 minute to complete (128mb ram)

That's all, may upload a video in short time to prevent some people don't know how to do it Smile






NETWORK STEP 12
Actually network is really easy...
Note:ONLY work on windows XP
IF you want network, change step 12 to:
Quote:qemu -localtime -cdrom YOURWINDOWSISONAME.iso -m [----] -boot d WIN.img -net nic,vlan=0,model=rtl8139 -net user
* Replace the [----] with the following size you want to allocate for your windows:
64mb = 64
96mb = 96
128mb = 128
Note: 128mb RAM may actually used 200mb RAM! (Network eat up many RAM)

NETWORK STEP 13
Note:ONLY work on windows XP
IF you want network, change step 13 to:
Quote:qemu -hda WIN.img -boot c -m [----] -localtime -k de -usb -net nic,vlan=0,model=rtl8139 -net user
* Replace the [----] with the following size you want to allocate for your windows:
64mb = 64
96mb = 96
128mb = 128
Note: 128mb RAM may actually used 200mb RAM! (Network eat up many RAM)


Cara DIatas Belom Gw TEST . Gw saranin buat make virtualisasi yang make Xen / KVM karna lebih dedicated.


source = freevps.us