0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Alpine Linux3.4でLAMP (apache2)

Last updated at Posted at 2016-10-05
  • proxmox4.3でAlpineLinx3.3のLXC templateを使用した。3.4に更新
セットアップ
setup-alpine
# Asia/Tokyoを選択,vda,sys,後はEnter連打
sed -i -e 's/v3.3/v3.4/' \
  -e 's/^#//' \
  /etc/apk/repositories
apk update && apk upgrade

apache + php7 + mariadb

phpmyadmin設定
apk add \
  apache2 \
  php7 php7-apache2 \
  \
  mariadb mariadb-client \
  \
  postfix mailx \
  \
  logwatch pflogsumm
# mariadb
/etc/init.d/mariadb setup
service mariadb start
/usr/bin/mysqladmin -u root password 'パスワード'
#
rc-update add mariadb
rc-update add apache2
#
reboot

phpmyadminをどうしても入れたい場合

  • phpmyadminパッケージはphp5に依存、Apache2.2用の設定ファイルと使わないほうがいいが、一応メモを残しておく。
apk add phpmyadmin
chown -R apache:apache /etc/phpmyadmin
  • phpmyadminの設定ファイルがApache2.2用のため2.4用に修正
/etc/apache2/conf.d/phpmyadmin.conf
  Alias /phpmyadmin "/usr/share/webapps/phpmyadmin"
  <Directory "/usr/share/webapps/phpmyadmin">
  	AllowOverride All
  	Options FollowSymlinks
- 	Order allow,deny
- 	Allow from all
+ 	Require all granted
  </Directory>

myadm.png

postfix

echo "root: メールアドレス" >> /etc/postfix/aliases
newaliases
date | mail root
/var/www/localhost/htdocs/test_mail.php
<?php
mail('メール@アドレス', 'My Subject', "message");

その他インストール

# apk add samba-common-tools samba-server
# apk add nagios nagios-web nagios-plugins
apk add vim
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?