mirror of
https://github.com/Cacti/documentation.git
synced 2026-10-23 03:26:44 +09:00
Create doc to convert package install to source install (#186)
* Create convert-from-package-to-source-debian-ubuntu.md * Update README.md * Update Upgrading-Cacti.md * Update Upgrading-Cacti.md
This commit is contained in:
1 parent
e7f8d372b6
commit
dfd5c62c50
3 files changed
+112
-48
No files matched your search
@@ -319,6 +319,8 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
12.[Change poller interval from 5 minutes to 1 minute ](How-To-Poller-5-to-1-min.md)
|
||||
|
||||
13.[Convert from Package based install to source on Ubuntu/Debian](convert-from-package-to-source-debian-ubuntu.md)
|
||||
|
||||
### Video Tutorials
|
||||
|
||||
Watch Howto's and Tutorials on the Cacti Official YouTube page if you prefer. If you would have any ideas for videos or would like to contribute let us know !
|
||||
|
||||
+48
-48
@@ -1,75 +1,75 @@
|
||||
# Upgrading Cacti Under UNIX Compatible Operating Systems
|
||||
|
||||
To upgrade Cacti under UNIX style operating systems is very straightforward.
|
||||
To upgrade Cacti on Windows, you should use the instructions
|
||||
in the Link below:
|
||||
To upgrade Cacti under UNIX-style operating systems is very straightforward. To upgrade Cacti on Windows, you should use the instructions in the link below:
|
||||
|
||||
[Upgrading in Windows](Upgrading-Cacti-Under-Windows.md)
|
||||
|
||||
Before you begin, generally both your Apache/NGINX and your Crontab or
|
||||
systemd based pollers should run as the same account. In most Linux
|
||||
operating systems these days, that'll be the `apache` account. Under
|
||||
SLES, it'll be `www-run`. For this guide, we will use the `apache` account
|
||||
but please keep this in mind before starting.
|
||||
Before you begin, ensure that both your Apache/NGINX and your Crontab or systemd-based pollers run as the same account. In most Linux operating systems, this will be the apache account. Under SLES, it will be www-run. For this guide, we will use the apache account, but please adjust accordingly.
|
||||
|
||||
1. Backup the old Cacti database.
|
||||
1. Disable Polling:
|
||||
|
||||
```sh
|
||||
shell> mysqldump -l --add-drop-table --lock-tables=false cacti > mysql.cacti
|
||||
Go to Console >> Settings >> Poller >> Data Collection Enabled and switch it off.
|
||||
|
||||
2. Backup the Cacti Configuration File:
|
||||
|
||||
Backup the config.php file located in <cacti_dir>/include/.
|
||||
```shell
|
||||
shell> cp <cacti_dir>/include/config.php <backup_location>
|
||||
```
|
||||
|
||||
3. Backup the Old Cacti Database:
|
||||
|
||||
> **NOTE:** You will probably have to specify the -u and -p flags for the
|
||||
> MySQL username and password. This user must have permission to read from
|
||||
> Cacti's database or you will end up with an empty backup.
|
||||
Create a backup of the current Cacti database.
|
||||
```shell
|
||||
shell> mysqldump -l --add-drop-table --lock-tables=false cacti > mysql.cacti
|
||||
```
|
||||
On newer versions of MariaDB
|
||||
|
||||
2. Backup the old Cacti directory with the exception of the RRDfiles which
|
||||
should not need backup.
|
||||
```shell
|
||||
shell> mariadb-dump -l --add-drop-table --lock-tables=false cacti > mysql.cacti
|
||||
|
||||
```sh
|
||||
```
|
||||
|
||||
You will probably have to specify the -u and -p flags for the MySQL username and password. This user must have permission to read from Cacti's database or you will end up with an empty backup.
|
||||
|
||||
5. Backup the Old Cacti Directory:
|
||||
|
||||
Backup the old Cacti directory with the exception of the RRD files, which should not need backup.
|
||||
```shell
|
||||
shell> tar --exclude=*.rrd -zcf cacti_backup_YYYYMMDD.tgz cacti
|
||||
```
|
||||
|
||||
3. Extract the distribution tarball.
|
||||
|
||||
```sh
|
||||
6. Extract the Distribution Tarball:
|
||||
```shell
|
||||
shell> tar -xzvf cacti-version.tar.gz
|
||||
```
|
||||
|
||||
4. Copy the distribution tarball over the existing installation.
|
||||
|
||||
```sh
|
||||
7. Copy the Distribution Tarball Over the Existing Installation:
|
||||
```shell
|
||||
shell> /bin/cp -rpf cacti-version cacti
|
||||
```
|
||||
8. Set Appropriate Permissions:
|
||||
|
||||
5. Set the appropriate permissions on Cacti's directories for graph/log
|
||||
generation. You should execute these commands from inside Cacti's directory
|
||||
to change the permissions.
|
||||
|
||||
```sh
|
||||
Set the appropriate permissions on Cacti's directories for graph/log generation. Execute these commands from inside Cacti's directory to change the permissions.
|
||||
```shell
|
||||
shell> chown -R apache:apache rra/ log/
|
||||
```
|
||||
9. Recreate the Cache Folder (Optional):
|
||||
|
||||
(Enter a valid username for cactiuser, this user will also be used in the
|
||||
next step for data gathering.)
|
||||
|
||||
6. If you are using the optional feature `Performance > Image Caching`, or
|
||||
Realtime Graphing, then recreate the `cache` folder and correct the permissions.
|
||||
|
||||
```sh
|
||||
shell> mkdir cache
|
||||
shell> chown -R apache:apache cache
|
||||
If you are using Performance > Image Caching or Realtime Graphing, recreate the cache folder and correct the permissions.
|
||||
```shell
|
||||
shell> mkdir cache
|
||||
shell> chown -R apache:apache cache
|
||||
```
|
||||
|
||||
10. Point Your Browser:
|
||||
|
||||
7. Point your web browser to:
|
||||
Point your web browser to http://your-server/cacti/ and follow the on-screen instructions to update your database to the new version.
|
||||
|
||||
`http://your-server/cacti/`
|
||||
11. Re-enable Polling:
|
||||
|
||||
Follow the on-screen instructions so your database can be updated to the
|
||||
new version.
|
||||
Go to the console and re-enable the poller. It will take two polling cycles to update the remote pollers.
|
||||
|
||||
> NOTE: That starting with Cacti 1.0, all **Data Collectors** will upgrade
|
||||
> themselves automatically within two polling cycles. If for some reason they
|
||||
> do not, upgrade them one at a time using the procedure above.
|
||||
12. If Remote Pollers Fail to Update:
|
||||
|
||||
---
|
||||
Copyright (c) 2004-2024 The Cacti Group
|
||||
Try to rebuild the Resource Cache by going to Console >> Utilities and wait 2 polling cycles.
|
||||
|
||||
If that fails, update the remote pollers that have failed to update.
|
||||
@@ -0,0 +1,62 @@
|
||||
# Converting from Debian/Ubuntu Package Install to Cacti Source-Based Install
|
||||
|
||||
This guide outlines the steps to convert from a Debian/Ubuntu package install of Cacti to a source-based install.
|
||||
|
||||
If you are looking to run the latest version of Cacti a source based installation is the way to go
|
||||
Often the cacti team releases feature and updates that the packages lag behind on also source based installs
|
||||
provide more control for administrators than a package installation
|
||||
|
||||
This document will provide the steps on how to convert a system that has been installed via package on a Debian/Ubuntu system while retaining your settings and data
|
||||
|
||||
### Important ! Before running these steps ensure you have a system backup !
|
||||
#### Note these steps can vary between Ubuntu/Debian versions however the process flow would be the same
|
||||
|
||||
## Step 1: Stop Cron/cactid Daemon
|
||||
ensure that cron is stopped to prevent any conflicts during the transition and to prevent the poller from running while backing up the system
|
||||
systemctl stop cron
|
||||
If you have installed the cactid daemon
|
||||
```shell
|
||||
systemctl stop cactid
|
||||
```
|
||||
|
||||
## Step 2: Backup Configuration File
|
||||
```shell
|
||||
cp /usr/share/cacti/site/include/config.php /path/to/backup/config.php
|
||||
```
|
||||
|
||||
## Step 3: Backup Graph Files
|
||||
You can copy all of the graph files in `/usr/share/cacti/site/rra` to another folder so you can copy them back later.
|
||||
```shell
|
||||
cp -r /usr/share/cacti/site/rra /path/to/backup/rra
|
||||
```
|
||||
|
||||
## Step 4: Dump the Database
|
||||
Create a backup of the Cacti database.
|
||||
```shell
|
||||
mysqldump cacti > cacti.sql
|
||||
```
|
||||
## Step 5: Uninstall the Package Version of Cacti
|
||||
Remove and purge the Cacti package to ensure no conflicts with the source-based install.
|
||||
```shell
|
||||
apt-get remove cacti && apt-get purge cacti
|
||||
```
|
||||
|
||||
## Step 6: Install Cacti via Source
|
||||
Follow the appropriate steps to install Cacti from source. Refer to the official Cacti https://github.com/bmfmancini/documentation/blob/develop/Installing-Under-Ubuntu-Debian.md
|
||||
|
||||
## Step 7: Re-import the Database
|
||||
Once Cacti is installed from source, restore your previous settings by re-importing the database.
|
||||
```shell
|
||||
mysql cacti < cacti.sql
|
||||
```
|
||||
|
||||
## Step 8: Restore Graph Files
|
||||
Copy the backed-up RRA files to the new RRA folder directory in your source installation.
|
||||
|
||||
```shell
|
||||
cp -r /path/to/backup/rra /new/cacti/source/path/rra
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Once these steps are completed, your Cacti installation will be switched from a package-based install to a source-based one, while retaining your configurations and graphs.
|
||||
Reference in new issue
Block a user