• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install python server on CentOS 7

1747

To install Python Server on CentOS 7

Python&rsquo s SimpleHTTPServer is a module that allows you to instantly create a web server or serve your files in a snap. With SimpleHTTPServer, you don&rsquo t need to install anything since you have python interpreter installed. It is very simple to install Python server on CentOS 7 and this article sheds light on it.

Installing python

You can install Python by executing the yum command in your terminal.


\[root@linuxhelp Desktop\]# yum install python -y Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 \* base: mirror.vbctv.in
 \* extras: mirror.vbctv.in
 \* updates: mirror.vbctv.in
.
.
.
Updated:
  python.x86\_64 0:2.7.5-48.el7                                                  

Dependency Updated:
  python-libs.x86\_64 0:2.7.5-48.el7                                             

Complete!

Once it is done, start python http server by running the following command.


\[root@linuxhelp Desktop\]#  python2.7 -m SimpleHTTPServer 8880 Serving HTTP on 0.0.0.0 port 8880 ...

After that, open your browser and give the url as serverip:8880(192.168.7.165:8880). It will display the server. The sever starts running on your screen.
PYTHON SERVER

While server runs in browser, you can see the it will log details displayed on your terminal.


\[root@linuxhelp Desktop\]#  python2.7 -m SimpleHTTPServer 8880 Serving HTTP on 0.0.0.0 port 8880 ...
192.168.7.165 - - \[03/Aug/2017 06:16:53\] " GET / HTTP/1.1"  200 -
192.168.7.165 - - \[03/Aug/2017 06:16:53\] code , message File 
192.168.7.165 - - \[03/Aug/2017 06:16:53\] " GET /favicon.ico HTTP/1.1"   -
192.168.7.165 - - \[03/Aug/2017 06:16:53\], message File 

With this, the installation of Phython Server is complete.

Tags:
jacob
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

Can I delete Python?

A

That depends on where Python came from.

If someone installed it deliberately, you can remove it without hurting anything. On Windows, use the Add/Remove Programs icon in the Control Panel.

Q

Why is Python installed on my machine?

A

If you find Python installed on your system but don’t remember installing it, there are several possible ways it could have gotten there.

Perhaps another user on the computer wanted to learn programming and installed it; you’ll have to figure out who’s been using the machine and might have installed it.

Q

What is Python?

A

Python is a programming language. It’s used for many different applications. It’s used in some high schools and colleges as an introductory programming language because Python is easy to learn,

Q

How is memory managed in Python?

A

Memory management in python is managed by Python private heap space. All Python objects and data structures are located in a private heap. The programmer does not have access to this private heap. The python interpreter takes care of this instead.

Q

What is the usage of help() and dir() function in Python?

A

Help() function: The help() function is used to display the documentation string and also facilitates you to see the help related to modules, keywords, attributes, etc.
Dir() function: The dir() function is used to display the defined symbols.

Related Tutorials in How to install python server on CentOS 7

Related Tutorials in How to install python server on CentOS 7

How To Install AnyDesk on Centos 7
How To Install AnyDesk on Centos 7
Apr 2, 2018
How to install Tiki Wiki CMS Groupware on CentOS 7
How to install Tiki Wiki CMS Groupware on CentOS 7
May 31, 2018
How to install PHP ImageMagick on CentOS 7
How to install PHP ImageMagick on CentOS 7
Nov 4, 2017
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6
Jun 4, 2019
How to install Apache from Source Code on CentOS 7
How to install Apache from Source Code on CentOS 7
Oct 21, 2017
How to enable or disable repositories in CentOS
How to enable or disable repositories in CentOS
Mar 28, 2018
How to install AWStats on CentOS 7
How to install AWStats on CentOS 7
Dec 8, 2017
How to install Apache JMeter in CentOS 7
How to install Apache JMeter in CentOS 7
Mar 24, 2017

Related Forums in How to install python server on CentOS 7

Related Forums in How to install python server on CentOS 7

CentOS
connor class=
How To Completely Remove Apache package On CentOS 7.6
May 14, 2019
CentOS
ceriaimmaculate class=
setfacl : command not found
Jan 3, 2018
CentOS
mason class=
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
Nov 20, 2018
CentOS
landon class=
Command to find SNMP Version
May 28, 2018
CentOS
arjitharon class=
cannot start minio service help
Mar 10, 2018
Apache tomcat
AadrikaAnshu class=
Cannot find ./catalina.sh The file is absent or does not have execute permission This file is needed to run this program
Jun 17, 2019
gitlab
caden class=
Insufficient space in download directory /var/cache/yum/x86_64/6/base/packages
Jul 22, 2019
OpenVAS
frank class=
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Dec 20, 2018
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Elijah ?
Remote Desktop Connection Has Stopped Working

When accessing my remote machine server using remote desktop on a windows machine I am getting this error

forum (1)

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.