Quickly build counters on Linux

xiaoxiao2021-03-06  38

Some people have continuously visited the foreign release website, so how can they regain the number of people visiting the website? There are many ways, such as traffic statistics and IP statistics. Here is the counter (Counter). Through the counter, the website personnel can promptly master the number of people who browse the website. Nowadays, many servers on the Internet are all Linux operating systems, so how do you quickly build your own counter on Linux? Installing and configured on the Linux platform with wwwcount-2.6-3.i386.rpm package, you can build basic counters, and simple. The installation and configuration method of the package is as follows: 1. First download wwwcount-2.6-6.i386.rpm. The URL is http: //speakeasy.rpmfind.net/linux/rpm/pld/dists/ra/pld/i386/pld/rpms/wwwcount -2.6-6.i386.html. Enter the following command: #rpm -uvh wwwcount-2.6-6.i386.rpm At this time, the system will automatically open a My.DAT file in the / var / lib / wwwcount / data directory. The user needs to set the permissions of the My.DAT file and open an example file WC-EXAMPLE.html in / var / www / html. Users can hang the counter on the website as long as the user is observed. 2. Then download wwwcount2.6.tar.gz files. The URL is http: //www.muquit.com/muquit/software/count/count2.6/count2.6/download/src/wwwcount2.6.tar.gz. After the download is finished, the installation is started, set and used. 3. Log in to the Linux host, enter the / usr / local / src directory, decompress the wwwcount2.6.tar.gz file. The command is as follows: # CD / usr / local / src # tar -zxvf wwwcount2.6.tar.gz 4. Then start setting the file that is decompressed, see the following procedure:

# ./Count-config // Start setting

......

◆ CGI-bin dierctory [/ usr / local / etc / httpd / cgi-bin]:

/ usr / local / apache / cgi-bin // Apache default cgi-bin directory

......

◆ Base Directory [/ usr / local / etc / counter]:

/ usr / local / counter // wwwcount installation directory

You NEED TO ENTER The Directory of the Configuration File.

◆ config directory [/ usr / local / counter / conf]: // Default Press Enter key

You Will Create this file later by running the program "gen_conf".

◆ Name of the configuration file [count.cfg]: // Default Press Enter key

You ued to enter the directory of the counter data file.

◆ Data Directory [/ usr / local / counter / data]: // Default Press Enter

You ued to enter the directory of the log file.

◆ log Directory [/ usr / local / counter / log]: // Default Press Enter key

◆ Name of the log file [count2.6.log]: // Default Press Enter key

You entered:

CGIBINDIR = / usr / local / apache / cgi-bin

......

Everything Looks OK [Y | N]? Y / / Determines the above settings, press Y.

5. Next, enter the "./configure" command, start some test host conditions. 6. If you want to add a number in the Makefile file, find "Makefile # count_reeload = -dcount_reeload = 1" in the makefile file (approximately 33 lines), and cancel the "#" symbol, and exit after saving. 7. Enter the command "make clean" and start compiling the executable. 8. Then use the "./gen-conf" command to set the host information, the process is as follows:

......

Continue [y | n]? Y // Press Y determined

ENTER YOUR FULLY Qualified Domain Name [no default]:

Game1.com.cn // Need to enter the host name and domain name

◆ ENTER YOUR IP Address [no default]: 221.7.128.164

◆ Does your host have any nickname [y | n]:

? Y // If the host has multiple names, then press Y, otherwise press N

◆ ENTER Your Host's Nickname (FQDN) [no default]:

Www.game1.com.cn // If you press Y, you will need to fill another host name.

◆ Do you want to allow automatic File Creation [y | n]

? n // usually does not want to automatically generate files

◆ Do you want the program to run in strict mode [y | n]? Y

◆ Do you want to ignore access hits from Your OWN HOST [Y | N]? Y

// Users yourself, if you want to be included in it, press Y.

......

9. Start installation, the process is as follows:

# ./Count-install

Your configuration:

......

Continue [y | n]? Y // View whether the above setup information is correct, correct, start installation

◆ Do you know the user and group id of httpd 'child process [y | n]:? Y

◆ Enter User ID of Httpd's Child Process [no default]: Nobody

◆ Enter group id of httpd's child process [no default]:? Nobody

// If the user is unclear, you can find the relevant settings in the httpd.conf file.

At this point, the installation is complete. Applying the counter to be built above is also very simple, as long as the following code is added anywhere in the web file, the counter graphic can be displayed:

Where the Test.dat file is placed in the / usr / local / counter / data directory, the user can refer to this file below:

#CD / USR / Local / Counter / Data

#echo 1> Test.dat

#Chown Nobody: Nobody Test.dat

#CHMOD 644 Test.dat

转载请注明原文地址:https://www.9cbs.com/read-72285.html

New Post(0)