This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ssh -Nf -D 192.168.10.107:7070 root@wxianfeng.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=/usr/local/system/projects/guoyi | |
FIND_BIN=/usr/bin/find | |
SED_BIN=/bin/sed | |
CAT_BIN=/bin/cat | |
LOG=/tmp/foreach.log | |
$CAT_BIN /dev/null > $LOG | |
cd $PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,apache2.conf: | |
Include /etc/apache2/sites-enabled/ | |
2,配置域名 | |
# sites-available 下 inono_net.conf | |
# www.inono.net 跳转到 www.365weiyi.com | |
<VirtualHost *:80> | |
ServerName www.inono.net | |
DocumentRoot /var/www/zsites/dooxoo_www/dooxoowww/current/public | |
<Directory /var/www/zsites/dooxoo_www/dooxoowww/current/public> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# 使用acts_as_nested_set的表lft,rgt数据错乱了,根据已有数据重新调整为正确的! | |
orgunits = Orgunit.all # cant use Orgunit.where("") | |
Orgunit.delete_all | |
orgunits.each do |orgunit| | |
parent = unless orgunit.parent_id.nil? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@SNDA-192-168-2-15:~# thin install | |
>> Installing thin service at /etc/init.d/thin ... | |
mkdir -p /etc/init.d | |
writing /etc/init.d/thin | |
chmod +x /etc/init.d/thin | |
mkdir -p /etc/thin | |
To configure thin to start at system boot: | |
on RedHat like systems: | |
sudo /sbin/chkconfig --level 345 thin on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lecai360.com ,www.lecai360.com 分别独立访问 | |
server{ | |
listen 80; | |
server_name lecai360.com www.lecai360.com; | |
root /web/projects/lecai/current/public; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server 区内添加: | |
location ~ ^/assets/ { | |
root /web/projects/sqopen.com/public; | |
expires 1y; | |
add_header Cache-Control public; | |
add_header ETag ""; | |
gzip_static on; | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost nginx-0.8.54]# passenger-config --root | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9 | |
[root@localhost nginx-0.8.54]# ./configure --prefix=/usr/local/nginx \ | |
> --with-http_ssl_module \ | |
> --with-http_gzip_static_module \ | |
> --with-pcre=/usr/local/src/pcre-7.9 \ | |
> --add-module=/usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/ext/nginx | |
>make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# edit crontab job | |
>crontab -e | |
[root@localhost shell]# crontab -l | |
# m h d mon dow command | |
0 3 * * * root /bin/sh /data/shell/scan_yuezhi.sh >> /data/shell/output.txt 2>&1 # 每天早晨3点执行 | |
* * * * * root /bin/sh /data/shell/date.sh >> /data/shell/output.txt 2>&1 # 每分钟一次 | |
# scan_yuezhi.sh | |
#!/bin/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# m h dom mon dow command | |
0 4 * * * /bin/sh /data/shell/rsync.sh >> /data/shell/output.txt 2>&1 # 每天早晨4点执行 |
OlderNewer