Skip to content

Instantly share code, notes, and snippets.

@amirulasyraf88
Created September 23, 2015 02:06
Show Gist options
  • Save amirulasyraf88/9488603efe4cae79e080 to your computer and use it in GitHub Desktop.
Save amirulasyraf88/9488603efe4cae79e080 to your computer and use it in GitHub Desktop.
SYS ADMIN
'''System administrator maintenance, Assignment 02 (Drupal and Wiki)''' is the last project appoint to us 6 member of the group to develop Drupal and Wiki webpage base on their own understanding on how to Install the 2 common CMS (Content Management System) chosen to provide the latest update of the report and assignment.
= Group Member =
{| class="wikitable"
| 1. || Amirul Asyraf Bin Mohamed Azam || style="text-align:right;" | 1141123412
|-
| 2. || Muhammad Nasriq Bin Mohd Khairul Leow || style="text-align:right;" | 1141124233
|-
| 3. || Ahmad Fahmi Bin Ariffin || style="text-align:right;" | 1141125316
|-
| 4. || Mohammed Yahea Ali Mahyoub Al-Hashedi || style="text-align:right;" | 1141123586
|-
| 5. || Ali Ahmed Mohammed Al-Fakih || style="text-align:right;" | 1141123608
|-
| 6. || Bachir Bendrissou || style="text-align:right;" | 1141123432
|}
= '''Installation Gallery''' =
<gallery>
File:Screenshot (280).png|Domain Name Config
File:Screenshot (286).png|Web Hosting Cpanel
File:Screenshot (295).png|FileZilla
File:Screenshot (304).png|Drupal Page
File:Screenshot (270).png|Web Hosting
File:Screenshot (266).png|Freenom
</gallery>
= '''Installing Drupal''' =
[[File:drupal_logo.png|thumb]]
Drupal is open source software maintained and developed by a community of over 1,000,000 users and developers. It's distributed under the terms of the GNU General Public License (or "GPL"), which means anyone is free to download it and share it with others. This open development model means that people are constantly working to make sure Drupal is a cutting-edge platform that supports the latest technologies that the Web has to offer. The Drupal project's principles encourage modularity, standards, collaboration, ease-of-use, and more.
= System requirements =
To install and run Drupal your web server must meet certain minimum requirements. Most web hosting companies meet these requirements. However, a few stand out by also actively supporting the Drupal community. If you need hosting, consider selecting one of[http://drupal.org/hosting these web hosts]
== Disclaimer ==
Note that the minimum requirements of Drupal core can be subject to change, given an important enough reason. Where such a change is likely to have broad impact on Drupal's user base, every effort will be made to communicate these decisions ahead of time.
== Disk space ==
A minimum installation requires 15 Megabytes. 60 MB is needed for a website with many contributed modules and themes installed. Keep in mind you need much more for the database, files uploaded by the users, media, backups and other files.
== Web server ==
[https://www.drupal.org/requirements/webserver More details about web server requirements.]
== Database ==
* Drupal 6: MySQL 4.1 or higher, PostgreSQL 7.1,
* Drupal 7: MySQL 5.0.15 or higher with PDO, PostgreSQL 8.3 or higher with PDO, SQLite 3.3.7 or higher
* Drupal 8: MySQL 5.5.3/MariaDB 5.5.20/Percona Server 5.5.8 or higher with PDO and an InnoDB-compatible primary storage engine, PostgreSQL 8.3 or higher with PDO, SQLite 3.4.2 or higher
[https://www.drupal.org/project/sqlsrv Microsoft SQL Server]
[https://www.drupal.org/project/oracle Oracle]
[https://www.drupal.org/requirements/database More details about database requirements.]
== PHP ==
* Drupal 6: PHP 5.x only (5.2.5 or higher recommended). Warning: support for PHP 4.x has been dropped. Drupal core should work with PHP 5.3.x, but PHP 5.3.x and higher may produce errors or unexpected behavior especially for contributed modules and themes.
* Drupal 7: PHP 5.2.5 or higher (5.4 or higher recommended).
*Drupal 8: PHP 5.5.9 or higher
[https://www.drupal.org/requirements/php More details about PHP requirements,][https://www.drupal.org/requirements/php#memory PHP memory].
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">See also the&nbsp;</span>[http://drupal.org/node/627252 Site Performance section]<span style="color:#222222;">&nbsp;of the Administration Guide and the&nbsp;</span>[https://www.drupal.org/node/34022 webhosting troubleshooting FAQ]<span style="color:#222222;">.</span></div>
= Step 1: Download and extract Drupal =
<div style="margin-left:0in;margin-right:0in;"></div><div style="margin-left:0in;margin-right:0in;"></div><div style="margin-left:0in;margin-right:0in;">[https://www.drupal.org/project/drupal Drupal]<span style="color:#222222;">&nbsp;is available in two supported versions: the most recent and the previous. Currently that is Drupal 7 and Drupal 6. The&nbsp;</span><span style="color:#222222;">''Recommended releases''</span><span style="color:#222222;">&nbsp;are the latest stable releases of either version.Drupal 8 is currently in development and is not yet ready for production use. To learn more about versions, see the&nbsp;</span>[https://www.drupal.org/documentation/version-info Drupal version information]<span style="color:#222222;">&nbsp;page.</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">To&nbsp;</span><span style="color:#222222;">''install''</span><span style="color:#222222;">&nbsp;a Drupal site in a language other than English, see</span>[http://localize.drupal.org/translate http://localize.drupal.org/translate]<span style="color:#222222;">. You can also add additional languages after the installation.&nbsp;</span><span style="color:#222222;">'''''Note:'''</span><span style="color:#222222;">&nbsp;If you install Drupal 8, you can choose the installation language as the first option in the interface of the installation script itself.''</span></div>
<div style="color:#222222;margin-left:0in;margin-right:0in;">You can download and extract Drupal in three different ways:</div>* <div style="margin-left:0in;margin-right:0in;">[https://www.drupal.org/documentation/install/download#drush using Drush,]</div>
* <div style="margin-left:0in;margin-right:0in;">[https://www.drupal.org/documentation/install/download#download-extract from the command line,]</div>
* <div style="margin-left:0in;margin-right:0in;">[https://www.drupal.org/documentation/install/download#ftp using FTP.]</div>
<div style="color:#222222;margin-left:0in;margin-right:0in;">So, follow one of the methods below for downloading, and then...</div>
=== Before continuing to the next page ... ===
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">The base URL for your Drupal installation is set in your web server's configuration file. You need to know this URL before proceeding to the next steps of the installation.If you are installing Drupal on your local machine, the base URL may be&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">http://localhost</span><span style="color:#222222;">.If you're installing Drupal to a web server, your base URL may be a specific domain name, such as&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">http://example.com</span><span style="color:#222222;">.</span></div>
== Drush ==
<div style="margin-left:0in;margin-right:0in;">[https://www.drupal.org/project/drush Drush]<span style="color:#222222;">&nbsp;is a command line tool to maintain and administer Drupal sites. It offers the most convenient way of downloading Drupal by using a single command:&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">pm-download</span><span style="color:#222222;">&nbsp;(or its alias&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">dl</span><span style="color:#222222;">):</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="background-color:#f6f6f2;color:#222222;">drush dl drupal</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">This command will download the recommended version into the current folder. Check&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">drush help dl</span><span style="color:#222222;">&nbsp;to see additional options such as how to download a specific version.</span></div>
== From the command line ==
=== Downloading ===
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">Log into your server on using&nbsp;</span><span style="color:#222222;">''ssh''</span><span style="color:#222222;">&nbsp;and navigate to the directory from which you will be serving your Drupal site.On many *nix computers the path from the server's root will be /var/www/html, so&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">cd /var/www/html</span><span style="color:#222222;">. On a shared server, or a server that hosts multiple domains, the path will be different (try&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">cd ~/www</span><span style="color:#222222;">&nbsp;or&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">cd ~/public_html</span><span style="color:#222222;">). If you are unsure of the directory, ask your hosting provider for assistance.</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">Download Drupal from the command line, for example using&nbsp;</span><span style="color:#222222;">''wget''</span><span style="color:#222222;">&nbsp;or&nbsp;</span><span style="color:#222222;">''curl''</span><span style="color:#222222;">.The commands are, respectively:</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="background-color:#f6f6f2;color:#222222;">wget http://ftp.drupal.org/files/projects/drupal-x.x.tar.gz</span></div>
<div style="color:#222222;margin-left:0in;margin-right:0in;">or</div>
<div style="margin-left:0in;margin-right:0in;"><span style="background-color:#f6f6f2;color:#222222;">curl -O http://ftp.drupal.org/files/projects/drupal-x.x.tar.gz</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">'''''Note:'''</span><span style="color:#222222;">&nbsp;The curl command option is the upper case letter "O" and not the numeral that stands for zero.''</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">Replace&nbsp;</span><span style="background-color:#f6f6f2;color:#222222;">http://ftp.drupal.org/files/projects/drupal-x.x.tar.gz</span><span style="color:#222222;">&nbsp;with the link for the version you want to install.The links to the recommended versions are available on&nbsp;</span>[https://www.drupal.org/project/drupal Drupal Core]<span style="color:#222222;">&nbsp;project page, where you can copy them from the&nbsp;</span><span style="color:#222222;">''Download''</span><span style="color:#222222;">&nbsp;column.All other versions are available on the&nbsp;</span>[https://www.drupal.org/node/3060/release Releases for Drupal core]<span style="color:#222222;">&nbsp;page.</span></div>
=== Extracting files ===
<div style="color:#222222;margin-left:0in;margin-right:0in;">Type the following command and replace "x.x" with your downloaded version's number:</div>
<div style="margin-left:0in;margin-right:0in;"><span style="background-color:#f6f6f2;color:#222222;">tar -xzvf drupal-x.x.tar.gz</span></div>
<div style="color:#222222;margin-left:0in;margin-right:0in;">Then remove the compressed version of the file by using the following command:</div>
<div style="margin-left:0in;margin-right:0in;"><span style="background-color:#f6f6f2;color:#222222;">rm drupal-x.x.tar.gz</span><span style="color:#222222;">.</span></div>
=== Moving to its intended location ===
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">Now you need to move the contents of the&nbsp;</span><span style="color:#222222;">''drupal-x.x''</span><span style="color:#222222;">&nbsp;directory one level "up" into the web server's document root or your public HTML directory:</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="background-color:#f6f6f2;color:#222222;">mv drupal-x.x/* drupal-x.x/.htaccess ./</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">For Drupal 7, also add:</span><span style="background-color:#f6f6f2;color:#222222;">mv drupal-x.x/.gitignore ./</span></div>
<div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">Drupal 8 comes with several additional hidden files that all need to be moved as well.Alternative, you can extract the the tar archive directly into the correct directory by typing:</span><span style="background-color:#f6f6f2;color:#222222;">tar --strip-components=1 -xzvf drupal-x.x.tar.gz</span></div>
<div style="color:#222222;margin-left:0in;margin-right:0in;">The files from the directory you downloaded and decompressed have now been moved up a level into your web directory, and you can delete the (now empty) drupal-x.x directory:</div>
<div style="margin-left:0in;margin-right:0in;"><span style="background-color:#f6f6f2;color:#222222;">rmdir drupal-x.x</span></div>
== Using FTP ==
<div style="color:#222222;margin-left:0in;margin-right:0in;">You can download Drupal using your favorite FTP-tool.</div># <div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">Download a Drupal tar.gz or zip file to your local computer from</span>[https://www.drupal.org/project/drupal https://www.drupal.org/project/drupal]<span style="color:#222222;">&nbsp;by clicking on the link for the version you want to install.</span></div>
# <div style="color:#222222;margin-left:0in;margin-right:0in;">When you download the file, your browser will ask you what to do with it. Choose "Extract" and extract it to your local computer. Or, save the file and extract it using your computer's software (7-zip for example) that deals with archive files. The exact steps to do this differ by software, but you should end up with a folder/directory called something like "drupal-7.32" on your local computer.</div>
# <div style="margin-left:0in;margin-right:0in;"><span style="color:#222222;">Use FTP to transfer the entire contents of this folder, including hidden files like .htaccess, to your hosting account's HTML document root. Details of how to do this depend on your FTP software.Note: Drupal 8 includes about 10 times as many files as earlier versions (due to its new</span>[https://www.drupal.org/drupal-8.0/developers framework]<span style="color:#222222;">), that may take significantly longer to upload to a server by FTP than earlier versions. A faster way to upload Drupal 8 as a single ZIP files, suitable for some hosts is described&nbsp;</span>[https://www.drupal.org/node/2357587 here]<span style="color:#222222;">.</span></div>
=='''Installing MediaWiki'''==
[[File:Mediawiki-logo.png|thumb]]
MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia. It is now also used by several other projects of the non-profit Wikimedia Foundation and by many other wikis, including this website, the home of MediaWiki.
Use the links below to explore the site contents. You'll find some content translated into other languages, but the primary documentation language is English.
For general questions about MediaWiki see the communication page or ask at the support desk.
==Manual:Installing MediaWiki==
MediaWiki installs itself using an interactive, web-based installation script. Before you can run this script, you need to do a couple of things: see prerequisites or [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Installation_guide#Summarized_installation_guide short installation guide for experts.]
MediaWiki can be difficult to install for the average computer user who does not have experience with Apache, PHP and MySQL. Most users who wish to use wiki software may benefit from using a [http://wikiindex.org/Category:Free_MediaWiki_wiki_farms free MediaWiki host] or via a [https://www.mediawiki.org/wiki/Software_bundles software bundles.]
Note Note: For troubleshooting information, see [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Errors_and_Symptoms#Installation_Errors Special:MyLanguage/Manual:Errors and Symptoms#Installation Errors.]
<dl><strong>Contents</strong> [https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki# hide] </dl>
<dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Download_MediaWiki_software 1 Download MediaWiki software]</dl>
<ol><dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#For_developers 1.1 For developers]</dl></ol>
<dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Uploaded_files 2 Uploaded files]</dl>
<dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Create_a_database 3 Create a database]</dl>
<ol><dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#SQLite 3.1 SQLite]</dl></ol>
<ol><dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#MySQL 3.2 MySQL]</dl></ol>
<ul><ol><dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Unix.2FLinux_installation 3.2.1 Unix/Linux installation]</dl></ol></ul>
<ol><ol><dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Windows_installation 3.2.2 Windows installation]</dl></ol></ol>
<ol><ol><dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Installation_continued 3.2.3 Installation continued]</dl></ol></ol>
<ol><dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#PostgreSQL 3.3 PostgreSQL]</dl></ol>
<dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Run_the_installation_script 4 Run the installation script]</dl>
<dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Keep_up_to_date.21 5 Keep up to date!]</dl>
<dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Installation_assistance 6 Installation assistance]</dl>
<dl>[https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#See_also 7 See also]</dl>
<strong>Download MediaWiki software</strong>
You can download a release version of MediaWiki from the [https://www.mediawiki.org/wiki/Special:MyLanguage/Download official download page:] generally, if you're using a production environment, you want to be running the stable release.
To download MediaWiki 1.25.2, which is the latest stable release version, to a *nix machine you can use the following command:
<code>wget https://releases.wikimedia.org/mediawiki/1.25/mediawiki-1.25.2.tar.gz</code>
<ul>Alternatively, using [https://en.wikipedia.org/wiki/cURL cURL]:</ul>
<code>curl -O https://releases.wikimedia.org/mediawiki/1.25/mediawiki-1.25.2.tar.gz</code>
The downloaded files are in .tar.gz format, so will need to be uncompressed before use. This can be done locally (and then uploaded via FTP) or directly on your server. This is usually done with software such as [http://www.7-zip.org/ 7-Zip] (free), [http://www.winzip.com/ WinZip], [http://www.rarlabs.com/ WinRAR] or [http://www.izarc.org/ IZArc] (free) on Windows. On Linux and Mac OS X, you can untar the file using this command:
<code>tar xvzf mediawiki-*.tar.gz</code>
<strong>NOTE:</strong> If you untar the archive as root, you should probably change the ownership afterwards with chown, otherwise the files will end up owned as user # 1000, which may or may not be what you want.
<strong>For developers</strong>
Developers on the other hand should probably [https://www.mediawiki.org/wiki/Download_from_Git download from Git] to set up a local repository with the latest code in development. They will also need to manually install dependencies via [https://www.mediawiki.org/wiki/Composer Composer.]
<strong>Uploaded files</strong>
If you have not already uploaded the files to your web server, do so now.
<strong>Make sure the "Change file names to lowercase" option for upload is disabled.</strong>
Upload the files to your web server's web directory either by:
directly copying the unzipped folder or
by using an FTP client such as [http://filezilla.sourceforge.net/ FileZilla] (Open Source Software, Windows, OSX and Linux) or [http://cyberduck.ch/ Cyberduck] (OSX).
If you installed Apache, the correct directory is specified in your <code>httpd.conf</code> file (it's typically <code><apache-folder>/htdocs</code>). Note: This changes in Ubuntu 14.04 with [http://nixmash.com/linux/changes-that-will-affect-you-in-apache-2-4-7/ Apache 2.4.7] where the primary config file for Apache server settings and directories is <code>/etc/apache2/apache2.conf</code>.
If you are using a Linux or Unix server you can instead copy the files to any directory on your server and then make a [https://en.wikipedia.org/wiki/Symbolic_link symbolic link] to that folder from your web server's web directory.
Rename the uploaded folder to whatever you would like to have in the URL. If your web server is running as <code>http://localhost</code> for example, renaming to <code>/w/</code> directory would mean you would access your wiki at <code>http://localhost/w/index.php</code>. <strong>Do not use <code>/wiki/</code> if you want to use it as a </strong>[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Short_URL Short URL.] (And don't set up short URLs until you have run the installation script.)
This (renamed) folder will now be <strong>referred</strong> as <code><MediaWiki-folder></code>.
<strong>Create a database</strong>
If you already have a database server and know the root password for it, the MediaWiki installation script can create a new database for you. If this is the case, you can skip to the [https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Run_the_installation_script Run the installation script] section below. If you don't know the root password, for example if you are on a hosted server, you will have to create a new database now. Currently, you must use SQLite, MySQL or PostgreSQL to store the actual contents of your wiki.
<strong>SQLite</strong>
MediaWiki supports SQLite since version 1.13, however at least 1.16 is highly recommended. SQLite is a stand-alone database library that stores the database contents in a single file. If PHP has the <code>pdo-sqlite</code> module, no further setup is required.
On the installation page, you will need to choose a database name (which can be anything) and the SQLite database directory. For the database directory, the installer will attempt to use a subdirectory outside of the document root and create it if needed. If this directory is not safe (for example, web-readable), change it manually to avoid making it accessible to everyone on the web.
<strong>MySQL</strong>
MediaWiki will ask you for database and user name and will attempt to create them if they don't already exist. If doing so from MediaWiki is impossible, you can do this using various control panels such as [https://en.wikipedia.org/wiki/PhpMyAdmin PhpMyAdmin], which are often available from shared hosts, or you may be able to use [https://en.wikipedia.org/wiki/Secure_Shell ssh] to login to your host and type the commands into a MySQL prompt. See the corresponding documentation. Alternatively, contact your host provider to have them create an account for you.
==<strong>Unix/Linux installation</strong>==
1. Download and install [http://dev.mysql.com/downloads/mysql MySQL] - MediaWiki supports version 5.0.2 or later. MySQL typically installs in <code>/usr/local/mysql</code>. (If you use your Linux distribution's package manager to install MySQL, the following commands may be in some other directory; try typing them without the path prefix <code>/usr/local/mysql/bin/</code> .)
2. Check and see if the database server is running; for example, run <code>/usr/local/mysql/bin/mysqladmin</code> status. If it is not, run <code>mysqld_safe> to start it: <code>sudo /usr/local/mysql/bin/mysqld_safe</code> &.
Another way to initially start the MySQL server is to run the configure script available at the root of the installation. It creates the initial tables and automatically starts the mysql daemon
3. Set a password for the "root" account on your database server. /usr/local/mysql/bin/mysqladmin -u root password yourpassword
4. Run the MySQL command-line client: <code>/usr/local/mysql/bin/mysql -u root -p</code>
This will prompt for the "root" database password you just set, then connect to the MySQL server. Now, continue with the SQL commands below.
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment