ラベル LimeSurvey の投稿を表示しています。 すべての投稿を表示
ラベル LimeSurvey の投稿を表示しています。 すべての投稿を表示

2020年5月1日金曜日

Ubuntu 20.04にLimeSurveyとMariaDBをインストールする

LimeSurveyで、オンラインアンケートを設置することができます。

〇LimeSurveyの管理者画面


〇インストール手順
1. 以下のコマンドを実行してMariaDBをインストールします。
sudo apt-get update

sudo apt-get -y install mariadb-server

sudo mysql -uroot -e "SET PASSWORD = PASSWORD('root'); FLUSH PRIVILEGES;"

2. Lime Surveyをインストールします
sudo apt-get -y install apache2 \
  php7.4 \
  libapache2-mod-php7.4 \
  php7.4-gd \
  php7.4-json \
  php7.4-mysql \
  php7.4-pdo \
  php7.4-curl \
  php7.4-mbstring \
  php7.4-xml \
  php7.4-zip \
  php7.4-intl \
  unzip

wget https://www.limesurvey.org/stable-release?download=2967:limesurvey421%20200428targz -O limesurvey.tar.gz

tar xvfz limesurvey.tar.gz

sudo mv limesurvey /opt

sudo chown -R www-data:www-data /opt/limesurvey

sudo ln -s  /opt/limesurvey /var/www/html

sudo systemctl reload apache2.service

3.ブラウザからhttp://<ホストめまたはIPアドレス>/limesurveyにアクセスして、「日本語 - Japan」を選択して「Start installation」をクリックします


4.ライセンスを確認して、同意できるのであれば「同意する」をクリックします


5.「インストール前のチェック」画面で「次へ」をクリックします


6.「データベース設定」画面で、以下の項目を入力して「次へ」をクリックします
データベース形式: MySQL
MySQL database engine type: MyISAM
データの場所: localhost
データベースユーザー: root
データベースパスワード: root
データベース名: limesurvey


7.「データベース作成」をクリックします


8.「データベースを作成する」をクリックします


9.「管理者設定」画面で管理者情報等を入力して、「次へ」をクリックします


10.インストーラ完了画面


〇関連情報
・LimeSurveyに関する他の情報はこちらを参照してください。

2020年4月15日水曜日

Debian 10(Buster)にLime SurveyとMariaDBをインストールする

LimeSurveyで、オンラインアンケートを設置することができます。

〇LimeSurveyの管理者画面


〇インストール方法
シェルから以下のコマンド実行します
echo "mariadb-server-10.0 mysql-server/root_password password root" | sudo debconf-set-selections

echo "mariadb-server-10.0 mysql-server/root_password_again password root" | sudo debconf-set-selections

sudo apt-get -y install mariadb-server

sudo mysql -uroot -e "CREATE DATABASE limesurvey DEFAULT CHARACTER SET utf8;"

sudo mysql -uroot -e "CREATE USER limesurvey@localhost IDENTIFIED BY 'limesurvey';"

sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON limesurvey.* TO 'limesurvey'@'localhost';"

sudo mysql -uroot -e "FLUSH PRIVILEGES;"

sudo apt-get -y install apache2 \
  libapache2-mod-php7.3 \
  php7.3-gd \
  php7.3-json \
  php7.3-mysql \
  php7.3-pdo \
  php7.3-curl \
  php7.3-mbstring \
  php7.3-xml \
  php7.3-zip \
  php7.3-gd 

wget https://www.limesurvey.org/stable-release?download=2942:limesurvey4117%20200414targz -O limesurvey.tar.gz

tar xvfz limesurvey.tar.gz

sudo mv limesurvey /opt

sudo chown -R www-data:www-data /opt/limesurvey

sudo ln -s  /opt/limesurvey /var/www/html

sudo systemctl reload apache2.service

2.ブラウザからhttp://<ホスト名またはアドレス>/limesurveyにアクセスして、「日本語 - Japan」を選択して「Start installation」をクリックします


3.ライセンスを確認して、同意できるのであれば「同意する」をクリックします


4.「インストール前のチェック」画面で「次へ」をクリックします


5.「データベース設定」画面で、以下の項目を入力して「次へ」をクリックします
データベース形式: MySQL
MySQL database engine Type: MyISAM
データの場所: localhost
データベースユーザー: limesurvey
データベースパスワード: limesurvey
データベース名: limesurvey
テーブル名: lime_


6.「データベースを作成する」をクリックします


7.「管理者設定」画面で管理者情報等を入力して、「次へ」をクリックします


8.インストーラ完了画面


2019年7月15日月曜日

VagrantでLimeSurveyとMariaDBをインストールした仮想マシン(Debian Buster/10)を構築する

LimeSurveyで、オンラインアンケートを設置することができます。

〇LimeSurveyの画面


〇構築方法
1.以下のVagrantfileを使用して、LimeSurveyとMariaDBをインストールした仮想マシン(Debian Buster/10)を構築します

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/debian-10"
  config.vm.hostname = "db10pagekit"
config.vm.network "public_network", ip:"192.168.1.103", :netmask => "255.255.255.0"
config.vm.network "private_network", ip: "192.168.55.103", :netmask => "255.255.255.0"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "db10pagekit"
     vbox.gui = true
     vbox.cpus = 2
     vbox.memory = 2048
  end
  config.vm.provision "shell", inline: <<-SHELL
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y install task-japanese gawk
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
timedatectl set-timezone Asia/Tokyo


# install mariadb
echo "mariadb-server-10.0 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mariadb-server-10.0 mysql-server/root_password_again password root" | sudo debconf-set-selections
apt-get -y install mariadb-server
mysql -uroot -proot -e "CREATE DATABASE limesurvey DEFAULT CHARACTER SET utf8mb4;"
mysql -uroot -proot -e "CREATE USER limesurvey@localhost IDENTIFIED BY 'limesurvey';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON limesurvey.* TO 'limesurvey'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"

# install apache and php
apt-get -y install apache2 libapache2-mod-php7.3
apt-get -y install php7.3-gd php7.3-json php7.3-mysql php7.3-pdo php7.3-curl php7.3-mbstring
apt-get -y install php7.3-xml php7.3-zip php7.3-gd php7.3-zip

# install limeservey(3.17.7)
wget https://www.limesurvey.org/stable-release?download=2584:limesurvey3177%20190627targz -O limesurvey.tar.gz
tar xvfz limesurvey.tar.gz
mv limesurvey /opt

chown -R www-data:www-data /opt/limesurvey
ln -s  /opt/limesurvey /var/www/html

systemctl reload apache2.service
echo 'access http://192.168.1.103/limesurvey/'
echo 'db:limesurvey  user:limesurvey  password:limesurvey'

SHELL
end

2.ブラウザからhttp://192.168.55.107/limesurveyにアクセスして、「日本語 - Japan」を選択して「Start installation」をクリックします


3.ライセンスを確認して、同意できるのであれば「同意する」をクリックします


4.「インストール前のチェック」画面で「次へ」をクリックします


5.「データベース設定」画面で、以下の項目を入力して「次へ」をクリックします
データベース形式: MySQL
データの場所: localhost
データベースユーザー: limesurvey
データベースパスワード: limesurvey
データベース名: limesurvey


6.「データベースを作成する」をクリックします


7.「管理者設定」画面で管理者情報等を入力して、「次へ」をクリックします


8.インストーラ完了画面



○関連情報
・LimeSurveyに関する他の記事はこちらを参照してください。

2018年9月20日木曜日

AnsibleでMariaDBとLimeSurveyをインストールする(Ubuntu18.04用)

LimeSurveyで、オンラインアンケートを設置することができます。

〇LimeSurveyの管理者画面


〇インストール方法
1.下準備
~/.ansible.cfgに以下の内容を設定します
[ssh_connection]
pipelining=True
[defaults]
host_key_checking = False

2. インストール対象ホストのユーザやパスワードを環境に合わせてinventoryファイルに記入します

inventory例
[lime-survey]
192.168.1.107

[all:vars]
ansible_ssh_port=22
ansible_ssh_user=vagrant
ansible_ssh_pass=vagrant
ansible_sudo_pass=vagrant

3.inventory、limesurvey.ymlを準備し、以下のコマンドを実行します。
ansible-playbook -i inventory limesurvey.yml

limesurvey.yml
- hosts: lime-survey
  vars:
    - dbname: limesurvey
    - dbuser: limesurvey
    - dbpassword: limesurvey
    - dbhost: localhost
    - dbport: 3306
  tasks:
    - name: set password for root
      shell: echo "mariadb-server-10.1 mysql-server/root_password password root" | sudo debconf-set-selections
      become: yes
    - name: set password for root
      shell: echo "mariadb-server-10.1 mysql-server/root_password_again password root" | sudo debconf-set-selections
      become: yes
    - name: install mariadb
      apt:
        name: mariadb-server
        state: present
      become: yes
    - name: enable and start mariadb
      systemd:
        name: mysql
        enabled: yes
        state: started
      become: yes
    - name: Install required software
      apt: name={{ item }} state=present
      with_items:
        - libmysqlclient-dev
        - python-pip
      become: true
    - name: install MySQL-python using pip
      pip:
        name: "{{ item }}"
        state: forcereinstall
      with_items:
        - pip
        - MySQL-python
      become: true
    - name: create db
      mysql_db:
        name={{ dbname }}
        state=present
        encoding=utf8
        login_user=root
      become: true
    - name: create and grant a database user
      mysql_user:
        name={{ dbuser }}
        password={{ dbpassword }}
        priv="limesurvey.*:ALL"
        state=present
      become: true
    - name: Install apache and php modules
      apt: name={{ item }} state=present
      with_items:
        - apache2
        - libapache2-mod-php7.2
        - php7.2-gd
        - php7.2-json
        - php7.2-mysql
        - php7.2-pdo
        - php7.2-curl
        - php7.2-mbstring
        - php7.2-xml
        - php7.2-zip
      become: true
    - name: download limesurvey
      get_url:
        url: https://github.com/LimeSurvey/LimeSurvey/archive/3.14.0+180730.tar.gz
        dest: /tmp/
      become: true
    - name: extract limesurvey
      unarchive:
        remote_src: yes
        src: /tmp/LimeSurvey-3.14.0-180730.tar.gz
        dest: /opt/
      become: true
    - name: change owner
      file:
        path: /opt/LimeSurvey-3.14.0-180730
        owner: www-data
        group: www-data
        recurse: yes
      become: true
    - name: symlink
      file:
        path: /var/www/html/limesurvey
        state: link
        src: /opt/LimeSurvey-3.14.0-180730
      become: true
    - name: clean up
      file:
        state: absent
        path: /tmp/LimeSurvey-3.14.0-180730.tar.gz
      become: yes
    - name: start apache2.service
      systemd:
        name: apache2
        state: restarted
      become: yes

4.ブラウザからhttp://192.168.55.107/limesurveyにアクセスして、「日本語 - Japan」を選択して「Start installation」をクリックします


5.ライセンスを確認して、同意できるのであれば「同意する」をクリックします


4.「インストール前のチェック」画面で「次へ」をクリックします


6.「データベース設定」画面で、以下の項目を入力して「次へ」をクリックします
データベース形式: MySQL
データの場所: localhost
データベースユーザー: limesurvey
データベースパスワード: limesurvey
データベース名: limesurvey


7.「データベースを作成する」をクリックします


8.「管理者設定」画面で管理者情報等を入力して、「次へ」をクリックします


9.インストーラ完了画面



○関連情報
・Ansibleに関する他の記事はこちらを参照してください。

・LimeSurveyに関する他の記事はこちらを参照してください。

2018年9月16日日曜日

AnsibleでMariaDBとLimeSurveyをインストールする(Ubuntu16.04用)

LimeSurveyで、オンラインアンケートを設置することができます。

〇LimeSurveyの管理者画面


〇インストール方法
1.下準備
~/.ansible.cfgに以下の内容を設定します
[ssh_connection]
pipelining=True
[defaults]
host_key_checking = False

2. インストール対象ホストのユーザやパスワードを環境に合わせてinventoryファイルに記入します

inventory例
[lime-survey]
192.168.1.107

[all:vars]
ansible_ssh_port=22
ansible_ssh_user=vagrant
ansible_ssh_pass=vagrant
ansible_sudo_pass=vagrant

3.inventory、limesurvey.ymlを準備し、以下のコマンドを実行します。
ansible-playbook -i inventory limesurvey.yml

limesurvey.yml
- hosts: lime-survey
  vars:
    - dbname: limesurvey
    - dbuser: limesurvey
    - dbpassword: limesurvey
    - dbhost: localhost
    - dbport: 3306
  tasks:
    - name: set password for root
      shell: echo "mariadb-server-10.1 mysql-server/root_password password root" | sudo debconf-set-selections
      become: yes
    - name: set password for root
      shell: echo "mariadb-server-10.1 mysql-server/root_password_again password root" | sudo debconf-set-selections
      become: yes
    - name: install mariadb
      apt:
        name: mariadb-server
        state: present
      become: yes
    - name: enable and start mariadb
      systemd:
        name: mysql
        enabled: yes
        state: started
      become: yes
    - name: Install required software
      apt: name={{ item }} state=present
      with_items:
        - libmysqlclient-dev
        - python-pip
      become: true
    - name: install MySQL-python using pip
      pip:
        name: "{{ item }}"
        state: forcereinstall
      with_items:
        - pip
        - MySQL-python
      become: true
    - name: create db
      mysql_db:
        name={{ dbname }}
        state=present
        encoding=utf8
        login_user=root
      become: true
    - name: create and grant a database user
      mysql_user:
        name={{ dbuser }}
        password={{ dbpassword }}
        priv="limesurvey.*:ALL"
        state=present
      become: true
    - name: Install apache and php modules
      apt: name={{ item }} state=present
      with_items:
        - apache2
        - libapache2-mod-php7.0
        - php7.0-gd
        - php7.0-json
        - php7.0-mysql
        - php7.0-pdo
        - php7.0-curl
        - php7.0-mbstring
        - php7.0-mcrypt
        - php7.0-xml
        - php7.0-zip
      become: true
    - name: download limesurvey
      get_url:
        url: https://github.com/LimeSurvey/LimeSurvey/archive/3.14.0+180730.tar.gz
        dest: /tmp/
      become: true
    - name: extract limesurvey
      unarchive:
        remote_src: yes
        src: /tmp/LimeSurvey-3.14.0-180730.tar.gz
        dest: /opt/
      become: true
    - name: change owner
      file:
        path: /opt/LimeSurvey-3.14.0-180730
        owner: www-data
        group: www-data
        recurse: yes
      become: true
    - name: symlink
      file:
        path: /var/www/html/limesurvey
        state: link
        src: /opt/LimeSurvey-3.14.0-180730
      become: true
    - name: clean up
      file:
        state: absent
        path: /tmp/LimeSurvey-3.14.0-180730.tar.gz
      become: yes
    - name: start apache2.service
      systemd:
        name: apache2
        state: restarted
      become: yes

4.ブラウザからhttp://192.168.55.107/limesurveyにアクセスして、「日本語 - Japan」を選択して「Start installation」をクリックします


5.ライセンスを確認して、同意できるのであれば「同意する」をクリックします


4.「インストール前のチェック」画面で「次へ」をクリックします


6.「データベース設定」画面で、以下の項目を入力して「次へ」をクリックします
データベース形式: MySQL
データの場所: localhost
データベースユーザー: limesurvey
データベースパスワード: limesurvey
データベース名: limesurvey


7.「データベースを作成する」をクリックします


8.「管理者設定」画面で管理者情報等を入力して、「次へ」をクリックします


9.インストーラ完了画面



○関連情報
・Ansibleに関する他の記事はこちらを参照してください。

・LimeSurveyに関する他の記事はこちらを参照してください。

2018年9月12日水曜日

AnsibleでMariaDBとLimeSurveyをインストールする(Debian Stretch/9.5用)

LimeSurveyで、オンラインアンケートを設置することができます。

〇LimeSurveyの管理者画面


〇インストール方法
1.下準備
~/.ansible.cfgに以下の内容を設定します
[ssh_connection]
pipelining=True
[defaults]
host_key_checking = False

2. インストール対象ホストのユーザやパスワードを環境に合わせてinventoryファイルに記入します

inventory例
[lime-survey]
192.168.1.106

[all:vars]
ansible_ssh_port=22
ansible_ssh_user=vagrant
ansible_ssh_pass=vagrant
ansible_sudo_pass=vagrant

3.inventory、limesurvey.ymlを準備し、以下のコマンドを実行します。
ansible-playbook -i inventory limesurvey.yml

limesurvey.yml
- hosts: lime-survey
  vars:
    - dbname: limesurvey
    - dbuser: limesurvey
    - dbpassword: limesurvey
    - dbhost: localhost
    - dbport: 3306
  tasks:
    - name: set password for root
      shell: echo "mariadb-server-10.1 mysql-server/root_password password root" | sudo debconf-set-selections
      become: yes
    - name: set password for root
      shell: echo "mariadb-server-10.1 mysql-server/root_password_again password root" | sudo debconf-set-selections
      become: yes
    - name: install mariadb
      apt:
        name: mariadb-server
        state: present
      become: yes
    - name: enable and start mariadb.service
      systemd:
        name: mariadb
        enabled: yes
        state: started
      become: yes
    - name: Install required software
      apt: name={{ item }} state=present
      with_items:
        - default-libmysqlclient-dev
        - python-pip
      become: true
    - name: install MySQL-python using pip
      pip:
        name: "{{ item }}"
        state: forcereinstall
      with_items:
        - pip
        - MySQL-python
      become: true
    - name: create db
      mysql_db:
        name={{ dbname }}
        state=present
        encoding=utf8
        login_user=root
      become: true
    - name: create and grant a database user
      mysql_user:
        name={{ dbuser }}
        password={{ dbpassword }}
        priv="limesurvey.*:ALL"
        state=present
      become: true
    - name: Install apache and php modules
      apt: name={{ item }} state=present
      with_items:
        - apache2
        - libapache2-mod-php7.0
        - php7.0-gd
        - php7.0-json
        - php7.0-mysql
        - php7.0-pdo
        - php7.0-curl
        - php7.0-mbstring
        - php7.0-mcrypt
        - php7.0-xml
        - php7.0-zip
      become: true
    - name: download limesurvey
      get_url:
        url: https://github.com/LimeSurvey/LimeSurvey/archive/3.14.0+180730.tar.gz
        dest: /tmp/
      become: true
    - name: extract limesurvey
      unarchive:
        remote_src: yes
        src: /tmp/LimeSurvey-3.14.0-180730.tar.gz
        dest: /opt/
      become: true
    - name: change owner
      file:
        path: /opt/LimeSurvey-3.14.0-180730
        owner: www-data
        group: www-data
        recurse: yes
      become: true
    - name: symlink
      file:
        path: /var/www/html/limesurvey
        state: link
        src: /opt/LimeSurvey-3.14.0-180730
      become: true
    - name: clean up
      file:
        state: absent
        path: /tmp/LimeSurvey-3.14.0-180730.tar.gz
      become: yes
    - name: start apache2.service
      systemd:
        name: apache2
        state: restarted
      become: yes

4.ブラウザからhttp://192.168.55.106/limesurveyにアクセスして、「日本語 - Japan」を選択して「Start installation」をクリックします


5.ライセンスを確認して、同意できるのであれば「同意する」をクリックします


4.「インストール前のチェック」画面で「次へ」をクリックします


6.「データベース設定」画面で、以下の項目を入力して「次へ」をクリックします
データベース形式: MySQL
データの場所: localhost
データベースユーザー: limesurvey
データベースパスワード: limesurvey
データベース名: limesurvey


7.「データベースを作成する」をクリックします


8.「管理者設定」画面で管理者情報等を入力して、「次へ」をクリックします


9.インストーラ完了画面



○関連情報
・Ansibleに関する他の記事はこちらを参照してください。

・LimeSurveyに関する他の記事はこちらを参照してください。

2018年9月8日土曜日

AnsibleでMariaDBとLimeSurveyをインストールする(CentOS7用)

LimeSurveyで、オンラインアンケートを設置することができます。

〇LimeSurveyの管理者画面


〇インストール方法
1.下準備
~/.ansible.cfgに以下の内容を設定します
[ssh_connection]
pipelining=True
[defaults]
host_key_checking = False

2. インストール対象ホストのユーザやパスワードを環境に合わせてinventoryファイルに記入します

inventory例
[lime-survey]
192.168.1.106

[all:vars]
ansible_ssh_port=22
ansible_ssh_user=vagrant
ansible_ssh_pass=vagrant
ansible_sudo_pass=vagrant

3.inventory、limesurvey.ymlを準備し、以下のコマンドを実行します。
ansible-playbook -i inventory limesurvey.yml

limesurvey.yml
- hosts: lime-survey
  vars:
    - dbname: limesurvey
    - dbuser: limesurvey
    - dbpassword: limesurvey
    - dbhost: localhost
    - dbport: 3306
  tasks:
    - name: install mariadb
      yum:
        name: mariadb-server
        state: present
      become: yes
    - name: enable and start mariadb.service
      systemd:
        name: mariadb
        enabled: yes
        state: started
      become: yes
    - name: install epel-release
      yum:
        name: epel-release
        state: present
      become: yes
    - name: Install required software
      yum: name={{ item }} state=present enablerepo=epel
      with_items:
        - mariadb-devel
        - python-devel
        - python36-devel
        - python-pip
      become: true
    - name: install MySQL-python using pip
      pip:
        name: "{{ item }}"
        state: forcereinstall
      with_items:
        - MySQL-python
      become: true
    - name: create db
      mysql_db:
        name={{ dbname }}
        state=present
        encoding=utf8
        login_user=root
    - name: create and grant a database user
      mysql_user:
        name={{ dbuser }}
        password={{ dbpassword }}
        priv="limesurvey.*:ALL"
        state=present
      become: true
    - name: install remi repository
      yum: name=http://ftp.riken.jp/Linux/remi/enterprise/remi-release-7.rpm
      become: true
    - name: Install apache and php modules
      yum: name={{ item }} state=present enablerepo=remi-php71
      with_items:
        - httpd
        - php
        - php-mbstring
        - php-curl
        - php-gd
        - php-dom
        - unzip
        - php-json
        - php-pdo
        - php-xml
        - php-simplexml
        - php-mysql
        - php-zip
      become: true
    - name: download limesurvey
      get_url:
        url: https://github.com/LimeSurvey/LimeSurvey/archive/3.14.0+180730.tar.gz
        dest: /tmp/
      become: true
    - name: extract limesurvey
      unarchive:
        remote_src: yes
        src: /tmp/LimeSurvey-3.14.0-180730.tar.gz
        dest: /opt/
      become: true
    - name: change owner
      file:
        path: /opt/LimeSurvey-3.14.0-180730
        owner: apache
        group: apache
        recurse: yes
      become: true
    - name: symlink
      file:
        path: /var/www/html/limesurvey
        state: link
        src: /opt/LimeSurvey-3.14.0-180730
      become: true
    - name: clean up
      file:
        state: absent
        path: /tmp/LimeSurvey-3.14.0-180730.tar.gz
      become: yes
    - name: start httpd.service
      systemd:
        name: httpd
        state: restarted
      become: yes

4.ブラウザからhttp://192.168.55.107/limesurveyにアクセスして、「日本語 - Japan」を選択して「Start installation」をクリックします


5.ライセンスを確認して、同意できるのであれば「同意する」をクリックします


4.「インストール前のチェック」画面で「次へ」をクリックします


6.「データベース設定」画面で、以下の項目を入力して「次へ」をクリックします
データベース形式: MySQL
データの場所: localhost
データベースユーザー: limesurvey
データベースパスワード: limesurvey
データベース名: limesurvey


7.「データベースを作成する」をクリックします


8.「管理者設定」画面で管理者情報等を入力して、「次へ」をクリックします


9.インストーラ完了画面



○関連情報
・LimeSurveyに関する他の記事はこちらを参照してください。