Christophe Casalegno

How to install automatically apache, php, mysql, memcache, pure-ftpd, etc. on Debian 8

PALI (Perfect Automatic Lamp Installer) is a simple way to do a very fast installation of apache + php + mysql + memcached (with stored memcached php sessions), git, nodejs, webmin grunt and other interesting things with an only one command line.

It is a really simple script, so you can modify it if you need to add others software. Today the script do different things like :

  • Install vim, iotop, mc, apache2, rsync, duplicity…
  • Install php5 (curl, apcu, gd, intl, imagick, imap, mcrypt, memcache, pspell, recode, sqlite, tidy, xmlrpc, xsl, soap, calendar)
  • Install Mysql-server, Mysql-client and phpmyadmin
  • Install munin, postfix, git, pure-ftpd, Imagemagick and curl
  • Install Composer, NodeJs, Grunt, Drupal Console, Drush and webmin
  • Activate userdir, rewrite, expires, deflate, headers and ssl
  • Configure pure-ftpd to use unix users and chroot them
  • Create a first virtualhost (on the hostname address) with a phpinfo and a phptest
  • Install a pre-optimized mysql configuration
  • Install and configure loadcheck, memorycheck & diskcheck
  • You can change ssh port from 22 to another
  • You can change webmin port from 10000 to another
  • You can choose your NodeJS version 6 or 7 (7 by default)
  • Make a “hot modification” of the hostname of the server
  • Configure php for using memcached for session storage
  • Choose two emails contact : one for the admin, one for the monitor
  • Setup root, mysql & user password and sent you them by email

 
No talk all action : you can test it immediately from here : it’s *free*


Christophe Casalegno
https://twitter.com/Brain0verride

5 Comments

  1. hello:

    This ids the error Mysql…

    mysql.service – LSB: Start and stop the mysql database server daemon
    Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: enabled)
    Active: failed (Result: exit-code) since Fri 2016-09-09 11:50:46 UTC; 44s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 9826 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

    Sep 09 11:50:03 beaglebone systemd[1]: Starting LSB: Start and stop the mysql database server daemon…
    Sep 09 11:50:46 beaglebone /etc/init.d/mysql[11571]: 0 processes alive and ‘/usr/bin/mysqladmin –defaults-file=/etc/mysql/debian.cnf ping’ resulted in
    Sep 09 11:50:46 beaglebone mysql[9826]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
    Sep 09 11:50:46 beaglebone systemd[1]: mysql.service: Control process exited, code=exited status=1
    Sep 09 11:50:46 beaglebone systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
    Sep 09 11:50:46 beaglebone systemd[1]: mysql.service: Unit entered failed state.
    Sep 09 11:50:46 beaglebone systemd[1]: mysql.service: Failed with result ‘exit-code’.

    ——————————————————————–

    root@beaglebone:~# journalctl -xe
    — Unit systemd-tmpfiles-clean.service has finished starting up.

    — The start-up result is done.
    Sep 09 11:53:56 beaglebone sudo[13002]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/usr/
    Sep 09 11:53:56 beaglebone sudo[13002]: pam_unix(sudo:session): session opened for user root by root
    Sep 09 11:53:58 beaglebone systemd[1]: Starting LSB: Start and stop the mysql database server daemon
    — Subject: Unit mysql.service has begun start-up
    — Defined-By: systemd
    — Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

    — Unit mysql.service has begun starting up.
    Sep 09 11:54:36 beaglebone /etc/init.d/mysql[14292]: 0 processes alive and ‘/usr/bin/mysqladmin –de
    Sep 09 11:54:36 beaglebone /etc/init.d/mysql[14292]: [61B blob data]
    Sep 09 11:54:36 beaglebone /etc/init.d/mysql[14292]: error: ‘Can’t connect to local MySQL server thr
    Sep 09 11:54:36 beaglebone /etc/init.d/mysql[14292]: Check that mysqld is running and that the socke
    Sep 09 11:54:36 beaglebone /etc/init.d/mysql[14292]:
    Sep 09 11:54:36 beaglebone mysql[13035]: Starting MySQL database server: mysqld . . . . . . . . . .
    Sep 09 11:54:36 beaglebone systemd[1]: mysql.service: Control process exited, code=exited status=1
    Sep 09 11:54:36 beaglebone systemd[1]: Failed to start LSB: Start and stop the mysql database server
    — Subject: Unit mysql.service has failed
    — Defined-By: systemd
    — Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

    — Unit mysql.service has failed.

    — The result is failed.
    Sep 09 11:54:36 beaglebone systemd[1]: mysql.service: Unit entered failed state.
    Sep 09 11:54:36 beaglebone systemd[1]: mysql.service: Failed with result ‘exit-code’.
    Sep 09 11:54:36 beaglebone sudo[13002]: pam_unix(sudo:session): session closed for user root
    Sep 09 11:55:01 beaglebone CRON[14479]: pam_unix(cron:session): session opened for user root by (uid
    Sep 09 11:55:01 beaglebone CRON[14478]: pam_unix(cron:session): session opened for user munin by (ui
    Sep 09 11:55:01 beaglebone CRON[14481]: (root) CMD (if [ -x /etc/munin/plugins/apt_all ]; then /etc/
    Sep 09 11:55:01 beaglebone CRON[14482]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/mu
    Sep 09 11:55:01 beaglebone CRON[14479]: pam_unix(cron:session): session closed for user root

    Thanks for you atention.

Leave a Comment