উইকিবেস/স্যুট

From mediawiki.org
This page is a translated version of the page Wikibase/Suite and the translation is 37% complete.
Outdated translations are marked like this.
উইকিবেস লোগো
উইকিবেস লোগো
এই নথিতে উইকিবেস স্যুটটি ম্যানুয়ালি ইনস্টল করার পদ্ধতি বলা হয়েছে। ডকারের মাধ্যমে ইনস্টলেশন নির্দেশাবলীর জন্য, $1 দেখুন। For instructions installing Wikibase Suite under Docker, see Wikibase/Docker . শুধুমাত্র উইকিবেস এক্সটেনশন ইনস্টল করার জন্য, Wikibase/Installation দেখুন।

ভূমিকা

উইকিবেস ইনস্টলে প্রায়শই নিম্নলিখিত বিষয়বস্তু থাকে:

  • একটি RDBMS (MariaDB/MySQL বা SQLite) [প্রয়োজনীয়]
  • মিডিয়াউইকি [প্রয়োজনীয়]
    • উইকিবেস এক্সটেনশন [প্রয়োজনীয়]
    • অন্যান্য প্রয়োজনীয় এক্সটেনশন [ঐচ্ছিক]
  • উইকিডাটা ক্যোয়ারী সার্ভিস (WDQS) [ঐচ্ছিক]
    • WDQS প্রক্সি
    • WDQS ফ্রন্টএন্ড
  • দ্রুত বিবৃতি [ঐচ্ছিক]
  • ইলাস্টিক সার্চ [ঐচ্ছিক]

ডকার ইনস্টলে এই সমস্ত উপাদান রয়েছে এবং একটি একক docker-compose কমান্ড দিয়ে শুরু করা যেতে পারে। এই ইন্সটলটি অনেক উইকিবেস ব্যবহারকারীদের চাহিদা পূরণ করে, বিশেষ করে যারা সবেমাত্র শুরু করছে।

যাইহোক, যারা ডকার চালাতে চান না তাদের জন্য (অতিরিক্ত প্রশাসনিক ওভারহেড, উৎপাদনে স্কেলিং সমস্যা, বা উপাদানগুলি আরও ভালভাবে বোঝার ইচ্ছার কারণে), প্রতিটি উপাদান ম্যানুয়ালি কীভাবে ইনস্টল করবেন তা এখানে।

নেটওয়ার্ক কনফিগারেশন

নেটওয়ার্কের বিবরণ এবং চিত্রটি দেখুন: https://www.mediawiki.org/wiki/Wikibase/Maintaining#Architecture_overview

ডুব দেওয়ার আগে

উইকিবেস প্রযুক্তিগত ডক সাইট এ পড়া এবং উপভোগ করার জন্য প্রচুর পরিমাণে প্রযুক্তিগত ডকুমেন্টেশন রয়েছে।

এই প্রক্রিয়াটি সফলভাবে নেভিগেট করতে, আপনার সম্ভবত থাকতে হবে:

  • লিনাক্স এবং ওয়েব সার্ভার সফটওয়্যারের সাথে পরিচিতি
  • এক বা একাধিক সার্ভার থেকে আপনি সফ্টওয়্যার ইনস্টল করতে পারেন৷

উইকিবেস স্যুট ইনস্টল করা

মারিয়াডিবি

মন্তব্য

নির্দেশনা

The MediaWiki install linked in the next step relies on a running RDBMS with a database and user already created.

আমরা MariaDB ব্যবহার করার পরামর্শ দিই, এবং যদিও একটি সম্পূর্ণ ইনস্টলেশন গাইড এই নথির সুযোগের বাইরে, এই চমৎকার ডকুমেন্টেশনের সংগ্রহ এবং এই টিউটোরিয়াল দিয়ে শুরু করুন।

মিডিয়াউইকি

নোট

  • উল্লেখ্য যে মিডিয়াউইকির ভ্যানিলা ইনস্টল (সঠিকভাবে) পোস্টগ্রেএসকিউএলকে একটি কাজের বিকল্প হিসাবে নোট করে, উইকিবেস PostgreSQL এর সাথে কাজ করে না।
  • মিডিয়াউইকির এই ইনস্টলের জন্য, আমরা php-fpm-এর সাথে nginx ব্যবহার করার পরামর্শ দিই।
  • This configuration assumes you have php-fpm running on the same host; to use a network port use fastcgi_pass HOST:9000.
  • You will need the following PHP extensions (install doc): calendar ctype dom fileinfo iconv intl json mysql mbstring xml

Instructions

Install instructions for MediaWiki

Working MediaWiki nginx config

Wikibase extension

Notes

Install zip and unzip for Composer to work correctly.

The Wikibase data model is described in these documents:

Instructions

Installation guide for Wikibase

Installation guide for Composer

Optional sidebar

If you'd like to add some Wikibase-related links to your main page sidebar, you can add these configuration stanzas to your LocalSettings.php.

Extensions

There are many extensions often used with Wikibase. Only some require special install instructions for a Wikibase context; the list below includes information about all extensions included in our Docker images.

OAuth

Wikibase needs the OAuth extension for the Wikidata query service, as you'll see below.

Installation

The OAuth install instructions are comprehensive. Note that you'll benefit from a working understanding of User rights to finish this install.

Other extensions

These extensions can be installed simply using their own installation instructions.

Native and non-native data types

Extending Wikibase's functionality beyond its native data types may require the installation of additional extensions.

Native data types
  • commonsMedia = "string"
  • entity-schema = "string"
  • external-id = "string"
  • geo-shape = "string"
  • globe-coordinate = "globecoordinate"
  • monolingualtext = "monolingualtext"
  • quantity = "quantity"
  • string = "string"
  • tabular-data = "string"
  • time = "time"
  • url = "string"
  • wikibase-item = "wikibase-entityid"
  • wikibase-property = "wikibase-entityid"
Non-native data types

Many other data types exist and are implemented in some instances of Wikibase, such as Wikidata. Because these other instances are frequently highly customized, below is a list of officially supported data types and the extensions they require:

Wikidata Query Service

The Wikidata Query Service (WDQS), which consists of the Blazegraph SPARQL query backend and its updater, can be and often is used in conjunction with Wikibase.

Instructions

While intrepid users may wish to compile their own instance of WDQS, we recommend using the precompiled version.

Elasticsearch

Overview

Elasticsearch is a Lucene-based search engine. To get it working with MediaWiki/Wikibase, you'll need the following software:

Instructions

wfLoadExtension( 'Elastica' );
wfLoadExtension( 'CirrusSearch' );
wfLoadExtension( 'WikibaseCirrusSearch' );

$wgCirrusSearchServers = [ '<name/IP of host running ElasticSearch>' ];
$wgSearchType = 'CirrusSearch';
$wgCirrusSearchExtraIndexSettings['index.mapping.total_fields.limit'] = 5000;
$wgWBCSUseCirrus = true;
> $PATH_TO_ELASTICSEARCH/bin/elasticsearch-plugin install org.wikimedia.search:extra:6.5.4
> $PATH_TO_ELASTICSEARCH/bin/elasticsearch-plugin install org.wikimedia.search.highlighter:experimental-highlighter-elasticsearch-plugin:6.5.4
  • Modify elasticsearch.yml as needed:
    • Name your cluster with the cluster.name directive.
    • Make a single-node cluster: discovery.zen.minimum_master_nodes: 1
    • Set network.host as needed
  • Modify jvm.options as needed (above all, set -Xms and -Xmx based on the amount of memory available to your host)
  • Note the "flood stage" settings for your disk size.
    • You can either ensure that at least 5% of the disk is available at all times, or you can alter the cluster.routing.allocation.disk.watermark.flood_stage setting. For more information, consult this StackOverflow article.
  • Run UpdateSearchIndexConfig for CirrusSearch:
php extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php --startOver
  • Start jobs running in the background:
php /var/www/html/maintenance/runJobs.php --wiki my_wiki --wait &
  • Run ForceSearchIndex:
php extensions/CirrusSearch/maintenance/ForceSearchIndex.php --queue --maxJobs 10000 --pauseForJobs 1000 --skipLinks --indexOnSkip

QuickStatements

Instructions

  • Using Git, clone the two repositories into your web root (hereafter www_root):
  • In www_root/quickstatements, run composer install.
  • For the files that follow, determine the appropriate values in your installation for the following environment variables, and set them. They can also be easily substituted in place using envsubst.
MW_SITE_NAME="site name"
WB_PUBLIC_SCHEME_HOST_AND_PORT=<public ip>
WIKIBASE_SCHEME_AND_HOST=<localhost>
WB_PROPERTY_NAMESPACE=122
WB_ITEM_NAMESPACE=120
WB_PROPERTY_PREFIX="Property:"
WB_ITEM_PREFIX="Item:"
  • Create the following files with the contents specified.

/www_root/quickstatements/public_html/config.json:

{
	"site" : "${MW_SITE_NAME}" ,
	"bot_config_file" : "/var/www/html/bot.ini" ,
	"logfile" : "/var/log/quickstatements/tool.log" ,
	"sites" : {
		"${MW_SITE_NAME}" : {
			"oauth" : {
				"language":"${MW_SITE_LANG}" ,
				"project":"${MW_SITE_NAME}" ,
				"ini_file":"/quickstatements/data/oauth.ini" ,
				"publicMwOAuthUrl":"${WB_PUBLIC_SCHEME_HOST_AND_PORT}/w/index.php?title=Special:OAuth" ,
				"mwOAuthUrl":"${WB_PUBLIC_SCHEME_HOST_AND_PORT}/w/index.php?title=Special:OAuth" ,
				"mwOAuthIW":"mw"
			} ,
			"server" : "${WB_PUBLIC_HOST_AND_PORT}" ,
			"api" : "${WIKIBASE_SCHEME_AND_HOST}/w/api.php" ,
			"pageBase" : "${WB_PUBLIC_SCHEME_HOST_AND_PORT}/wiki/" ,
			"toolBase" : "${QS_PUBLIC_SCHEME_HOST_AND_PORT}/" ,
			"types" : {
				"P" : { "type":"property" , "ns":"${WB_PROPERTY_NAMESPACE}" , "ns_prefix":"${WB_PROPERTY_PREFIX}" } ,
				"Q" : { "type":"item" , "ns":"${WB_ITEM_NAMESPACE}" , "ns_prefix":"${WB_ITEM_PREFIX}" }
			}
		}
	}
}

/quickstatements/data/oauth.ini:

; HTTP User-Agent header
agent = 'Wikibase QuickStatements'
; assigned by Special:OAuthConsumerRegistration (request modelled after https://www.wikidata.org/wiki/Special:OAuthListConsumers/view/77b4ae5506dd7dbb0bb07f80e3ae3ca9)
consumerKey = '<OAUTH_CONSUMER_KEY>'
consumerSecret = '<OAUTH_CONSUMER_SECRET>'
  • Set these environment variables according to your installation:
    • MW_ADMIN_NAME: MediaWiki username with administrator rights
    • QS_PUBLIC_SCHEME_HOST_AND_PORT: External IP of your query service instance
  • With the variables set, create an OAuth consumer by executing the following php script on your MediaWiki installation where OAuth is installed:
php /var/www/html/extensions/OAuth/maintenance/createOAuthConsumer.php \
    --approve \
    --callbackUrl $QS_PUBLIC_SCHEME_HOST_AND_PORT/api.php \
    --callbackIsPrefix true \
    --user $MW_ADMIN_NAME \
    --name QuickStatements \
    --description QuickStatements \
    --version 1.0.1 \
    --grants createeditmovepage \
    --grants editpage \
    --grants highvolume \
    --jsonOnSuccess
  • A successful response will have the "created" flag set to "true", as in this example:
{"created":true,"id":1,"name":"QuickStatements","key":"30e532f04e1bdf63ac281fcbc819170c","secret":"f60f31ad4196af40bb0598e1d4d3435a3515604e","approved":1}

For more information, consult the Docker image README.

Reference