Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
Run kloxo+wordpress+torrentflux+lighttpd in low memory 128mb lowendbox vps
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

Run kloxo+wordpress+torrentflux+lighttpd in low memory 128mb lowendbox vps

raihan0888raihan0888 Member
edited February 2012 in Tutorials

In this tutorial you found how to:
A)Setup kloxo
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.

A)Kloxo Setup

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 **

1)
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)

2)
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.

3)
Mysql settings change:
To see this file :

#cat /etc/my.cnf

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 :

#nano /etc/my.cnf

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:

whereis lighttpd.conf

Then in terminal show the location of lighttpd file.Then we creat backup of that file:
for copy:

cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.backup

for edit :

nano /etc/lighttpd/lighttpd.conf

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:

#nano /etc/lighttpd/lighttpd.conf

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:

Download torrenflux:
http://developer.berlios.de/project/...lease_id=14392

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:
/home/admin/domain/tf/html/dload/

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.
http://encode-explorer.siineiolekala.net

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.

Thanked by 1vedran

Comments

  • Can you format this a little better, Also include a linkback if this is not your own tutorial.

    AboveClouds • UK Company • UK Datacentre • UK Customer Support

    High Performance Pure SSD Cloud Hosting with a personal touch

  • http ://www.wjunction.com/13-tutorials-guides/127563-run-kloxo-wordpress-torrentflux-lighttpd-low-memory-128mb-lowendbox-vps.html

    Thanked by 1Jack
  • i reformat it.both tutorial is mine.you see username please.

  • dont know why some word getting bold!! :( .can you re-edit on behalf of me.
    here is the link:
    http://tinypaste.com/ddb22aee

    @EaseVPS said: Can you format this a little better, Also include a linkback if this is not your own tutorial.

  • @raihan0888 said: skip-bdb

    FYI, adding this to to the my.cnf of newer versions of mysql may prevent it from starting properly.

    Thanked by 2raihan0888 tux
  • yomeroyomero Member
    edited February 2012

    Just remove al your ===== stuff

    And your # at the start of each line, or use "pre" tags for commands

    Edit:

    http://tinypaste.com/16055733

    It needs more work, and the links are broken, take a look

    Ahm, but, btw, I don't understand what's all this, I mean, I don't understanmd what means all the kloxxo stuff lol.

    And megaupload doesn't exist anymore xD

    Thanked by 1raihan0888
  • @Damian4IPXcore said: FYI, adding this to to the my.cnf of newer versions of mysql may prevent it from starting properly.

    Do you know any other way to reduce kloxo and server related.please share if you know.thanks for your suggestion.

  • @yomero said: I don't understanmd what means all the kloxxo stuff lol.

    kloxo is a control panel for managing hosting.its free control panel,
    For paid service example is cpanel-whm and direct admin.

  • Why use Torrentflux? it is total junk now a days.

    Rtorrent rules and if you need a web based gui add rutorrent which works directly with rtorrent.

    rtorrent was made to run on old hardware. It is insanely efficient.

  • @luma said: rtorrent was made to run on old hardware. It is insanely efficient.

    Sometimes, and sometimes it hogs your RAM like an idiot

  • @yomero said: Sometimes, and sometimes it hogs your RAM like an idiot

    I have never had this issue with recent releases. I have 100's and 100's of torrents loaded and it still uses next to no ram (102megs on this particular box, debian, rtorrent, screen, lighttpd, php, etc)

  • Deluge is the way to go ;)

  • @raihan0888 said: kloxo is a control panel for managing hosting.its free control panel,

    Yes, I know what is Kloxxo, but your steps sound directed to an "expert" about it.

  • @luma said: Why use Torrentflux? it is total junk now a days.

    Rtorrent rules and if you need a web based gui add rutorrent which works directly with rtorrent.

    rtorrent was made to run on old hardware. It is insanely efficient.

    I search but not found any simple step by step tutorial.If i install kloxo all needed dependecie maybe install.and not need to sent any ssh command.I am totally new with linux.somewhere i found a tuto but its need lots of command.I said that its for personal use.not for uploading stuff.thats why torrentflux is good for me.I am interested to rutorrent but not find any tutorial for install in centos kloxo install os.IF you have a time please write a tutorial like me.which i able to implement in kloxo installed os.I also try transmission.And its also impressive,but stuck to change folder permission and change download location.another problem facing is that unable to access via www url.

    @luma said: I have never had this issue with recent releases. I have 100's and 100's of torrents loaded and it still uses next to no ram (102megs on this particular box, debian, rtorrent, screen, lighttpd, php, etc)

    impressed in your comment.100s and 100s torrent!!!if 100 torrent connected with minimum 20 people for leeching and seeding.Thats mean 2000 connection at a time!!! You are in vps or dedi?whats your box config?how many ram it consume when 100 torrent connected?

  • lumaluma Member
    edited February 2012

    With private trackers not every torrent will be connected. I see maybe 10-20 connected torrents on average.

    I use a VPS which is on a dedicated server. I gave the VPS 1GB of ram and 2 cores (Xeon 5520's) it runs Debian (Netinstall, core only, no base or anything) I then do updates and upgrade, secure it down a bit and then do the lighttpd, php-cgi, rtorrent (xmlrpc-c, libtorrent, rutorrent) etc

    Right now with 48 connected torrents for mine (not sure how many my buddy has) we are using 102MB of ram.

    PS: I don't actually use Kloxo so that may affect the usage a bit.

  • drmikedrmike Member
    edited February 2012

    Last I knew lighttpd had issues with the file uploader within wordpress and each group was blaming the other.

    Not sure where things stand now on that.

    Reference: http://core.trac.wordpress.org/ticket/6243

    edit: Oh and +1 for just using rtorrent directly.

  • @drmike said: Oh and +1 for just using rtorrent+screen directly.

    Fixed.

    Thanked by 1djvdorp
  • Rtorrent + screen == awesomeness

    Check my blog for more cool *nix tips & tricks!

  • yeah Screen + rtorrent rocks. and with proper watch folders and a properly configured .rtorrent.rc file there is no need for a gui at all. I never re-attach my screen session. I drop the .torrent into my watch folder, wait for it to show up in the completed folder and then rsync the file home. Done and Done!

    Wonder if that last rsync step can be automated. ummmmm yes that would be nice and handy!

    Thanked by 1djvdorp
  • My AlienVPS 19/year VPS idles at 80MB Ram with Wordpress. I am also running Apache, Mysql-myisam, djbdns, suphp, apache_optimizer

  • @luma said: Wonder if that last rsync step can be automated. ummmmm yes that would be nice and handy!

    I wonder how the torrent is "hashed" to get its ID, if is a simple hash of the files maybe you can check the hash every 'x' time. Or maybe rtorrent cna log to a file, so you can parse it periodically? Easier one :P

  • @Jeffrey can you show me how you make it?

    VMVPS - VPS coupons and reviews for Chinese visitors.
    Donation, Banners buying and Offers posting, contact: admin#vmvps.com (Change # to @)
  • @Jeffrey said: My AlienVPS 19/year VPS idles at 80MB Ram with Wordpress. I am also running Apache, Mysql-myisam, djbdns, suphp, apache_optimizer

    how many client average online ?daily and monthly hit?

    apache?!!! happy to see you at 80mb... but how? :)

  • @luma said: Wonder if that last rsync step can be automated. ummmmm yes that would be nice and handy!

    Yes, just like dropbox:
    http://fak3r.com/2009/09/14/howto-build-your-own-open-source-dropbox-clone/

    I'd do that but dropbox is aready enough for my auto downloading anime's and manga's, so I just use the dropbox API.

  • @luma said: yeah Screen + rtorrent rocks. and with proper watch folders and a properly configured .rtorrent.rc file there is no need for a gui at all. I never re-attach my screen session. I drop the .torrent into my watch folder, wait for it to show up in the completed folder and then rsync the file home. Done and Done!

    If you want to have it setup properly without doing it all by yourself, I can recommend the TuxLite.com scripts and then the rtorrent installer, does all of this and more for you :)
    (*not my work)

    Check my blog for more cool *nix tips & tricks!

  • @raihan0888 @VMVPS I get about 50-100 views daily and believe it or Not Apache is lighter than lighttpd once you configure it. All I did was select it in Kloxo and switched other services to much lighter ones.

    Thanked by 1Amfy
  • @Jeffrey said: @raihan0888 @VMVPS I get about 50-100 views daily and believe it or Not Apache is lighter than lighttpd once you configure it. All I did was select it in Kloxo and switched other services to much lighter ones.

    One of the things that helps is using mpm_worker, although many people think it uses more memory, when you set it up to use a single server and up to 64 threads, the ram usage is actually quite minimal.

  • guys facing problem in kloxo 6.1.10.because when its install its new php not compatible with lighttpdd phpcgi.and unable to start lightpdd and apache load too much ram in 128 mb vps.another thing new version hog 60mb ram :(.if you facing problem in start lightppd from kloxo.here is the solution.

    i solve my problem in kloxo 6.1.10
    here is the solution:
    http://forum.lxcenter.org/index.php?t=msg&goto=95151&&srch=lighttpd#msg_95151

    yum downgrade php*
    yum -y reinstall lighttpd lighttpd-fastcgi
    yum remove httpd

    putting this 3 command my 3 days problem solved :)

  • cosmicgatecosmicgate Member
    edited February 2012

    there is no way you can run kloxo+mysql+torrentflux+wordpress with 128mb. Your stats could be based on a fresh install with no traffic to wordpress.

    torrent flux alone eats up a lot of ram. On a test run of 10MB/s upload with 4 max connection it easily shoots up to 300mb ram with no traffic to wordpress.

    vpsdash.com - Tips and tricks in life, information and technology news to get things done

  • @raihan0888 your gravatar looks cool. Like it has eyes and a mouth.

    Thanked by 1raihan0888
  • @cosmicgate said: there is no way you can run kloxo+mysql+torrentflux+wordpress with 128mb. Your stats could be based on a fresh install with no traffic to wordpress.

    torrent flux alone eats up a lot of ram. On a test run of 10MB/s upload with 4 max connection it easily shoots up to 300mb ram with no traffic to wordpress.

    totally wrong.
    i always got 500-550 hit daily.
    torrent flux connected with 4-5 torrent.

  • When I tried rtorrent (a couple years ago), I found it didn't save traffic, and instead started counting from 0B up/down every time it started up. Not a big deal for private torrents, but awkward for knowing when to stop seeding something public. Has this been fixed in more recent versions?

Sign In or Register to comment.