2017年7月11日 星期二

(教學)OpenAudit 2.0.1&1.8.4資產管理系統(Centos7.LicenseKey.MariaDB.查微軟序號)


yum -y install epel-release
wget http://li.nux.ro/download/nux/dextop/el7/x86_64//winexe-1.00-2.4.x86_64.rpm
rpm -Uvh winexe-1.00-2.4.x86_64.rpm
yum -y install httpd mysql mariadb-server mariadb php php-cli php-mysql php-ldap php-mbstring php-mcrypt php-snmp php-xml nmap net-snmp zip curl perl wget sshpass screen samba-client

設定啟動及開機自啟動
systemctl enable httpd && systemctl restart httpd
systemctl start mariadb && systemctl enable mariadb

開通防火牆
firewall-cmd --permanent --add-service=mysql
firewall-cmd --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload

mysql_secure_installation

1.MariaDB 的 root 帳號,預設是沒有密碼,所以案Enter就好。
2.然後因為預設無密碼,所以要設定 root 的密碼,密碼需輸入兩次作為確認。
3.移除匿名帳號的登入權限。
4.拒絕 root 帳號從遠端登入,沒有特殊疑慮就選n,方便root遠端操作。
5.刪除測試資料庫。
6.是否要重新載入table的權限。

sed -i -e 's/memory_limit/;memory_limit/g' /etc/php.ini
echo "memory_limit = 512M" >> /etc/php.ini
sed -i -e 's/max_execution_time/;max_execution_time/g' /etc/php.ini
echo "max_execution_time = 300" >> /etc/php.ini
sed -i -e 's/max_input_time/;max_input_time/g' /etc/php.ini
echo "max_input_time = 600" >> /etc/php.ini
sed -i -e 's/error_reporting/;error_reporting/g' /etc/php.ini
echo "error_reporting = E_ALL" >> /etc/php.ini
sed -i -e 's/display_errors/;display_errors/g' /etc/php.ini
echo "display_errors = On" >> /etc/php.ini
sed -i -e 's/upload_max_filesize/;upload_max_filesize/g' /etc/php.ini
echo "upload_max_filesize = 10M" >> /etc/php.ini
sed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini
echo "date.timezone = Asia/Taipei " >> /etc/php.ini
echo "ServerName open-audit" >> /etc/httpd/conf/httpd.conf

chsh -s /bin/bash apache
systemctl restart httpd.service
chmod u+s /usr/bin/nmap

新版
wget http://dl-openaudit.opmantek.com/OAE-Linux-x86_64-release_2.0.1.runsh OAE-Linux-x86_64-release_2.0.1.run --noexec --keepcd  /usr/local/Open-AudIT-2.0.1

舊版wget http://dl-openaudit.opmantek.com/OAE-Linux-x86_64-release_1.8.4.tar.gztar -zxvf OAE-Linux-x86_64-release_1.8.4.tar.gz -C /usr/local/cd  /usr/local/Open-AudIT-1.8.4
編輯
vi installer

將38行註解成這樣
#use version 0.77;

然後安裝
./installer -t /var/www/html/oa

若需要能夠匯出LicenseKey
 vi /usr/local/open-audit/code_igniter/application/views/theme-bootstrap/v_devices_collection.php
$export_link = $this->response->links->first;

if (strpos($this->response->links->first, '?') !== false) {

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。