From b8a7935aa130d379c95e6cc93ba84cc471dc1773 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 2 Feb 2015 16:54:55 +0800 Subject: [PATCH] =?UTF-8?q?20150205-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...all Websvn for Subversion in CentOS 7.0.md | 123 ++++++++++++++++++ ...ache Tomcat to IPv4 in Centos or Redhat.md | 79 +++++++++++ ...Python Tool To Test Your Internet Speed.md | 76 +++++++++++ 3 files changed, 278 insertions(+) create mode 100644 sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md create mode 100644 sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md create mode 100644 sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md diff --git a/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md b/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md new file mode 100644 index 0000000000..0a9dfdb442 --- /dev/null +++ b/sources/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md @@ -0,0 +1,123 @@ +How To Install Websvn for Subversion in CentOS 7.0 +================================================================================ +Hi all, today we'll be installing latest WebSVN in our CentOS 7 for subversion repositories. + +WebSVN offers a view onto your subversion repositories that’s been designed to reflect the Subversion methodology. We can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. We can also view the differences between two versions of a file so as to see exactly what was changed in a particular revision. + +### Features ### + +WebSVN offers the following features: + +- Easy to use interface +- Customisable templating system +- Colourisation of file listings +- Blame view +- Log message searching +- RSS feed support +- [and more...][1] + +Since it's written using PHP, WebSVN is also very portable and easy to install. + +Now, we'll install WebSVN for our Subversion (Apache SVN). Make sure that you have installed Apache SVN in your server. If you don't have it installed, you can install from this tutorial. + +After you installed Apache SVN(Subversion), you'll need to follow the easy steps below. + +### 1. Download WebSVN ### + +You can download WebSVN from their official site http://www.websvn.info/download/ . We'll first get inside directory /var/www/html/ and then download the package inside it. + + $ sudo -s + +**Please execute the above command in a shell or terminal as wee'll need to switch to root privilege so that we'll have full access to the system's restricted areas.** + + # cd /var/www/html + # wget http://websvn.tigris.org/files/documents/1380/49057/websvn-2.3.3.zip + +![downloading websvn package](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-websvn.png) + +Here, I am download the latest version 2.3.3 of websvn. You can get the link from the site. You can simply replace the above link with the link of the package you wanna install. + +### 2. Extract the downloaded zip ### + + # unzip websvn-2.3.3.zip + + # mv websvn-2.3.3 websvn + +![extracting websvn](http://blog.linoxide.com/wp-content/uploads/2015/01/extracting-websvn.png) + +### 3. Install php ### + + # yum install php + +![yum install php](http://blog.linoxide.com/wp-content/uploads/2015/01/yum-install-php.png) + +### 4. Edit WebSVN config ### + +Now, we'll need to copy distconfig.php which is situated inside /var/www/html/websvn/include directory to config.php and then edit the configuration file. + + # cd /var/www/html/websvn/include + + # cp distconfig.php config.php + + # nano config.php + +Now, we'll need to make changes to the file as shown below. After it is done, please save the file and exit. + + // Configure these lines if your commands aren't on your path. + // + $config->setSVNCommandPath('/usr/bin'); // e.g. c:\\program files\\subversion\\bin + $config->setDiffPath('/usr/bin'); + + // For syntax colouring, if option enabled... + $config->setEnscriptPath('/usr/bin'); + $config->setSedPath('/bin'); + + // For delivered tarballs, if option enabled... + $config->setTarPath('/bin'); + + // For delivered GZIP'd files and tarballs, if option enabled... + $config->setGZipPath('/bin'); + + // + $config->parentPath('/svn/'); + + $extEnscript[".pl"] = "perl"; + $extEnscript[".py"] = "python"; + $extEnscript[".sql"] = "sql"; + $extEnscript[".java"] = "java"; + $extEnscript[".html"] = "html"; + $extEnscript[".xml"] = "html"; + $extEnscript[".thtml"] = "html"; + $extEnscript[".tpl"] = "html"; + $extEnscript[".sh"] = "bash"; + +![websvn config file](http://blog.linoxide.com/wp-content/uploads/2015/01/config-file-websvn.png) + +### 5. Starting WebSVN ### + +Now, we are almost done. We now need to restart our Apache server. You can do that by the command below. + + # systemctl restart httpd.service + +And then, we'll open WebSVN inside our favorite browser with the address as http://Ip-address/websvn or if you are on local computer, you can goto http://localhost/websvn . + +![websvn successfully installed](http://blog.linoxide.com/wp-content/uploads/2015/01/websvn-success.png) + +**Note**: If you encountered error like "Unable to find "enscript" tool at location "/usr/bin/enscript"" then, you'll need to install enscript using the command "yum install enscript" which will fix the problem. + +### Conclusion ### + +Hurray, we have completed installing WebSVN in our CentOS 7 server. This tutorial works great on RHEL 7 too. WebSVN offers a view onto your subversion repositories that’s been designed to reflect the subversion methodology. You can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy WebSVN :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-websvn-subversion-centos-7/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.websvn.info/features/ \ No newline at end of file diff --git a/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md b/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md new file mode 100644 index 0000000000..92ac657b5a --- /dev/null +++ b/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md @@ -0,0 +1,79 @@ +How to Bind Apache Tomcat to IPv4 in Centos / Redhat +================================================================================ +Hi all, today we'll learn how to bind tomcat to ipv4 in CentOS 7 Linux Distribution. + +**Apache Tomcat** is an open source web server and servlet container developed by the [Apache Software Foundation][1]. It implements the Java Servlet, JavaServer Pages (JSP), Java Unified Expression Language and Java WebSocket specifications from Sun Microsystems and provides a web server environment for Java code to run in. + +Binding Tomcat to IPv4 is necessary if we have our server not working due to the default binding of our tomcat server to IPv6. As we know IPv6 is the modern way of assigning IP address to a device and is not in complete practice these days but may come into practice in soon future. So, currently we don't need to switch our tomcat server to IPv6 due to no use and we should bind it to IPv4. + +Before thinking to bind to IPv4, we should make sure that we've got tomcat installed in our CentOS 7. Here's is a quick tutorial on [how to install tomcat 8 in CentOS 7.0 Server][2]. + +### 1. Switching to user tomcat ### + +First of all, we'll gonna switch user to **tomcat** user. We can do that by running **su - tomcat** in a shell or terminal. + + # su - tomcat + +![Switch user to tomcat](http://blog.linoxide.com/wp-content/uploads/2015/01/switch-user-tomcat.png) + +### 2. Finding Catalina.sh ### + +Now, we'll First Go to bin directory inside the directory of Apache Tomcat installation which is usually under **/usr/share/apache-tomcat-8.0.x/bin/** where x is sub version of the Apache Tomcat Release. In my case, its **/usr/share/apache-tomcat-8.0.18/bin/** as I have version 8.0.18 installed in my CentOS 7 Server. + + $ cd /usr/share/apache-tomcat-8.0.18/bin + +**Note: Please replace 8.0.18 to the version of Apache Tomcat installed in your system. ** + +Inside the bin folder, there is a script file named catalina.sh . Thats the script file which we'll gonna edit and add a line of configuration which will bind tomcat to IPv4 . You can see that file by running **ls** into a terminal or shell. + + $ ls + +![finding catalina.sh](http://blog.linoxide.com/wp-content/uploads/2015/01/finding-catalina.sh_.png) + +### 3. Configuring Catalina.sh ### + +Now, we'll add **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** to that scripting file catalina.sh at the end of the file as shown in the figure below. We can edit the file using our favorite text editing software like nano, vim, etc. Here, we'll gonna use nano. + + $ nano catalina.sh + +![Catalina script](http://blog.linoxide.com/wp-content/uploads/2015/01/catalina-script.png) + +Then, add to the file as shown below: + +**JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** + +![configured catalina](http://blog.linoxide.com/wp-content/uploads/2015/01/configured-catalina.png) + +Now, as we've added the configuration to the file, we'll now save and exit nano. + +### 4. Restarting ### + +Now, we'll restart our tomcat server to get our configuration working. We'll need to first execute shutdown.sh and then startup.sh . + + $ ./shutdown.sh + +Now, well run execute startup.sh as: + + $ ./startup.sh + +![restarting apache tomcat server](http://blog.linoxide.com/wp-content/uploads/2015/01/restarting-tomcat-server.png) + +This will restart our tomcat server and the configuration will be loaded which will ultimately bind the server to IPv4. + +### Conclusion ### + +Hurray, finally we'have got our tomcat server bind to IPv4 running in our CentOS 7 Linux Distribution. Binding to IPv4 is easy and is necessary if your Tomcat server is bind to IPv6 which will infact will make your tomcat server not working as IPv6 is not used these days and may come into practice in coming future. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/bind-apache-tomcat-ipv4-centos/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.apache.org/ +[2]:http://linoxide.com/linux-how-to/install-tomcat-8-centos-7/ \ No newline at end of file diff --git a/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md b/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md new file mode 100644 index 0000000000..a12f0b68b3 --- /dev/null +++ b/sources/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md @@ -0,0 +1,76 @@ +tespeed - Python Tool To Test Your Internet Speed +================================================================================ +Many computer nerds know how to test their internet speed by using the **speedtest.net** but the thing is that it does not give you full control of the operationg going on during the measurement of your speed. Linux users love to type commands on their terminal emualator and do stuff, at least me. + +The tespeed tool is a python tool with many features that helps to test network speed from the terminal. According to the documentation it makes use of nearest speedtest.net server but the users can also manually specify one. + +In the beginning the author wrote the tespeed tool in the php programming language and proved to the ISP he was working for at that time that the internet they served was far from what they advertised. But things were not working all the time as they supposed to be so the author ported his php scripts to python and his tool counts 180 stars on github. + +It means **alot**. + +### How to use tespeed on linux ### + +Before running a python application on your machine you have to make sure that the system you are working meets the dependencies required by the tool. The python tool tespeed dependes on the two following python packages: + +- lxml +- SocksiPy + +You can easily install lxml with the help of the pip python package management system and to do that run the following command. + + pip install lxml + +Now we have to perform a simple trick to make use of the SocksiPy which you can download by using the the following command like shown below. + + wget http://sourceforge.net/projects/socksipy/files/socksipy/SocksiPy%201.00/SocksiPy.zip/ + +Once the installation is finished unzip **SocksiPy.zip** and run the following command to clone tespeed repo on your local machine. + + git clone https://github.com/Janhouse/tespeed.git + +Then place the SocksiPy folder inside the tespeed project you cloned. Now we have to create an empety file inside the SocksiPy folder under the name of **__init__.py** like shown in the following screenshot. + +![simple trick to make tespeed work](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed1.png) + +Now that we have fixed the dependencies for out projet we can easily run it by using the following command. + + python tespeed.py + +Then some magic is going to happen. The application is going to test your download and upload speed and display them in your console using some really nice colors. + +![testing download and upload speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed2.png) + +There are many commands available in tespeed such as the option **-ls** to list the servers, option **-p** to specify and use a proxy server, the option **-s** to suppress debugging (STDERR) output and many others that we will explore in this tutorial. + +For example if you want to display results in mebibits you need to use the command **python tespeed.py** followed by the option **-mib** + + python tespeed.py -mib + +You can easily see how the unit used for measurement of the internet speed changed after using the tespeed app with the option -mib. + +![testing internet speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed3.png) + +A very nice useful option I like to use while working with tespeed is the option -w which can be used to print CSV formated output to STDOUT. + + python tespeed.py -w + +Use the following command to list the servers. + + python tespeed -ls + +After running the above command you will get a list of servers used to test your upload and download speed. My list is really long so I am not going to share it in this tutorial. + +### Conclusion ### + +tespeed is a really easy to use high performance python script that helps computer users to test their upload and download speed by typing commands on their terminal. It supports many options and also you can specify the list of servers you would like to use. Keep playing with tespeed and please share your experience with us in the comment section. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/tespeed-python-tool-test-internet-speed/ + +作者:[Oltjano Terpollari][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/oltjano/ \ No newline at end of file