Last active
January 4, 2019 01:51
-
-
Save yegusa/645ce453bbd7f7a2c1b733682000c6c1 to your computer and use it in GitHub Desktop.
Omeka Classic2.6.1をVirtualBox+vagrant+ubuntu16.04にインストールする方法 ref: https://qiita.com/yegusa/items/0a3b9d4a3723b0dd98f0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory /var/www/html/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locale.name = “ja” # "" -> "ja"というように修正する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[databese] | |
host = "localhost" # XXXXXXX --> localhost | |
username = "omeka_user" # XXXXXXX --> omeka_user | |
password = "upw_omeka2018" # XXXXXXX --> upw_omeka2018 | |
dbname = "omeka_db" # XXXXXXX --> omeka_db | |
prefix = "omeka_" | |
charset = "utf8" | |
;port = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_dir.c> | |
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir vagrantwork | |
$ mkdir vagrantwork/vagrantwork20181227-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd vagrantwork/vagrantwork20181227-2 | |
$ vagrant init bento/ubuntu-16.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /etc/apache2/mods-available/rewrite.load | |
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sudo vi /etc/apache2/sites-enabled/000-default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo a2enmod rewrite | |
Enabling module rewrite. | |
To activate the new configuration, you need to run: | |
service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo a2enmod rewrite | |
Enabling module rewrite. | |
To activate the new configuration, you need to run: | |
service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo ufw app list | |
Apache | |
Apache Full | |
Apache Secure | |
OpenSSH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install mysql-server | |
After this operation, 162 MB of additional disk space will be used. | |
Do you want to continue? [Y/n]Y | |
New password for the MySQL "root" user: omeka2018 | |
Repeat password for the MySQL "root" user: omeka2018 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mysql -u root -p | |
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'omeka2018'; | |
mysql> FLUSH PRIVILEGES; | |
mysql> exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mysql -u root -p | |
Enter password:omeka2018 | |
mysql> exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mysql_secure_installation | |
Enter password for user root: omeka2018 | |
Would you like to setup VALIDATE PASSWORD plugin? | |
Press y|Y for Yes, any other key for No: N | |
Using existing password for root. | |
Change the password for root ? ((Press y|Y for Yes, any other key for No) : N (rootパスワードを変えたいなら Y) | |
By default, a MySQL installation has an anonymous user, | |
allowing anyone to log into MySQL without having to have | |
a user account created for them. This is intended only for | |
testing, and to make the installation go a bit smoother. | |
You should remove them before moving into a production | |
environment. | |
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y | |
Normally, root should only be allowed to connect from | |
'localhost'. This ensures that someone cannot guess at | |
the root password from the network. | |
Disallow root login remotely? (Press y|Y for Yes, any other key for No) :y | |
By default, MySQL comes with a database named 'test' that | |
anyone can access. This is also intended only for testing, | |
and should be removed before moving into a production | |
environment. | |
Remove test database and access to it? (Press y|Y for Yes, any other key for No) :y | |
Reloading the privilege tables will ensure that all changes | |
made so far will take effect immediately. | |
Reload privilege tables now? (Press y|Y for Yes, any other key for No) :y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vi Vagrantfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get -y install php php-gd php-mbstring php-common php-mysql php-imagick php-xml libapache2-mod-php php-curl php-tidy php-zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo vi /etc/apache2/mods-enabled/dir.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo service apache2 status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo vi /var/www/html/info.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo rm /var/www/html/info.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo rm /var/www/html/info.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get -y install imagemagick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mysql -u root -p | |
Enter password: omeka2018 (rootのパスワード) | |
mysql> CREATE DATABASE omeka_db CHARACTER SET utf8 COLLATE utf8_general_ci; | |
CREATE USER 'omeka_user'@'localhost' IDENTIFIED BY 'upw_omeka2018'; | |
GRANT ALL PRIVILEGES ON omeka_db.* TO 'omeka_user'@'localhost'; | |
FLUSH PRIVILEGES; | |
EXIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> CREATE DATABASE omeka_db CHARACTER SET utf8 COLLATE utf8_general_ci; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> CREATE USER 'omeka_user'@'localhost' IDENTIFIED BY ‘upwomeka2018'; | |
'> GRANT ALL PRIVILEGES ON omeka_db.* TO 'omeka_user'@'localhost'; | |
'> FLUSH PRIVILEGES; | |
'> EXIT; | |
'> | |
'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mysql -u root -p | |
Enter password: omeka2018 (rootのパスワード) | |
mysql> CREATE DATABASE omeka_db CHARACTER SET utf8 COLLATE utf8_general_ci; | |
CREATE USER 'omeka_user'@'localhost' IDENTIFIED BY 'upw_omeka2018'; | |
GRANT ALL PRIVILEGES ON omeka_db.* TO 'omeka_user'@'localhost'; | |
FLUSH PRIVILEGES; | |
EXIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> CREATE DATABASE omeka_db CHARACTER SET utf8 COLLATE utf8_general_ci; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> CREATE USER 'omeka_user'@'localhost' IDENTIFIED BY ‘upwomeka2018'; | |
'> GRANT ALL PRIVILEGES ON omeka_db.* TO 'omeka_user'@'localhost'; | |
'> FLUSH PRIVILEGES; | |
'> EXIT; | |
'> | |
'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install wget | |
$ sudo apt-get install zip unzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget https://github.com/omeka/Omeka/releases/download/v2.6.1/omeka-2.6.1.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ unzip omeka-2.6.1.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /var/www/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /var/www/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mv index.html ~/index.html.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mv ~/omeka-2.6.1/* /var/www/html | |
$ sudo mv ~/omeka-2.6.1/.htaccess /var/www/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo chown -R www-data:www-data * ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sudo vi ./db.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vagrant ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sudo vi ./db.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo grub-pc hold | sudo dpkg --set-selections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vagrant ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo grub-pc hold | sudo dpkg --set-selections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get -y update | |
sudo apt-get -y upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get -y update | |
$ sudo apt-get -y install apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get -y update | |
$ sudo apt-get -y upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get -y update | |
$ sudo apt-get -y install apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install apache2-doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
phpinfo(); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a forwarded port mapping which allows access to a specific port | |
# within the machine from a port on the host machine. In the example below, | |
# accessing "localhost:8080" will access port 80 on the guest machine. | |
# NOTE: This will enable public access to the opened port | |
config.vm.network "forwarded_port", guest: 80, host: 8084 | |
# a)↑の冒頭の#を消す、適宜host: の値を修正ここでは8080から8084 に | |
config.vm.network "forwarded_port", guest: 22, host: 2224 | |
# b)↑を追加 | |
#3メモリの設定(メモリを倍にする(2048MBに)) | |
config.vm.provider "virtualbox" do |vb| # c) これの冒頭の#を消す | |
# # Display the VirtualBox GUI when booting the machine | |
# vb.gui = true | |
# | |
# # Customize the amount of memory on the VM: | |
vb.memory = "2048" # d) 冒頭の # を消し, 1024 を2048に変える | |
end # e) これの冒頭の#を消す |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment