태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

'I.T. Diary/Freebsd'에 해당되는 글 6건

  1. 2008/12/30 Screen
  2. 2008/12/07 putty connection manager
  3. 2008/04/05 Remote X-window
  4. 2007/10/08 Freebsd 에서그놈 (GNOME) 실행하기.
  5. 2007/09/28 SSL install

Screen

I.T. Diary/Freebsd 2008/12/30 15:47

여러시스템을 관리하다 보면 한화면에 여러개의 콘솔을 열어놓고 작업을해할때가 종종 있습니다.
이런 경우 사용할수 있는 도구로 screen 있습니다.
대부분 모든 *nix 시스템에서 사용가능합니다. 중요한 몇가지 기능은 다음과 같습니다.


화면에 열어넣은 모든 콘솔을 메뉴처럼 볼려면  : Ctrl-a shift-"
새로운 콘솔을 만들려면 : Ctrl-a Ctrl-c
새로만든 콘솔에 이름을 주려면 : Ctrl-a Shift-a ( 새로만든 콘솔 안해서 작업)
한화면에서 여러콘솔로 나누어볼때 : Split screen : Ctrl-a Shift-s
나누어진 화면을 없셀떄 : Kill Split Screen : Ctrl-a Shift-q
작업하는 스크린을 종료 하고 나올때 : Detach Screen : Ctrl-a Ctrl-d
다시 스크린을 사용하고자 할떄: Attach Screen : screen -rx
여러 콘솔사이로 이동하고 싶을때: Crl-A Tab : move between split screen


이올린에 북마크하기(0) 이올린에 추천하기(0)

'I.T. Diary > Freebsd' 카테고리의 다른 글

Screen  (0) 2008/12/30
putty connection manager  (0) 2008/12/07
Remote X-window  (0) 2008/04/05
Freebsd 에서그놈 (GNOME) 실행하기.  (0) 2007/10/08
SSL install  (0) 2007/09/28
Name server setup  (0) 2007/09/28
Posted by aboutnz

여러 시스템을 관리하다 보면 동시에 여러 시스템에 로그인 하여 모니터나 작업 할때가 있습니다. putty coonection manager  이런 작업을 수월하게 여러 세션을 한 화면에 동시에 열어 작업하기 편리한 소프트웨어 입니다.
베타와 알파 버전이 있는데 알파버전은 절대 사용하지 마시고 베타버전을 사용하세요. 제가 구글로 찾아내어 직원들에게 알려주었더니 간간히 사용하는 사람들이 보이는군요. 한 직원은 알파버전을 사용하다 데이타 오류가 나 베타버전으로 돌렸습니다. 베타버전을 사용하세요.
http://puttycm.free.fr/






이올린에 북마크하기(0) 이올린에 추천하기(0)

'I.T. Diary > Freebsd' 카테고리의 다른 글

Screen  (0) 2008/12/30
putty connection manager  (0) 2008/12/07
Remote X-window  (0) 2008/04/05
Freebsd 에서그놈 (GNOME) 실행하기.  (0) 2007/10/08
SSL install  (0) 2007/09/28
Name server setup  (0) 2007/09/28
Posted by aboutnz

리모트에서 X-window 을 실행할수있는  프로그램으로 Xming 이 있다. 오픈소스지만 성능이 뛰어나 널리 많이 쓰이고있습니다. putty 함께사용하여 원도우에서 각종 unix system 의 X-window application 들을 사용할수있다. 내려받기는  다음에서 할수 있고http://sourceforge.net/projects/xming  설치후 putty 에서 Tunnels 옵션에서 X11 forwarding항목 중 "Enable X11 forwarding" 에 체크를 하면됩니다.

이올린에 북마크하기(0) 이올린에 추천하기(0)

'I.T. Diary > Freebsd' 카테고리의 다른 글

Screen  (0) 2008/12/30
putty connection manager  (0) 2008/12/07
Remote X-window  (0) 2008/04/05
Freebsd 에서그놈 (GNOME) 실행하기.  (0) 2007/10/08
SSL install  (0) 2007/09/28
Name server setup  (0) 2007/09/28
Posted by aboutnz
Freebsd 는 리눅스와 달리 그놈 패키지을 설치해도 자동으로 그놈 화면이 실행되지않는다.
최신 버전 Freebsd 의 GNOME Display Manger 는 비활성화 되어있기때문에 활성화 시켜주어야 자동으로 GNOME 이 시작된다.

gdm_enable="Yes" 을 /etc/rc.conf 파일이 입력해 주고 다시 Freebsd 을 시작하면 된다.
또한 커멘드 라인에서 /usr/local/bin/gnome-session 을 입력해도 그놈이 시작된다.


 
이올린에 북마크하기(0) 이올린에 추천하기(0)

'I.T. Diary > Freebsd' 카테고리의 다른 글

Screen  (0) 2008/12/30
putty connection manager  (0) 2008/12/07
Remote X-window  (0) 2008/04/05
Freebsd 에서그놈 (GNOME) 실행하기.  (0) 2007/10/08
SSL install  (0) 2007/09/28
Name server setup  (0) 2007/09/28
Posted by aboutnz

SSL install

I.T. Diary/Freebsd 2007/09/28 18:15
URL : http://www.bsdguides.org/guides/freebsd/webserver/apache_ssl_php_mysql.php


Apache+SSL, PHP, and MySQL


Updated: 10/10/2004

General Information

I'm sure many of you have been wondering how people host secure sites using Secure Sockets Layer (SSL). This guide will show you how to set up a web server with SSL, PHP, and MySQL support.


Requirements

In order for public access to your website, you must have a valid domain name.
A text editor (for this guide we will use Nano)
Installation

Section A -- Apache+mod_ssl

First thing we need to do is install the Apache web server. Currently there are two main versions available: 1.3.x and 2.0.x. I will be teaching from the 1.3x branch, but many of the steps are the same for 2.0.x. I will also make notes for those of you who choose to use the 2.0.x branch.

#
# cd /usr/ports/www/apache13-modssl
make install distclean

The default install will automagically start apache and we need to shutdown the server to continue.

# /usr/local/sbin/apachectl stop

** Apache2 users: You only need to install the apache2 port, but then you have to manually create the directories for the SSL Certificate and Key.

#
#
#
#
#
# cd /usr/ports/www/apache2
make install distclean
mkdir /usr/local/etc/apache2/ssl.key
mkdir /usr/local/etc/apache2/ssl.crt
chmod 0700 /usr/local/etc/apache2/ssl.key
chmod 0700 /usr/local/etc/apache2/ssl.crt

Section B -- MySQL

#
# cd /usr/ports/databases/mysql40-server
make install WITH_OPENSSL=yes distclean

Take a break while it downloads, compiles, and installs. It'll take about 45 minutes on a K6-2 350MHz.

Section C -- PHP

#
#
#
#
cd /usr/ports/www/mod_php4
make install distclean
cd /usr/ports/lang/php4-extensions
make install distclean

Now, when you get to the PHP configuration screen, you just need to check the OpenSSL box and leave the rest of the default values alone, unless you plan on installing other applications, such as the IMP Webmail, that require other PHP modules. Time to take another break.

PHP should be installed by now. At the end of the installation, you will need to edit Apache's configuration file to add two lines after all the "LoadModule" lines for PHP support.

# nano -w /usr/local/etc/apache/httpd.conf

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Configuration

Section A -- Create Certificate

It is now time to create your own certificate using the openssl utility. Now, you need to understand that one server can hold multiple certificates, but only one per listening IP address. So, if your server is listening on one IP address, you can only have one certificate for the server. All of your virtual domains can share the same certificate, but clients will get warning prompts when they connect to a secure site where the certificate does not match the domain name. If your server is listening on multiple IP addresses, your virtual hosts have to be IP-based -- not name-based. This is something to consider when creating your certificate.

Change to any directory you would like to save your certficate in. I chose root's home directory. We will then copy the necessary files to the correct directory later. This way we have a back up in case something happens.

#
# cd ~

You will be prompted to enter a password for this key. Remember it because we will need it later. Now we need to make a Certificate Signing Request (CSR) from the key we just generated.

#  
Enter your password you had used as this is where you get to enter all the fun information about the certificate, like your name and Fully Qualified Domain Name (FQDN). Make sure you enter your FQDN for the "Common Name" portion. For example, if the certificate is for https://webmail.domain.tld/, then your CommonName should be webmail.domain.tld.

Alright, your certificate is ready to be signed. The following steps are to self-sign the certificate, but you could pay money and have it signed by Verisign or Thawte.

# openssl x509 -req -days 365 -in /root/server.csr -signkey /root/server.key -out /root/server.crt

Ok, your certificate is signed and valid for 365 days, which you could have changed if you wanted. We now need to copy the files to the appropriate directory for Apache to use them.

#
# cp ~/server.key /usr/local/etc/apache/ssl.key/
cp ~/server.crt /usr/local/etc/apache/ssl.crt/

If you want to read more about SSL Certificates, you can read the FAQs at http://httpd.apache.org/docs-2.0/ssl/ssl_faq.html#aboutcerts.

** Apache2 users: The correct permissions must be set.

#
# chmod 0400 /usr/local/etc/apache2/ssl.key/server.key
chmod 0400 /usr/local/etc/apache2/ssl.crt/server.crt

Section B -- Configure VirtualHosts

VirtualHosts are neat because they allow you to host many domains on the same server and the same IP address. For this example, we will make three VirtualHost entries -- one for http and two for https (SSL).

This section will be modifying /usr/local/etc/apache/httpd.conf so you can pull that up in your favorite editor now. The normal VirtualHosts can be placed at the beginning of the file for easy access and should be set up like this:

ServerName domain.tld

NameVirtualHost 192.168.0.2:80


   ServerName domain.tld
   ServerAlias www.domain.tld
   ServerAdmin admin@domain.tld
   DocumentRoot /path/to/website/files


Now at the bottom of httpd.conf, you should see a whole bunch of lines relating to SSL. Insert the following line just before the default VirtualHost for SSL like this:

NameVirtualHost 192.168.0.2:443



NameVirtualHost tells Apache that there are several virtual hosts under the same IP. So, at the bottom of httpd.conf you will want to put your VirtualHosts just before .


   ServerName domain.tld
   ServerAlias www.domain.tld
   ServerAdmin admin@domain.tld
   DocumentRoot /path/to/website/files
   SSLEngine on
   SSLCertificateFile /usr/local/etc/apache/ssl.crt/server.crt
   SSLCertificateKeyFile /usr/local/etc/apache/ssl.key/server.key


Now, if you had a server listening on another IP address, you could set up another certificate for that IP address to use. Then, your second VirtualHost could look like this:


   ServerName domain2.tld
   ServerAlias www.domain2.tld
   ServerAdmin admin@domain2.tld
   DocumentRoot /path/to/website/files
   SSLEngine on
   SSLCertificateFile /usr/local/etc/apache/ssl.crt/server2.crt
   SSLCertificateKeyFile /usr/local/etc/apache/ssl.key/server2.key


If you notice, SSLCertificateFile and SSLCertificateKeyFile are only paths to the certificate and key. Just remember that you would have to use IP-based VirtualHosts, like we did, and not name-based.

** Apache2 users: All of your SSL configuration is in a separate file at /usr/local/etc/apache2/ssl.conf so edit that for your SSL-aware VirtualHosts.

Section C -- Start Services

Your server is now ready to start MySQL and Apache with SSL.

#
# /usr/local/etc/rc.d/mysql-server.sh start
/usr/local/sbin/apachectl startssl

When you start apache with ssl, you will be prompted to enter that password you were supposed to remember. The reason for entering it everytime apache starts is because the RSA private key is stored in encrypted format. You can remove the encryption to eliminate the password prompt if you would like, but it's not recommended for security reasons. If you removed the encryption and somebody was able to control your box, they could take your certificate and impersonate you. But, if you are annoyed by the password prompt and feel confident that your server is secure, these are the steps to remove the encryption:

#
#
# cd /usr/local/etc/apache/ssl.key
cp server.key server.key.orig
openssl rsa -in server.key.orig -out server.key

Point your favorite browser to https://domain.tld and you should have a 128-bit secure connection. That's all there is to setting up a standard web server with SSL support. Happy hosting!

Author: Jon LaBass
jon at bsdguides dot org


Comments

ManDude on March 05, 2004 at 3:48:19 pm MST
Thanks for the info. I'll give it a go later.

Hovi on July 28, 2004 at 10:27:04 am MST
Hey i dont get the options to install anything else with mod_php4.How can i install mod_php4 with some of the options it had before (that i could have picked but now cant)?
thnx

Jon on July 28, 2004 at 1:50:19 pm MST
As of 07/19/2004, the php4 and php5 port structure has changed. The lang/php4, lang/php5, www/mod_php4, and www/mod_php5 ports are only the "base" php. You can install individual php extensions under the names of php4- or you can install php4-extensions which will give you the familiar look and feel that you are used to.


You must login to post any comments.

View the moved comments for this guide.
이올린에 북마크하기(0) 이올린에 추천하기(0)

'I.T. Diary > Freebsd' 카테고리의 다른 글

Screen  (0) 2008/12/30
putty connection manager  (0) 2008/12/07
Remote X-window  (0) 2008/04/05
Freebsd 에서그놈 (GNOME) 실행하기.  (0) 2007/10/08
SSL install  (0) 2007/09/28
Name server setup  (0) 2007/09/28
Posted by aboutnz
TAG freebsd