In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to install and use Trac, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Installation description:
According to the official website, it can be divided into seven steps. The following non-control translation, is based on my understanding and practice to explain, personal environment Centos6.5, minimize installation. )
The first step is to solve the dependence, which is divided into mandatory and non-mandatory.
Mandatory installation software has
1. Python version requires between 2.5 and 3.0, and Centos6.5 installs version 2.6 by default.
2, setuptools version requirements greater than 0.6, this must be installed, after the installation of other software has a lot of help, you can use it to install other software (easy_install xxx). You can download the software (https://pypi.python.org/pypi/setuptools) on the official website, select the Python version, then decompress it, install python setup.py install and install it.
3. The Genshi version requires more than 0.6, and the installation method is easy_install Genshi (available after installing the above software, you know the benefits, and the rest can be installed in this way)
4. Database, three official solutions are provided, namely, SQLite, PostgreSQL and MySLQ. Due to personal habits, choose MySQL installation, others please try by yourself.
On the basis of configuring the yum source, use yum to install.
It is recommended to install the compiler software yum install gcc gcc-c++-y
Yum install mysql mysql-devel mysql-server-y
Install the python module for the MySQL database, which is useful later
Yum install MySQL-python
5. Database permission settings, mainly created for later use of the database.
Service mysqld start is enabled first
Service mysqld stop
You need to set the default engine to InnoDB (recommended) or BOD (a hint given in the event of an error without experiment), otherwise an error will be reported when creating the environment later.
Vim / etc/my.cnf
Add under [mysqld] in the configuration file my.cnf
Default-storage-engine=INNODB
Then enable the database
Service mysqld start
Create the database and set the appropriate permissions, as well as the default character set, database username and password
CREATE DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_bin
GRANT ALL ON trac.* TO tracuser@localhost IDENTIFIED BY '123123'
FLUSH PRIVILEGES
Test whether the database is created successfully
Service mysqld restart (restart is recommended or not recommended)
Mysql-u tracuser-p trac (you will be prompted to enter the password of the creation mentioned above. By default, there is no content in it. You can view the existence of the corresponding table after creating the environment.)
6. Install apache (later, you can generate a password for trac, or you can provide a real web server for trac. At present, the experiment is not successful. If anyone understands, you would appreciate it if you could leave a message for me to improve the content.)
Yum install httpd-y
7, install the related dependent software (copy and paste quietly wait on the line, the premise is to have a net, otherwise please believe that there will be miracles. )
Easy_install babel
Easy_install docutils
Easy_install Pygments
Easy_install pytz
Step 2: install Trac
With so many things installed on it, it is finally the protagonist. There are three installation methods available on the official website, and I continue to choose the easiest one.
Easy_install trac
Yum install mod_wsgi (this module is optional to install and is mainly used to match the password function of apache)
The third step, create a working environment
Mkdir / project
Trac-admin / project initenv uses trac-admin management tools to initialize the workspace. Enter will prompt the data workspace name, such as test, and then prompt the data database connection such as: mysql://tracuser:123123@localhost/trac knows what the above creation is for, . Of course, you can also enter directly without using the database.
Step 4, deploy Trac
In fact, after the above creation is completed, you will be prompted to use the Trac stand-alone Web server "tracd"
Tracd-port 8000 / project
Then enter the corresponding address in the browse to access the http://ip:8000/project. Note that the firewall should be turned off or port 8000 should be developed.
Step 5, configure permissions
You don't need a user to access it. Do you always feel like you're missing something? Haha, the official website provides two ways to configure users, one of which is as follows
Htpasswd-c / project/htpasswd username (install httpd above and you can use it here)
To configure other passwords, you do not need to use the parameter-c, you can add multiple users to use
Step 6: create an administrator rights management user
Trac-admin / project permission add admin TRAC_ADMIN
Part VII, completion and use
Tracd-p 8000-basic-auth= "project,/project/.htpasswd,My Test project" / project
You can access it through the browser. Go and try it.
*
Note 1:
When you visit, you find that the picture in the upper left corner is not very uncomfortable. You can use the following setting method to place the unique picture that belongs to your project. Please adjust the size according to the actual situation.
Picture settings: vim / project/conf/trac.ini
[header_logo]
Alt = (please configure the [header_logo] section in trac.ini)
Height = 10
Link =
Src = common/a.png
Width = 10
Storage location: / root/.cache/Python-Eggs/Trac-1.0.13-py2.6.egg-tmp/trac/htdocs/a.png
The above is all the contents of the article "how to install and use Trac". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.