In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
In the advanced section, we will provide a localized installation reference, but the advanced section requires more expertise and hands-on skills than the quick guide, and we do not encourage everyone to try it in order to save your valuable time.
Before the installation is successful, you may encounter a series of problems such as linux,git,python,mysql, and if you are not familiar with these, then you will only encounter more and more problems, although these problems are not worth mentioning in front of people with relevant expertise. If you don't think linux,git,python,mysql is a big deal, go ahead.
People who are not suitable for this tutorial
Linux has never been successfully installed
After installing the linux system, there is not even a make instruction.
Can only use the interface and use linux as windows.
The basic instructions of opening, editing, saving and exiting vi are not available yet.
A very lazy person
A very rich man.
The selection of linux system
The world of linux distributions is too diverse, but it remains the same. Theoretically, ToughRADIUS can run on most linux systems.
ToughRADIUS depends on the Python2.7+ running environment. If the system is already built-in, the step of upgrading python is omitted. If the system is still the version of python2.4 or python2.6, you need to install the python2.7 version independently.
For more convenient installation, it is recommended to use centos7,ubuntu14 and other systems that already have built-in python2.7.
Git version control tool
Git is a version control tool, through the git tool, you can easily upgrade the ToughRADIUS service installed on the server, or switch between different versions, but git is not necessary, do not use git, it is just not convenient to upgrade ToughRADIUS, later when you need to upgrade, you need to download the version and reinstall.
Selection of database
ToughRADIUS supports sqlite and mysql databases by default, while other databases such as mssql,oracle only provide commercial support services. The ToughRADIUS V2 version has been rearchitected to adopt a better caching mechanism (Redis), and the database is no longer a decisive factor in performance.
Sqlite is usually easier to use, built-in support, no additional installation, but does not provide network-based management, which brings inconvenience in maintenance. MySQL is much more complex in installation and configuration, but the management tools are powerful, more stable and reliable, so it is still the first choice for applications in production environment.
CentOS7 installation configuration instance
The default installation instruction provided by ToughRADIUS is for the CentOS system. If you want to perform the installation under ubuntu, you can modify the Makefile file and replace the yum install instruction with the corresponding apt-get install,Centos software name, which is different from ubuntu and needs to be solved on your own.
Install through the git tool
In order to upgrade the version more conveniently, it is recommended to use the git version control tool.
Please ensure that your server network is unblocked. If your server forbids access to the network, please solve the network problem first.
Install git
$yum install-y git
Clone repository (stable version)
$git clone-b release-stable https://github.com/talkincode/ToughRADIUS.git / opt/toughradius
Clone repository (development version)
$git clone-b release-dev https://github.com/talkincode/ToughRADIUS.git / opt/toughradius
Download and install directly
Download the decompressed stable version
$wget https://github.com/talkincode/ToughRADIUS/archive/release-stable.zip-O / opt/release-stable.zip
$cd / opt
$unzip release-stable.zip
$mv ToughRADIUS-release-stable / opt/toughradius
Download the decompressed development version
$wget https://github.com/talkincode/ToughRADIUS/archive/release-dev.zip-O / opt/release-dev.zip
$cd / opt
$unzip release-dev.zip
$mv ToughRADIUS-release-dev / opt/toughradius
Install toughradius
Complete the clone repository, either the stable version or the development version. / opt/toughradius is an agreed installation path, so don't change it to another path for the time being.
Follow these steps to perform the installation tasks
$cd / opt/toughradius $make all
The make all directive completes the download and installation of all related ToughRADIUS system dependencies, the installation of related python modules, and the installation of configuration files. In the process of make all, there may be failures, such as network timeout and lack of other dependencies of the system, which is usually a challenge for you. In the world of linux, many things are unpredictable, which requires you to have a certain ability to solve problems.
Modify ToughRADIUS configuration
After the make all completes, the following configuration files exist:
/ etc/toughradius.json
This is the main configuration file for ToughRADIUS, and we may need to modify the configuration for the database section. If you only want to use the built-in sqlite database, you don't need to make any changes.
The default sqlite database file is in / var/toughradius/toughradius.sqlite3, which you can download to your local computer and use sqlite's management tools to open and view the data.
If you want to use the mysql database, please first complete the installation and configuration of mysql, make sure that the mysql service is running properly, and create an empty database and a dedicated user name and password.
Mysql example:
Enter mysql terminal management:
Mysql > create database raddb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;mysql > GRANT ALL ON raddb.* TO raduser@'%' IDENTIFIED BY 'radpwd' WITH GRANT OPTION;mysql > FLUSH PRIVILEGES
Modify the database configuration part, please fill in the specific parameters according to the actual.
"database": {"backup_path": "/ var/toughradius/data", "dbtype": "mysql", "dburl": "mysql://raduser:radpwd@127.0.0.1:3306/raddb?charset=utf8", "echo": 0, "pool_recycle": 300, "pool_size": 60} initialization data $cd / opt/toughradius$ make initdb
If there are no errors in the database part of the configuration file, this step will pass smoothly, creating all database tables and initializing the necessary configuration parameters.
Manage ToughRADIUS services
Now you can run the ToughRADIUS service, assuming that the previous process has been completed successfully. ToughRADIUS has configured the system's self-startup service.
$service toughradius start
If you want to stop the ToughRADIUS service, execute
$service toughradius stop
Restart, please execute.
$service toughradius restart
To check the running status, please execute
$service toughradius statusToughRADIUS data backup
ToughRADIUS provides a general data backup service that does not depend on the database type, which you can use through ToughRADIUS's management interface-data backup under the system Administration submenu.
Backup data defaults to directory / var/toughradius/data
ToughRADIUS's log
All the log files are in the / var/toughradius directory
The web Management console log file is / var/toughradius/radius-manage.log
Radius's certification accounting log is / var/toughradius/radius-worker.log
You can view the analysis log through the vi,awk,more,less,tail tool under linux, such as the last 100 lines of log:
$tail-n 100 / var/toughradius/radius-manage.log$ tail-n 100 / var/toughradius/radius-worker.log
If you encounter problems during installation, it is most useful to provide these log information, and if you do not provide these log data, you will almost certainly not get the answer.
ToughRADIUS service process management
/ etc/toughradius.conf is the configuration of ToughRADIUS service process and implements service process management based on supervisord.
If you are not actually installed in the / opt/toughradius path, you can modify the / opt/toughradius path in this configuration file
Adjust the number of radius child processes to improve the performance of ToughRADIUS under multicore CPU
You can modify the numprocs parameter and set it to the number of CPU cores or 2 times.
[program:worker] command=python / opt/toughradius/radiusctl worker-c / etc/toughradius.jsonstartretries = 10process_name =% (program_name) s% (process_num) dnumprocs=4redirect_stderr=truestdout_logfile=/var/toughradius/radius-worker.log
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.