Server - System - Manager - CentOS, Operation System, VBB, HACKING AND SECURITY

Go Back   Server - System - Manager - CentOS, Operation System, VBB, HACKING AND SECURITY > CentOS Việt Nam - Viet Nam Linux CentOS Community > Hỏi đáp về CentOS

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2008
Hackingart Member
 
Join Date: Jul 2008
Posts: 3
Thanks: 10
Thanked 0 Times in 0 Posts
Default Request: hướng dẫn cài server!

Hi,

Mình mới tập tành cài server, phần cài HDH thì mình đã cài xong CentOS 5.2
Giờ mình không biết phải làm gì bước tiếp theo để chạy domain hoặc làm những ứng dụng khác tưong tự.
Có người bảo cài cpanel, có người bảo install php,mysql,apache rồi cài cpanel sau...
Có ai có kinh nghiệm có thể giúp mình được không?
Hiện tại mình chỉ có quyền ssh root vào serrver.

Thân.
Reply With Quote
  #2 (permalink)  
Old 11-07-2008
Lovelinux's Avatar
Super Moderator
 
Join Date: Jun 2008
Posts: 211
Thanks: 22
Thanked 45 Times in 23 Posts
Thumbs down

Nếu mục đích của bạn là cài đặt - chạy domain thì có 3 hướng:
1. Hướng thương mại - bạn là hosting - và cho thuê hosting thì bạn có thể cài Cpanel hoặc DirectAdmin. Hiện server mình đang cài DirectAdmin - giá license cũng rẻ.
Cách cài đặt thì bạn có thể truy cập vào 2 site này, nó hướng dẫn rất chi tiêt. Yêu cầu khi cài directadmin là 1 hệ điều hành sạch - như bạn vừa cài xong đó
DirectAdmin Web Control Panel
cPanel - The Leading Control Panel

2. Hướng sử dụng: bạn có thể cài đặt webmin (free) để sử dụng.
3. Hướng nghiên cứu: Hãy sử dụng shell để cấu hình domain, cài đặt apache, php, mysql từ source.

Vậy bạn muốn đi theo hướng nào?

------------------------------------
Directadmin: ***Please do not install services such as Apache, PHP, MySQL, Ftp, Sendmail, etc., as we will do this for you. All we need is a CLEAN install of your operating system.***

Last edited by Lovelinux; 11-07-2008 at 09:07 PM.
Reply With Quote
The Following 2 Users Say Thank You to Lovelinux For This Useful Post:
get2you (12-07-2008), thu_6_ngay_13 (13-07-2008)
  #3 (permalink)  
Old 12-07-2008
Hackingart Member
 
Join Date: Jul 2008
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hihi, gặp lại Lovelinux rùi, mình cũng đang có 1 con server running Centos 5.1 và Directadmin, trước đây mình nhờ đứa em ở Digipower cài giùm mình cái Directadmin, sau đó nó bị lỗi và mình cài đặt lại, nói chung cài đặt mọi thứ cũng tốt, tuy nhiên có 1 vấn đề mình không biết fix như thế nào được, cụ thể như sau :

Mình dùng IP tĩnh của VNN, modem ADSL, khi mình cài DirectAdmin, DA sẽ hỏi mình IP nào dùng, do mình NAT IP ỡ modem ADSL nên mình chỉ có thể chọn IP LAN (192.168.1.100) sau đó thì mình cài DA bình thường, nhưng sau khi xong rồi thì ở bên ngoài mình ko thể vào IP external được, chỉ vào dc Ip Internal 192.168.1.100:2222 mà thôi, mình đã NAT ỗn các port về máy server rồi, sau đó đứa em của mình vào server chỉnh lại như thế nào đó, và từ đó về sau thì ở bên ngoài run dc Ip external để quản trị dc, ngại hỏi nó quá, ko biết Lovelinux đã gặp tình trạng này bao giờ chưa nhĩ ?
Reply With Quote
The Following User Says Thank You to hoahongtim For This Useful Post:
thu_6_ngay_13 (13-07-2008)
  #4 (permalink)  
Old 12-07-2008
Hackingart Member
 
Join Date: Jul 2008
Posts: 3
Thanks: 10
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Lovelinux View Post
Nếu mục đích của bạn là cài đặt - chạy domain thì có 3 hướng:
1. Hướng thương mại - bạn là hosting - và cho thuê hosting thì bạn có thể cài Cpanel hoặc DirectAdmin. Hiện server mình đang cài DirectAdmin - giá license cũng rẻ.
Cách cài đặt thì bạn có thể truy cập vào 2 site này, nó hướng dẫn rất chi tiêt. Yêu cầu khi cài directadmin là 1 hệ điều hành sạch - như bạn vừa cài xong đó
DirectAdmin Web Control Panel
cPanel - The Leading Control Panel

2. Hướng sử dụng: bạn có thể cài đặt webmin (free) để sử dụng.
3. Hướng nghiên cứu: Hãy sử dụng shell để cấu hình domain, cài đặt apache, php, mysql từ source.

Vậy bạn muốn đi theo hướng nào?

------------------------------------
Directadmin: ***Please do not install services such as Apache, PHP, MySQL, Ftp, Sendmail, etc., as we will do this for you. All we need is a CLEAN install of your operating system.***
Cảm ơn Lovelinux rất nhiều, HDH mình đang rất sạch vì mua server chỉ cài CentOS, mình theo ý bạn cài Cpanel vì mình có ý định share host cho mọi người, mà mục đích chính là mình muốn tiếp cận cách cài server từ a-->z, có gì thì mình sẽ nhờ bạn support tiếp, một lần nữa cảm ơn bạn.
Reply With Quote
  #5 (permalink)  
Old 12-07-2008
Lovelinux's Avatar
Super Moderator
 
Join Date: Jun 2008
Posts: 211
Thanks: 22
Thanked 45 Times in 23 Posts
Wink

Quote:
Originally Posted by thu_6_ngay_13 View Post
Cảm ơn Lovelinux rất nhiều, HDH mình đang rất sạch vì mua server chỉ cài CentOS, mình theo ý bạn cài Cpanel vì mình có ý định share host cho mọi người, mà mục đích chính là mình muốn tiếp cận cách cài server từ a-->z, có gì thì mình sẽ nhờ bạn support tiếp, một lần nữa cảm ơn bạn.
@thu_6_ngay_13: Mình sẵn sàng giúp đỡ bạn nếu điều đó nằm trong khả năng!

Quote:
Originally Posted by hoahongtim View Post
Mình dùng IP tĩnh của VNN, modem ADSL, khi mình cài DirectAdmin, DA sẽ hỏi mình IP nào dùng, do mình NAT IP ỡ modem ADSL nên mình chỉ có thể chọn IP LAN (192.168.1.100) sau đó thì mình cài DA bình thường, nhưng sau khi xong rồi thì ở bên ngoài mình ko thể vào IP external được, chỉ vào dc Ip Internal 192.168.1.100:2222 mà thôi, mình đã NAT ỗn các port về máy server rồi, sau đó đứa em của mình vào server chỉnh lại như thế nào đó, và từ đó về sau thì ở bên ngoài run dc Ip external để quản trị dc, ngại hỏi nó quá, ko biết Lovelinux đã gặp tình trạng này bao giờ chưa nhĩ ?
@hoahongtim:
Tớ chưa gặp tình trạng này bao giờ, nhưng tớ đoán khi không vào được DirectAdmin CP thì có lẽ vấn đề có thể do 3 hướng:
1. NAT port
2. Do IP của modem trên WAN(external IP) không trùng với IP trong license file.
3. Do DA có thể chạy nhiều IP, hoặc giả sử em bạn add thêm 1 IP external chăng?
Đây chỉ là dự đoán - có lẽ tớ cần phải gặp trường hợp đó - thì sẽ rõ hơn.
Thân!


----------------------------------
DirectAdmin -- Installation
Your server IP must be an external IP address. Local IP addresses (192.168.x.x or 10.0.x.x) will not work. The IP in your network device must be the same IP in your license file, as well as the public IP that connects to our system to download the license and binaries. This means that LANs will not work.

Last edited by Lovelinux; 12-07-2008 at 08:44 AM.
Reply With Quote
The Following User Says Thank You to Lovelinux For This Useful Post:
thu_6_ngay_13 (13-07-2008)
  #6 (permalink)  
Old 12-07-2008
Hackingart Member
 
Join Date: Jul 2008
Posts: 3
Thanks: 10
Thanked 0 Times in 0 Posts
Default

+++++ Mình đã buy xong cpanel, nhưng đọc cách install trên trang chủ Cpanel thì gặp phải vấn đề này:

Quote:
*You also need to make sure that /etc/resolv.conf contains valid nameservers that allow you to resolve domains properly. To test this, try :
dig domain.com@serverip
(replace domain.com with the name of a well known domain and replace serverip with the ip address of a nameserver in /etc/resolv.conf)
* The hostname of this server should be a Fully Qualified Domain Name that will not be used elsewhere on the server. You should never set your hostname to an name that is already used (www, ftp, mail, etc) or to the name of an account on the server (Register a Domain, Find Hosting and Create a Website at Domain.com). This means that your hostname should never be a domain name and especially not the name of your domain!!
+++ Và mình search google để tìm hiều rõ hơn về cái này thì gặp phải bài viết này:
Quote:
[2] Checking the host name and network settings :
After your first boot, you must check your system’s host name and network configuration to ensure that they are correct.

To check your system’s host name and network configuration:
- Log on to the system as the root user.
- Type vi /etc/hosts to open the host file and modify the contents.
- Verify that the file is in the following format:

- Verify that the loopback entry (127.0.0.1) appears in the file. A correctly configured file should look like this:

Note : The IP addresses used here are for illustration purposes only; they are not valid values.

Quote:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.1.1.1 myhost.mydomain.com myhost



- Modify the file as needed.
- Type :wq to close the file.
- Type vi /etc/sysconfig/network to open the network sysconfig file and modify the contents.
- Verify the host name. A correctly configured file should look like this:

Note : The IP addresses used here are for illustration purposes only; they are not valid values.


Quote:
NETWORKING=yes
HOSTNAME=myserver.mydomain.com
GATEWAY=10.100.0.1



- Modify the file as needed.
- Type :wq to close the file.
- Type vi /etc/sysconfig/network-scripts/ifcfg-eth0 to open the network scripts file and modify the contents.
- Verify that network information. A correctly configured file should look like this:

Note : The IP addresses used here are for illustration purposes only; they are not valid values.


Quote:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=10.1.1.1
IPADDR=10.1.1.1
NETMASK=255.255.0.0
NETWORK=10.1.0.0
ONBOOT=yes

- Modify the file as needed.
- To make these changes active, restart the system by typing:

Quote:
shutdown -r now
Giờ mình không biết phải làm cái bước này trước khi install Cpanel thế nào.
Ví dụ domain mình là abc.com và có 1 ip chính là 111.111.111.110 + 1rang 4ip 111.111.111.111-->111.111.111.114

Mình phải làm gì bước config này trước khi install Cpanel?
Cảm ơn bạn rất nhiều!
Reply With Quote
  #7 (permalink)  
Old 12-07-2008
Lovelinux's Avatar
Super Moderator
 
Join Date: Jun 2008
Posts: 211
Thanks: 22
Thanked 45 Times in 23 Posts
Default

Cái này chẳng liên quan gì đến IP range cả.
ví dụ: Tớ có cái domain mv2server3.com. Con server này cài CentOS và có 4 địa chỉ IP, nhưng trong file resolv.conf tớ chỉ khai báo 1 địa chỉ 69.50.214.169
Đây là file resolv.conf của tớ:
Code:
cat /etc/resolv.conf
kết quả:
Code:
domain mv2server3.com
search mv2server3.com
nameserver 69.50.214.169
nameserver 202.60.77.162
nameserver 69.50.214.169
những phần bôi đậm là quan trọng - còn những cái khác ko là vấn đề!

Chúc cài đặt thành công

Last edited by Lovelinux; 12-07-2008 at 02:14 PM.
Reply With Quote
The Following 2 Users Say Thank You to Lovelinux For This Useful Post:
get2you (12-07-2008), thu_6_ngay_13 (13-07-2008)
  #8 (permalink)  
Old 13-07-2008
Hackingart Member
 
Join Date: Jul 2008
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

Đúng là ở trang chủ DA có nói đến ko thể setup DA nếu dùng dãi Ip trong LAN, tuy nhiên mình vẫn cài đặt được, lúc đầu mình cũng nghĩ là ko thể cài, nên mình kết nối ISP dạng cầu nối PPPOE, nhưng kết nối ko thành công, sau đó mình chuyển về dạng kết nối ISP thông dụng, mình NAT Port rất ổn, mình open DMZ về máy server luôn, nên mình nghĩ chuyện NAT Port có thể loại bõ qua, còn nếu IP ko trùng với DA thì DA đã ko cho mình setup từ buổi ban đầu rồi! Vì thế mình nghĩ trường hợp add thêm IP Ext là khả thi nhất, tuy nhiên tìm hiểu nhiều bài viết về DA nhưng vẫn chưa tìm ra bài nào hướng dẫn cách add thêm, Lovelinux có thể chỉ mình cách add thêm IP Ext cho DA nhé, mình nghĩ trường hợp này khả thi nhất, cám ơn bạn nhiều !
Reply With Quote
  #9 (permalink)  
Old 13-07-2008
Hackingart Member
 
Join Date: Jul 2008
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

Mình kiểm tra lại server, mình phát hiện có thể 1 LAN ảo trong này nữa, có lẽ vấn đề của mình nằm trong LAN ảo này, nhờ Lovelinux xem qua nhé.

Quote:
[root@server network-scripts]# ls -al
total 408
drwxr-xr-x 2 root root 4096 Apr 29 22:42 .
drwxr-xr-x 10 root root 4096 Apr 29 16:38 ..
-rw-r--r-- 3 root root 103 Apr 29 21:32 ifcfg-eth0
-rw-r--r-- 3 root root 199 Apr 29 21:32 ifcfg-eth1
-rw-r--r-- 1 root root 159 Apr 29 22:42 ifcfg-eth1:0
-rw-r--r-- 1 root root 254 Jun 21 2001 ifcfg-lo
lrwxrwxrwx 1 root root 20 Apr 29 21:37 ifdown -> ../../../sbin/ifdown
-rwxr-xr-x 1 root root 625 Sep 12 2006 ifdown-bnep
-rwxr-xr-x 1 root root 4421 Jan 5 2007 ifdown-eth
-rwxr-xr-x 1 root root 827 Apr 16 2005 ifdown-ippp
-rwxr-xr-x 1 root root 2159 Sep 12 2006 ifdown-ipsec
-rwxr-xr-x 1 root root 4473 Sep 12 2006 ifdown-ipv6
lrwxrwxrwx 1 root root 11 Apr 29 21:37 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x 1 root root 1481 Sep 12 2006 ifdown-post
-rwxr-xr-x 1 root root 1084 Sep 12 2006 ifdown-ppp
-rwxr-xr-x 1 root root 637 Jul 11 2006 ifdown-routes
-rwxr-xr-x 1 root root 1593 Sep 12 2006 ifdown-sit
-rwxr-xr-x 1 root root 904 Sep 12 2006 ifdown-sl
-rwxr-xr-x 1 root root 1074 Sep 12 2006 ifdown-tunnel
lrwxrwxrwx 1 root root 18 Apr 29 21:37 ifup -> ../../../sbin/ifup
-rwxr-xr-x 1 root root 13427 Sep 12 2006 ifup-aliases
-rwxr-xr-x 1 root root 859 Sep 12 2006 ifup-bnep
-rwxr-xr-x 1 root root 10160 Jun 23 2007 ifup-eth
-rwxr-xr-x 1 root root 11970 Sep 12 2006 ifup-ippp
-rwxr-xr-x 1 root root 6820 Sep 12 2006 ifup-ipsec
-rwxr-xr-x 1 root root 10853 Sep 12 2006 ifup-ipv6
-rwxr-xr-x 1 root root 823 Sep 12 2006 ifup-ipx
lrwxrwxrwx 1 root root 9 Apr 29 21:37 ifup-isdn -> ifup-ippp
-rwxr-xr-x 1 root root 727 Sep 12 2006 ifup-plip
-rwxr-xr-x 1 root root 954 Sep 12 2006 ifup-plusb
-rwxr-xr-x 1 root root 2369 Sep 12 2006 ifup-post
-rwxr-xr-x 1 root root 4253 Sep 12 2006 ifup-ppp
-rwxr-xr-x 1 root root 1707 Jul 24 2006 ifup-routes
-rwxr-xr-x 1 root root 3662 Sep 12 2006 ifup-sit
-rwxr-xr-x 1 root root 1648 Sep 12 2006 ifup-sl
-rwxr-xr-x 1 root root 2078 Sep 12 2006 ifup-tunnel
-rwxr-xr-x 1 root root 3325 Oct 1 2005 ifup-wireless
-rwxr-xr-x 1 root root 5433 Sep 12 2006 init.ipv6-global
-rwxr-xr-x 1 root root 1154 Feb 7 2006 net.hotplug
-rw-r--r-- 1 root root 10392 Jun 23 2007 network-functions
-rw-r--r-- 1 root root 39806 Nov 22 2006 network-functions-ipv6
[root@server network-scripts]# cat ifcfg-eth1:0
# Intel Corporation 82557/8/9 Ethernet Pro 100
DEVICE=eth1:0
BOOTPROTO=static
HWADDR=00:03:47:31:7A:EC
IPADDR=222.253.144.227
NETMASK=255.255.255.0
ONBOOT=yes
[root@server network-scripts]#

Reply With Quote
  #10 (permalink)  
Old 13-07-2008
Hackingart Member
 
Join Date: Jul 2008
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hix, tai nạn nữa rồi, server đang chạy ngon lành, tự dưng ko chịu chạy, mình ping tuử thì trả về như sau :

Quote:
Reply from 222.253.144.227: Destination host unreachable.
Reply from 222.253.144.227: Destination host unreachable.
Cái này khắc phục làm sao đây bác Lovelinux, hix, nó mà die chắc chết quá ! (
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hướng dẫn cài đặt Linux CentOS trên máy ảo VMWave Lovelinux Cài đặt CentOS và ứng dụng 1 23-07-2008 09:57 PM
Bắt đầu với CD CentOS Single Server Lovelinux Cài đặt CentOS và ứng dụng 0 22-07-2008 09:00 PM
Hướng dẫn cài đặt một số extension cơ bản cho PHP Lovelinux PHP for CentOS 1 21-07-2008 06:27 PM
Tổng Hợp các hướng dẫn về làm forum vBB ninhbinhcraft Diễn đàn VBB 6 19-07-2008 07:13 PM


All times are GMT +1. The time now is 02:33 AM.


© Diễn đàn HackingArt (HA) được xây dựng và phát triển bởi các thành viên.
+ Diễn đàn HackingArt là nơi trao đổi của các webmaster chuyên nghiệp.