Feb 9, 2017
- We did a Wordpress backup to Dreamhost on Jan 26.
- Database was also backed up.
- Image database was also backed up.
Moving OBI Website to a New Folder
- Deactivate wordpress
- Put it in a folder
- Repoint server to new location of wordpress
- Need to learn how to direct URLs to the proper directory - Htaccess.
Jan 26, 2017
Meeting at https://meet.jit.si/DiscreetApplesShareLazily. Moved to Google Hangout as Tom could not see my screenshare.
Last week we tarred the wiki and wordpress OSE site on old Hetzner, then backed it up to Dreamhost.
- Qestion: how do we know backup was successful?
- gzip -test filename
- tar -tvzf and will expand on the server to see all the files
- Go to Hanjin
- Server admin 101 - 
- Backing up OBI wordpress database, named wordpress on Hetzner. Weebmin allows dumping of database, from there, we move it to Dreamhost backup.
$ nslookup opensourceecology.org Server: 18.104.22.168 Address: 22.214.171.124#53
Non-authoritative answer: Name: opensourceecology.org Address: 126.96.36.199 Name: opensourceecology.org Address: 188.8.131.52
The thing to do is log into Dreamhost to see why it hasn't changed to the new IP address: 184.108.40.206.
Wed Oct 5, 2016
Updating PhP by Tom:
- rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
- yum install yum-plugin-replace
- yum replace --enablerepo=webtatic-testing php-common --replace-with=php56w-common
This seems to have updated PHP just fine, as it ended with this:
php.x86_64 0:5.4.16-36.3.el7_2 php-cli.x86_64 0:5.4.16-36.3.el7_2 php-common.x86_64 0:5.4.16-36.3.el7_2 php-enchant.x86_64 0:5.4.16-36.3.el7_2 php-gd.x86_64 0:5.4.16-36.3.el7_2 php-mbstring.x86_64 0:5.4.16-36.3.el7_2 php-mysql.x86_64 0:5.4.16-36.3.el7_2 php-pdo.x86_64 0:5.4.16-36.3.el7_2 php-process.x86_64 0:5.4.16-36.3.el7_2 php-xml.x86_64 0:5.4.16-36.3.el7_2
php56w.x86_64 0:5.6.26-1.w7 php56w-cli.x86_64 0:5.6.26-1.w7 php56w-common.x86_64 0:5.6.26-1.w7 php56w-enchant.x86_64 0:5.6.26-1.w7 php56w-gd.x86_64 0:5.6.26-1.w7 php56w-mbstring.x86_64 0:5.6.26-1.w7 php56w-mysql.x86_64 0:5.6.26-1.w7 php56w-pdo.x86_64 0:5.6.26-1.w7 php56w-process.x86_64 0:5.6.26-1.w7 php56w-xml.x86_64 0:5.6.26-1.w7
The thing I was sweating about this update is if it would affect the OBI install of Wordpress . . . but afterwards, it still seems to work. Tom
Tue Oct 4, 2016
Concerning PHP 5.6 : I am not familiar with Centos sources, but the instructions gived here : https://webtatic.com/packages/php56/ sounds very good In addition to main package, I advise the installation of the following package if not already installed : yum install php56w-opcache php56w-xml php56w-mysql php56w-mcrypt php56w-mbstring php56w-imap php56w-gd
Concerning DNS : They are configured with a TTL value (Time to live). Is was common to set it to 1 day, to avoid too many requests. That why changes in DNS take sometimes a long time to completely propagate. However, today it is more common to set it to smaller values (1 to 5 minutes). I just did some DNS requests on your domain, it seems that your DNS are set with TTL = 300s (5 minutes) so it seems OK to a quick change. But I invite you to check on your hosting service interface if you can see this value. Note that an additionnal time may be needed by your hosting service to apply DNS changes (but it should not be more than 10 minutes)
Concerning set wiki read-only : this is very simple, you just have to add the following line and the end to the LocalSetting.php file in your wiki : (the message given will be displayed to thoses trying to make changes on wiki) $wgReadOnly = 'This wiki is currently being upgraded to a newer software version.';
Finally, Here is a full step by step to migrate to new server, and install wikifab in it : I indicate the detailed commands to help you, you may have to change thinks like directories you want to use...
1. download your actual web site data to the new server ( you essentially need the 'images' directory, the rest is in the package I'll give you) You can do it by doing an archive, or with the following command on the new server : (change user and IP value , and directories if needed) rsync -azv root@OLD_SERVER_IP:/var/www/html/w /var/www/html/w
the advantage of this command is that it is incremental : if you have to stop it, or if you want to do it again a second time to get latest files, then the second time it will only transfert the missing or changed files
2. download our package an extract it (it contains mediawiki 1.27 (the lastest), all wikifab extensions, all others extensions you had, and the customisation extension we did specially for OSE) avaliable at http://releases.wikifab.org/ose/wiki.ose.0.1.tar.gz : wget http://releases.wikifab.org/ose/wiki.ose.0.1.tar.gz tar -xzf wiki.ose.0.1.tar.gz --strip-components=1 -C /var/www/html/w
Note : I use the strip-component option because archive contains a root dir "wiki" that you do not need here
3. set correct rights on files : change the owner if needed : chown www-data:www-data -R /var/www/html/wiki
4. Captcha Configuration : (I forgot to mention this part during call, but this is quite simple) You have to create secret key and access key to configure captcha extension : just go here https://www.google.com/recaptcha/admin#list (login with a google account) and fill the forms with your domain name then it will give you a 'Site key' and a 'secret key', you have to write them in the LocalSetting.php file, in this lines (at the end) : wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ) ); $wgCaptchaClass = 'ReCaptchaNoCaptcha'; $wgReCaptchaSiteKey = 'Your_Site_key'; $wgReCaptchaSecretKey = 'Your-secret-key';
I know, this is a google captcha solution, not very open, but it is the best captcha we know, very simple and efficient
5. set your old wiki as readOnly, as I mention before ad the line in LocalSettings.php file of your old wiki : $wgReadOnly = 'This wiki is currently being upgraded to a newer software version.';
6. create Database and SQL access on new server : (change with your password) CREATE USER 'osewiki_w'@'localhost' IDENTIFIED BY 'PASSWORD'; GRANT ALL PRIVILEGES ON osewiki . * TO 'osewiki_w'@'localhost';
7. dumps and download your database to the new server tar -xzf osewiki.sql.tar cat osewiki.sql | mysql -u osewiki_w -p osewiki
8. run thoses php scripts (from the directory of your wiki) (this update the databases with new tables needed for extensions): php maintenance/update.php php maintenance/initWikifab.php --force
9. At this point, your new server should be running, you can try to access it. You may need to change the server name in Localsettings.php to test it without have to change DNS of the main domain. (edit variable $wgServer = "http://opensourceecology.org"; )
10. change DNS to point to your new server, it should be active in no more than 10 minutes
I hope have been very clear, and that it will works fine :) Do not hesitate if you have any questions or issues.