- 浏览: 2076276 次
- 性别:
- 来自: NYC
文章分类
- 全部博客 (628)
- Linux (53)
- RubyOnRails (294)
- HTML (8)
- 手册指南 (5)
- Mysql (14)
- PHP (3)
- Rails 汇总 (13)
- 读书 (22)
- plugin 插件介绍与应用 (12)
- Flex (2)
- Ruby技巧 (7)
- Gem包介绍 (1)
- javascript Jquery ext prototype (21)
- IT生活 (6)
- 小工具 (4)
- PHP 部署 drupal (1)
- javascript Jquery sort plugin 插件 (2)
- iphone siri ios (1)
- Ruby On Rails (106)
- 编程概念 (1)
- Unit Test (4)
- Ruby 1.9 (24)
- rake (1)
- Postgresql (6)
- ruby (5)
- respond_to? (1)
- method_missing (1)
- git (8)
- Rspec (1)
- ios (1)
- jquery (1)
- Sinatra (1)
最新评论
-
dadadada2x:
user模型里加上 protected def email ...
流行的权限管理 gem devise的定制 -
Sev7en_jun:
shrekting 写道var pattern = /^(0| ...
强悍的ip格式 正则表达式验证 -
jiasanshou:
好文章!!!
RPM包rpmbuild SPEC文件深度说明 -
寻得乐中乐:
link_to其实就是个a标签,使用css控制,添加一个参数: ...
Rails在link_to中加参数 -
aiafei0001:
完全看不懂,不知所然.能表达清楚一点?
"$ is not defined" 的问题怎么办
UPDATE(2013/06/01)
几个重要说明:
1. mac 下brew安装后要initdb
2. 启动后,默认管理员是系统当前帐户
3. psql不认的时候,就是brew的路径问题(见下代码)
4. brew装的重启,启动什么的用brew services
在ubuntu下完全不同sudo aptitude 安装后,不许要initdb只要
mac下用brew装posgresql
然后,有个说明很不错,只是记录过程
# Build Notes
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
https://github.com/mxcl/homebrew/issues/issue/2510
To build plpython against a specific Python, set PYTHON prior to brewing:
PYTHON=/usr/local/bin/python brew install postgresql
See:
http://www.postgresql.org/docs/9.1/static/install-procedure.html
# Create/Upgrade a Database
If this is your first install, create a database with:
initdb /usr/local/var/postgres
To migrate existing data from a previous major version (pre-9.1) of PostgreSQL, see:
http://www.postgresql.org/docs/9.1/static/upgrading.html
# Start/Stop PostgreSQL
If this is your first install, automatically load on login with:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.1.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
If this is an upgrade and you already have the homebrew.mxcl.postgresql.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
cp /usr/local/Cellar/postgresql/9.1.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or start manually with:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
And stop with:
pg_ctl -D /usr/local/var/postgres stop -s -m fast
# Loading Extensions
By default, Homebrew builds all available Contrib extensions. To see a list of all
available extensions, from the psql command line, run:
SELECT * FROM pg_available_extensions;
To load any of the extension names, navigate to the desired database and run:
CREATE EXTENSION [extension name];
For instance, to load the tablefunc extension in the current database, run:
CREATE EXTENSION tablefunc;
For more information on the CREATE EXTENSION command, see:
http://www.postgresql.org/docs/9.1/static/sql-createextension.html
For more information on extensions, see:
http://www.postgresql.org/docs/9.1/static/contrib.html
# Other
Some machines may require provisioning of shared memory:
http://www.postgresql.org/docs/current/static/kernel-resources.html#SYSVIPC
To install postgresql (and ossp-uuid) in 32-bit mode:
brew install postgresql --32-bit
If you want to install the postgres gem, including ARCHFLAGS is recommended:
env ARCHFLAGS="-arch x86_64" gem install pg
To install gems without sudo, see the Homebrew wiki.
==> Summary
brew services restart postgresql psql -U kenlu -h localhost -d postgres
几个重要说明:
1. mac 下brew安装后要initdb
2. 启动后,默认管理员是系统当前帐户
3. psql不认的时候,就是brew的路径问题(见下代码)
4. brew装的重启,启动什么的用brew services
在ubuntu下完全不同sudo aptitude 安装后,不许要initdb只要
sudo -u postgres psql template1 template1=# CREATE USER tom WITH PASSWORD 'myPassword'; ALTER USER postgres with encrypted password 'your_password'; grant all privileges on database postgres to postgres; alter user livegamer with superuser; sudo nano /etc/postgresql/9.1/main/postgresql.conf #localhost
mac下用brew装posgresql
然后,有个说明很不错,只是记录过程
initdb /usr/local/var/postgres -E utf8 postgres -D /usr/local/var/postgres psql postgres `whoami` $ echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profile && . ~/.bash_profile
brew install postgres initdb /usr/local/var/postgres cp /usr/local/Cellar/postgresql/9.1.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist createuser (postgres) sudo -u postgres psql ALTER USER postgres with encrypted password 'your_password'; vim /usr/local/var/postgres/postgresql.conf listen_addresses = 'localhost' => listen_addresses = '*' psql -U postgres -h localhost
引用
# Build Notes
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
https://github.com/mxcl/homebrew/issues/issue/2510
To build plpython against a specific Python, set PYTHON prior to brewing:
PYTHON=/usr/local/bin/python brew install postgresql
See:
http://www.postgresql.org/docs/9.1/static/install-procedure.html
# Create/Upgrade a Database
If this is your first install, create a database with:
initdb /usr/local/var/postgres
To migrate existing data from a previous major version (pre-9.1) of PostgreSQL, see:
http://www.postgresql.org/docs/9.1/static/upgrading.html
# Start/Stop PostgreSQL
If this is your first install, automatically load on login with:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.1.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
If this is an upgrade and you already have the homebrew.mxcl.postgresql.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
cp /usr/local/Cellar/postgresql/9.1.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or start manually with:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
And stop with:
pg_ctl -D /usr/local/var/postgres stop -s -m fast
# Loading Extensions
By default, Homebrew builds all available Contrib extensions. To see a list of all
available extensions, from the psql command line, run:
SELECT * FROM pg_available_extensions;
To load any of the extension names, navigate to the desired database and run:
CREATE EXTENSION [extension name];
For instance, to load the tablefunc extension in the current database, run:
CREATE EXTENSION tablefunc;
For more information on the CREATE EXTENSION command, see:
http://www.postgresql.org/docs/9.1/static/sql-createextension.html
For more information on extensions, see:
http://www.postgresql.org/docs/9.1/static/contrib.html
# Other
Some machines may require provisioning of shared memory:
http://www.postgresql.org/docs/current/static/kernel-resources.html#SYSVIPC
To install postgresql (and ossp-uuid) in 32-bit mode:
brew install postgresql --32-bit
If you want to install the postgres gem, including ARCHFLAGS is recommended:
env ARCHFLAGS="-arch x86_64" gem install pg
To install gems without sudo, see the Homebrew wiki.
==> Summary
发表评论
-
brew service restart
2013-07-06 22:56 1457brew services restart memcached ... -
git如何合并 多个commit
2013-07-02 20:42 9381需要先搞明白rebase 然后,进这个界面 pick b ... -
rvm create gemset
2013-07-01 09:00 1285rvm ruby-1.9.3-p429 do rvm gems ... -
关于devise结合github通过omniauth登录
2013-06-24 04:47 4163最近写了个github帐户登录Demo: https://gi ... -
cdata 和 xml xmlParseEntityRef: no name 错误
2013-05-04 00:24 5012Problem: An XML parser returns ... -
一目了然 rails html xml encode decode
2013-05-03 23:37 31241.9.2p320 :001 > require ' ... -
使用scope 链接多个where条件
2013-05-02 09:17 2610scope :by_category, (lamb ... -
在rspec里使用 route path
2013-05-01 20:09 1014Rspec.configure do |config| ... -
postgresql install and configure for ubuntu
2013-04-25 08:13 1099ABSTRACT PostgreSQL is an ob ... -
select_tag default value & options
2013-04-10 21:40 2194#If you are using select_tag ... -
Jquery array remove
2013-04-10 21:38 4544Array.prototype.remove = fu ... -
ruby readline的两种写法
2013-04-09 10:21 910f = File.read('public/file.cs ... -
关于encoding utf-8
2013-04-04 20:55 4091一 gem解决方案 https://github.com/m- ... -
我见过最清楚的解释class_eval 和 instance_eval
2013-04-02 07:06 3336忘了,看一次就能回忆起来 class A # def ... -
multiple provider oauth
2013-04-01 11:13 1315Allowing users to login with mu ... -
oauth github和multiple oauth
2013-04-01 11:08 1552http://railscasts.com/episodes/ ... -
Ruby Jquery 地图,地理信息相关资源
2013-03-22 20:32 939Railscast Geocorder Geocorde ... -
load migrate file and load
2013-03-22 05:52 1002Dir[Rails.root.join('db','mig ... -
Brew update problem
2013-03-22 05:48 1349引用 MBA:~ fortin$ brew update er ... -
Jquery sort table number
2013-03-19 01:01 1144So here is what the column is s ...
相关推荐
USB 串口 PL2303 MAC OSX 驱动,适用于 OS X 10.9 以上的版本。 Mac OS X Universal Binary Driver v1.6.2 (PKG file format) For Mac OS High Sierra (version 10.15) - see NOTE below. For Mac OS High Sierra ...
苹果电脑安装 Windows 和 Mac_OSX 双系统 苹果电脑作为一款高性能的个人计算机,安装Windows和Mac_OSX双系统可以满足不同用户的需求。 Boot Camp 是苹果电脑系统自带的双系统安装工具,可以帮助用户安装Windows和...
这些操作系统版本都是苹果公司推出的Mac OS X(现更名为macOS)的重要更新,涵盖了从Yosemite到High Sierra的多个版本。下面将详细阐述这些系统的特点、改进以及安装方法等方面的内容。 ### 一、osx 10.10.5:...
CP2102是一款USB转UART桥接芯片,本站提供的驱动程序为Mac OSX10.6 Software环境使用,压缩文件中有使用说明,仅供需要的朋友下载收藏。
Mac OSX的文件系统介绍 各目录说明
4. **注意兼容性**:确保所使用的硬件与Mac OSx 10.5.6版本兼容,特别是对于显卡和网卡等关键硬件设备。 #### 常见问题及解决方法 1. **驱动冲突**:若安装过程中出现驱动冲突,可以通过手动安装相应的kext文件夹...
这表明发布者可能提供Postman不同版本的下载,包括历史版本和更新版本,以便用户根据自己的需求选择最适合的版本。 "Postman 6 mac osx"标签明确了这个软件包是Postman的第6个主要版本,且专为mac osx系统设计。...
polycom 宝利通 的Mac OSX客户端,可以PC到会议系统,PC跟PC之间视频通话。这个是官方账户里下载的最新版本。安全可靠,十分难得,值得收藏
【Mac OSX 音乐汇】是一款专为Mac OS X操作系统设计的音乐聚合应用,它集成了多个知名在线音乐服务,包括音悦TV、虾米电台、百度音乐和豆瓣电台等,为用户提供了丰富的音乐资源和便捷的收听体验。这款应用旨在让Mac...
"Mac OSX"是苹果公司的桌面和服务器操作系统系列,每一代都有不同的代号,如Tiger(虎)、Leopard(豹)、Snow Leopard(雪豹)、Lion(狮子)等。这些操作系统以其美观的界面、稳定的性能和与Apple硬件的紧密集成而...
然而,通过使用特定的解锁工具和技术,用户可以在非苹果硬件,如基于 Intel 或 AMD 的 PC 上,利用 VMware 创建虚拟机来安装和运行 Mac OSX。 标题提到的“Vmware安装Mac OSX所需的解锁文件”,主要指的就是用来...
charles-proxy-3.9.1-applejava Mac OSX破解版
Mac OS X系统是苹果公司开发的操作系统,以其优雅的设计和强大的功能深受用户喜爱。在开发领域,Xcode是Apple官方提供的集成开发环境(IDE),用于编写iOS、macOS以及其他Apple平台的应用程序。然而,对于一些高级的...
总的来说,全志A10 MAC OSX 固件更新工具是Mac用户为基于全志A10处理器的设备进行系统升级的必备工具,它简化了固件更新流程,提高了设备的稳定性和功能性。通过正确使用LiveSuit.app,用户可以确保他们的设备始终...
你可以自定义其列和行,绑定到数据源,实现数据的动态加载和更新。在Objective-C中,你需要实现UITableViewDataSource和UITableViewDelegate协议来处理数据的加载和用户交互。 4. **按钮控件**:另一个基础元素是...
Mac OS X Universal Binary Driver v1.6.2 (PKG file format) For Mac OS High Sierra (version 10.15) - see NOTE below. For Mac OS High Sierra (version 10.14) For Mac OS High Sierra (version 10.13) ...
例如,如果你计划创建两个NTFS分区用于Windows 7和一个用于Mac OSX,那么你应该切割出两个FAT分区(因为Windows 7可以识别并写入FAT格式)以及一个用于OSX的分区。重要的是,OSX的分区应该被安排在最后,这是为了...
CloudBox .NET mac osx 工具列是一个专为苹果Mac OS X操作系统设计的.NET框架控件,旨在提供用户在mac环境下与CloudBox服务交互的功能。这个工具栏控件允许开发者将CloudBox的功能无缝集成到他们的应用程序中,提升...
【描述】: "本资源提供了在Windows系统上运行预装了Mac OSX操作系统的VMware虚拟机的相关链接,使得Windows用户能够体验和测试Mac OS X环境,而无需拥有实体苹果设备。这种解决方案对于开发者、设计师或是想要熟悉...