Difference between revisions of "Setup MediaWiki on AWS"
Line 178: | Line 178: | ||
<br /> | <br /> | ||
− | = | + | =Log of Transfer to Virtual Host= |
− | + | == Current versions on wiki special page== | |
− | |||
− | + | * http://www.science.smith.edu/dftwiki/index.php/Special:Version | |
+ | * Product Version | ||
+ | * MediaWiki 1.20.5 | ||
+ | * PHP 5.5.9-1ubuntu4.20 (apache2handler) | ||
+ | * MySQL 5.5.53-0ubuntu0.14.04.1 | ||
− | + | == dftwiki/includes/DefaultSettings.php == | |
− | |||
− | |||
− | + | /** Database host name or IP address */ | |
− | + | $wgDBserver = 'localhost'; | |
− | + | /** Database port number (for PostgreSQL) */ | |
− | + | $wgDBport = 5432; | |
− | + | /** Name of the database */ | |
+ | $wgDBname = 'my_wiki'; | ||
+ | /** Database username */ | ||
+ | $wgDBuser = 'wikiuser'; | ||
+ | /** Database user's password */ | ||
+ | $wgDBpassword = ''; | ||
+ | /** Database type */ | ||
+ | $wgDBtype = 'mysql'; | ||
+ | /** Whether to use SSL in DB connection. */ | ||
+ | $wgDBssl = false; | ||
+ | /** Whether to use compression in DB connection. */ | ||
+ | $wgDBcompress = false; | ||
− | |||
− | |||
− | |||
− | + | == dftwiki/LocalSettings.php == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | / | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ## Database settings | + | ## Database settings |
− | $wgDBtype = "mysql"; | + | $wgDBtype = "mysql"; |
− | # change to localhost on 7/26/11 | + | # change to localhost on 7/26/11 |
− | #$wgDBserver = "maven.smith.edu"; | + | #$wgDBserver = "maven.smith.edu"; |
− | #$wgDBserver = "scinix.smith.edu"; | + | #$wgDBserver = "scinix.smith.edu"; |
− | $wgDBserver = "localhost"; | + | $wgDBserver = "localhost"; |
− | $wgDBname = "dftwiki"; | + | $wgDBname = "dftwiki"; |
− | $wgDBuser = "thiebaut"; | + | $wgDBuser = "thiebaut"; |
− | $wgDBpassword = "tataratata"; | + | $wgDBpassword = "tataratata"; |
− | + | == Backup dftwiki on cirrus == | |
− | |||
− | |||
− | xgridmac2 | + | * on xgridmac2 |
− | ssh -Y dthiebaut@www.science.smith.edu | + | ssh -Y dthiebaut@www.science.smith.edu |
− | cd /var/www/departments/cs/dftwiki | + | cd /var/www/departments/cs/dftwiki |
+ | |||
+ | cd /var/www/departments/cs | ||
+ | tar --ignore-failed-read -czf dftwiki_010418.tgz dftwiki/ | ||
+ | |||
+ | cd /var/www/departments/cs | ||
+ | mysqldump --user=thiebaut --password=taratata dftwiki > dftwiki_010418.sql | ||
+ | tar -czvf dftwiki_010418.sql.tgz dftwiki_010418.sql | ||
+ | |||
− | + | * rsync tgz files to xgridmac2, then to hadoop0:temp/ | |
− | |||
− | + | == Add VM with Ubuntu server on hadoop0 == | |
− | |||
− | |||
+ | == Run VirtualBox on hadoop0 to create hadoop01 == | ||
− | + | == Once on Hadoop01 == | |
− | + | * Install ddclient | |
− | + | # Configuration file for ddclient generated by debconf | |
− | + | # | |
− | + | # /etc/ddclient.conf | |
− | + | ||
− | + | protocol=dyndns2 | |
− | + | use=web, web=checkip.dyndns.com, web-skip='IP Address' | |
− | + | server=members.dyndns.org | |
− | + | login=dthiebaut | |
− | + | password='super##man' | |
− | + | hadoop01.dyndns.org | |
− | Install ddclient | + | |
− | # Configuration file for ddclient generated by debconf | + | * sudo apt-get install emacs |
− | # | + | * set network to bridge |
− | # /etc/ddclient.conf | + | * reset hadoop01 |
− | + | * edit /etc/apache2/mysql/mysqld…/*.conf and replace 127.0.0.1 by 0.0.0.0 to allow access from outside | |
− | protocol=dyndns2 | + | * on hadoop01 |
− | use=web, web=checkip.dyndns.com, web-skip='IP Address' | + | |
− | server=members.dyndns.org | + | mysql -u root -p |
− | login=dthiebaut | + | |
− | password='super##man' | + | * create user dftwiki with password taratata |
− | hadoop01.dyndns.org | ||
− | |||
− | sudo apt-get install emacs | ||
− | |||
− | set network to bridge | ||
− | |||
− | reset hadoop01 | ||
− | |||
− | edit /etc/apache2/mysql/mysqld…/*.conf and replace 127.0.0.1 by 0.0.0.0 to allow access from outside | ||
− | |||
− | on hadoop01 | ||
− | |||
− | mysql -u root -p | ||
− | |||
− | create user dftwiki with password taratata | ||
create user ‘thiebaut’@‘localhost’ identified by ‘taratata’; | create user ‘thiebaut’@‘localhost’ identified by ‘taratata’; | ||
Line 293: | Line 273: | ||
− | + | * on bash prompt | |
+ | * add “USE dftwiki;” as first line of mysqldump sql file | ||
+ | * echo “USE dftwiki;” > newfile.sql | ||
+ | * cat dftwiki_010418.sql >> newfile.sql | ||
+ | * mv newfile.sql dftwiki_010418.sql | ||
− | + | == restore database == | |
− | + | * mysql -u thiebaut -p < dftwiki_010418.sql | |
− | |||
− | |||
− | + | ::(takes a long time) | |
− | mysql - | + | * sudo apt-get install php5.6-gd php5.6-mysql php5.6-dom php5.6-cli php5.6-json php5.6-common php5.6-mbstring php5.6-opcache php5.6-readline |
− | + | * download mediawiki-1.27.4 | |
− | |||
− | |||
+ | ==dftwiki== | ||
− | + | * dftwiki works | |
− | |||
− | |||
− | dftwiki works | ||
− | + | ==dftwiki2== | |
− | dftwiki2 | ||
− | |||
− | Download media wiki 1.27 | + | * Download media wiki 1.27 |
+ | * Install new skin: Chameleon: | ||
+ | * Install composer | ||
+ | * do installation of chameleon skin | ||
+ | * edit composer.json and add | ||
+ | |||
+ | "mediawiki/chameleon-skin": "~1.0" | ||
+ | |||
+ | :: in composer.json, in require section. Don’t forget comma before that line | ||
− | + | * composer update "mediawiki/chameleon-skin" | |
− | + | * Remove discussion tab: | |
− | |||
− | |||
− | + | * type “MediaWiki:Common.css” in wiki search box, then edit window and add | |
+ | |||
+ | #ca-talk { | ||
+ | display: none !important; | ||
+ | } | ||
+ | |||
+ | :: to it. | ||
− | + | * Updated onlydft, and only smith | |
− | + | * Meta Tag extension not working… Need to put into a class? | |
− | + | == upgrade to MW 1.30 == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | * make dominique use www-data as default group | ||
+ | |||
sudo usermod -g www-data dominique | sudo usermod -g www-data dominique | ||
+ | |||
+ | * backup mysql database and directory tree | ||
+ | * for mysql backup dftwiki2 from hadoop0 into a sql file | ||
+ | * for directory tree, just create a zip file and rsync it somewhere else. | ||
− | + | * create new database and copy sql backup into it. | |
− | |||
− | |||
− | + | * download mediawiki 1.30 | |
+ | * untar | ||
+ | * put in /var/www/html/dftwiki3 | ||
− | + | * point browser to hadoop01.dyndns.org/mw-config | |
− | + | * give info on database containing copy of working database | |
− | |||
− | |||
− | point browser to hadoop01.dyndns.org/mw-config | ||
− | give info on database containing copy of working database | ||
− | Create chameleon skin: | + | * Create chameleon skin: |
− | emacs -nw composer.json , and add "mediawiki/chameleon-skin": "~1.0" in the “require” | + | * emacs -nw composer.json , and add "mediawiki/chameleon-skin": "~1.0" in the “require” |
section | section | ||
− | + | * sudo composer update "mediawiki/chameleon-skin" | |
− | import/rsync one extension at a time into LocalSettings.php | + | * import/rsync one extension at a time into LocalSettings.php |
− | Pick chameleon and navhead as the default font. | + | * Pick chameleon and navhead as the default font. |
</source> | </source> | ||
Line 385: | Line 357: | ||
=Install LAMP on Ubuntu EC2= | =Install LAMP on Ubuntu EC2= | ||
− | |||
− | |||
− | + | == Install LAMP on Ubuntu on AWS== | |
− | Ubuntu | ||
+ | * Pick free-tier | ||
+ | * Ubuntu server | ||
+ | |||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get dist-upgrade | sudo apt-get dist-upgrade | ||
Line 401: | Line 373: | ||
sudo adduser ubuntu www-data | sudo adduser ubuntu www-data | ||
sudo emacs /etc/hosts -nw | sudo emacs /etc/hosts -nw | ||
− | + | ||
cat /etc/hosts | cat /etc/hosts | ||
− | + | ||
127.0.0.1 localhost | 127.0.0.1 localhost | ||
127.0.0.1 ip-172-30-0-30 | 127.0.0.1 ip-172-30-0-30 | ||
− | + | ||
# The following lines are desirable for IPv6 capable hosts | # The following lines are desirable for IPv6 capable hosts | ||
::1 ip6-localhost ip6-loopback | ::1 ip6-localhost ip6-loopback | ||
Line 416: | Line 388: | ||
+ | =Setup S3cmd on hadoop0= | ||
− | |||
− | |||
− | |||
* install s3cmd | * install s3cmd | ||
* s3cmd --configure | * s3cmd --configure |
Revision as of 19:41, 23 January 2018
D. Thiebaut (talk) 16:44, 13 January 2018 (EST)
This page contains very sketchy steps for setting up (in my case moving) an existing mediawiki installation to AWS. This list is mostly for myself to remember what steps I have taken. |