sysadmin

Is there any performance hit involved in choosing gzip over deflate for http compression?

余生颓废 提交于 2019-12-29 08:26:08
问题 We recently switched some of our sites from deflate to gzip and noticed a significant increase in cpu load on our servers. 回答1: Is it possible that you are experiencing cache miss? That is, compressed content is sometimes cached compressed but switching compression schemes would (or at least should) invalidate that cache causing dramatically increased cpu utilization. Did you try switching it back? 回答2: gzip is, basically, deflate with some additional headers. So there should not be a

How to change MySQL root password to default?

拟墨画扇 提交于 2019-12-28 06:34:13
问题 My initial installation for the MySQL had no password for root. I assigned a password for root and everything worked fine. Due to some reason (don't ask why) I had to revert back to the original settings where root didn't have any password. I changed the root password to '' (empty string) . The problem now is that MySQL doesn't run with 'mysql -uroot' , it expects a password. On running 'mysql -uroot -p' and hitting enter on the password prompt gets me into the db, but is not same as the

VBScript/IIS - How do I automatically set ASP.NET version for a particular website

吃可爱长大的小学妹 提交于 2019-12-23 22:18:46
问题 I need to script the creation of app pools and websites on IIS 6.0. I have been able to create these using adsutil.vbs and iisweb.vbs, but don't know how to set the version of ASP.NET for the sites I have just created to 2.0.50727.0. Ideally I would like to adsutil.vbs to update the metabase. How do I do this? 回答1: @Chris beat me to the punch on the ADSI way You can do this using the aspnet_regiis.exe tool. There is one of these tools per version of ASP.NET installed on the machine. You could

Edit crontab programmatically and force the daemon to refresh

血红的双手。 提交于 2019-12-23 02:52:06
问题 I'm trying to write a web frontend for Crontab in Ruby using the excellent CronEdit gem. I went through Dillon Cron's crontab source code and found that it updates a particular file so that the daemon will refresh the cron list during the next sweep. In man crontab for VixieCron, it says: Additionally, cron checks each minute to see if its spool directory’s modtime (or the modtime on /etc/crontab) has changed, and if it has, cron will then examine the modtime on all crontabs and reload those

Need help setup windows server 2008 SMTP server

蓝咒 提交于 2019-12-22 11:35:11
问题 I am trying to setup windows server 2008 smtp server to relay emails to gmail smtp. Everything appears to be setup but it is not sending emails. Could you please help me figure out whats wrong. Below is the setup: Windows server 2008 with SMTP server feature installed. Need SMTP server to forward all messages to gmail smtp server to send. I have google apps setup for my domain, also I can send emails throught my test app using gmail smtp. SMTP Server Configuration: By default has default smtp

Should we really use chef to manage the sudoers file?

◇◆丶佛笑我妖孽 提交于 2019-12-22 10:08:40
问题 This is my question. I am worried that if Chef breaks something in the sudoers file, probably by a Chef user using the cookbook incorrectly, then the server will be entirely inaccessible. I would hate for us to completely lose a production server for a customer because we messed up the sudoers file and can no longer ssh into the box. 回答1: Chef has a feature to help with this, verifiers. You can set up the verifies on your sudoer template like this: template '/etc/sudoers' do source 'whatever

What are the various files that could have PATH declarations for OS X Terminal in them?

。_饼干妹妹 提交于 2019-12-18 13:28:05
问题 So I'm having a path issue on OS X Leopard. It seems OS X is adding other paths that I'm not stating and it's messing with my path priority. I only have a .bash_login file, I don't have a .bashrc or a .profile file. My .bash_login file is as such: export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" When I run export this is the path it returns: PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin" Any ideas on what could be

How can I automate running commands remotely over SSH to multiple servers in parallel?

混江龙づ霸主 提交于 2019-12-17 22:07:45
问题 I've searched around a bit for similar questions, but other than running one command or perhaps a few command with items such as: ssh user@host -t sudo su - However, what if I essentially need to run a script on (let's say) 15 servers at once. Is this doable in bash? In a perfect world I need to avoid installing applications if at all possible to pull this off. For argument's sake, let's just say that I need to do the following across 10 hosts: Deploy a new Tomcat container Deploy an

How do I daemonize an arbitrary script in unix?

我的未来我决定 提交于 2019-12-17 08:04:08
问题 I'd like a daemonizer that can turn an arbitrary, generic script or command into a daemon. There are two common cases I'd like to deal with: I have a script that should run forever. If it ever dies (or on reboot), restart it. Don't let there ever be two copies running at once (detect if a copy is already running and don't launch it in that case). I have a simple script or command line command that I'd like to keep executing repeatedly forever (with a short pause between runs). Again, don't

How do I daemonize an arbitrary script in unix?

我们两清 提交于 2019-12-17 08:03:10
问题 I'd like a daemonizer that can turn an arbitrary, generic script or command into a daemon. There are two common cases I'd like to deal with: I have a script that should run forever. If it ever dies (or on reboot), restart it. Don't let there ever be two copies running at once (detect if a copy is already running and don't launch it in that case). I have a simple script or command line command that I'd like to keep executing repeatedly forever (with a short pause between runs). Again, don't