Welcome to Southern Fried DNN!

Transcription

Welcome to Southern Fried DNN!
Admin 101
Administrators 101
Joe Craig
Robb Bryn
April 11, 2013
About Administrators 101
Our objective: To provide you the tools so that you will be
able to effectively:
Install,
Configure,
Upgrade, and
Manage
DotNetNuke installations
•
•
•
•
In DNNspeak, this is more about “superuser” work than
portal administrator work.
About Joe
•
•
Involved with DotNetNuke since 2006
Patapsco Research Group
(http://patapscorg.com)
•
•
•
Provides tech support at DNNCreative.com
Email: jncraig@gmail/com
Twitter: @josephncraig
About Robb
And who are you?
Logistics
• Schedule
• Rest Rooms
• Questions?
Today’s Schedule
Time
9:30 AM
Topic
9:50 AM Introduction
10:00 AM
10:50 AM Installing DotNetNuke
10:50 AM
11:00 AM Break
11:00 AM
11:30 AM Configure
Secure
Optimize
12:00 PM Skins and Modules
Testing
Installing
12:45 PM Lunch
11:30 AM
12:00 PM
Time
12:45 PM
1:00 PM
2:00 PM
2:50 PM
3:00 PM
Topic
1:00 PM Questions
1:50 PM Backing Up a DotNetNuke
Installation
Upgrading DotNetNuke
2:50 PM Roles and Permissions
Site and Page Templates
Multi-Portal Issues
3:00 PM Break
3:50 PM
3:50 PM Moving a Site
Local to Host
Host to Local
Azure
4:00 PM Break
4:00 PM
4:30 PM Questions and Discussion
4:45 PM
Putting It All Together
(main auditorium)
About DotNetNuke
•
•
•
DotNetNuke helps organizations build and manage
content-rich websites, social intranets and online
communities.
It is the most widely adopted Web Content Management
Platform for Microsoft .Net, powering over 700,000
production web sites worldwide.
The powerful web application development platform
allows businesses to easily customize and extend their
desktop and mobile websites.
More: http://www.dotnetnuke.com
About your Azure computer
Remote Desktop:
frieddnn1.cloudapp.net:58749
Username: Administrator
Password: Frieddnn1 (it is case sensitive)
Installing DotNetNuke
Let's Install DotNetNuke!
•
Components of a DotNetNuke Installation
o
o
o
•
Database
Website Directory
IIS Website & AppPool
DotNetNuke Minimum Requirements
DotNetNuke Minimum Requirements
Database
• DotNetNuke requires a MS SQL Server
•
•
•
database
Most of the cofigurable settings are stored in
the database.
The database is what helps to enable a
dynamic website (i.e. layout, look & feel and
content are not fixed)
Create and manipulate the database with
Microsoft SQL Server Management Studio
SQL Server Management Studio
Click this icon on the task bar
• Login with Windows Authentication.
• This login give you “sa” privileges.
• Not recommended for the DNN
datbase user. We will create a
special account for that.
Create the DotNetNuke Database
Expand the Object Explorer
Create a new Database
• Right-click on Databases
• Select New Database …
Enter a name for the
new database
Don’t click “OK” just yet.
Create a Database – Best Practice
Choose the Path for the database
• Create directory C:\databases
• Choose the new directory as the path
Create a Database – Best Practice
Choose the Path for the database
• Create directory C:\databases
• Choose the new directory as the path
Now Click “OK” and check that the database was created
CreateDatabase User
• Username, password, and “appropriate”
privileges.
Right-Click to create a new login
CreateDatabase User
• Username, password, and “appropriate”
privileges.
New Login
CreateDatabase User
• Username, password, and “appropriate”
privileges.
Add User to Database
Check with SSMS
Can you connect?
Create the DNN Website Directory
• Contains all of the code and files for
•
DotNetNuke
Server as the “home directory” for the
DotNetNuke installation.
• Best Practice:
Create a directory to hold all
websites – c:\websites
• Exercise:
Create the directory
Download DotNetNuke
• Always start with the Install Package
• Login with your username/password
(create one if you don’t have one)
Download DotNetNuke
• Use the Install Package
• I recommend that you
avoid the Web Platform
Installer or the Web Matrix
Install
There is a nice video and installation
instructions at the bottom of this page!
• The current version of
DotNetNuke will download
when you click the box!
OOPS!!!!!!!!!!!
For this exercise we want to install
DotNetNuke 06.02.07
(We will upgrade to 07.05.00 later
Click the Green Downloads link
Click 06.02.07
Click 06.02.07 – New Install
Save the download in your Downloads
folder
Extract DotNetNuke
•
Unblock the file
o Right-click, choose
Properties
o Click “Unblock”
(Unblocking ensures that
you can extract all files from
the ZIP archive)
The Website Directory
• Create c:\websites\DNN
• Right-click on the install zip file
• Extract all files to c:\websites\DNN
IIS Website & AppPool
•
Create the website: Internet Information
Service (IIS) Manager
Right-click on “Sites”
to create a new
website
IIS Website & AppPool
•
Create the website: Internet Information
Service (IIS) Manager
IIS Website & AppPool
•
Website Name
AppPool
Path to website
Host Name (URL)
Create the website: Internet Information
Service (IIS) Manager
Best Practice: *.dnndev.me
• Known to DNS.
• Resolves to 127.0.0.1, a.k.a “Localhost”.
• Useful if your site will be viewed on the same
computer (good for development).
• Solves the “directory” problem.
• No editing of “hosts” file.
AppPools
Let’s talk about AppPools …
AppPool
•
•
•
•
An Internet Information Services (IIS) application pool is a grouping of
URLs that is routed to one or more worker processes.
Because application pools define a set of Web applications that share one
or more worker processes, they provide a convenient way to administer a
set of Web sites and applications and their corresponding worker
processes.
Process boundaries separate each worker process; therefore, a Web site or
application in one application pool will not be affected by application
problems in other application pools.
Application pools significantly increase both the reliability and manageability
of a Web infrastructure.
AppPool Identity
•
•
•
An Internet Information Services (IIS) worker process is
a windows process (w3wp.exe) which runs Web
applications, and is responsible for handling requests
sent to a Web Server for a specific application pool.
The AppPool Identity is the name of the worker process
that controls the AppPool
Important: The AppPool Identity must have full
control over the files in your website directory!
AppPool (cont’d)
•
•
IIS Application Pool Availability --Web sites and Web applications
depend on the availability of Internet Information Services (IIS)
application pools. IIS application pools in turn depend on the
Windows Process Activation Service (WAS). If WAS is not running
or errors occur during the startup or shutdown of an application pool,
Web sites and Web applications may not be available.
IIS Application Pool Configuration -- To ensure Web site and Web
application isolation, Internet Information Services (IIS) application
pools must be configured to have unique names and correctly
configured identities. If errors occur during the configuration of an
application pool, the application pool may not be available to serve
the Web sites and Web applications that are assigned to it.
AppPool Recycling
•
•
•
•
•
Internet Information Services (IIS) application pools can be periodically
recycled to avoid unstable states that can lead to application crashes,
hangs, or memory leaks.
By default, application pool recycling is overlapped, which means that the
worker process that is to be shut down is kept running until after a new
worker process is started.
After a new worker process starts, new requests are passed to it. The old
worker process shuts down after it finishes processing its existing requests,
or after a configured time-out, whichever comes first.
This way of recycling ensures uninterrupted service to clients.
However, if an application in the application pool cannot run more than one
instance of itself at a time, overlapping rotation can be disabled.
Idle Timeout Shutdown
• Your website can be shutdown due to
inactivity!
• This can cause lightly used ASP.NET (e.g.
DotNetNuke) sites to load slowly
•
This answers one question: Why are DotNetNuke sites
so slow?
Idle Timeout Solutions
• "Idle timeout" is an application pool
configuration setting.
o Open IIS Manager and check Advanced Settings for
an application pool.
o You do want the AppPool to recycle occasionally!
• Keep Alive Service
o Visits site regularly to prevent shutdown
o Convenient for situations (shared hosting) where you
can’t configure IIS
Configuring the Website
• The AppPool Identity has the same name as
your AppPool
• Configure the File Permissions for the
website directory to give full control to:
o IIS APPPOOL\WEBSITENAME
o IIS APPPOOL\dnn.dnndev.me
Setting the Permissions
Edit to change file
permissions
Setting the Permissions
Add to add the
user
Setting the Permissions
• Enter the AppPool
Identity
• OK
Setting the Permissions
AppPool Identity
Give Full Control
Setting the Permissions
What Have We Done?
• Created an empty database and user
• Created a website directory and added
DotNetNuke’s files
• Created an IIS Website and AppPool
• Gave the AppPool Identity full control over
the website directory
Drum Roll Please …
Browse to the site
http://dnn.dnndev.me
The DotNetNuke Installation Wizard
Configure
Secure
Optimize
Host Settings
Site settings
Security Best Practices
•
•
•
•
http://www.dotnetnuke.com/Resources/Wiki/Page/Securi
ty_best_practices.aspx
http://mitchelsellers.com/blogs/2011/10/07/securing-adotnetnuke-installation---passwords.aspx
http://www.iowacomputergurus.com/products/dotnetnuke
-extensions/install-security
http://www.iowacomputergurus.com/products/dotnetnuke
-extensions/secure-password-recovery
Performance Best Practices
• http://www.dotnetnuke.com/Resources/Wiki/P
age/Performance_best_practices.aspx
• http://www.iowacomputergurus.com/Portals/0
/whitepapers/DNN-PerformanceConfiguration-Best-Practices.pdf
• http://www.iowacomputergurus.com/products/
dotnetnuke-extensions/scheduled-sql-jobs
Extensions
Skins and Modules
Testing
Installing
Installing Extensions Best Practice
• ALWAYS install and test first on your
•
development site!
ALWAYS make a backup before starting!
ZIP Files
• All DotNetNuke Extensions are provided as
ZIP files – a.k.a. “packages”.
• (Almost) All extensions are installed from the
Host, Extensions page.
• Be wary of anything that has to be installed
some other way.
Kinds of Extensions
Testing Extensions
• Test before installing on your test site.
• Test before installing on your live site.
• Remember to test the uninstall process.
Test Before Installing
• http://www.dotnetnuke.com/News/PressReleases/DotNetNuke-Releases-ExtensionVerification-Service.aspx
• Mostly for extension developers
• http://www.youtube.com/watch?v=VlwzGljbbiw
Finding and Installing Extensions
• From Developers, other people other
•
•
websites
codeplex.com
store.dotnetnuke.com
• Search codeplex and the DotNetNuke Store
from the Host, Extensions page (later
versions of DotNetNuke)
Testing Skins
•
•
http://www.dotnetnuke.com/Community/ExtensionsForge/view/ProjectDetail/project/DnnSkinTest.aspx
A “portal template” used to test skins
Backing Up a DotNetNuke
Installation
Three Approaches
• Brute force – which is what most of us do …
• DNNBackup (Evotiva)
http://store.dotnetnuke.com/home/product-details/dnnbackup-654backup-restore-and-clone-dotnetnuke
• SiteBackup (Papayas)
http://store.dotnetnuke.com/home/product-details/sitebackup-625free-15-days-trial
Brute Force Backup
• Database:
create a backup with SSMS
• Web Directory:
Make a ZIP
• Thank you, Jon Sheely!
http://inspectorit.com/tips-tricks/backup-your-website-to-skydriveusing-powershell/
Restoring a DotNetNuke
Installation
Restore – it’s the un-backup
• Restore the database using SSMS
• Delete the contents of the web directory and
unzip the backup file there
Upgrading a DotNetNuke
Installation
Upgrade Preliminaries
• MAKE A BACKUP!!!
And store it safely
• It is a lot easier to restore than to rebuild
• If possible:
o Do the upgrade on a copy of the site
o Move the upgraded site to production
Preliminaries
• Modules
o Upgrade to the highest version possible at each step
•
Skins
o Upgrade if necessary.
o Be sure to worry about menus, specially if they are
non-standard.
o Check with Skin vendors for purchased (or
downloaded) skins
o SolPartMenu and DNN NAV menu are out of date,
and can be replaced easily
Recommended Upgrade Path
•
http://www.dotnetnuke.com/Resources/Wiki/Page/Sugge
sted_Upgrade_Path.aspx
•
I have gone from 5.x to 7.x in a single step!
•
Make backups after every step and test at every step
Upgrade in Four Easy Steps
• Download the DotNetNuke Upgrade Package.
When you installed, you used the Install Package.
• Unblock the ZIP file.
• Unzip the ZIP file RIGHT ON TOP OF THE
WEB DIRECTORY!
Let it overwrite existing files…
•
Browse to your site and follow directions
OK, there is a 5th Step
• Test your site like crazy
o
o
o
o
Navigation
Styling – does it “look right”?
Multiple Browsers – and browser versions
Links
• Be prepared for occasional oddities
o Particularly on crossing major version boundaries,
e.g. 5.x to 6.x or 6.x to 7.x
What Happens in an Upgrade
• New SQL scripts are run (for each version)
• Updated extensions are installed
If Something Goes Wrong
• The Upgrade Fails …
• Don’t Panic!
• Save as much information as possible
o Screen Shots
o SQL Log Files: *.log.resources files
 In: \Providers\DataProviders\SqlDataProvider
 Any file larger than 1K probably has error reports
 Files named by Version Number
• You can always restore to where you started.
IIS / .NET Issues
•
You may need to change ASP.NET version especially
going to 7.x from an earlier version.
•
Is an AppPool configuration item
•
Don’t forget to recycle the AppPool after changes
•
If fact, if any error occurs just after an upgrade, clearing
the cache and recycling the AppPool (Restart
Application) won’t hurt!
Things to Watch For
• Skin Doctype issues
• Various menu issues
o DDR Menu can easily replace SolPart or DNN NAV
o Non-standard menus in purchased skins
• IE Nastiness
• If you find these, usually Google or Forums
can help solve them.
Getting Help
• DotNetNuke.com forums
• People you know (or meet here)
• Consultants (There are a bunch of us…)
After the Upgrade is Done
• MAKE ANOTHER BACKUP!
Roles and Permissions
Site and Page Templates
Multi-Portal Issues
Permissions
• Determine who can see
o Pages
o Specific Modules on a Page
• Permissions can be assigned to
o Individual Users
o Groups of Users by Security Role membership
Standard Security Roles
Page and Module Permissions
Page Settings
Module Settings
Module Permission Example
• Login module on a page
• Only for NOT logged in users
Set the permission to be visible for “Registered” users
•
Page Appearance will vary depending on
user’s Security Role Memberships.
Site and Page Templates
Tools built into DotNetNuke for copying pages
and entire portals.
Page Template
• Includes
• Does NOT include
• Gotchas
o Modules set to “Display Module on All Pages” in the
target site will be duplicated
• Best Practice:
All Pages”
Don’t use “Display Module on
Site Template
• Does NOT include:
o
o
o
o
Modules
Skins
Other Extensions
Users
• Does Include
o Security Roles
o /Portal/N contents
• Works best when the DNN Version doesn’t
change
Multi-Portal Issues
• How many sites can be supported?
o Trade off with performance
• Mixing Data
• Mixing Users
Moving a Site
Migration Tools
• Backup
o SSMS for database
o ZIP for web directory
• Moving files
o FTP
o RDP
• DNNBackup from Evotiva*
o Will do most of the work for you
o Especially helpful if you need to go to a lower version
of SQL Server
o Emergency Recovery, too
Local to Host
•
•
•
Backup on Local
Database
o Copy database and web
directory to host
o Restore database
o Fix Database user if
needed
Web Directory
o Create
o Unzip web directory
backup
•
•
•
Web Site
o Create with IIS
o Configure AppPool
Adjust Web Directory
Permissions
Adjust
o DNS
o Portal Alias (database
table)
Host to Local
• In the previous
o Replace “Host” with “Local”
o Replace “Local” with “Host”
• There’s just a redefinition as to which is the
host and which is the “local”
Azure
Additional Configuration
Resources
Tools (you might find these to be useful)
• Visual Studio
The Express Edition is fine for administrative work
• SQL Server Management Studio
Necessary to see what is happening in the database,
and for making changes.
• Remote Desktop
• FTP (Filezilla)
o Both RDP and FTP will get you access to the files on
your server.
o If you do have RDP access, you may be able to have
other tools installed on the server
More Tools
• Notepad ++
• ZIP, WinRAR, 7Zip
• Fiddler
• GIMP (free image editor)
• SQL Profiler
o When you need it, you really need it
References
• DotNetNuke Manuals
http://www.dotnetnuke.com/Resources/Manuals.aspx
• DotNetNuke Installation Instructions
http://info.dotnetnuke.com/rs/dotnetnuke/images/DotNet
Nuke_Install_Package_Installation_Instructions_071410
.pdf
• Recorded Webinar
http://www.dotnetnuke.com/Resources/VideoLibrary/Viewer/Video/429/View/Details/DotNetNukeExplained-Installation-.aspx
References (cont’d)
• Application Pool Identities
http://www.iis.net/learn/manage/configuringsecurity/application-pool-identities
References (cont’d)
• Configuring
References (cont’d)
• SEO
References (cont’d)
• Troubleshooting
References (cont’d)
• SMTP
http://www.dotnetnuke.com/Resources/Blogs/EntryId/36
06/ContentItemId/149106/How-to-configure-SMTPlogging-in-DotNetNuke.aspx
Questions and
Discussion