zt discourse安装以及本地oauth认证接入

https://www.idefs.com/recorddiscourse-installation-as-well-as-local-access-oauth-authentication-1.html

Discourse是一个“下一代,为下个十年互联网所打造的百分百开源讨论平台。”,由问答网站StackoverflowStackExchange的联合创始人,同时也是著名博客Coding Horror的博主 Jeff Atwood创造。

在实际使用中,Discourse需要和本地现有的用户系统整合。目前Discourse并没有提供解决方案。

我们通过oauth2的plugin,搭建oauth2服务器实现了Discourse和用户系统的整合,并将整合代码开源。

本文由云计算组长朱劲寿贡献。

1.0 系统环境:

uname -a
Linux dev2 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

1.1 使用非root账号登陆(安全起见,不建议使用root),如果没有,自行创建。

sudo adduser bistu sudo adduser bistu sudo

1.2 更新linux

sudo apt-get update && sudo apt-get -y upgrade

1.3 安装 Discourse 所需的包文件

sudo tasksel install openssh-server
sudo tasksel install mail-server
sudo tasksel install postgresql-server

安装邮件服务的时候,选择“Satellite system” 或者“Internet Site” ,读者自己决定 ,然后在下一步输入你自己的域名,我用的是d.iflab.org
继续安装其它所需的包文件:

sudo apt-get -y install build-essential libssl-dev libyaml-dev git libtool libxslt-dev libxml2-dev redis-server libpq-dev gawk curl pngcrush

果你希望用 linux 本身发送邮件,则需安装 sendmail(具体设置方法请自行查阅):

sudo apt-get install sendmail

1.4 设定主机名称修改hosts:

bistu@Discourse:~$ cat /etc/hostname 
Discourse
cat /etc/hosts
127.0.0.1	localhost Discourse
222.249.250.91	Discourse  d.bistu.edu.cn d.iflab.org

1.5 安装最新版的 Nginx
更新软件源:

cat <<'EOF' | sudo tee -a /etc/apt/sources.list

deb https://nginx.org/packages/ubuntu/ precise nginx
deb-src https://nginx.org/packages/ubuntu/ precise nginx
EOF

加入 nginx 密钥:

curl https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

安装nginx :

sudo apt-get update && sudo apt-get -y install nginx

1.6 安装RVM

\curl -s -S -L https://get.rvm.io | sudo bash -s stable
sudo adduser $USER rvm
newgrp rvm
. /etc/profile.d/rvm.sh
rvm requirements

1.7安装 Ruby 2.0 和打包程序

rvm install 2.0.0
gem install bundler

2.安装Discourse

2.1 创建discourse用户,专门用于安装 discourse 论坛。

sudo adduser --shell /bin/bash discourse
sudo adduser discourse rvm

为用户 discourse 赋予操作数据库的权限:

sudo -u postgres createuser -s discourse
sudo -u postgres psql -c "alter user discourse password 'your password';"

新建www目录并赋予discourse权限

sudo mkdir /var/www
sudo chown discourse.discourse /var/www

切换到 discourse 用户:

sudo su - discourse

2.2下载并安装 discourse 源码

cd /var/www
git clone git://github.com/discourse/discourse.git
cd discourse
git checkout latest-release
bundle install --deployment --without test

最后这一步耗时较长,请耐心等待,大家可以更换ruby的源。安装完毕后,就可以开始配置 discourse 了。

2.3 修改 Discourse 的相关配置文件

cd discourse/config
cp database.yml.production-sample database.yml
cp redis.yml.sample redis.yml
cp discourse.pill.sample discourse.pill
cp environments/production.rb.sample environments/production.rb

2.3.1 修改 database.yml

nano database.yml

需要修改的内容包括:

用户名
密码
主机名
实际上,你还可以修改数据库的名称,不过这里不建议新手修改。 本文修改后的 database.yml 如下,请结合你的实际情况加以修改:

production:
  adapter: postgresql
  database: discourse_prod
  username: discourse   # if using username/password auth
  password: [你自己设定的密码]   # if using username/password auth
  # host: dbhost                # if not localhost
  pool: 5       # size of DB connection pool *per process*
  timeout: 5000
  # db_id: 0    # database ID if hosting multiple sites
  host_names:
    - d.iflab.org  # Update this to be the domain of your production site

test:
  adapter: postgresql
  database: discourse_test
  # username: discourse_test
  # password: 123123123123
  min_messages: warning
  host: localhost
  pool: 5
  timeout: 5000
  host_names:
    - test.localhost

2.3.2 修改 discourse.pill

nano discourse.pill

需要修改的内容包括:

将 rails_root 设为 /var/www/discourse
删除# Running bluepill as a user? Use:这一行下面那行的注释符号

本文修改后的 discourse.pill 如下,请结合你的实际情况加以修改:

rails_env   = ENV['RAILS_ENV']  || "production"
rails_root  = ENV['RAILS_ROOT'] || "/var/www/discourse"

user = ENV["DISCOURSE_USER"] || ENV['USER'] || 'discourse'
group = ENV["DISCOURSE_GROUP"] || ENV['GROUP'] || 'www-data'
num_webs = ENV["NUM_WEBS"].to_i > 0 ? ENV["NUM_WEBS"].to_i : 4

# to debug use
#Bluepill.application("your_app", :foreground => true) do |app|

# Running bluepill as a user? Use:
Bluepill.application("discourse", :base_dir => ENV["HOME"] + '/.bluepill') do |app|

# Running bluepill as root? Use:
#Bluepill.application("discourse") do |app|

  # getting this to work was a nightmare
  # bundle exec spawns a process totally messing with the demonize option
  # so we suck the environment out and set it up first
  bootup_bundle = [ "#{ENV['HOME']}/.rvm/bin/rvm/bootup_bundle",
                    "/usr/local/rvm/bin/rvm/bootup_bundle",
                    `which bootup_bundle`.strip,
                  ].each do |location|
    if File.exist? location
      break location
    end
  end
  # XXX if none match, bootup_bundle is set to the array

  if bootup_bundle
    app.environment = `env -i BUNDLE_GEMFILE=#{rails_root}/Gemfile #{bootup_bundle} exec env`.lines.inject({}) do |env_hash,l|
      kv = l.chomp.split('=',2)
      env_hash[kv[0]] = kv[1]
      env_hash
    end
  end

  app.environment ||= {}

  # Load .env file if there is one
  if File.exist? "#{rails_root}/.env"
    File.read("#{rails_root}/.env").split("\n").each do |l|
      kv = l.chomp.split('=',2)
      app.environment[kv[0]] = kv[1]
    end
  end

  # Force RAILS_ENV to the value specified in the environment of the bluepill invocation
  app.environment['RAILS_ENV'] = rails_env

  app.gid = group
  app.uid = user

  app.working_dir = rails_root
  sockdir = "#{rails_root}/tmp/sockets"
  File.directory? sockdir or FileUtils.mkdir_p sockdir
  num_webs.times do |i|
    app.process("thin-#{i}") do |process|
      process.start_command  = "bundle exec thin start -e production -t 0 --socket #{sockdir}/thin.#{i}.sock --pid #{rails_root}/tmp/pids/thin#{i}.pid --log #{rails_root}/log/thin-#{i}.log --daemonize"

      # Alternatively, you can start with a port number instead of a socket. If you do that, then you MUST update
      # the upstream section in the nginx config to match.
      # The nginx.sample.conf file assumes you're using sockets.
      # process.start_command  = "bundle exec thin start -e production -t 0 -p #{9040 + i} -P #{rails_root}/tmp/pids/thin#{i}.pid -d"

      process.pid_file = "#{rails_root}/tmp/pids/thin#{i}.pid"
      process.start_grace_time = 30.seconds
      process.stop_grace_time = 10.seconds
      process.restart_grace_time = 10.seconds
      process.group = "thins"
      process.uid = user
      process.gid = group
      process.daemonize = false
      process.stdout = process.stderr = "#{rails_root}/log/thin#{i}.log"
      # Thanks to: https://www.garrensmith.com/2012/09/24/Staying-up-with-Unicorn-Upstart-Bluepill.html
      # If the amount of memory is exceeded 3 times out of 5, restart
      process.checks :mem_usage, :every => 1.minutes, :below => 750.megabytes, :times => [3, 5]
    end
  end

#debug instance
#    app.process("thin-debug") do |process|
#      process.start_command  = "bundle exec thin start -e development -t 0 -p 10040 -P #{rails_root}/tmp/pids/thin-debug.pid -l #{rails_root}/log/thin-debug.log" -d"
#      process.pid_file = "#{rails_root}/tmp/pids/thin-debug.pid"
#      process.start_grace_time = 30.seconds
#      process.stop_grace_time = 10.seconds
#      process.restart_grace_time = 10.seconds
#      process.group = "thins"
#      process.uid = user
#      process.gid = group
#      process.daemonize = false
#      process.stdout = process.stderr = "#{rails_root}/log/thin-debug.log"
#    end

  app.process("sidekiq-worker") do |process|
    pidfile = "#{rails_root}/tmp/pids/sidekiq-worker.pid"

    process.start_command  = "/usr/bin/env PIDFILE=#{pidfile} RAILS_ENV=#{rails_env} bundle exec sidekiq -L #{rails_root}/log/sidekiq.log"
    process.pid_file = pidfile
    process.start_grace_time = 30.seconds
    process.stop_grace_time = 10.seconds
    process.restart_grace_time = 10.seconds
    process.uid = user
    process.gid = group
    process.daemonize = true
  end

end

2.3.3 修改 secret_token.rb 文件
为了保证站点的安全,需要生成密钥会话令牌。
cd /var/www/discourse
rake secret
将生成的密钥记下来,打开 config/initializers/secret_token.rb 文件

nano config/initializers/secret_token.rb

执行以下步骤:
清空该文件中的所有已有内容
将下面这行代码拷贝到该文件中,用刚才生成的密钥代替 [TOKEN] 部分

Discourse::Application.config.secret_token = "[TOKEN]"

2.3.4 修改 production.rb 文件,设定邮件发送方式
Discourse 中,系统邮件是非常重要的,它涉及到激活用户、修改邮箱、修改密码等多项功能。
如果你已经有了邮件服务器,则可以通过 smtp 服务发送系统邮件:

修改 config/environments/production.rb 文件:

nano config/environments/production.rb

修改其中有关邮件发送的部分,本文中如下:

  # you may use other configuration here for mail eg: sendgrid

  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    :address              => "yours",
    :port                 => 25,
    :domain               => 'd.iflab.org',
    :user_name            => 'iflab',
    :password             => 'yours',
    :authentication       => 'plain',
    :enable_starttls_auto => true  }

  if ENV.key?('SMTP_URL')
    config.action_mailer.smtp_settings = begin
      uri = URI.parse(ENV['SMTP_URL'])
      params = {
        :address              => uri.host,
        :port                 => uri.port,
        :domain               => (uri.path || "").split("/")[1],
        :user_name            => uri.user,
        :password             => uri.password,
        :authentication       => 'plain',
        :enable_starttls_auto => true
      }
      CGI.parse(uri.query || "").each {|k,v| params[k.to_sym] = v.first}
      params
    rescue
      raise "Invalid SMTP_URL"
    end
  else
    config.action_mailer.delivery_method = :sendmail
    config.action_mailer.sendmail_settings = {arguments: '-i'}
  end

2.4 初始化数据库:

cd /var/www/discourse
createdb discourse_prod
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake db:migrate
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake assets:precompile

2.5 配置服务环境

2.5.1 配置 Nginx
切换到 bistu 用户

sudo su - bistu

编辑 nginx.conf

sudo nano /etc/nginx/nginx.conf

在 http 部分加入下面一行:

server_names_hash_bucket_size 64;

如果该linux 上只有 discourse 一项服务,则禁用默认的 nginx 站点:

sudo mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.disabled

编辑 discourse.conf

sudo cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
sudo nano /etc/nginx/conf.d/discourse.conf

将 server_name 改为你自己的主机名。
根据实际情况修改 socket 和 root 的路径,本文中如下:

upstream discourse {
  server unix:/var/www/discourse/tmp/sockets/thin.0.sock;
  server unix:/var/www/discourse/tmp/sockets/thin.1.sock;
  server unix:/var/www/discourse/tmp/sockets/thin.2.sock;
  server unix:/var/www/discourse/tmp/sockets/thin.3.sock;
}

server {

  listen 80;
  gzip on;
  gzip_min_length 1000;
  gzip_types application/json text/css application/x-javascript;

  server_name d.iflab.org;

  sendfile on;

  keepalive_timeout 65;

  location / {
    root /var/www/discourse/public;

    location ~ ^/t\/[0-9]+\/[0-9]+\/avatar {
      expires 1d;
      add_header Cache-Control public;
	      add_header ETag "";
    }

    location ~ ^/assets/ {
      expires 1y;
      add_header Cache-Control public;
      add_header ETag "";
      break;
    }

    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  X-Forwarded-Proto $scheme;
    proxy_set_header  Host $http_host;

    # If the file exists as a static file serve it directly without
    # running all the other rewite tests on it
    if (-f $request_filename) {
      break;
    }

    if (!-f $request_filename) {
      proxy_pass https://discourse;
	      break;
    }

  }

}

重启 nginx 服务:

sudo /etc/init.d/nginx reload

2.5.2 安装并配置 Bluepill

Discourse 官方使用 bluepill 来管理所有 discourse 的相关服务,省去了很多麻烦。
切换到 discourse 用户

sudo su - discourse

安装并配置 bluepill

gem install bluepill
echo 'alias bluepill="NOEXEC_DISABLE=1 bluepill --no-privileged -c ~/.bluepill"' >> ~/.bash_aliases
rvm wrapper $(rvm current) bootup bluepill
rvm wrapper $(rvm current) bootup bundle

注销并重新登录以激活 bluepill

logout
ssh discourse@localhost

到这里,discourse 就安装完成了,可以通过下面的命令行来启动:

RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ROOT=/var/www/discourse RAILS_ENV=production NUM_WEBS=4 bluepill --no-privileged -c ~/.bluepill load /var/www/discourse/config/discourse.pill

为了让 discourse 每次开机就能自动运行,还需要在 crontab 里写入 bluepill 服务:

crontab -e
@reboot RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ROOT=/var/www/discourse RAILS_ENV=production NUM_WEBS=4 /usr/local/rvm/bin/bootup_bluepill --no-privileged -c ~/.bluepill load /var/www/discourse/config/discourse.pill

2.6 创建管理员

登录你的 discourse 论坛地址,并注册一个用户,本文中注册的邮件地址为 [email protected]
然后再次用 discourse 用户登录 linux,执行以下命令:

ssh [email protected]
cd /var/www/discourse
RAILS_ENV=production bundle exec rails c

me = User.find_by_username_or_email('[email protected]')
me.activate
me.admin = true
me.save

2.7 启用中文支持

目前,Discourse 已经可以支持中文界面,使用管理员账户登录后,点击右上角的管理员名称进入设置界面,然后再点击右上角的小扳手 Admin 进入系统管理界面,在第二项 Settings 中,把 default_locale 从默认的 en 更改为 zh_CN,然后返回论坛主界面,按 Ctrl+F5 刷新浏览器缓存,中文界面就出来了。

3 更新
鉴于 discourse 更新很快,建议每隔几天就执行一次更新。
用 discourse 用户登录 linux,执行以下命令:

ssh [email protected]
bluepill stop
cd /var/www/discourse
git checkout master
git pull
git fetch --tags
bundle install --without test --deployment
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake db:migrate
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake assets:precompile
bluepill start

如果启动失败并出现重试,则按 Ctrl+C 中止,然后执行以下两条命令重启 bluepill 服务:

bluepill quit
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ROOT=/var/www/discourse RAILS_ENV=production NUM_WEBS=4 /usr/local/rvm/bin/bootup_bluepill --no-privileged -c ~/.bluepill load /var/www/discourse/config/discourse.pill

关于撤消秘书组新设立运营组的说明

经过创联理事会决定,我们原来的“秘书组”的定位过于简单和狭隘,现撤消此小组。

同时,针对目前项目开发及社团活动的需要,新设立“运营组”。小组的技术方向为项目管理、项目运营、产品设计;亦有社团活动组织及支持及外联的工作职责。

原秘书组成员自动转入运营组。

欢迎对以上方向感兴趣的同学报名加入运营组。

创联集体活动课后作业@2013.11.3

MIT课程作业 MIT课程代码

提示:

fork MITHomework repository on GitHub/ifLab first

git clone https://github.com/your_username/MITHomework

git branch your_name

git checkout your_name

git add file_name

git commit -m “lesson 1”

git push -u origin your_name

 

modify your readme file  like this: 

MITHomework@student id@group name

 

zt写给Git初学者的7个建议

https://blog.jobbole.com/50603/

本文由 伯乐在线 – 吴鹏煜 翻译自 sixrevisions。欢迎加入技术翻译小组。转载请参见文章末尾处的要求。

当我刚刚开始使用Git的版本控制时,我根本不确定我付出那么多时间是不是会得到回报。Branch、Stage、Stash,这些Git名词对我来说都非常陌生。

而今天的我已不能想象生活没有Git会变成什么样。Git不仅提供了我非常需要的版本控制功能,还让我变成一个更优秀的程序员。

这里有一系列可以帮助你的小贴士,可以让Git成为你开发工作中非常重要的一部分。

 

第一条:花时间去学习Git的基本操作

学习Git的基本操作并不是要求你把整个Git文档从头到尾读完(但如果这就是你的方式,我也不会反对)。

Git里面有太多的教育内容,我很确定里面一定有对你胃口的最佳学习方式。

gitimage0

看一下以下这些Git学习资源吧:

第二条:从简单的Git工作流开始

少即是多。

常常的,Git会和一个复杂的工作流联系起来。不过我可以这么说:你还暂时不需要为了Git的诸多好处,而一下子变成Git大师。

Git的工作流是可以非常简单的 —- 而且在许多情况下你需要的就是这么简单。你当然可以用multiple remote repositories、issue pull request、rebase changes等等,但是你不想用这些的话完全可以不用。

从简单的工作流入手也会使日后添加复杂性或者使用Git高级功能变得简单。当你需要使用这些功能的时候,Git已经准备好了。

这里有一些不同的Git工作流的例子,你可以从他们的想法中得到启发

总的来说:不要因为觉得Git什么都要学就压力很大,你完全可以从今天开始使用Git。

 

第三条:不要再害怕犯错误

Git最出色的一点是:它几乎是100%易上手误操作的。

记住以下几点会让你晚上睡得更香:

  1. Git基本上不删除数据。即使是那些看起来是删除数据的操作,实际上是为了让你更快的撤销删除,而在向系统添加数据。
  2. Git基本可以撤销所有操作。我鼓励你更多的实验和探索你的想法,因为这就是使用版本控制系统系统的最主要的好处之一。
  3. 你团队的每一个成员都在他/她的计算机中有各自的副本。本质上这更像是整个版本控制项目中的冗余备份(包括包括整个历史纪录),你捅了大娄子而且还没办法还原这种情况是极其少见的。

第四条:理解分支概念

在Git里面,分支这个概念是你一开始能学到的最有用的东西了。分支允许你隔离开发你的项目,而要想成为一个高效的Git用户,这是非常关键的一点。

一开始这听起来好像不是什么大事,但一旦你完全的理解了分支概念,你会开始想没有这个你怎么活下去。

尽管其他的版本控制系统也会使用分支概念,Git是第一个实现它,并让它变的好用的系统。

Gitimage01

这里有一些有助你了解Git分支概念的资源:

 

第五条:学习暂存区

当你的提交里面只包含一些相关的变化时,版本控制会变的非常有用[b],它保证了你的提交可以被没有任何副作用的回滚,经常提交的习惯也可以让你的同事更好的了解你的进度。

Git有个功能叫暂存区让这一切都变为可能

学习使用暂存区,并爱上它,因为这是Git里面最重要最独立的一个模块。

  1. 为什么暂存区那么有用
  2. 用暂存区的好处在哪 —- 一个有关Git暂存区的讨论主题
  3. 啊哈!学习Git的那些时候 —- 一篇博客文章
  4. Git上有关暂存区的简短教程

 

第六条:用Git图形界面

尽管使用图形界面绝对不会是一个要求,但我还是高度推荐使用。

使用图形界面让大多数操作都变得简单,让你在项目开始时便占尽优势。

不管怎么说,使用Git不应该只是记住各种命令和参数,而是改进你的编程工作流。如果图形界面可以做到这一点的话,没有理由让简单的事变的困难嘛。

Gitimage02

看一下这些Git界面吧:

  • Tortoise Git – Windows平台下的开源Git图形界面
  • GitX(L) – Mac OS X下的开源Git客户端
  • SourceTree – Windows和Mac下的免费Git或Mecurial界面
  • git-cola – 一款开源Git界面
  • Tower – 我们公司为Mac用户所出的Git界面

使用图形界面并不能减轻你学习Git基础的负担,不过一旦你快乐的征服了Git,使用这些工具会让你的生活变得更轻松。

 

第七条:对自己承诺你会用Git

使用一个新工具一开始会让人非常头疼,走过这条学习曲线的方法只有一个:继续走下去。

做一个充分的承诺,不要回头。在你平常的工作流里引入Git很快就会被证明这是你近期做的最大的,最有意义的决定。

避免这种情况:「我会在这个项目里使用Git,但其他项目就再说了。」至少一开始不要这样。

充分承诺的这种心态会让你有更多的机会去练习,让事情变得更加简单,因为你知道你现在这个项目用了版本控制系统。而更重要的是,让Git成为你的编程习惯。

未来不久,你就会看到只有那么一些情况不需要用到Git,

对自己做一个100%的承诺,作为Git征服之路的开始。

 

创联集体活动内容@2013.11.3

时间:2013-11-3(周日) 2:30PM(健翔桥校区)  7:00PM(小营校区)

地点:健翔桥校区网管中心,小营校区实验楼一层机房

主题:Git、Github的使用,常用技术网站介绍

内容:

  1. Source control introduction
  2. Git basic knowledge
  3. Install Git
  4. Config Git
  5. Initialize Local Git Repo
  6. Clone remote Git Repo from Github.com
  7. Create branchs
  8. Merge branchs
  9. Introduction of Stack Overflow, GistBox, etc.

负责人:马奎@iOS

Note: 请各位组长通知组员注意出席。

使用plsql developer远程连接Oracle数据库

PLSQL Developer不是独立的软件,是要基于Oracle客户端运行的。而实际的Oracle数据库庞大的身材实在是让人难以接受。实际上只需安装一个简单的客户端即可实现远程登录的目标。

1、到Oracle官方网站下载一个客户端:https://www.oracle.com/technetwork/cn/database/features/instant-client/index-092699-zhs.html //时间长了该网址可能会失效,如果无效了话大家直接baidu  instantclient即可

2、我这里选择的是:即时客户端程序包 — Basic: 运行 OCI、OCCI 和 JDBC-OCI 应用程序所需的所有文件(instantclient-basic-win32-11.2.00.70.0.zip)

3、将安装包解压到:F:\Program Files\instantclient_11_2

4、设置环境变量:
1.;F:\Program Files\instantclient_11_2; (在PATH环境变量追加)
2.SET TNS_ADMIN=F:\Program Files\instantclient_11_2 (新建)
3.SET NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK (新建,防止查询乱码) 这里具体的设置得和oracle目标服务器一致,常用的还有AMERICAN_AMERICA.ZHS 16GBK

5、指定需要连接的实例名字,在F:\Program Files\instantclient_11_2目录下新建一个tnsnames.ora文件,然后填入

appdb =                               //服务名 同下service_name,机登录时的数据库,如下图
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))

(CONNECT_DATA =
(SERVER = db)   //这个字段和服务器名一致即可,不一致也不影响使用
(SERVICE_NAME = appdb)
)
)

3

 

 

6、接下来对plsql developer配置,如下图在工具->首选项中设置instantclient的路径。

分别为F:\Program Files\instantclient_11_2

F:\Program Files\instantclient_11_2\oci.dll

5

 

7、工作全部完成后即可重启plsql developer输入账号信息后连接数据库

创联集体活动内容@2013.10.27

时间:2013.10.27 (SUN) 2:00 PM

地点:健翔桥网络中心

主题:使用 LAMP + WordPress 创建个人博客

内容:

  1. Linux & Ubuntu 介绍与简单命令行控制
  2. Apache介绍与配置(on Ubuntu)
  3. MySQL介绍与配置(on Ubuntu)
  4. PHP介绍与配置(on Ubuntu)
  5. WordPress介绍与配置(on Ubuntu)
  6. MIT计算机导论第二节

负责人:刘鸿喆@iOS

ps: 请各组长通知组员活动时间

 

MIT课程代码  MIT课程作业