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
config setup | |
uniqueids=never | |
conn %default | |
ikelifetime=60m | |
keylife=20m | |
rekeymargin=3m | |
rekey=no | |
keyingtries=1 | |
keyexchange=ike |
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
#对于新入门的开发者,如何安装 Ruby, Ruby Gems 和 Rails 的运行环境是个是棘手的问题,本页主要介绍如何用一条靠谱的路子快速安装 Ruby 开发环境。 | |
#解决包的依赖关系 | |
sudo yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers | |
sudo yum install -y wget | |
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm | |
sudo rpm -ivh epel-release-5-4.noarch.rpm | |
sudo yum install -y readline* libyaml* libffi* libtool* bison* libxslt* | |
#安装RVM |
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
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ | |
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/ | |
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1\ \(9B176\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/ | |
sudo rm -f /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest | |
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/ | |
sudo ln -s ./5.1\ \(9B176\) ./Latest |
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
#python26# | |
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm | |
sudo rpm -ivh epel-release-5-4.noarch.rpm | |
yum -y install python26 | |
ln -f /usr/bin/python2.6 /usr/bin/python | |
python -V | |
#EOF python26 | |
#For python2.7# |
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
# unless the request is for a valid file, send to bootstrap | |
if (!-e $request_filename) | |
{ | |
rewrite ^(.+)$ /index.php?q=$1 last; | |
} |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" /> | |
<title>News</title> | |
<style type="text/css"> | |
.box{width:635px; height:27px;line-height:27px; border:#bbb 1px solid; overflow:hidden;margin-left:-10px;margin-top:-15px;} | |
.box ul{margin:0; padding:0} | |
.box li{height:27px; font-size:12px; list-style-type:none;} |
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
建立 Apache 运行账户 | |
useradd -d /data/www www | |
建立一个文件夹用于存放网站的文件 | |
/data/www/wwwroot | |
注意事项 | |
*每一次修改配置文件必须重新启动才会生效 | |
*90%的问题是因为权限不对导致的 | |
*从windows向Linux下传文件可以使用WinScp |
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. 安装准备 | |
1) 系统约定 | |
软件源代码包存放位置 /root/src | |
源码包编译安装位置(prefix) /usr/local/software_name | |
Apache 网站根目录 /data/www/wwwroot(可按情况设置) | |
Apache 运行账户 www:www (useradd -d /data/www/;chown www.www /data/www/wwwroot) | |
2) 系统环境部署及调整 | |
检查系统是否正常 | |
# ifconfig(检查网卡设置是否正确) | |
# ping www.google.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
Finished in 1.33 seconds | |
5 examples, 1 failure | |
rake aborted! | |
ruby -S bundle exec rspec "spec/html2haml_spec.rb" failed | |
/usr/lib/ruby/gems/1.8/gems/rspec-core-2.2.1/lib/rspec/core/rake_task.rb:139:in `initialize' | |
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1112:in `verbose' | |
/usr/lib/ruby/gems/1.8/gems/rspec-core-2.2.1/lib/rspec/core/rake_task.rb:131:in `send' | |
/usr/lib/ruby/gems/1.8/gems/rspec-core-2.2.1/lib/rspec/core/rake_task.rb:131:in `initialize' | |
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' | |
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' |
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 | |
#group add | |
for x in 'awk '{print $2}' user.list | sed 's/,/\n/g' | sort | uniq -c|sed 's/[^a-zA-Z]//g'' | |
do | |
groupadd $x &> /dev/null | |
done | |
#back message |
NewerOlder