===== Installing Linux9 Configuring Apache PHP MySQL Proftp method =====
Configuring Apache PHP MYSQL Proftp under Linux Linux Configure Apache PHP MySQL Proftp.
Download the software to the following official website
Apache http://www.apache.org
Mysql http://www.mysql.com
PHP http://www.php.net
Proftp http://www.proftpd.org
For Apache, there are 1.3.x versions and two branches of 2.x versions. Since 2.x is rewritten on 1.3.x, there is a great improvement in structure and functionality. The Apache 2.x version is selected here. Similarly, a PHP version that supports Apache 2.x version is also selected. Download the latest version of Apache, MySQL, PHP from its respective websites.
Mysql-standard-4.1.7-pc-linux-i686.tar.gz
PHP-4.3.9.tar.gz
httpd-2.0.50.tar.gz
PrOFTPD-1.2.10RC1.TAR.GZ
1.Mysql installation
(1) MYSQL binary package installation method (installation method actually adopted by the server) First download MySQL's binary package: You can find the release of mysql4.0 in various platforms: http: //dev.mysql.com/downloads/ Mysql / 4.0.html From here to the binary package under Linux: http://dev.mysql.com/get/downloads/mysql-4.0/mysql-standard-4.1.7-pc-linux-i686.tar.gz/ After from / http:/mysql.linuxForum.net/ After decompression, there is an install-binary file in the mysql directory with a very detailed binary installation instruction. The steps installed are as follows. Unzipped # TAR ZXVF mysql-standard-4.0.20-pc-linux-i686.tar.gz -c / usr / local # cd / usr / local # mv mysql-standard-4.0.20-PC-Linux-i686 mysql
Add a mysql user group and user, I point my home directory of this account to my mysql installation directory, and let the account not login # groupadd mysql # useradd -g mysql -d / usr / local / mysql -s / sbin / NOLOGIN MYSQL
The actual installation uses the following sentence:
# ueradd -g mysql mysql
According to the instructions inside Install-binary, a step in one step is configured mysql: # scripts / mysql_install_db --user = mysql # chown -r root. # Chown -r mysql data # chgrp -r mySQL.
OK, start mysql: # /usr/local/mysql/support-files/mysql.server start Take a look at MySQL is already? # Ps -ef installation directory / usr / local / mysql The following LIB / and Include / inside the content is to compile the library and header file to be used by PHP. (2) Compiling MYSQL we put some software packages in / var / local directory (personal habits), they are tar.gz packages, you can use the command tar -xzpvf to be named, put them in the current directory Unlocked in (/ var / local /): CD / VAR / LOCAL
Tar -Xzpvf mysql-standard-4.1.7-pc-linux-i686.tar.gz
Tar -XZPVF PHP-4.3.9.TAR.GZ
Tar -Xzpvf httpd-2.0.50.tar.gz
Tar -Xzpvf proFTPD-1.2.10rc1.tar.gz
After unpacking, you can start entering the formal installation.
Compile
CD MYSQL-4.0.20 /
./configure --prefix = / usr / local / mysql
Make
Make Install
CD ..
Initialize and set directory permissions
CD / usr / local / mysql
Scripts / mysql_install_db
GroupAdd MySQL
UserAdd -g mysql mysql
Chown -r root.
Chown -r mysql data
CHGRP -R mysql.
Join the library
Echo / usr / local / mysql / lib / mysql / lib >> /etc/ld.so.conf
CD / SBIN /
. / LDCONFIG
Automatically run when it starts
Echo "/ usr / local / mysql / bin / mysqld_safe &" >> / etc / rc.d / rc.local
Launch MySQL
/ usr / local / mysql / bin / mysqld_safe &
Modify the mysql root password
/ usr / local / mysql / bin / mysqladmin -p root
2, install Apache
Note that the installation parameter MPM for Apache2 is recommended to modify the /server/mpm/prefork/prefork.c file,
Methods as below:
CD /VAR/LOCAL/HTTPD-2.0.50/server/mpm/prefork/
Vi prefork.c
Find Default_Server_Limit 256
Modify to default_server_limit 10000
Save the file and exit.
CD /VAR/LOCAL/HTTPD-2.0.50
./configure --prefix = / usr / local / httpd --enable-so --with-mpm = prefork
Make
Make Install
CD ..
The Apache 2.0.50 has now installed in the / usr / local / httpd directory, and the installed Apache supports the MPM Prefork that can load the module and standard. If there is no error during the installation process, you can use the following command to launch the Apache service.
/ usr / local / httpd / bin / apachectl start
If the startup is successful, add the start command to Rc.local so that it automatically runs at the system starts.
Echo "/ usr / local / httpd / bin / apachectl start & "> / etc / rc.d / rc.local
Stop Apache service and continue to install PHP / USR / local / httpd / bin / apachectl stop
3, install PHP (without GD library installation)
CD PHP-4.3.9
./configure --prefix --with-apxs2 = / usr / local / httpd / bin / apxs --with-mysql = / usr / local / mysql --with-config-file-path = / usr / local / php / lib --with-config-file-scan-dir = / usr / local / PHP / LIB
If Apache is 1.3.x version, use the following way:
./configure --prefix = / usr / local / php --with-apxs = / usr / local / apache / bin / apxs --with-config-file-path = / usr / local / pHP / lib --with -mySQL = / usr / local / mysql --enable-track-vars --with-xml
Make
Make Install
CP php.ini-dist /usr/local/lib/php.ini
This installation method is to install PHP as an SAPI module of Apache.
4. PHP GD installation
If you are PHP MySQL Apache packaging with RPM, the GD library defaults.
If you want to compile, the GD library is to do it yourself.
Because the website needs to use the GD library, add a GD library.
The following is passed under Red Hat Linux 9.0 Apache PHP.
...........
First, download software
GD-2.0.33.tar.gz http://www.boutell.com/gd/
Jpegsrc.v6b.tar.gz http://www.ijg.org/
Libpng-1.2.7.tar.tar http://sourceforge.net/projects/libpng/
Zlib-1.2.2.tar.gz http://sourceforge.net/projects/zlib/
Freetype-2.1.9.tar.gz http://sourceforge.net/projects/freetype/
PHP-4.3.9.tar.gz http://www.php.net
Second, the explanation
The latest GD library includes support for GIF, so don't play GIF patch http://sourceforge.net/
installation steps:
First install Zlib, FreeType, Libpng, JPEG, then load GD, then install PHP
Third, installation
Pack ZLIB
Tar -zxvf zlib-1.2.2.tar.gz
CD ZLIB-1.2.2
./configure
Make
Make Install
2. Install libpng
Tar -zxvf libpng-1.2.7.tar.gz
CD libpng-1.2.7
CD Scripts /
mv makefile.linux ../makefile
CD ..
Make
Make Install
Note that the makefile here is not used ./configure generated, but directly from Scripts / Ride
3. Install Freetype
TAR ZXVF FREETYPE-2.1.9.TAR.GZ
CD Freetype-2.1.9
./configure
Make
Make Install
4. Install JPEGTAR ZXVF JPEGSRC.V6B.TAR.GZ
CD JPEG-6B /
./configure --enable-shared
Make
Make test
Make Install
Note that configure here must take --enable-shared parameters, otherwise, no shared library will not generate
5. Install GD
TAR ZXVF GD-2.0.33.tar.gz
CD GD-2.0.33
./configure --with-png --with-freetype --with-jpeg
Make Install
6. Compile PHP
TAR ZXVF PHP-4.3.9.TAR.GZ
CD PHP-4.3.9
./configure --prefix = / usr / local / php
--with-apxs2 = / usr / local / apache2 / bin / apxs
--with-mysql = / usr / local / mysql
--with-config-file-path = / usr / local / PHP / LIB
--with-config-file-scan-dir = / usr / local / php / lib
--with-GD
--with-zlib
--with-PNG
--with-JPEG
--with-freetype
--enable-sockets
Basic configuration after PHP and Apache installation
Apache configuration
Apache's configuration file is /usr/local/httpd/conf/httpd.conf, editing httpd.conf files, plus the following two lines at the end of the file:
LoadModule PHP4_Module Modules / Libphp4.so
AddType Application / X-httpd-php .php .php3
Simultaneously modify DirectoryIndex
DirectoryIndex index.html index.php index.php3
Apache's virtual host configuration:
ServerName www.yourname.net ## Your domain name
ServerAdmin Web@yourname.net ## Your management email address
Documentroot / Home / YourName ## Volume Directory in your WEB
Virtualhost>
Apache's configuration content is relatively abundant, other apache related configuration, please refer to Apache's related documentation.
PHP configuration
Apache's configuration file is /usr/local/lib/php.ini, editing the php.ini file to configure the PHP option. Special note is that the REGISTER_GLOBALS variable is set to OFF after the installation is complete, and it needs to be changed to ON. Otherwise the phenomenon of PHP does not read the POST.
Register_globals = on
test
Write a simple PHP file to test the installation, the file contains the following line:
phpinfo ();?>
Save it as /usr/local/httpd/htdocs/info.php, start Apache, and then browse in your browser.
4, install Proftp:
CD proFTPD-1.2.10RC1
./configure -prefix = / usr / proFTP
Make
Make Install
CD ..
Create a system account
Create group # groupadd ftpusers
Add to group # UserAdd -g ftpusers -d / home / ftp caiqing
(Create a system account caiqing to the ftpusers group, and set only access / home / ftp directory) Set the account password # passwd caiqing
Set access # chown -r caiqing / home / ftp
(Setup Caiqing can only read and write the / home / ftp directory)
Configure the proFTPD.conf file
Join:
ALLOWOVERWRITE ON (Overwrite)
ALLOWRETRIEVERESTART ON (disconnected to upload)
ALLOWSTORERESTART ON (Remove Continued Upload)
Defaultroot ~ (Set up your account can only access your own directory)
============ Linux and Windows shared hard disk partition =============
Linux reading and writing Windows 9x / Windows 2000 / XP / DOS logic is quite easy, without having to install any other software, Linux itself has a mount command. As long as you read and write, just the corresponding partition on mount.
---- Assuming to use a file of Windows 98 in the above system under Linux, just run the following command as root:
---- #mount / dev / hda1 / mnt
---- Located under the Linux root directory / mnt default should be empty, of course, other empty catalogs such as DOS_D can be established to facilitate mounting other devices.
After mount, enter the / mnt directory, you can read any content in the DOS's C drive. However, doing so don't have a long file name. If you want to see the long text name after the Mount Windows partition under Linux, you need to specify an additional partition or file system type, that is, run ROOT operation.
- # mount -t vfat / dev / hda1 / mnt / command
(If you have just already MOUNT, please run Umount to uninstall it. Mount. In fact, Mount should specify the type of partition, but the current Linux is more and more fools.), You can see long files Named. After Mount, we can start installing Linux software downloaded under Windows, or use the gtk see below Linux to see graphic images in the Windows disk ..., because it is readable, it is almost "desirable" . Suppose there is less space in the Linux partition, and there is a lot of space in Windows, then we can download the big files that need to download to the Windows partition, and then install / use.
If you want to use the DOS partition below Linux, it is best to automatically put the corresponding partition mount after the Linux is started, as long as the / etc / fstab can reach this effect, below is the content of Linux / etc / fstab file The last two lines are increasing in order to share the Windows D disk and the E disk. After startup, the system will automatically automatically mount Windows 9x's D disk and the E disk.
# Cat / etc / fstab
/ DEV / HDA3 / EXT2 Defaults 1 1
/ DEV / HDA2 SWAP SWAP DEFAULTS 0 0 / DEV / FD0 / MNT / FLOPPY EXT2 NOAUTO 0 0
None / Proc Proc Defaults 0 0
/ DEV / HDA5 / DOS_D VFAT Defauts 1 1
/ DEV / HDA6 / DOS_E VFAT Defauts 1 1
============ Enable Telnet service ==========================================================================================================================================================================================================================
Linux does not start the Telnet service by default. To enable this service, open the /etc/xinetd.d/telnet configuration file with the text editor and modify the following statement;
Service telnet
{
...
Disable = no // The default "YES" is changed to "NO", which is enabled.
...
}
-------------------------------- About Linux startup mode ------------- ----------------------------
SMP: Multi-processor mode, you can open Multi-CPU support, or P4 can open Hyperformo technology. BIGMEM: A model of kernel is an optimized kernel of 1G or more memory. It is exactly a bit of Bigmem to support more than 896M memory.
Up: Mode of single processor