$ sudo aptitude -s install tasksel [sudo] password for aka: No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Would download/install/remove packages. $ aptitude search tasksel i tasksel - Tool for selecting tasks for installation on Debian s i tasksel-data - Official tasks used for installation of Debian system $ sudo tasksel install lamp-server [snip] perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). /usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory /usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory $
$ curl http://localhost/ <html><body><h1>It works!</h1> <p>This is the default web page for this server.</p> <p>The web server software is running but no content has been added, yet.</p> </body></html> $
$ sudo -s # echo "<?php phpinfo(); ?>" > /var/www/test.php # exit exit $ curl http://localhost/test.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html><head> <style type="text/css"> [snip] </style> <title>phpinfo()</title><meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" /></head> [snip] </div></body></html>$ $ sudo rm /var/www/test.php $
$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 39 Server version: 5.1.58-1ubuntu1 (Ubuntu) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | +--------------------+ 2 rows in set (0.00 sec) mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables; +---------------------------+ | Tables_in_mysql | +---------------------------+ | columns_priv | | db | [snip] | user | +---------------------------+ 23 rows in set (0.00 sec) mysql> exit; Bye $
$ sudo aptitude install php5-cli libgd2-xpm libgd2-xpm-dev php5-gd The following NEW packages will be installed: gcc{a} gcc-4.6{a} libc6-dev{a} libexpat1-dev{a} libfontconfig1-dev{a} libfreetype6-dev{a} libgd2-xpm-dev libjpeg62-dev{a} libpng12-dev{a} linux-libc-dev{a} zlib1g-dev{a} 0 packages upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 1825 kB/13.4 MB of archives. After unpacking 43.2 MB will be used. Do you want to continue? [Y/n/?] Y [snip] Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main linux-libc-dev amd64 3.0.0-16.28 404 Not Found [IP: 10.202.26.15 80] Err http://security.ubuntu.com/ubuntu/ oneiric-security/main linux-libc-dev amd64 3.0.0-16.28 404 Not Found [IP: 91.189.92.167 80] Err http://security.ubuntu.com/ubuntu/ oneiric-security/main libfreetype6-dev amd64 2.4.4-2ubuntu1.1 404 Not Found [IP: 91.189.92.167 80] Err http://security.ubuntu.com/ubuntu/ oneiric-security/main libpng12-dev amd64 1.2.46-3ubuntu1.1 404 Not Found [IP: 91.189.92.167 80] 0% [Working]perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.0.0-16.28_amd64.deb: 404 Not Found [IP: 91.189.92.167 80] E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.0.0-16.28_amd64.deb: 404 Not Found [IP: 91.189.92.167 80] $
$ sudo aptitude -s safe-upgrade Resolving dependencies... The following NEW packages will be installed: linux-image-3.0.0-17-virtual{a} The following packages will be upgraded: apt apt-transport-https apt-utils cloud-init gir1.2-gudev-1.0 grub-legacy-ec2 gzip libapt-inst1.3 libapt-pkg4.11 libc-bin libc-dev-bin libc6 libfreetype6 libgnutls26 libgudev-1.0-0 libmysqlclient16 libpng12-0 libtiff4 libudev0 libxml2 linux-image-3.0.0-16-virtual linux-image-virtual linux-virtual lxcguest multiarch-support mysql-client-5.1 mysql-client-core-5.1 mysql-common mysql-server mysql-server-5.1 mysql-server-core-5.1 python-httplib2 python-pam python-pkg-resources tzdata udev 36 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 55.8 MB of archives. After unpacking 33.5 MB will be used. Do you want to continue? [Y/n/?] Y Would download/install/remove packages. $ sudo aptitude safe-upgrade [snip] Current status: 0 updates [-36]. $ sudo aptitude install php5-cli libgd2-xpm libgd2-xpm-dev php5-gd The following NEW packages will be installed: gcc{a} gcc-4.6{a} libc6-dev{a} libexpat1-dev{a} libfontconfig1-dev{a} libfreetype6-dev{a} libgd2-xpm-dev libjpeg62-dev{a} libpng12-dev{a} linux-libc-dev{a} zlib1g-dev{a} 0 packages upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 4381 kB/13.4 MB of archives. After unpacking 43.2 MB will be used. Do you want to continue? [Y/n/?] Y [snip] $
$ which git $ sudo aptitude -s install git [sudo] password for aka: The following NEW packages will be installed: git git-man{a} liberror-perl{a} 0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 5347 kB of archives. After unpacking 12.6 MB will be used. Do you want to continue? [Y/n/?] Y Would download/install/remove packages. $ sudo aptitude install git The following NEW packages will be installed: git git-man{a} liberror-perl{a} 0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 5347 kB of archives. After unpacking 12.6 MB will be used. Do you want to continue? [Y/n/?] Y Get: 1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric/main liberror-perl all 0.17-1 [23.8 kB] Get: 2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric/main git-man all 1:1.7.5.4-1 [571 kB] Get: 3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ oneiric/main git amd64 1:1.7.5.4-1 [4752 kB] Fetched 5347 kB in 0s (9663 kB/s) perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory Selecting previously deselected package liberror-perl. (Reading database ... 34026 files and directories currently installed.) Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ... Selecting previously deselected package git-man. Unpacking git-man (from .../git-man_1%3a1.7.5.4-1_all.deb) ... Selecting previously deselected package git. Unpacking git (from .../git_1%3a1.7.5.4-1_amd64.deb) ... Processing triggers for man-db ... locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory Setting up liberror-perl (0.17-1) ... Setting up git-man (1:1.7.5.4-1) ... Setting up git (1:1.7.5.4-1) ... $ pwd /home/aka $ mkdir repos $ cd repos $ git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git Cloning into core... remote: Counting objects: 357859, done remote: Finding sources: 100% (357859/357859) Receiving objects: 100% (357859/357859), 95.60 MiB | 2.99 MiB/s, done. remote: Total 357859 (delta 305476), reused 355450 (delta 305476) Resolving deltas: 100% (305476/305476), done. $ ls core $ cd core $ git branch -r | sort -V [snip] origin/REL1_17 origin/REL1_18 origin/REL1_19 origin/Wikidata origin/iwtransclusion origin/make-collapsible-custom origin/master $ git checkout origin/REL1_19 Note: checking out 'origin/REL1_19'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at f6d57bc... Merge "Bug 35671 - PHP Notice: Undefined index: gettoken in includes/api/ApiMain.php on line 598" into REL1_19 $ git tag || sort -V [snip] 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17.0 1.17.0beta1 1.17.0rc1 1.17.1 1.17.2 1.17.3 1.18.0 1.18.0beta1 1.18.0rc1 1.18.1 1.18.2 1.19.0beta1 1.19.0beta2 1.2.0 1.2.0rc1 1.2.0rc2 1.2.0rc3 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 [snip] $ git checkout 1.18.2 Previous HEAD position was fb142b0... tag 1.9.6 HEAD is now at a917949... * (bug 34212) ApiBlock/ApiUnblock allow action to take place without a token parameter present $ head RE README RELEASE-NOTES-1.18 $ head RELEASE-NOTES-1.18 = MediaWiki release notes = Security reminder: MediaWiki does not require PHP's register_globals setting since version 1.2.0. If you have it on, turn it '''off''' if you can. == MediaWiki 1.18.2 == 2012-03-21 This is a maintenance and security release of the MediaWiki 1.18 branch. $
$ pwd /home/aka/repos $ sudo cp -pR core /var/lib/wiki1 [sudo] password for aka: $
max_execution_time = 300 upload_max_filesize = 80M memory_limit = 128M
Alias /wiki1 /var/lib/wiki1
$ sudo mv LocalSettings.php /var/lib/wiki1/ [sudo] password for aka: $
<Directory "/var/lib/wiki1"> AuthType Basic AuthName darkness AuthUserFile /usr/www/users Require user aka </Directory>
#User restrictions #Account creation by anonymous users $wgGroupPermissions['*']['createaccount'] = false; #Account creation by registered users $wgGroupPermissions['user']['createaccount'] = false; #Account creation by sysops $wgGroupPermissions['sysop']['createaccount'] = true;
#Anonymous user permissions $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['createpage'] = false; $wgGroupPermissions['*']['createtalk'] = false;
#Uploads rules ## To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: #$wgEnableUploads = false; $wgEnableUploads = true; #Only allow restricted uploads $wgCheckFileExtensions = true; $wgStrictFileExtensions = true; $wgFileExtensions = array('png', 'gif', 'jpg'); #Permissions for uploads #Not for Anonymous $wgGroupPermissions['*']['upload'] = false; $wgGroupPermissions['*']['reupload'] = false; $wgGroupPermissions['*']['reupload-shared'] = false; #Uploads (but not re-uploads) for Users $wgGroupPermissions['user']['upload'] = true; $wgGroupPermissions['user']['reupload'] = false; $wgGroupPermissions['user']['reupload-shared'] = false; #Sysops $wgGroupPermissions['sysop']['upload'] = true; $wgGroupPermissions['sysop']['reupload'] = true; $wgGroupPermissions['sysop']['reupload-shared'] = true;
$ sudo aptitude remove mediawiki mediawiki-math mediawiki-extensions
$ sudo aptitude purge mysql-server-5.1