-
Notifications
You must be signed in to change notification settings - Fork 208
RHEL
Wilbur Longwisch edited this page May 31, 2023
·
11 revisions
yum install mod_ssl httpd php mariadb-server php-pdo php-mysqlnd php-mbstring php-snmp php-xml php-snmp php-gd php-ldap php-intl graphviz graphviz-gd wget vim
systemctl enable httpd.service --now
systemctl enable mariadb.service --now
mysql_secure_installation
Switch to unix_socket authentication [Y/n] n
Change the root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Remove anonymous users? [Y/n]
... Success!
Disallow root login remotely? [Y/n]
... Success!
Remove test database and access to it? [Y/n]
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reload privilege tables now? [Y/n]
... Success!
# mysql -u root -p
MariaDB [(none)]> create database dcim;
MariaDB [(none)]> grant all privileges on dcim.* to 'dcim' identified by 'dcim';
MariaDB [(none)]> exit
# vim /etc/httpd/conf.d/opendcim.conf
<VirtualHost *:443>
ServerAdmin [email protected]
DocumentRoot /opt/openDCIM/opendcim
ServerName opendcim.example.net
SSLCertificateKeyFile "/etc/pki/tls/private/localhost.key"
SSLCertificateFile "/etc/pki/tls/certs/localhost.crt"
SSLCACertificateFile "/etc/pki/tls/certs/ca-bundle.crt"
AllowEncodedSlashes On
<Directory /opt/openDCIM/opendcim>
AllowOverride All
AuthType Basic
AuthName "openDCIM"
AuthUserFile /opt/openDCIM/.htpasswd
Require valid-user
</Directory>
</VirtualHost>
mkdir -p /opt/openDCIM/
cd /opt/openDCIM/
wget https://github.com/opendcim/openDCIM/archive/refs/tags/23.01.tar.gz
tar -zxpf 23.01.tar.gz
ln -s openDCIM-23.01 opendcim
mkdir -p assets/{pictures,drawings}
chown apache:apache assets/*
ln -s /opt/openDCIM/assets/ /opt/openDCIM/opendcim/
cp opendcim/db.inc.php-dist opendcim/db.inc.php
semanage fcontext -a -t httpd_sys_rw_content_t "/opt/openDCIM/assets(/.*)?"
restorecon -R -v /opt/openDCIM/assets
htpasswd -c /opt/openDCIM/.htpasswd dcim
firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --reload
systemctl reload httpd
https://<server ip goes here>