64-bit CENTOS5 (REDHATAS5) Installation configuration (web Service, email service, WEB mail) note-Linux Enterprise Application-Linux server application information, the following is a detailed description. Red Hat Enterprise Linux is charged, but for small and medium-sized IT enterprises, CENTOS is also a good choice. CENTOS partially modifies the Red Hat Enterprise Linux source code and re-compiles it. It releases an Enterprise-level server operating system that can be used for free and provides a free online upgrade service, however, no technical support is provided. Therefore, enterprises must have maintenance personnel familiar with Linux operations.
The CENTOS version is synchronized with the Red Hat Enterprise Linux version.
I downloaded the 64-bit centos dvd iso from the CENTOS website. The installation is very simple. I burned the ISO file into a DVD, inserted it into the disc, started the installation from the disc, and selected the image method, all the way smoothly.
The recommended SELinux method is used when you select a security mode. In XWINDOW, I chose GNOME.
After the installation is complete, press CTL + ALT + F7 to enter the XWINDOW.
First, configure the network and use firefox to access the Internet. The font and other aspects are good, but the only pity is that Adobe still does not provide 64-bit Flash Player, so it is impossible to view the Flash in the webpage, however, some third-party solutions on the Internet are said to be able to solve this problem. Because I mainly use this server as a web server, I don't need to worry about it.
Vsftp is a built-in ftp server program. It is not started by default. It starts the vsftpd service in the service, but connects to the server through the ftp client for testing and reports the cannot change directory to/home/ Similar errors. It turns out that SELinux's installation configuration has prevented the ftp client from accessing the home directory. The specific information and handling methods are as follows:
Summary
SELinux is preventing the ftp daemon from reading users home directories (home). Detailed Description
SELinux has denied the ftp daemon access to users home directories (home ). someone is attempting to login via your ftp daemon to a user account. if you only setup ftp to allow anonymous ftp, this cocould signal a intrusion attempt. allowing AccessIf you want ftp to allow users access to their home directories you need to turn on the ftp_home_dir boolean:
"Setsebool-P ftp_home_dir = 1"
The following command will allow this access:
Setsebool-P ftp_home_dir = 1
I will install various network services such as tomcat, qmail, and extmail later.
Because of the time relationship, you can write down these items at any time and sort them out later.
==========
In the SAMBA configuration section, I have configured SAMBA Access Users and directories. Access to the CENTOS server from WINDOWS is always inaccessible. After verification, this is also because of SELINUX's security policy. The solution is as follows:
Summary
SELinux is preventing the samba daemon from reading users home directories.
Detailed Description
SELinux has denied the samba daemon access to users home directories. someone is attempting to access your home directories via your samba daemon. if you only setup samba to share non home directories, this probably signals a intrusion attempt. for more information on SELinux integration with samba, look at the samba_selinux man page. (man samba_selinux) Allowing AccessIf you want samba to share home directories you need to turn on the samba_enable_home_dirs boolean: "setsebool-P samba_enable_home_dirs = 1"
The following command will allow this access:
Setsebool-P samba_enable_home_dirs = 1
======================
The default java sdk version of 64-bit CENTOS 5 is 1.4.
Download AMD 64 JDK 6 from the sun website for the first time. After installation, an ExitCode 13 error is always reported when running eclipse.
Because the CPU Of my server is intel xeon 64-bit, but there is no x86 64-bit jdk on sun's website to download. Only the jdk version of x86 is downloaded.
Run rpm-e jdk to uninstall the first installed version of amd64 jdk6, then install jdk of this x86 version, and run Eclipse. There is no problem.
====================
How does one make the newly installed JDK 6 the default JDK of the system?
Create a file java. sh in the/etc/profile. d directory. The content is as follows:
# Set java environment
JAVA_HOME =/usr/java/jdk1.6.0 _ 03
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
PATH = $ JAVA_HOME/bin: $ PATH
Export JAVA_HOME CLASSPATH PATH
You need to change the java. sh attribute to executable.
==============================
How to install the new MySql version?
I downloaded the latest 64-bit version of msql 5.0 for direct installation and reported "installation package update error, which may be due to network connection problems". At first, I thought the installation program would need to download some information online, the installer cannot access the Internet through the proxy server. After repeated attempts, you can only find a way to uninstall the old version of mysql (because the SERVER package is installed when CENTOS is installed, so MySQL is included, because the IMAP server Dovecot uses the MySQL server, you must first uninstall Dovecot. The specific uninstall command is as follows:
Rpm-e dovecot
Rpm-e mysql
The new MySQL version is successfully installed!
As for Dovecot, since I don't plan to use this IMAP Server later, I don't have to reinstall it.
Mysql 5.0 client must be installed to use the mysql command line tool in terminal! At first, I thought that the server installation package already contains the command line tool.
By default, the root user of mysql server does not allow remote access. You need to manually open it using the mysql command.
To enable port 3306 of centos in/etc/sysconfig/iptables, run the following command to restart the Firewall Service:
/Sbin/service iptables restart
==============================
Install TOMCAT 6.0.14 and integrate it with Apache:
1. httpd uses the software package provided by CENTOS 5 based on the default configuration;
2. Download the 64-bit apache-tomcat-6.0.14.tar.gz file and decompress it to the/usr/local/tomcat directory;
3. Download the 64-bit mod_jk-1.2.25-httpd-2.2.4.so and copy it to the/etc/httpd/modules directory;
4. Create the mod_jk.conf file in the/etc/httpd/conf directory. The content is as follows:
# Point out the location of the workers. properties file required for mod_jk module work
JkWorkersFile/etc/httpd/conf/workers. properties
# Where to put jk logs
JkLogFile/etc/httpd/logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[% a % B % d % H: % M: % S % Y]"
# JkOptions indicate to send ssl key size,
JkOptions + ForwardKeySize + ForwardURICompat-ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "% w % V % T"
# Send all servlet and jsp requests to Tomcat through the ajp13 protocol for Tomcat to process
JkMount/servlet/* lb-server
JkMount/*. jsp lb-server
5. Create the workers. properties file in the/etc/httpd/conf directory. The content is as follows:
# Defining a worker named worker1 and of type ajp13
Worker. list = lb-server
# Set properties for worker1
Worker. lb-server.type = ajp13
Worker. lb-server.host = localhost
Worker. lb-server.port = 8009
Worker. lb-server.lbfactor = 50
Worker. lb-server.cachesize = 10
Worker. lb-server.cache_timeout = 600
Worker. lb-server.socket_keepalive = 1
Worker. lb-server.socket_timeout = 300
6. Add the following content to the LoadModule section in/etc/httpd/conf/httpd. conf:
#===== For tomcat 6 config ======
LoadModule jk_module modules/mod_jk-1.2.25-httpd-2.2.4.so
Include/etc/httpd/conf/mod_jk.conf
#==========================================
7. Add the following content to the host segment in/usr/local/tomcat/conf/server. xml:
8. Restart the httpd service;
9. start tomcat:
/Usr/local/tomcat/bin/startup. sh
10. Create a simple hello. jsp page in the/var/www/html directory and perform the test:
Http: // localhost/hello. jsp
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.