This script is a small tool used to automate the deployment of phpipam on a brand new clean debian 9 install. All my gratitude to Miha Petkovsek, creator of phpipam.
Find out more about phpipam and phpipam on github To install debian
N.B. : It will be soon tested for debian 10
- It installs several tools and utils on your debian 9 server
mariadb-client
andmariadb-server
(MySQL)expect
andjq
(for config. purposes)snmp
,snmpd
,fping
(required for phpipam)apache2
,openssl
,php7.0
(and all the required php7 plugins required by phpipam)git
vim
andvim-pathogen
netcat
,tcpdump
,dnsutils
(because it is always useful on a server, especially one for phpipam)
- It sets the root password for mariadb
- It configures apache2 vhost and ssl vhost for phpipam
- It clones the github repo of phpipam, checkout on the configured version
- It configures the config.php file
- It creates a DB for phpipam, load the phpipam DB schema
- It restarts apache, and you're good to go ! (you still need to install your own valid ssl certificate)
Install a clean debian 9, copy the script in your home directory, make the script executable
chmod +x ./phpipam_installer.sh
Then, simply run the script (as root)
./phpipam_installer.sh
Before copying the script, you can edit all variables as needed
ipam_admin_email
: PHPIPAM ADMIN EMAILipam_admin_pass
: PHPIPAM ADMIN PASSWORDipam_site_title
: PHPIPAM SITE TITLEipam_site_domain
: PHPIPAM SITE DOMAIN NAMEipam_site_host
: PHPIPAM SITE HOST NAMEipam_site_url_scheme
: PHP IPAM URL SCHEME (http or https)ipam_parentpath
: PHPIPAM PARENT DIRECTORY PATHipam_dirname
: PHPIPAM DIRECTORYvhost_admin
: PHPIPAM APACHE VHOST ADMINvhost_aliases
: PHPIPAM APACHE VHOST ALIASESvhost_error_log
: PHPIPAM APACHE VHOST ERROR LOG NAMEvhost_access_log
: PHPIPAM APACHE VHOST ACCESS LOG NAMEvhost_ssl_error_log
: PHPIPAM APACHE SSL VHOST ERROR LOG NAMEvhost_ssl_access_log
: PHPIPAM APACHE SSL VHOST ACCESS LOG NAMEapache_conf_path
: PHPIPAM APACHE VHOST CONFIG PATHapache_vhost_ipam
: PHPIPAM APACHE VHOST NAMEapache_vhost_ipam_ssl
: PHPIPAM APACHE SSL VHOST NAMEphp_ipam_version
: PHPIPAM VERSION (actual stable : 1.4)sql_root_pwd
: MySQL (mariadb) ROOT PASSWORDsql_ipam_user
: MySQL (mariadb) PHPIPAM USERsql_ipam_pwd
: MySQL (mariadb) PHPIPAM USER PASSWORDsql_ipam_db
: MySQL (mariadb) PHPIPAM DB NAME