LoginSignup
0
0

More than 5 years have passed since last update.

Install Zenphoto on Arch Linux

Last updated at Posted at 2013-12-06

ZenphotoをArch Linuxに入れて使い始めました。

必要なPackageをインストール

pacman -S imagemagick php-cgi php-apache php-pear
pecl install imagick

PHPのmysql用のextentionを有効にする

  • /etc/php/php.iniを修正
vi /etc/php/php.ini
  • 以下の行のコメントアウトを解除
php.ini
extension=mysqli.so
extension=mysql.so
extension=pdo_mysql.so
extension=gd.so
  • 以下の行を追加
php.ini
extension=imagick.so

PackageをDownload

cd /usr/local/src
wget https://github.com/zenphoto/zenphoto/archive/zenphoto-1.4.5.7.tar.gz
tar xvfz zenphoto-1.4.5.7.tar.gz
mv zenphoto-zenphoto-1.4.5.7 /srv/http/zenphoto
chown -R http:http /srv/http/zenphoto/

DBを作成

mysql -u root -p
Enter password: ******
MariaDB [(none)]> CREATE DATABASE zenphoto CHARACTER SET utf8;
Query OK, 1 row affected (0.12 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| ghost              |
| ghost_dev          |
| mysql              |
| performance_schema |
| test               |
| zenphoto           |
+--------------------+
7 rows in set (0.00 sec)

MariaDB [(none)]> GRANT ALL ON zenphoto.* to zenphoto@localhost;
Query OK, 0 rows affected (0.09 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.05 sec)

MariaDB [(none)]> SET PASSWORD FOR zenphoto@localhost=password('YOUR PASSWORD');
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> exit
Bye

Apacheの設定を追加

  • PHP Moduleを使えるよう設定を追加
vi /etc/httpd/conf/httpd.conf
httpd.conf
# PHP Module
LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
Include conf/extra/php5_module.conf 
  • VirtualHostの設定を追加
vi /etc/httpd/conf/extra/httpd-vhosts.conf
  • 以下の設定を追加
httpd-vhosts.conf
### zenphoto
<VirtualHost *:80>
    ServerAdmin root@example.com
    DocumentRoot "/srv/http/zenphoto/"
    ServerName zenphoto.example.com
    AddDefaultCharset Off
    ErrorLog "/var/log/httpd/zenphoto.example.com/error_log"
    CustomLog "/var/log/httpd/zenphoto.example.com/access_log" common
    <Directory /srv/http/zenphoto/>
        AllowOverride All
    </Directory>
</VirtualHost>
  • Log Directoryを作成
mkdir /var/log/httpd/zenphoto.example.com/
  • Apacheの設定に問題が無いことを確認後、再起動
httpd -t
Syntax OK
systemctl restart httpd
systemctl status httpd

zenphotoの設定

  • zp-dataディレクトリのpermissionを600に変更
cd /srv/httpd/zenphoto
chmod 600 zp-data
  • DB用の設定を追加する
Database engine : MySQL
Database admin user : zenphoto
Database admin password : YOUR PASSWORD
Database host : localhost
Database name : zenphoto
Database table prefix : (Blank) 

その他全てOKなら[GO]というボタンが出るので進む。

ユーザを作成

Username, Password等入力して完了。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0