27、SharePoint使用与管理全攻略

SharePoint使用与管理全攻略

1. 使用RPC操作SharePoint

在SharePoint中,我们可以使用RPC(远程过程调用)来进行各种操作,如创建文档库、页面,删除项目和列表等。

1.1 创建文档库

以下方法可用于创建一个新的文档库:

<Method ID="0,NewList">
  <SetVar Name="Cmd">NewList</SetVar>
  <SetVar Name="ListTemplate">101</SetVar>
  <SetVar Name="Title">New Document Library</SetVar>
</Method>

这里, ListTemplate 的值 101 代表文档库类型。不同的 ListTemplate 设置对应不同的列表类型,具体如下表所示:
| Setting | List type |
| ---- | ---- |
| 100 | Generic |
| 101 | Document library |
| 102 | Survey |
| 103 | Links |
| 104 | Announcements |
| 105 | Contacts |
| 106 | Events list |
| 107 | Tasks |
| 108 | Discussion board |
| 109 | Picture library |
| 110 | Data sources |
| 111 | Site template gallery |
| 113 | Web Part gallery |
| 114 | List template gallery |
| 115 | Form library |
| 120 | Custom grid for a list |
| 200 | Meeting Series |
| 201 | Meeting Agenda |
| 202 | Meeting Attendees |
| 204 | Meeting Decisions |
| 207 | Meeting Objectives |
| 210 | Meeting text box |
| 211 | Meeting Things To Bring |
| 212 | Meeting Workspace Pages |
| 1100 | Issue tracking |

1.2 创建页面

要在前面创建的文档库中添加一个新的网页,需要获取该库的GUID,然后使用 NewWebPage 方法:

<Method ID="0,NewWebPage">
  <SetList Scope="Request">{28F54F4C-BA98-43E9-A60F-8C81E5365560}</SetList>
  <SetVar Name="Cmd">NewWebPage</SetVar>
  <SetVar Name="ID">New</SetVar>
  <SetVar Name="Type">WebPartPage</SetVar>
  <SetVar Name="WebPartPageTemplate">3</SetVar>
  <SetVar Name="Overwrite">true</SetVar>
  <SetVar Name="Title">TempPage</SetVar>
</Method>

WebPartPageTemplate 参数决定了新页面的布局,具体设置如下表所示:
| Setting | Page layout |
| ---- | ---- |
| 1 | Full Page, Vertical |
| 2 | Header, Footer, 3 Columns |
| 3 | Header, Left Column, Body |
| 4 | Header, Right Column, Body |
| 5 | Header, Footer, 2 Columns, 4 Rows |
| 6 | Header, Footer, 4 Columns, Top Row |
| 7 | Left Column, Header, Footer, Top Row, 3 Columns |
| 8 | Right Column, Header, Footer, Top Row, 3 Columns |

1.3 删除项目和列表

以下代码可用于删除前面创建的网页:

<Method ID="0,Delete">
  <SetList Scope="Request">28F54F4C-BA98-43E9-A60F-8C81E5365560</SetList>
  <SetVar Name="Cmd">Delete</SetVar>
  <SetVar Name="ID">1</SetVar>
  <SetVar Name="owsfileref">http://wombat1/New Document Library/TempPage.aspx</SetVar>
</Method>

以下代码可用于删除前面创建的文档库:

<Method ID="0,DeleteList">
  <SetList Scope="Request">28F54F4C-BA98-43E9-A60F-8C81E5365560</SetList>
  <SetVar Name="Cmd">DeleteList</SetVar>
</Method>
1.4 最佳实践
  • 使用Office对象模型来访问SharePoint文档工作区。
  • 在Office应用程序中使用SharePoint Web服务来访问网站、列表和库。
  • 当在Office 2007中使用Web服务时,安装Office 2003和Office 2003 Web服务工具包以启用该功能。
2. 安装SharePoint

SharePoint可以以不同的配置进行安装,从简单到复杂不等。主要的配置选项如下表所示:
| Installation option | Server type | Advantages | Disadvantages |
| ---- | ---- | ---- | ---- |
| Basic | N/A | Dead - simple installation | Database runs on same server (WID); Can’t add SharePoint servers to this configuration |
| Advanced - Standalone | Standalone | Simple installation; Can change the location of the database to store the file on a different drive | Database runs on same server (WID); Can’t add servers to this configuration |
| Advanced - Web frontend | Web frontend | Database runs on separate server; You can add servers | Requires additional steps for install |
| Advanced - Complete (MOSS only) | Complete | Database runs on separate server; You can add servers | All services run on current server; Requires additional steps for install |

根据经验,有以下安装建议:
- Basic install :仅用于暂存和开发服务器。
- Advanced, standalone :适用于未运行Microsoft SQL Server 2000或2005的小型企业。确保将数据库文件放在单独的驱动器上。
- Advanced, web frontend :适用于有SQL Server可用的Windows SharePoint Services (WSS) 安装。
- Advanced, complete :用于Microsoft Office SharePoint Server (MOSS) 的初始安装以启动服务器场。

2.1 安装前的准备

在开始安装之前,需要验证硬件、软件和安全要求是否满足。

硬件要求
| Component | Minimum (staging) | Recommended (production) |
| ---- | ---- | ---- |
| Processor | 1 GHz | Dual 3 GHz |
| RAM | 512 KB | 2 GB |
| Storage | NTFS with 3 GB free | NTFS with 3 GB of free space plus adequate space for web sites |
| Drive | N/A | DVD |
| Display | N/A | 1,024 × 768 or higher resolution monitor |
| Network | Any network connection | 56 Kbps to clients; 1 Gbps between servers |

软件要求
| Component | Requirement | Details |
| ---- | ---- | ---- |
| Operating System | Windows Server 2003 SP1 | Install ASP.NET application server role without FrontPage server extensions; optionally install SMTP service. |
| Framework | .NET 2.0 | Install from dotnetfx.exe download from Microsoft. |
| | .NET 3.0 | Install from dotnetfx3setup.exe download from Microsoft. |
| Database | Windows Internal Database (WID) | Included with SharePoint for basic installation. |
| | SQL Server 2005 (preferred) or SQL Server 2000 SP4 | Required for server farm installation installed. A dedicated SQL server is preferred. |
| Other services for MOSS | Active Directory | Required for MOSS server farm deployment. |

客户端软件要求
| Component | Required | Recommended |
| ---- | ---- | ---- |
| Operating System | Any | Windows XP Professional or Windows Vista Business Edition |
| Browser | Any | Internet Explorer 6.0 or higher; Internet Explorer 7.0 preferred |
| Office suite | None | Office 2003 Professional Edition or higher; Office 2007 Professional preferred |
| Forms client | None | Microsoft InfoPath 2007 |
| Online presence | None | Windows Live Communicator |

安全要求
| Component | Item | Comments |
| ---- | ---- | ---- |
| Domain accounts | Application identity | Used to run the IIS application pool used for SharePoint web sites. Requires User rights on the server and Public rights on the SQL database. |
| | Administration identity | Used to run the IIS application pool for the Central Administration site. Requires local administration rights on the server and Create rights on the SQL database. |
| | Search identity (MOSS) | Used to perform cross - site searches. |
| Firewall | Various | Servers that are exposed to external access via the Internet should be protected. |
| Virus scan (optional) | Microsoft Forefront Security for SharePoint | Scans uploaded documents for viruses and monitor’s content for objectionable material. |

此外,还需要准备以下信息:
- SharePoint安装的产品密钥。
- 用于数据库的SQL Server名称和实例(服务器场安装)。
- 安装软件的服务器管理员用户名和密码,该用户必须有权在SQL服务器上创建数据库。
- 用于访问SQL服务器上数据库的域用户名和密码。

同时,要确保可以访问SharePoint安装DVD或从 http://www.microsoft.com/downloads 下载安装软件:
- 安装WSS,下载 SharePoint.exe
- 安装MOSS,下载 OfficeServer.exe 。如果使用MOSS下载,下载完成后记录下载页面上的产品安装密钥。

2.2 安装WSS

WSS提供了基本的SharePoint功能,不包含MOSS提供的跨站点搜索、聚合Web部件、文档管理工作流和企业模板等功能。安装WSS的步骤如下:
1. 使用具有本地管理权限的域账户登录目标服务器,并在存储数据的SQL服务器上创建数据库权限。
2. 运行 SharePoint.exe 。由于WSS是Windows 2003的一个组件,无需输入产品密钥。
3. 选择基本或高级安装。基本安装使用Windows内部数据库 (WID) 安装单个独立服务器。高级安装允许指定数据库和其他选项。如果选择基本安装,安装将在没有其他选择的情况下完成。以下步骤假设选择高级选项。
4. 选择服务器类型,WSS服务器类型选择说明如下表:
| Server type | Use to |
| ---- | ---- |
| Web Front End | Create a SharePoint server that uses a SQL database on another server. This is the most common choice for production installations. |
| Stand - alone | Install SharePoint and its databases on the current server. This option is a single - server configuration and you can’t add other SharePoint servers to the configuration database after installation. |
5. 安装完成后,点击“关闭”,SharePoint配置向导将引导完成其余的设置过程。如果安装的是独立服务器,点击数据位置选项卡并设置数据库文件的位置,默认情况下SharePoint将数据库安装在主分区上,建议将其更改为不同的磁盘驱动器以方便未来的存储管理。

SharePoint配置向导的步骤如下表所示:
| Step | Title | Explanation |
| ---- | ---- | ---- |
| 1 | None | Introduction to wizard. |
| 2 | Specify Configuration Database Settings | This is the SQL Server and database name where information about SharePoint users and web applications is stored. The database access account is used to read from and write to the database. The database is created using your current account. |
| 3 | Configure SharePoint Central Administration Web Application | The Central Administration site uses a randomly generated port number by default. You can override that default to use a trusted port. You can also choose between NTLM and Kerberos authentication: use Kerberos if your Active Directory service is already set up to use Kerberos authentication, otherwise use NTLM. |
| 4 | Completing the SharePoint Products and Technologies Configuration Wizard | Confirms the settings you have chosen. To enable account creation mode, click Advanced Settings at this point. |
| 4 (advanced) | Advanced Settings | Enter the Active Directory domain and organizational unit where SharePoint will automatically create new accounts. |
| 5 | Configuration Successful | Confirms that the wizard has completed setup and displays the settings that were used. |

需要注意的是,账户创建模式允许SharePoint创建新的AD账户并通过电子邮件发送给用户,此配置仅在WSS中允许,通常由商业托管服务使用。对于大多数企业安装,建议直接管理AD账户。如果选择账户创建模式,需要创建一个AD组织单位 (OU) 并将该OU的控制权委派给SharePoint使用的域账户,且只能在安装期间启用该模式。

2.3 安装MOSS

由于MOSS包含WSS,因此在安装MOSS之前无需安装WSS。安装MOSS的步骤如下:
1. 使用具有本地管理权限的域账户登录目标服务器,并在存储数据的SQL服务器上创建数据库权限。
2. 运行 OfficeServer.exe
3. 输入产品密钥。如果安装试用软件,产品密钥将在下载过程结束时提供。
4. 选择基本或高级安装。基本安装使用WID安装独立服务器,以下步骤假设选择高级安装。
5. 选择服务器类型,MOSS服务器类型选择说明如下表:
| Server type | Use to |
| ---- | ---- |
| Complete | Start a server farm or install a standalone server that uses a separate SQL database. This is the most likely choice for new MOSS installations. |
| Web Front End | Add a server to an existing server farm. Use this installation to add servers after an initial Complete installation. |
| Stand - alone | Install SharePoint and its databases on the current server. This option is a single - server configuration and you can’t add other SharePoint servers to the configuration database after installation. Use this installation for setting up a development environment or virtual PC image. |

安装完成后,安装程序将启动配置向导,其步骤如下表所示:
| Step | Title | Explanation |
| ---- | ---- | ---- |
| 1 | None | Introduction to wizard. |
| 2 | Connect to a server farm | If this is a new install, click No. If you are adding this server to an existing installation, click Yes. |
| 3 | Specify Configuration Database Settings | This is the SQL Server and database name where information about SharePoint users and web applications is stored. The database access account is used to read from and write to the database. The database is created using your current account. |
| 4 | Configure SharePoint Central Administration Web Application | The Central Administration site uses a randomly generated port number by default. You can override that default to use a trusted port. You can also choose between NTLM and Kerberos authentication: use Kerberos if your Active Directory service is already set up to use Kerberos authentication, otherwise use NTLM. |
| 5 | Completing the SharePoint Products and Technologies Configuration Wizard | Confirms the settings you have chosen. To enable account creation mode, click Advanced Settings at this point. |
| 6 | Configuration Successful | Confirms that the wizard has completed setup and displays the settings that were used. |

3. 创建Web应用程序和顶级站点

安装完成后,向导将显示中央管理站点,列出其余的管理任务。如果选择了Web前端或完整安装选项,还需要完成以下主要任务:
- 配置MOSS服务。
- 创建Web应用程序和顶级站点。
- 启用MOSS共享服务。基本和独立安装会自动执行这些任务,如果仅安装WSS,则可跳过与MOSS相关的两个任务。

3.1 配置MOSS服务
  1. 点击“Operations” ➝“Services on server”(在“Topology and Services”标题下),SharePoint将显示在创建站点之前必须启动的服务列表。
  2. 选择服务器类型,点击每个所需服务的“Start”。SharePoint将显示每个服务使用的数据库和用户信息页面,完成每个页面并点击“OK”启动服务。
  3. 服务启动后,继续创建Web应用程序和顶级网站。每个MOSS服务可以在单独的身份下运行,某些服务(如搜索)按特定计划运行,可以配置这些设置以优化安全性和性能,并在需要时通过“Operations”选项卡进行更改。
3.2 创建新的Web应用程序和顶级内容站点
  1. 点击“Application Management”,然后点击“Create or extend a Web application”(在“SharePoint Web Application Management”标题下)。
  2. 点击“Create a new Web application”,SharePoint将显示“Create New Web Application”页面。
  3. 完成页面并点击“OK”,SharePoint将创建新的Web应用程序,完成后显示“Application Created”页面。
  4. 在“Application Create”页面上点击“Create Site Collection”以创建顶级站点。顶级站点选择的模板很重要,因为它是所有其他网站的入口点。标准WSS配置使用团队网站模板,标准MOSS配置使用协作门户发布模板。

通过以上步骤,我们可以完成SharePoint的安装、配置以及相关操作,确保服务器顺利运行并满足企业的各种需求。

SharePoint使用与管理全攻略

4. 启用SharePoint的各项功能

安装并配置好SharePoint后,还需要启用一些重要的功能,以满足不同的使用场景和安全需求。

4.1 启用Internet访问

要让用户能够通过Internet访问SharePoint服务器,需要进行以下操作:
1. 配置防火墙规则,开放必要的端口(如HTTP的80端口、HTTPS的443端口),确保外部网络可以访问服务器。
2. 申请并配置有效的域名和SSL证书,以提供安全的HTTPS连接。可以通过域名注册商购买域名,并从证书颁发机构(CA)获取SSL证书。
3. 在SharePoint的中央管理站点中,配置Web应用程序的URL为外部域名,确保用户可以通过该域名访问站点。

4.2 启用匿名访问

匿名访问允许未经过身份验证的用户访问SharePoint站点的部分内容。启用步骤如下:
1. 打开SharePoint中央管理站点,导航到“应用程序管理” ➝“Web应用程序的策略”。
2. 选择要启用匿名访问的Web应用程序。
3. 在“匿名访问”选项中,选择允许匿名访问的区域(如整个网站、特定列表或库等)。
4. 点击“确定”保存设置。

4.3 启用基于表单的外部用户身份验证(外联网)

对于外部用户(如合作伙伴、供应商等),可以使用基于表单的身份验证。步骤如下:
1. 配置ASP.NET成员资格和角色提供程序,用于存储和管理外部用户的账户信息。可以使用SQL Server数据库来存储这些信息。
2. 在SharePoint的中央管理站点中,导航到“应用程序管理” ➝“验证提供程序”。
3. 选择要配置的Web应用程序,点击“新建”,选择“表单身份验证”。
4. 配置成员资格和角色提供程序的连接字符串和其他相关设置。
5. 点击“确定”保存设置。

4.4 启用自助服务站点创建

自助服务站点创建允许用户自行创建SharePoint站点,提高工作效率。启用步骤如下:
1. 打开SharePoint中央管理站点,导航到“应用程序管理” ➝“Web应用程序的策略”。
2. 选择要启用自助服务站点创建的Web应用程序。
3. 在“自助服务站点创建”选项中,选择允许的用户组和站点模板。
4. 点击“确定”保存设置。

4.5 配置备份和还原

为了确保数据的安全性和可恢复性,需要定期进行备份和还原操作。
1. 备份操作
- 可以使用SharePoint的内置备份工具,在中央管理站点中导航到“备份和还原” ➝“执行备份”。
- 选择要备份的组件(如整个农场、特定Web应用程序、站点集合等)。
- 指定备份文件的存储位置。
- 点击“开始备份”。
2. 还原操作
- 在中央管理站点中导航到“备份和还原” ➝“执行还原”。
- 选择要还原的备份文件。
- 选择要还原的组件和还原的目标位置。
- 点击“开始还原”。

4.6 启用活动审计

活动审计有助于维护服务器的安全性,记录用户的操作行为。启用步骤如下:
1. 打开SharePoint中央管理站点,导航到“监控” ➝“审核设置”。
2. 选择要审计的Web应用程序或站点集合。
3. 配置要审计的事件类型(如文件上传、下载、删除等)。
4. 点击“确定”保存设置。

4.7 配置搜索和PDF等文件类型的图标

为了提高搜索效率和用户体验,需要配置搜索功能和文件类型图标。
1. 配置搜索
- 在中央管理站点中导航到“应用程序管理” ➝“管理服务应用程序”。
- 选择搜索服务应用程序,点击“搜索架构”。
- 配置搜索范围、索引位置和查询规则等。
2. 配置文件类型图标
- 在中央管理站点中导航到“系统设置” ➝“管理文件类型”。
- 为不同的文件类型(如PDF、DOCX等)指定相应的图标。

5. SharePoint管理的其他注意事项

除了上述的安装、配置和功能启用外,还有一些其他的管理注意事项。

5.1 存储需求的估算

SharePoint的存储需求取决于多个因素,可以通过以下方法进行估算:
- 根据当前共享驱动器的使用情况估算,通常第一年的需求会小于当前共享驱动器的使用量,因为存在文件冗余、用户配额限制和上传大小限制等因素。
- 基于用户数量、站点数量和记录中心等因素进行估算,公式如下:
- 拥有个人站点的员工数量 × 100 MB + 顶级部门站点数量 × 10 GB + 记录中心 × 10 GB

5.2 安全账户的使用

在配置SharePoint的各种服务时,建议使用专门创建的账户,而不是内置账户(如Network Service)。这样可以更清晰地识别哪些账户用于SharePoint,避免与其他应用程序的账户混淆。同时,由于人员会流动,使用与特定人员无关的账户可以保证服务的稳定性。

5.3 升级和工具参考

如果需要从早期版本的SharePoint进行升级,可以参考相关的升级指南(通常在官方文档或附录中提供)。此外, stsadm.exe 实用工具命令可以用于执行各种管理任务,详细的命令说明可以在相关的指南中查找。

6. 总结

SharePoint是一个功能强大的协作和文档管理平台,通过正确的安装、配置和管理,可以满足企业在不同场景下的需求。从基本的文档库和页面创建,到复杂的服务器场配置和功能启用,每一个步骤都需要仔细考虑和操作。同时,要注意存储需求的估算、安全账户的使用以及各种功能的配置,以确保服务器的稳定运行和数据的安全。通过本文介绍的方法和步骤,相信可以帮助管理员更好地管理SharePoint服务器,为企业的协作和信息共享提供有力支持。

以下是一个简单的Mermaid流程图,展示了SharePoint安装和配置的主要流程:

graph LR
    classDef startend fill:#F5EBFF,stroke:#BE8FED,stroke-width:2px;
    classDef process fill:#E5F6FF,stroke:#73A6FF,stroke-width:2px;
    classDef decision fill:#FFF6CC,stroke:#FFBC52,stroke-width:2px;

    A([开始安装]):::startend --> B{选择安装类型}:::decision
    B -->|Basic| C(基本安装):::process
    B -->|Advanced - Standalone| D(高级独立安装):::process
    B -->|Advanced - Web frontend| E(高级Web前端安装):::process
    B -->|Advanced - Complete| F(高级完整安装):::process
    C --> G(使用WID安装):::process
    D --> H(可更改数据库位置):::process
    E --> I(连接外部SQL Server):::process
    F --> J(启动服务器场):::process
    G --> K(配置向导):::process
    H --> K
    I --> K
    J --> K
    K --> L{是否为MOSS}:::decision
    L -->|是| M(配置MOSS服务):::process
    L -->|否| N(仅WSS配置):::process
    M --> O(创建Web应用和顶级站点):::process
    N --> O
    O --> P(启用其他功能):::process
    P --> Q([完成配置]):::startend

这个流程图展示了从安装类型的选择到最终完成配置的主要步骤,帮助读者更直观地理解整个过程。通过以上的介绍和说明,希望读者能够全面掌握SharePoint的使用和管理方法,充分发挥其在企业中的价值。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值