Posts Tagged ‘bash’
Saturday, October 10th, 2009
To prepare for several upcoming articles on AskApache that are focused on optimizing Servers and Sites from a server admin level, here is an article to introduce the main tools that we will be using. These tools are used to optimize CPU time for each process using nice and renice, and other tools like ionice are used to optimize the Disk IO, or Disk speed / Disk traffic for each process. Then you can make sure your mysqld and httpd processes are always fast and prioritized.
Tags: bash, chrt, CPU Scheduling, Disk IO, ionice, iostat, Nice, optimize processes, Renice, servers, Shell Scripting, taskset
Posted in Apache, Cache, Featured, Linux Unix BSD, Review, Security, Server Administration, Shell Scripting, Web Hosting, Webmaster | 1 Comment »
Sunday, August 23rd, 2009
Want to get started with my custom bash file without reading this page (recommended as page is not updated)? Execute the following in your shell and rock and roll.
curl -O http://z.askapache.com/askapache-bash-profile.txt && . askapache-bash-profile.txt
Tags: .bashrc, advanced, alias, bash, bash alias, bash_profile, function, linux, scripts, shell script
Posted in Featured, Hacking, Linux Unix BSD, Security, Shell Scripting, Web Hosting | 2 Comments »
Saturday, June 13th, 2009
Ever wanted to execute commands on your server through php? Now you can. I’m calling this file (see below) shell.php and it allows you to run commands on your web server with the same permissions that your php executable has.
Tags: Ajax, bash, console, Hacking, htaccess, Javascript, linux, mod_rewrite, PHP, Security, Shell, shell console, Shell Scripting
Posted in Ajax, DreamHost, Featured, Hacking, Javascript, Linux Unix BSD, PHP, Security, Server Administration, Shell Scripting, Web Hosting, Web Tools, Webmaster, htaccess, mod_rewrite | 13 Comments »
Friday, April 10th, 2009
Sometimes there is an urgent need for creating an exact duplicate or “mirror” of a web site on a separate server. This could be needed for creating Round Robin Setups, Load-Balancing, Failovers, or for just plain vanilla backups. In the past I have used a lot of different methods to copy data from one server to another, including creating an archive of the whole directory and then using scp to send the file over, creating an archive and then encrypting it and then sending that file over using ftp, curl, etc., and my persistence at learning new ways to do things has paid off because now I use rsync to keep an exact replica of the entire directory on an external server, without having to use all the CPU and resources of other mirroring methods.
Tags: backup, bash, encryption, mirror, password, rsync, ssh
Posted in Apache, Featured, Linux Unix BSD, Security, Shell Scripting, Web Hosting | 1 Comment »
Wednesday, October 1st, 2008
One way I speed up AskApache.com is by downloading external third-party javascript files to host on my own server instead of externally. In addition to the obvious speed boost, this lets you configure the caching and compression settings for the files.
Tags: bash, shell script, Shell Scripting
Posted in Apache, Cache, Javascript, Linux Unix BSD, Shell Scripting, Web Hosting | 5 Comments »
Saturday, April 19th, 2008
Search all files in a directory, replacing all occurances of string with a replacement string.
Tags: bash, find, grep, linux, Nice, search and replace, shell script, xargs
Posted in Featured, Linux Unix BSD, Shell Scripting, Web Hosting | 7 Comments »
Sunday, March 16th, 2008
Scan Apache logs for IP address that are probably evil, then generates an .htaccess file to DENY them all.
Tags: bash, DreamHost, ip abuse, shell script
Posted in Apache, DreamHost, Security, Shell Scripting | 4 Comments »