Setup 128MB VPS for website using Centos 6
Installing nginx, php, mysql on Centos 6 is tricky business. Unlike Debian or Ubuntu, some package not available on it’s default repository. I tend to use Centos or Debian as server, but this time I choose to install Centos on my 128MB VPS. My consideration because of OpenVZ which is different from XEN which has it’s own kernel space and iptables. It’s recommended to use same Linux Distro on OpenVZ while XEN you could use any linux flavor regardless the container. Maybe I am out of date about OpenVZ improvement but that’s what I know.
I want to use latest version of LAMP LNMP pack. As we all know, Centos is an enterprise grade linux based operating system which means the updates will not as fast as bleeding edge distro such as Fedora Core. The situation is quite same like Debian vs Ubuntu*. We will use use third party repository to install software we need, so we don’t need to compile every software on production server. I will use EPEL and Remi’s repository in this article.
Disclaimer: I am not responsible for anything happen with your production server/VPS, you may test this article on your VirtualBox before applying into your VPS.
Pengalaman Pertama dengan Google Adsense
Suatu waktu, saya berpikir bagaimana caranya mendapatkan Google Adsense (GA)? saya melakukan research kecil untuk mendapatkan akun adsense, sudah sekian kali aplikasi saya ditolak dan akhirnya diterima oleh Google ketika saya sudah pasrah. Tujuan saya cuma satu, mengapa fenomena adsense begitu meluas di Indonesia, bahkan katanya ada yang menghasilkan ribuan dolar.
Dari apa yang saya alami dalam waktu sekitar dua tahun mencoba aplikasi ke Google Adsense ternyata banyak sekali faktor yang mempengaruhi tim Google Adsense untuk menerima aplikasi dan mengijinkannya suatu situs untuk menampilkan iklan. Dengan penuh kesadaran saya memahami maksudnya dan memang mencari konten yang orisinal sesuai standar. Saat ini saya mendengar adanya banned massal terhadap publisher yang kontennya tidak orisinil, saya tidak tahu rumor ini betul atau tidak.
Aplikasi GA saya diterima dengan akun email Yahoo!, saya terheran – heran dan apa yang saya baca selama ini harus gmail namun yang saya alami lain dari apa yang saya baca. Terus terang, Saya senang sekali aplikasi saya diterima, tentu saja dengan beberapa kali penolakan juga.
WordPress Post ID Huge Jumps
I am moving from my previous linux web host to dotNet host which can handle ASP.NET pages. I am surprised the migration is relatively easy and wordpress already support IIS rewrite to maintain permalink.
I was tried to check everything out and found my several latest post get HUGE ID, like this one 4.162.708.458. I never post 4 millions article to my website even combine with my revisions. I don’t remember what the exact error but will cause error as like “You don’t have permission to edit” or some kind like that when trying to edit content. In Linux based machine this won’t lead to any problem anyway.
So, I drill down the data and found out interesting auto increment jump from 210 suddenly jump to that number. I don’t want my next post will have ID in 4.162.708.459. Problematic post ID around 14 posts. So, I need a solution to make my next post will be 225. I am using store procedure to achieve my purpose, I know I can use PHP but mysql SP doesn’t need mysql_connect or mysqli_connect. Let’s see the code.
USB Modem Permission on Linux
I have usb modem and want to play with it’s AT Command. In Ubuntu 10.04 I could access the modem easily without problem as regular user. I choose to install Centos 6 to test my modem. Centos 6 has no problem recognizing my usb modem which has PL2303 controller.
I try to use Kannel 1.4.3 which I get it from EPEL repository and successfully installed, when I try to fire up bearer box I got this
DEBUG: AT2[modem1]: detecting modem type INFO: AT2[modem1]: opening device ERROR: AT2[modem1]: open failed! ERRNO=13 ERROR: System error 13: Permission denied INFO: AT2[modem1]: Closing device
As usual, googling the solution and most of resource I found was getting hardcore modification and adding user to a group. Specifically, adding regular user in uucp groups, still it doesn’t work.
I remember when I was tried to connect to the network on Debian i got same problem and the solution is
usermod -a -G dialout nurasto
Now, my regular user can use usb modem as sms gateway without problem. 😀
Using Same VirtualBox Machine on Dual Boot
My PC installed with Microsoft Windows 7 and Ubuntu 10.04 and recent days I work with both platform to create some web application. I am using SVN to centralize and easier versioning. My SVN server located on one of my VM which is running on Debian Server.
The situation is I want that virtual machine are available on both OS. I was looking everywhere from google for the solution and found a solution but I don’t want to reattach VDI file on new virtual machine because UUID will regenerate and also MAC Address.
The solution is really simple and I don’t even notice that virtual box GUI already has Add features. Luckily, VirtualBox 4.1.6 already integrate virtual harddisk (VDI) and it’s machine configuration (VBOX) under same directory.
Just make sure that your virtual machine under NTFS because Ubuntu will read it easily, most Linux based OS already have the function either.
I was doing these steps to accomplish my mission:
- Mount NTFS partition where the virtual machine located
- On VirtualBox choose this menu Machine -> Add, or simply press CTRL + A
- You may meet this error Configuration error: Failed to get the “Trunk” value
- Just reattach the VDI and it will run.
That’s it. Now, I can use the machine for SVN either in Windows and Ubuntu 10.04.
update: You need to enter settings windows and press OK every time moving to each operating system in order to makes configuration adjusted.