8/9/2019 Cacti Windows Path Setting
I am trying to add
C:xamppphp to my system PATH environment variable in Windows.
I have already added it using the Environment Variables dialog box.
But when I type into my console:
it doesn't show the new
C:xamppphp directory:
I have two questions:
2,51722 gold badges2424 silver badges4040 bronze badges
Mp de la VegaMp de la Vega
9,4971414 gold badges6161 silver badges102102 bronze badges
17 Answers
This only modifies the registry. An existing process won't use these values. A new process will do so if it is started after this change and doesn't inherit the old environment from its parent.
You didn't specify how you started the console session. Best way to ensure this is to exit the command shell and run it again. It should then inherit the updated PATH.
DaveInCaz
3,98433 gold badges2222 silver badges4545 bronze badges
Hans PassantHans Passant
806k112112 gold badges13691369 silver badges21532153 bronze badges
After you change
PATH with the GUI, close and re-open the console window.
This works because only programs started after the change will see the new
PATH .
Execute this command in the command window you have open:
This command appends
C:yourpathhere to the current PATH .
Breaking it down:
2,51722 gold badges2424 silver badges4040 bronze badges
JimRJimR
11.9k22 gold badges1515 silver badges2424 bronze badges
WARNING: This solution may be destructive to your PATH, and the stability of your system. As a side effect, it will merge your user and system PATH, and truncate PATH to 1024 characters. The effect of this command is irreversible. Make a backup of PATH first. See the comments for more information.
Don't blindly copy-and-paste this. Use with caution.
You can permanently add a path to
PATH with the setx command:
Remove the
/M flag if you want to set the user PATH instead of the system PATH .
Notes:
3,98433 gold badges2222 silver badges4545 bronze badges
NafscriptNafscript
3,61022 gold badges1212 silver badges1515 bronze badges
You don't need any
set or setx command, simply open the terminal and type:
This shows the current value of PATH variable. Now you want to add directory to it? Simply type:
If for any reason you want to clear the PATH variable (no paths at all or delete all paths in it), type:
Update
Like Danial Wilson noted in comment below, it sets the path only in current session. To set the path permanently use
setx but be aware, although that sets the path permanently but NOT in the current session, so you have to start a new command line to see the changes, more info here.
To check if an environmental variable exist or see its value use ECHO commnad:
zarzar
5,07677 gold badges5858 silver badges111111 bronze badges
In this age of PowerShell, I would edit PATH like so:
To set the variable for all users, machine-wide, the last line should be like:
In a PowerShell script, you might want to check for the presence of your
C:xamppphp before adding to PATH (in case it has been previously added). You can wrap it in an if conditional.
So putting it all together:
Ifedi OkonkwoIfedi Okonkwo
1,86333 gold badges1818 silver badges3535 bronze badges
Nod to all the comments on the @Nafscript's initial
SETX answer.
Warnings
The ss64 SETX page has some very good examples. Importantly it points to where the registry keys are for
SETX vs SETX /M
User Variables:
HKCUEnvironment
System Variables:
HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment
Usage instructionsAppend to User
|
download plugins /var/www/html/cacti/plugins/
No Plugins Found how to do ? |
commented Sep 6, 2017
What are the file and group ownerships set to? What are the file permissions set to?
|
commented Sep 6, 2017
chown -R apache:apache /var/www/html/cacti/
chmod -R 755 /var/www/html/cacti/
$database_type = 'mysql';
$database_default = 'cacti'; $database_hostname = 'localhost'; $database_username = 'cacti'; $database_password = 'password'; $database_port = '3306'; $database_ssl = false; |
commented Sep 6, 2017
What distro? Did you install cacti from a Package or from source? Which plugins? Where did you download them? Your not giving us a lot of info.
|
commented Sep 6, 2017
Can you please run:
ls -Al /var/www/html/cacti/plugins/
|
commented Sep 6, 2017
@paulcalabro
https://docs.cacti.net/plugins/ https://docs.cacti.net/plugins.install && old version cacti is ok!!but cacti 1.1.20/21 do no
[root@lan-switch-cacti ~]# ls -Al /var/www/html/cacti/plugins/
æ»ç¨é 4 -rwxr-xr-x 1 apache apache 40 9æ 5 04:37 index.php drwxr-xr-x 4 apache apache 161 10æ 6 2011 monitor drwxr-xr-x 3 apache apache 125 7æ 30 2010 ntop drwxr-xr-x 3 apache apache 106 9æ 25 2011 settings drwxr-xr-x 5 apache apache 325 6æ 10 2013 thold |
commented Sep 6, 2017
@paulcalabro
now here find three plugin,but is old time. it do not work. where is the plugin settings ? Not Compatible, Legacy Plugin
If I want to use traffic monitoring, alarm functions like the old version, and send mail, please choose what plug-in or how to implement the function?
|
commented Sep 6, 2017â¢
edited
It's considered a 'Legacy Plugin' based on this code:
Either:
I looked at the
thold plugin-- there's no INFO file, which is why it's being flagged as a legacy plugin.@cigamit is listed as the author of those plugins. I would check with him to see if they're compatible. |
commented Sep 6, 2017
@cigamit now download https://codeload.github.com/Cacti/plugin_thold/zip/develop
New problems
error
Validation error for variable id with a value of plugin_thold-develop. See backtrace below for more details.
(/plugins.php: 51 get_filter_request_var)(/lib/html_utility.php: 435 die_html_input_error)(/lib/html_validate.php: 60 cacti_debug_backtrace |
commented Sep 6, 2017
Rename the dir to thold.
|
commented Sep 6, 2017
Please note the following Wiki article: https://github.com/Cacti/cacti/wiki/PluginMigration
|
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Cacti is an open source web-based front end for the RRDtool that stores all the necessary information to display network and system graphics. Cacti makes use of the Simple Network Management Protocol to gather and monitor traffic from network devices, and can be installed on various Linux distributions. I'm going to walk you through the process of installing Cacti on Ubuntu 16.04 Server. The installation is quite involved and the majority of it is handled via the terminal. So log into your Ubuntu 16.04 server and prepare to type.
Configuring apt and update/upgrade
The first thing to do is to add the necessary repositories to apt. To do this create a new file with the command sudo nano /etc/apt/sources.list.d/cacti.list and add the following content:
Save and close that file, and then update and upgrade ubuntu with the commands:
Installing dependencies
Next the necessary dependencies must be installed. This can be done with the following three commands:
If you have a firewall running, you'll need to open it up with the following command:
Configure php
There are two lines to configure in /etc/php/7.0/apache2/php.ini. These two lines are:
If file_uploads isn't set to On, change it. You will also need to set your timezone. Find out your PHP-friendly timezone from the official PHP timezone listing. With those configurations in place, save and close the file and then restart Apache with the command:
The database
Cacti stores its data in an RDBMS database. To make that happen, we'll configure Cacti to work with MariaDB. Install this database with the command:
Next we secure the MariaDB root account with the following commands:
The final command will prompt you to answer a few questions. The first will be to enter the current password for the root user. Since there is no password, hit Enter on your keyboard and then type y to change the root password. Type and verify the new password, and then answer the remainder of the questions with the default answers.
Now we have to create the new database. This is done first by logging into the database with the command:
After you authenticate, issue the following commands to create the new database:
Next it is required to set permissions to the new database user according to the correct time zone. To do this, issue the following commands:
The next step is to append the following lines to the /etc/mysql/mariadb.conf.d/50-server.cnf file:
Restart Apache and MySQL with the following command:
Configure SNMP
Now it's time to install and configure the SNMP service. The installation is taken care of with the following command:
Since Cacti depends upon RRDtool, it must be installed with the following command:
Open the /etc/snmp/snmp.conf file and comment out the line mibs : by adding a # like so:
Save and close that file.
To configure SNMP, open the file /etc/snmp/snmpd.conf. The first thing that must be done is to comment out the line:
Now uncomment the line (by removing the #):
Scroll down and locate the line:
Below that line, add the following:
Save and close that file.
Restart the SNMP service with the command:
If you have a firewall running, open up the proper port with the command:
Install Cacti-Spine
It's time to install Cacti-Spineâa tool that replaces the default cmd.php poller. This is done with the following commands:
Next we configure Cacti-Spine to use our new database. Open the file /usr/local/spine/etc/spine.conf and edit the database credentials according to what you setup during the database installation/configuration. You'll need to change DB_User and DB_Pass.
Install Cacti
We finally get to the installation of Cacti. This is done with the following commands:
In similar fashion to Cacti-Spine, the Cacti configuration must be setup to connect to the database. Open the file /var/www/html/include/config.php and change the credentials as per the database install/configuration. You'll need to change database_username and database_password. In that same file, the line:
must be changed to:
Season 1 of Game of Thrones was released on DVD and Blu-ray in the United States and United Kingdom on 5 March 2012, setting new sales records for first-week sales of a HBO series. On 2 September 2012, the first season of Game of Thrones won a Hugo Award for Best Dramatic Presentation.David Benioff and D.B. Game of thrones mega download. Weiss were the executive producers and show runners.The season premiered on 17 April 2011.Season 1 is mostly based on A Game of Thrones, the first book in the A Song of Ice and Fire series by George R.R.
Save and close that file.
Populate the cacti database with the command:
Issue the command mysql -u cacti_user cacti -p -e 'show tables' and you should see the newly populated data (Figure A).
Figure A
Before moving on to the web installation, issue the following commands:
Web installation
The last phase is to point your browser to http://SERVER_IP/install (Where SERVER_IP is the address of the server housing Cacti) and walk through the installation steps. Since we've already configured everything, this should require little more than clicking next a few times.
However, I did find one problem that took a bit of finagling to solve. The installer won't be able to find the spine executable. Out of the box, that executable is found in /usr/local/spine/bin. However, the installer wants it to be in /usr/local/spine/bin/spine/. To solve this, do the following:
It's an odd issue, but the above will take care of it.
After clicking Finish in the web installer, you'll be prompted to login. The default credentials are admin/admin. Once you enter those, you'll be prompted to set a new admin password (it must contain a mixture of upper/lowercase and at least one number). After that, you'll find yourself in the Cacti web interface where you can get busy working with your new installation of Cacti.
Happy graphing!
Cybersecurity Insider Newsletter
Strengthen your organization's IT security defenses by keeping abreast of the latest cybersecurity news, solutions, and best practices. Delivered Tuesdays and Thursdays
Sign up today Sign up today
Also see
- How to easily share USB devices using USB Network Gate (TechRepublic)
- How to monitor your Docker containers with ctop (TechRepublic)
- Video: How to solve IPv6 network problems (TechRepublic Video)
- How to install and use Logwatch on Linux (TechRepublic)
- Uber says unauthorised transactions in Singapore not linked to global breach (ZDNet)
I want to be able to run Python commands from the Windows CMD. However, if I don't specify Python's full path for each command, I get an error saying 'Python is not recognized as an internal or external command, operable program or batch file.'
How do I add Python to the Windows PATH permanently?
Steven M. Vascellaro
5,0352020 gold badges5656 silver badges107107 bronze badges
davewisedavewise
migrated from stackoverflow.comMay 19 '10 at 22:01
This question came from our site for professional and enthusiast programmers.
5 Answers
For Windows 10/8/7:
- Open
System Properties
(Right clickComputer
in the start menu, or use the keyboard shortcut Win+Pause) - Click
Advanced system settings
in the sidebar. - Click
Environment Variables..
- Select
PATH
in theSystem variables
section - Click
Edit
-
Add Python's path to the end of the list (the paths are separated by semicolons). For example:
For Windows XP:
- Open
System Properties
(Type it in the start menu, or use the keyboard shortcut Win+Pause) - Switch to the
Advanced
tab - Click
Environment Variables..
- Select
PATH
in theSystem variables
section - Click
Edit
-
Add Python's path to the end of the list (the paths are separated by semicolons). For example:
-
Test on a new terminal window or if using an integrated terminal within a text editor, close and restart your editor or the changes won't be applied.
12.1k77 gold badges3636 silver badges5656 bronze badges
Michael MrozekMichael Mrozek
For anyone trying to achieve this with Python 3.3+, the Windows installer now includes an option to add python.exe to the system search path. Read more in the docs.
Andreas BergströmAndreas Bergström
As seen in the Python documentation:
Windows has a built-in dialog for changing environment variables (following guide applies to XP classical view): Right-click the icon for your machine (usually located on your Desktop and called âMy Computerâ) and choose Properties there. Then, open the Advanced tab and click the Environment Variables button.
In short, your path is:
My Computer ⣠Properties ⣠Advanced ⣠Environment Variables In this dialog, you can add or modify User and System variables. To change System variables, you need non-restricted access to your machine (i.e. Administrator rights).
Steven M. Vascellaro
Cacti Down
5,0352020 gold badges5656 silver badges107107 bronze badges
vitorbalvitorbal
- Click on the windows button to start a search
- type in 'system env' and click on the 'edit system environment variables'
- Now click on the advanced tab on the top
- At the bottom click the button that says 'environment variables'
- Now on the 'user variables'your user name' box at the top of the windows click on path then edit
- This should lead to another window where you want to click 'new' and type in the commands: 'C:Python27' and 'C:Python27scripts'
- Python should now work on command prompt
Just A Regular GuyJust A Regular Guy
Right-click on My Computer, choose Properties. Then find the Environment Variables button (on Win7, it's under the Advanced tab; I forget where it is on other versions of Windows). Click that, and under System variables, edit the Path one.
AmberAmber
Not the answer you're looking for? Browse other questions tagged windowspythonpath or ask your own question.
Comments are closed.
Author
Write something about yourself. No need to be fancy, just an overview.