Python ์น ๊ตฌ์ถ
yum -y install python
cd /var/www/cgi-bin
# ์ํ์น ์ค์ ํ์ผ
vim /etc/httpd/conf/httpd.conf
302๋ฒ์งธ ์ค #AddHandler cgi-script .cgi .py
systemctl restart httpd
cd /var/www/cgi-bin
vim first.py
#!/usr/bin/env python
print "Content-type: text/html\\n\\n"
print "\\n"
print "
" print "Python Test Page in [Benmin.com](<
http://benmin.com/>)" print "\\n\\n" chmod 707 first.py cd /var/www
Tomcat ์น ๊ตฌ์ถ
yum -y install tomcat java //ํฐ์บฃ ์๋ฐ ์ค์น
java -version //์๋ฐ ๋ฒ์ ํ์ธ
systemctl restart tomcat
systemctl status tomcat
systemctl enable tomcat
netstat -natlp | grep java // 8080 ํฌํธ ์ฌ์ฉ
lsof -i tcp:8080 // ํฌํธ ํ์ธ
systemctl stop firewalld // ๋ฐฉํ๋ฒฝ ๋๊ธฐ
setenforce 0
// ํฐ์บฃ GUIํ๊ฒฝ ์ค์น
yum -y install tomcat-webapps
// ํฐ์บฃ ์ค์ ํ์ผ
vim /usr/share/tomcat/conf/tomcat-users.xml
// ์ฃผ์ ์ ๊ฑฐ ํ ํจ์ค์๋๋ง ๋ณ๊ฒฝ , ์๋ฐ ์ฃผ์ <!— —>
// ํฐ์บฃ ๊ธฐ๋ณธ ๋๋ ํฐ๋ฆฌ
cd /usr/share/tomcat/webapps/ROOT/
// ๊ธฐ๋ณธ ํ์ผ
index.jsp
// index.jsp ํ์ผ ๋ฐฑ์
mv index.jsp index.jsp.bak
// index.jsp ํ์ผ ์์ฑ
vim index.jsp
<html>
<head>
<title>Tomcat Test</title>
</head>
<body>
<div style="width: 100%; font-size:80px; font-weigth:bold; text-align: center;">
Benmin's Tomcat test
<START OF JAVA CODES>
<%
out.println("Hello World!!!");
out.println("<BR>This is first JSP APP ");
%>
<END OF JAVA CODES>
</div>
</body>
</html>
// ํฐ์บฃ ์ฌ์ดํธ
<http://192.168.111.100:8080>