書簽,份額,和跳躍您喜愛的站點與SiteHoppin工具欄為Firefox!



DIY Linux文丐-如何優選您的Wordpress Blog, MediaWiki,或者其他高裝載網站以壓縮!

張貼 Blog, CPU, 計算機, Linux, Ubuntu, , WebApp, Wordpress 由最大在2008年2月24日在6:37 pm

很好,我們做了以前亂砍與某一MySQL、eAccelerator和httpd的很多服務器。

有很多主要blogs那裡我檢查了使用 網頁壓縮工具 那不使用壓縮。 (為一,我檢查了約翰食物的blog)

設法檢查你的一個崗位而不是檢查您的主要URL,因為工具是質樸的以根領域。 (即。 檢查 http://zedomax.com/blog/2008/02/23/never-give-up-especially-your-blog-dude/ 而不是http ://zedomax.com)

這的壓縮試驗screenshow我為一做 約翰食物的崗位:

a

您能看,約翰食物的blog不使用壓縮。 結果,他是丟失的在差不多帶寬的5次!!!

與第9級壓縮,他的站點在您的瀏覽器能被裝載在21K而不是巨大的100K。

現在壓縮也許不是為你們大家用慢CPUs。 我們的Zedomax.com在方形字體CPU有很多CPU處理能力的服務器跑。

Here’s a screenshow of my server under normal load:

DIY HACK - HOW TO optimize your Wordpress Blog, MediaWiki, or any other high load website with Compression!

As you can see, most of the time, my CPU is idling at 80.8%! That means my CPU is pretty much sitting on its ass instead of doing work for me.

Now, if you have a similar situation, compression will help your site load faster and also bring your load down so you can handle more traffic.

Here’s how to enable compression if you have a dedicated or access to root on your server:

(Most servers have zlib installed, if you don’t have zlib installed, you will have to install that first, you can check it by making a test file and putting <?php phpinfo() ?> and search for zlib)

Add the following lines to your /etc/php.ini:

zlib.output_compression = on
zlib.output_compression_level = 5

and then restart apache! (of course):

httpd -k restart

Now, go check one of your posts on the Compression Test Tool here.

b

As you can see above, I just compressed one of my blog posts by a whopping 76.1%!

If you are using Super Cache plugin for Wordpress, make sure to go to options and do this too:

Enable Super Cache Compression

Now, your server will run faster since there’s less data being transmitted to your visitors, meaning you save bandwith, time, and most importantly, the ability to handle more traffic.

At 70% increase in bandwidth, that could translate to that many more visitors too as bandwidth is directly proportional to amount of time a visitor stays on your site. (Yes, I did take Calculus in college, I failed miserably before passing.) The less time a visitor takes to load a page on your blog or your site, the more time and bandwidth you have for other visitors.)

I was searching through the web for many ways to use compression for server optimization but I couldn’t find any so I sort put everything together here.

Hopefully, it helps you.

And one more thing, you can also check out this great tutorial on your httpd.conf setup.

You can always check out HOWTO decrease load on your server by 5 times also.

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


DIY HACK - HOWTO Upgrade (or downgrade) from Vista to Windows XP!

Posted in Computer, Cool, DoItYourself!, Hack, Linux, Ubuntu by max on the February 21st, 2008 at 7:45 pm

HOWTO Upgrade (or downgrade) from Vista to Windows XP!

(Your computer will be faster and more reliable using Windows XP vs. Vista)

After testing out Windows Vista on one of my 6 PCs laying around my apartment, I finally decided it was time to scrap Vista for Windows XP.

Well, it turns out my HP a6040n desktop I bought off the shelf at Fry’s sucked at downgrading to XP. Why?

You go to HP’s driver downloads and they don’t even have XP drivers. I think HP has to at least put the specs of all the parts on their site. I had to open up the case and track down the motherboard, and then found a generic Intel ethernet driver just to get the internet working.

What a hassle. I love HP computers but this was probably the worst experience. (Well, I could’ve called their tech support but I am too lazy.)

Another problem I encountered? Basically I got one of those blue screen of death because the harddrive is set to “RAID” on BIOS setup and Windows XP cannot detect that unless you got a driver for it.

So all I did was set the settings back to “IDE” on BIOS setup and the blue screen of death disappeared. Wala!
(Trust me, you really don’t need RAID unless you are thinking about running bunch of servers.)

I also did some research and found you can also completely re-format your harddrive using DBAN. Although it took me some 6 hours to DBAN my HP harddrive, it was worth it. DBAN is great if your harddrive seems to be protected or whatever. Just nuke it and go along.
I also made sure to re-partition with room for Ubuntu, which I will be installing next on this experimental PC.

I used to run all Linux computers with VMware running windows on it. It did pretty good and my computer never gave me a blue screen of death. All I had to do was reboot the Virtual Machine but I might be headed down that path again soon.

Now I feel so good, it feels like I really flushed that “hard stool” that was sitting in my gut for 6 months.

Good bye Vista!

Next up we will be covering a step-by-step transition on how to install Ubuntu and use VMware to experience a new way to access the internet. Of couse, if you get bored of our tutorials, you can always go buy a Mac, we like Macs too. (they are unix based, which is pretty much a fancy Linux machine really)

You should also check out the Vista-XP parody ad we made couple months earlier.

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


DIY Linux Web Server HACK - Automate your MySQL MySQL database backups

Posted in Blog, Cool, DIY Zedomax, DoItYourself!, Educational, Hack, Linux, Ubuntu, Web, Wordpress by max on the February 10th, 2008 at 5:24 pm

Okay, I’ve been running dedicated servers for couple years now and I used to mess around with Linux boxes back in college.

Here’s an essential automatic script and a cron job you will need in order to keep your backup automatic.

Yes, if you get a dedicated server, don’t get their stupid extra $15/month for backing up your database.  (All they do is make scripts like this one and charge you for it)

You can follow this example and go spend that money on junk food.

So all you have to do is FTP your backup files.

This is way better than going into your phpMyAdmin and downloading from the web interface since the file is already ready for you to download.

Here’s how you do it:

1) Make a new file called backup.sh in your home directory. 2) Use the following syntax:

mysqldump -u[USERNAME] -p[PASSWORD] –opt [DATABASE NAME] > /root/backup/DATABASE1.sql

Here’s an example backup.sh file if you had 2 databases:

mysqldump -uUser1 -pPassword1 --opt Database1 > /root/backup/Database1.sql
mysqldump -uUser2 -pPassword2 --opt Database2 > /root/backup/Database2.sql
tar cvf /root/backup/sqlbackup.tar /root/backup/*

You can test your script by typing this:

sh backup.sh

(The mysqldump will overwrite the older file if you run this more than once)

3) If everything is working good, now you can put that script to be run once a day in your cron job.

For Fedora Core, you can edit this file /etc/cron.d/sa-update

Add the following line:

10 3 * * * root sh /root/backup/backup.sh

This will execute the script once a day at 3:10AM.

Now simply download one tar ball file whenever you feel like backing up your database.

You can probably change this a little bit and use it for many other things like backing up all your files too. (which I do)

If you have multiple servers like me, you can also automate your scripts to download backup databases to each server. That keeps things real redundant in case of server failure.

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


DIY Linux DoS HACK - HOWTO Limit your the max number of TCP connections to your Web Server!

Posted in Blog, Computer, Cool, DoItYourself!, Educational, Entertainment, Hack, Linux, Ubuntu, Web by max on the December 3rd, 2007 at 12:25 pm

I have been reading the following book called, Linux Server Hacks, which shows you many ways you can hack your Linux server so your server doesn’t die.

This actually works since we just had a DoS attack about 5 minutes ago. (It seems like we are getting more and more DoS attacks these days. You can refer to the DDOS Deflate script also)

Here’s HACK #47 I read about last week in my bath room from the book and I just used it to prevent DoS attackers from bringing my precious Quad-CPU dedicated server down.

Enter the following commands and you will limit number of TCP connections to your server to 12 connections per second after 24 connections have been seen. (It means that no matter what, your server will not try to serve more than 12 visitors during one second of period when your server gets digged, farked, stumbled, or whatever)
iptables -t nat -N syn-flood

iptables -t nat -A syn-flood -m limit —limit 12/s —limit-burst 24 -j RETURN

iptables -t nat -A syn-flood -j DROP

iptables -t nat -A PREROUTING -i $EXT_IFACE -d $DEST_IP -p tcp –syn -j syn-flood
I think you can increase the values steadily if your server can handle more. But it seems to have brought our server load from 33.00 somethin’ to under 1.0. Yey!

If you are a hacker, sorry dude. You are gonna have to try a little harder hacking Zedomax since we are hackers too.

P.S. You know what I try to do when I find out where the hackers are coming from, I do a DoS attack back on them. This usually pisses them off enough to DoS me more but I kinda enjoy the battle so bring it on! :p

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


Dell Ubuntu

Posted in Business, Consumer, Cool, Earth, Educational, Entertainment, Linux, Ubuntu, Web by max on the May 2nd, 2007 at 6:50 pm

Dell Ubuntu

Cool, Dell is going to be supporting Ubuntu! This is a sign that Linux and open source movement are taking over the world soon not to mention the cool open source CMS softwares like Wordpress, Joomla, Pligg, etc…etc…  This is a surprise from the company that announced to not ship their products with Linux in the past.

Ever since we heard that Dell would ship computers with Linux pre-installed, we wondered which flavor it would be. It doesn’t really come as a surprise that it will be Ubuntu, which Michael Dell uses it on his home laptop.

The official announcement is expected anytime now, but we got the heads up from Ubuntu contributor Fabián Rodríguez. His post is down (thanks, Digg) but can be seen on Dugg Mirror.

[via] ifacethoughts

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


Free Software Open Source heckler while Bill Gates speaking at a China university

Posted in Business, Consumer, Cool, Educational, Entertainment, Funny, Linux, Ubuntu by max on the April 20th, 2007 at 7:19 pm

Free Software Open Source

Cool, this guy jumped out while Bill Gates was speaking at Peking University in China. I think Microsoft should go open-source…

Wen sez, “On April, 20th, Bill Gates went to Peking University to give a talk titled “Creativity, China, Future”. After the talk, someone held a piece of paper written with ‘Free software, Open source’ rushed to the stage before Mr. Gates while spoke word to support open source software. It is said that that man is named Yang Wang, and he is a representative of LPI (Linux Professional Institute)

via boingboing

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


DIY LINUX HACK - XEYES

Posted in Consumer, Cool, DoItYourself!, Educational, Entertainment, Hack, Linux, Microcontroller, Motor, Projects, Ubuntu by max on the April 12th, 2007 at 11:40 am

X-eyes on Windows 2

X-eyes on Windows 3

X-eyes on Windows 1

If you use Linux, you know Xeyes is a simple program that follows your mouse movements. You can check out some web examples of Xeyes. You can even paste this javascript code on your website for Xeyes on the web.

Anyway, Hunz created physical Xeyes that stands on his window and follow people’s walking movements. Tight! We want one.

The eyes are made from large pizza boxes cardboard and rolled by RC-servos that are controlled by an ATTiny2313 that’s connected to the PC using the low-speed software usb stack. The camera is connected using USB as well. Since I disassembled my webcam and hooked it up to an FPGA for some experiments, I used an analog one and a USB video digitizer.

The video processing is done using mplayer. It’s cropped first to get only the street and no neighbour estates. Then a tiny & quick&dirty video filter plugin looks for the column with the strongest Y-component difference between the last & current frame and if the difference exceeds a certain threshold, that column is passed to the microcontroller using libusb.

[via] http://zedomax.com/image/icon/hackaday.jpg

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star