Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun May 26, 2019 4:19 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Error install 1.2.2
PostPosted: Sat Mar 09, 2019 8:48 pm 
Offline

Joined: Sat Mar 09, 2019 8:17 pm
Posts: 4
When I installing cacti 1.2.2,I meet an error:
System log file is not available for writing, please enable write access Log: /var/www/cacti/log/cacti.log

I tried all kinds of methods,but the problem has not been solved.

I delete the cacti,and install cacti 1.1.38,Success !
why ?

OS:Fedora29
/var/www/cacti system _u:object_r:httpd_sys_content_t:s0
mysql :5.7
php :7.2.15
httpd:2.4.38-2


Top
 Profile  
 
 Post subject: Re: Error install 1.2.2
PostPosted: Sun Mar 10, 2019 7:33 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2474
Because the website user or poller user did now have write access to the log file, exactly what it said.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error install 1.2.2
PostPosted: Mon Mar 11, 2019 10:06 pm 
Offline

Joined: Sat Mar 09, 2019 8:17 pm
Posts: 4
Steps for installing cacti-1.2.2,but it does not work! (System log file is not available for writing, please enable write access Log: /var/www/cacti/log/cacti.log ),why ?Who can help me ?

#tar -xvzf cacti-1.2.2.tar.gz
#mv cacti-1.2.2 /var/www/cacti
#cd /var/www/
#chown -R apache:apache cacti
#ls -l
drwxrwxr-x. 18 apache apache 4096 2月 24 22:52 cacti
drwxr-xr-x. 2 root root 6 1月 23 20:40 cgi-bin
drwxr-xr-x. 2 root root 6 1月 23 20:40 html
#chcon -R --reference=html cacti
#ls -Z
system_u:object_r:httpd_sys_content_t:s0 cacti
system_u:object_r:httpd_sys_script_exec_t:s0 cgi-bin
system_u:object_r:httpd_sys_content_t:s0 html
#mysqladmin -u root creat cacti -p
#cd cacti
#mysql -u root -p cacti < cacti.sql
#mysql -u root -p
mysql> GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY 'xxxxxxxx;
mysql> flush privileges;
mysql> exit
#vi include/config.php
$database_type = 'mysql';
$database_default = 'cacti';
$database_hostname = 'localhost';
$database_username = 'cactiuser';
$database_password = xxxxxxxx';
$database_port = '3306';
$database_ssl = false;
$database_ssl_key = '';
$database_ssl_cert = '';
$database_ssl_ca = '';
#vi /etc/crontab
*/5 * * * * apache php /var/www/cacti/poller.php > /dev/null 2>&1
#vi /etc/httpd/conf/httpd.conf
DocumentRoot "/var/www/cacti"
<Directory "/var/www/cacti">
#systemctl restart httpd


Top
 Profile  
 
 Post subject: Re: Error install 1.2.2
PostPosted: Tue Mar 12, 2019 4:52 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2474
OK your problem may be with SELinux, see the permissions section of my personal CentOS 7 setup, you'll have to adjust the paths and probably remove the {} sections as I have multiple instances.

https://github.com/netniV/cacti/wiki/Te ... missions-1

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error install 1.2.2
PostPosted: Wed Mar 13, 2019 9:46 am 
Offline

Joined: Sat Mar 09, 2019 8:17 pm
Posts: 4
Tthank you,netniV,you are right! My cacti.1.2.2 is working properly.

#cd /var/www/cacti
#chcon -R -t httpd_sys_rw_content_t log rra resource scripts cache
#vi /var/www/cacti/include/config.php
$url_path = '/';
#systemctl restart httpd


Top
 Profile  
 
 Post subject: Re: Error install 1.2.2
PostPosted: Wed Mar 13, 2019 11:58 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2474
You might want to use the SE commands I mentioned because if someone restores the default context at all, it will replace your chcon's. Using the other commands, it's part of the OS's rules.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error install 1.2.2
PostPosted: Sun Mar 17, 2019 4:54 am 
Offline

Joined: Sat Mar 09, 2019 8:17 pm
Posts: 4
I see .I use the commands of semanage and restorecon to modify the dir /var/www/cacti today.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot] and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group