1. Install apache(httpservice route 1.from apache.orgdownload source code installation package 2.uncompress unzip tarzxfhttpd-2.2.4.tar.gz # cdhttpd-2.2.43. install the apache dependency package apr and apr-util. Both of them install apr # cdsrclib/apr # In the srclib directory 3.1 #. /configure -- prefix =/usr/local/apr #
1. install apache (http Service)
1. Download the source code installation package from apache.org
2. Extract
# Tar zxf httpd-2.2.4.tar.gz
# Cd httpd-2.2.4
3. Install the apache dependency package apr and apr-util, both of which are in the srclib directory.
3.1 install apr
# Cd srclib/apr
#./Configure -- prefix =/usr/local/apr
# Make
# Make install
3.2 install apr-util
# Cd ../apr-util
#./Configure -- prefix =/usr/local/apr-util -- with-apr =/usr/local/apr
# Make
# Make install
4. Install httpd
# Cd ../../
#. /Configure -- prefix =/usr/local/httpd -- with-apr =/usr/local/apr -- with-apr-util =/usr/local/apr-util -- enable- so -- enable-rewrite
# Make
# Make install
-- Enable-so supports DSO mode (dynamic module Loading Mode)
-- Enable-rewrite supports rewrite (address redirection)
After the installation is complete, open the browser and enter the address of the server where you installed apache, which looks like this:
Http: // 192.168.1.3/
If the page is shown as follows:
It works!
Congratulations! apache has been installed successfully ~
Ii. Install mysql (Database Service)
1. Download the compiled compressed package from mysql.com. I am using the lazy method here. The official installation is still well compiled and installed by myself using the source code package.
2. Extract
# Tar zxf mysql-5.0.45-linux-i686-glibc23.tar.gz
3. See its installation documentation.
# More INSTALL-BINARY
The following prompt is displayed:
Shell> groupadd mysql
Shell> useradd-g mysql
Shell> cd/usr/local
Shell> gunzip </PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf-
Shell> ln-s FULL-PATH-TO-MYSQL-VERSION-OS mysql
Shell> cd mysql
Shell> chown-R mysql.
Shell> chgrp-R mysql.
Shell> scripts/mysql_install_db -- user = mysql
Shell> chown-R root.
Shell> chown-R mysql data
Shell> bin/mysqld_safe -- user = mysql &
Follow the steps shown in the following figure.
4. Add mysql groups and users
# Groupadd mysql
# Useradd-g mysql
5. Move the Directory
# Music mysql-5.0.45-linux-i686-glibc23/usr/local/mysql5
# Cd/usr/local/mysql5
6. Modify permissions
# Chown-R mysql.
# Chgrp-R mysql.
7. initialize the configuration file and Library File
# Cp support-files/my-medium.cnf/etc/my. cnf
# Scripts/mysql_install_db -- user = mysql
8. Change the directory permission to the root user. Only the data directory is owned by mysql.
# Chown-R root.
# Chown-R mysql data
9. Start the mysql Service
# Bin/mysqld_safe -- user = mysql &
& After the command indicates that the command will run in later Mode
Check whether our service is started.
# Ps axuw | grep mysql
If the following similar information is prompted, the database is successfully installed:
Root 21802 0.0 0.1 5224 1084 pts/0 S/bin/sh./bin/mysqld_safe -- user = mysql
Mysql 21828 0.8 1.3 114688 14428 pts/0 Sl/usr/local/mysql5/bin/mysqld -- basedir =/usr/local/mysql5 -- datadir =/usr/local/mysql5 /data -- user = mysql -- pid-file =/usr/local/mysql5/data/home.yz.com. pid -- skip-external-locking -- port = 3306 -- socket =/tmp/mysql. sock
Root 21840 0.0 0.0 5272 656 pts/0 S + grep mysql