In the advanced chapter, we will provide a localized installation reference, but in order to save your valuable time, we do not encourage everyone to try compared to the Quick guide, which requires a stronger professional knowledge and hands-on ability.
Before the installation succeeds, you may encounter some column problems such as Linux,git,python,mysql, and if you are unfamiliar with them, you will only encounter more and more problems, even though these problems are not worth mentioning in the eyes of those with relevant expertise. If you think linux,git,python,mysql these are not a thing, then go ahead.
People who are not suitable for this tutorial
No Linux has ever been successfully installed.
The Linux system doesn't even have a make command.
Only use the interface, the Linux when Windows used
VI Open, edit, save, exit these basic instructions are not yet
A very lazy person.
Particularly wealthy people.
Selection of Linux Systems
The Linux distribution World is too diverse, but original aim, theoretically Toughradius can be run on most Linux systems.
Toughradius relies on the python2.7+ operating environment, if the system is already built-in, the step to upgrade Python is omitted, and if the system remains a version of python2.4 or python2.6, you need to install the python2.7 version separately.
For a more convenient installation, it is recommended to use CENTOS7,UBUNTU14 and other already built-in python2.7 systems.
Git version control tools
Git is a version control tool, through the Git tool, you install on the server Toughradius service can be easily upgraded, or switch different versions, but git is not necessary, do not use git, but can not easily upgrade Toughradius, later need to upgrade, You need to reinstall the download version yourself.
Selection of databases
Toughradius is supported by default for SQLite and MySQL databases, and other databases such as Mssql,oracle are currently available only for commercial support services. The Toughradius V2 version has been re-architected with a better caching mechanism (REDIS), and the database is no longer a determining factor for performance.
Usually SQLite is easier to use, the system built-in support, no additional installation, but does not provide network-based management, resulting in maintenance inconvenience, MySQL in the installation of more complex configuration, but the management tools are powerful, more stable and reliable, is still the preferred production environment applications.
CENTOS7 Installation Configuration Instance
The default installation instructions provided by Toughradius are for the CentOS system, and if you wish to perform the installation under Ubuntu, you can modify the makefile file yourself and replace the Yum install instruction with the corresponding Apt-get install. The CentOS software name is not the same as Ubuntu and needs to be resolved by itself.
Installing via the Git tool
For a more convenient upgrade version, it is recommended to use the GIT version control tool.
Please ensure your server network is unblocked, if your server is forbidden to access the network, please resolve the network problem first.
Install Git
$ yum install-y git
Clone Warehouse (Stable version)
$ git clone-b release-stable Https://github.com/talkincode/ToughRADIUS.git/opt/toughradius
Clone Warehouse (development version)
$ git clone-b release-dev Https://github.com/talkincode/ToughRADIUS.git/opt/toughradius
Download and install directly
-
$ wget https://github.com/talkincode/toughradius/archive/release-stable.zip -o/opt/ Release-stable.zip
$ Unzip Release-stable.zip
$ MV Toughradius-release-stable/opt/toughradius
Download the Unzip 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
Installing Toughradius
Complete the clone warehouse, either stable or development. /opt/toughradius is a contractual installation path and is not modified for the time being.
Follow these steps to perform the installation task
$ Cd/opt/toughradius $ make all
The make all command will complete Toughradius all related system dependent download installation, associated Python module installation, and configuration file installation. In the making all process, there may be failures, such as network timeouts, lack of other system dependencies, which is usually a challenge for you, in the world of Linux, a lot of things can not be expected, it also requires you to have a certain problem-solving ability.
Modifying the Toughradius configuration
When make is complete, the following configuration files exist:
/etc/toughradius.json
This is the main configuration file for Toughradius, and we may need to modify the configuration about 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 in/var/toughradius/toughradius.sqlite3, you can download to the local computer using SQLite's administration tool to open the view data.
If you want to use MySQL database, please complete the installation configuration of MySQL first, and ensure that the MySQL service is running properly, and create an empty database, create a dedicated user name and password.
MySQL Example:
Go to MySQL terminal management:
MySQL > CREATE database raddb DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;mysql > GRANT all on raddb.* to [ Email protected] '% ' identified by ' radpwd ' with GRANT option;mysql > FLUSH privileges;
Modify the Database configuration section, the specific parameters please fill in according to the actual.
"Database": {"Backup_path": "/var/toughradius/data", "DbType": "MySQL", "Dburl": "Mysql://raduser:[email Protect Ed]:3306/raddb?charset=utf8 "," echo ": 0," pool_recycle ": +," Pool_size ": 60}
Initializing data
$ cd/opt/toughradius$ Make Initdb
If there are no errors in the Profile database section, this step will pass, creating all the database tables and initializing the necessary configuration parameters.
Manage Toughradius Services
Now you can run the Toughradius service, assuming the previous process is complete. Toughradius has configured the system's self-start service.
$ service Toughradius Start
If you want to stop the Toughradius service, perform
$ Service Toughradius Stop
Restart please perform
$ Service Toughradius Restart
To view the running status, perform
$ Service Toughradius Status
Toughradius Data Backup
Toughradius provides a common data backup service that does not depend on the database type, and you can use it through the Toughradius management interface-the data backup under the System Management submenu.
Backup data by default in directory/var/toughradius/data
Toughradius's Log
All log files are in the/var/toughradius directory
The Web Management console log file is/var/toughradius/radius-manage.log
The radius of the Certified accounting journal is/var/toughradius/radius-worker.log
You can view the analysis log by using the Vi,awk,more,less,tail tool under Linux, such as viewing the last 100 rows of logs:
$ tail-n 100/var/toughradius/radius-manage.log$ tail-n 100/var/toughradius/radius-worker.log
If you are having problems with the installation process, it is most useful to provide these log messages, 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 a Toughradius service process configuration that implements service process management based on Supervisord.
If you are not actually installing this path in/opt/toughradius, you can modify the/opt/toughradius path in this configuration file
Modify the Numprocs parameter, set to the number of CPU cores or twice times can be.
[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
This article is from the "toughstruct" blog, make sure to keep this source http://jamiesun.blog.51cto.com/7142358/1767013
Toughradius installation Step-by-step article