Run kloxo+wordpress+torrentflux+lighttpd in low memory 128mb lowendbox vps
In this tutorial you found how to:
B)Optimize kloxo for low memory vps
C)Working wordpress permalink in lighttpd
D)Setup Torrentflux for personal use and seeding.
E)Direct File Download
-All this in 128 ram/256mb burt vps
Few months ago I use rapidgen(at cost of 6 usd monthly) and host a site in cheap offer in wjunction for 3 usd month with 5 gb space.Now I disable rapidgen subscription because of filesonic,megaupload.And my site also suspended because of heavy ram and processor use.In vps I also strange to see that my simple wordpress site consume 300-400mb ram in apache enable vps.now I think why hosting provider suspended me!!Recently I saw a seedbox offer in wjunction at under 5usd and buy it.at that time I facing many problem to setup,tweak,and simple copy-paste.And found most of the solution because of nice community in reputated forum and understand how hard to find a solution if I/you don’t know the proper step.thats why in my internet life first time I write a simple tutorial which may be helpful to you.If you getting simple help from this tutorial then opening of my thread is succesfull.If you need any help please ask here if I know the solution I answer here. If you need to setup this way I will happy to setup for first 20 user.
First of all i need to install Kloxo,I creat vps from default centos-hostinabox image which is provide from my vps provider.IF your provider not provide centos hostinabox image you need to install kloxo and optimize it first.
Become a root user and disable selinux.Here in all ssh code in front of code i put # sign,when you copy paste that code dont copy # sign.
#su - root #setenforce 0
Now Installing Kloxo
#yum install -y wget #wget http://download.lxcenter.org/downloa...o-installer.sh
To install in master:
#sh ./kloxo-installer.sh --type=master (I use this)
To install as Slave:
#sh ./kloxo-installer.sh --type=slave (if you want to install in slave you use this,I don’t use this command)
Once kloxo is installed, you can connect to
http://YOUR_SERVER_IP:7778 and you will be presented with a login screen.
Note:In some cases When Kloxo is running and you can not connect to the web interface then type:
#/etc/init.d/iptables stop #iptables -A INPUT -p tcp --dport 7778 -j ACCEPT #chkconfig --list #/etc/init.d/kloxo restart
if its not worked then update yum by using this
#yum update #/etc/init.d/kloxo restart
for setup default domain
#echo 192.168.210.1 raihan0888.com >> /etc/hosts
in example its looks like:echo yourip domain >> /etc/hosts
**B)for reduce server load,optimize vps, innodb, optimize kloxo **
In Kloxo, Main Panel under Advanced > General Settings, there is an option called "Web Statistics Program." You can disable awstats there.(for statistic you may use wordpress statpress I think its less memory consumer then awstat,I use now in my blog)
Under Server > Switch Program, there is an option to switch to Lighttpd from apache.if you install from centos hostinabox image this settings default set as a lighttpd,if you setup kloxo manually then need to change this.Switching to Lighttpd from Apache also helps lower memory usage by a bit.In apache for simple wordpress blog with 5-6 plugin(soe search term,all in one seo,statpress,similar post,autoblogged) with 10-20 user connected it took 300-400mb ram!!!I so tensed that I really need to buy 20usd 512ram vps?Then I search and and ask in reputated forum.How i solve my problem I write here.
Mysql settings change:
To see this file :
Copy this file by typing
#cp cat/etc/my.cnf cat/etc/my.cnf.backup
To Edit from SSH we need to install nano(simple text file editor ):
To install nano :
#yum install nano
For edit using nano :
At below [mysqld] add this by typing :
# skip-bdb # skip-innodb
here need to mention that in my.cnf different types of edit you may done.but in hostinabox template box all set by default for low memory vps.you googling that “kloxo mysql optimization” or “kloxo my.cnf edit” or “reduce kloxo load” lots of tweak you found.
After Edit : just press
#ctrl+X , and press #y for save.
Now restart our mysql :
#service mysqld restart.
C)Permalink work in wordpress:
Another problem I face in wordpress is that lightppd by default not supported custom permalink and unable to access by directory.
That’s why I tweak lighttpd.conf
So we search by typing:
Then in terminal show the location of lighttpd file.Then we creat backup of that file:
cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.backup
for edit :
for add in text type:
server.error-handler-404 = "/index.php"
After Edit : just press ctrl+X , and press y for save.
E)Directory listing / File show in lighttpd:
For directory listing we need to again edit lighttpd.conf file:
add this line:
#server.dir-listing = "disable"
After Edit : just press ctrl+X , and press y for save.
Then restart by typing : /etc/init.d/lighttpd restart
major problem is that its show all file in directory.and don’t accept any .htaccess rules.it show also plugins,wp-content folder.You bypass it by creating blank index.php file.i am not satisfied with this solution.
D)Setup Torrentflux and Proceess to download downloaded torrent directly by ip or domain:
upload it by FtP
then simply creat user from phpmyadmin from kloxopanel.
Then go to your ftp copied url.
Then simply follow the instruction.
You need to change permission In dew folder and files.in installation it tell you.
Then you need to creat folder which will be your download directory for torrent and downloaded data(created folder/username in torrenflux):
And that folder must be permission set to 777.i set 755 then torrentflux unable to remove torrent.so need to set 777.
Then I creat folder in my torrenflux directory and set it like this:
Here domain means your kloxo username.if you add any domain from kloxo panel its ask for name.that is the domain.and “tf/html/dload” means it’s a subdirectory in my domain name.
E)For directly download from domain name:
I upload their directory listing 1file php script.
and now I able to run wordpress site with 4-5 torrent download simultaneously and seeding.In idle time without any torrent download,worpress and kloxo consume 15-25mb ram.With 30-40 people online without torrent download it show 60 mb used in top command.When I downloading 2 torrent its show 70-80 mb used,in 5 torrent its show 220mb used.Mainly I buy this vps for my personal torrent download and maintaining ratio. And side by side I able to run a site.I am satisfied.
If you need any help ask here your problem.our answer became other user solution.If found any mistake or wrong command here please correct it by your valuable comment.