ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 简单LAMP系统安装过程

简单LAMP系统安装过程

原创 Linux操作系统 作者:lucash 时间:2009-06-03 20:32:17 0 删除 编辑
OS:RHEL5
all software are souce code
apache 2.2
mysql 5.1.32
php 5.2.6

1> Installing apche server:
bash-3.2#useradd apache -u 40
bash-3.2#tar -zxvf httpd-NNN.tar.gz&&cd httpd-NNN
bash-3.2#./configure --prefix=/usr/local/apache/ --enable-modules=all --enable-mods-shared=most --enable-cache --enable-file-cache --enable-disk-cache --enable-mem-cache --enable-static-support --enable-static-htpasswd --enable-static-rotatelogs --enable-static-hdigest --enable-static-ab --enable-static-checkgid --enable-disable-cgid --enable-authn-dbm=shared --enable-deflate=shared
--enable-expires=shared --enable-FEATURE=yes --enable-proxy --enable-proxy-http --enable-proxy-ftp --enable-http --enable-ssl --enable-rewrite --enable-dav --enable-cgi --enable-so --enable-alias --enable-vhost
bash-3.2=make && make install
 
make a support of mod_perl
Installing mod_perl:
bash-3.2#tar -zxvf mod_perl-NNN.tar.gz && ch mod_perl.NNN
bash-3.2# perl Makefile.PL MP_APXS=/usr/local/apache/bin/apxs
Add the following statements into httpd.conf:

 LoadModule perl_module modules/mod_perl.so
bash-3.2#ls /usr/local/apache/modules|grep mod_perl.so
it's null,then
bash-3.2#/usr/local/apache/bin/apxs -q LIBEXECDIR
bash-3.2#make && make test
it failed by time respire to warm apache,so we start it manully(it's no need to do so probably):
bash-3.2#/usr/local/apache/bin/apachectl -k start
bash-3.2#make && make test
bash-3.2#make install

2>Installing mysql
bash-3.2#useradd -u 45 mysql
bash-32.#tar -zxvf mysql-NNN.tar.gz&&cd mysql-NNN
bash-3.2#./configure --prefix=/usr/local/mysql --enable-shared --enable-static --enable-local-infile --with-charset=utf8 --with-system-type=gnu-linux-centos5 --with-mysqld-user=mysql --with-ssl --with-mysqlmanager --with-ndb-test --with-ndb-docs --with-plugins=partition,myisam,myisammrg,ndbcluster,daemon_example
bash-3.2#make && make install
bash-3.2#chmod  755 /usr/local/mysql
bash-3.2#chown -R mysql.mysql /usr/local/mysql

bash-3.2#cp supprts-file/mysql-medium.cnf /etc/my.cnf
Notice:there are three config file in the supports-file dir,which one to choose depends on your server.mostly we choose medium.

Initial mysql db:
bash-3.2#sed -i 's/^skip-federated/#&/g' /etc/my.cnf
bash-3.2#/usr/local/mysql/bin/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql --pid-file=/var/run/mysql.pid --port=3306 --socket=/tmp/mysql.sock --skip-locking
Start MySQL daemon backgroud:
bash-3.2#/usr/local/mysql/bin/mysqld_safe &

For conviniently;you should add "/usr/local/mysql/bin" into your $PATH or create a symbolic links for /usr/local/mysql/bin/mysql to /usr/bin/mysql by doing this:
ln -s /usr/local/mysql/bin/mysql  /usr/bin/mysql

bash-3.2#mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.32-debug-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

If you seeing this,Congratulations,it works


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21650889/viewspace-605044/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ORA-00824
请登录后发表评论 登录
全部评论

注册时间:2009-05-14

  • 博文量
    5
  • 访问量
    3803