LAMP簡單配置

MySQL 5.0.51a # cd /usr/local/src # tar zxvf mysql-5.0.51a-linux-i686.tar.gz # groupadd mysql # useradd -g mysql mysql # ln -s /usr/local/src/mysql-5.0.51a-linux-i686 /usr/local/mysql # cd /usr/local/mysql # chown -R mysql . # chgrp -R mysql . # scripts/mysql_install_db –user=mysql # chown -R root . # chown -R mysql data # bin/mysqld_safe –user=mysql &   Apache 2.2.8 # cd /usr/local/src # tar jxvf httpd-2.2.8.tar.bz2 # cd httpd-2.2.8 # ./configure –prefix=/usr/local/apache2 –sysconfdir=/etc/httpd –enable-module=so # make # make install   PHP 5.2.5 # cd /usr/local/src # tar jxvf php-5.2.5.tar.bz2 # cd php-5.2.5 # ./configure –prefix=/usr/local/php5 –with-config-file-path=/etc/php –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local/mysql # make # make install # libtool –finish /usr/local/src/php-5.2.5/libs   修改Apache配置文件 # vi /etc/httpd/httpd.conf AddType application/x-httpd-php .php   若是在安裝PHP時出現以下提示: /php-5.2.5/sapi/cli/php: error while loading shared libraries: /usr/local/mysql/lib/libmysqlclient.so.15: cannot restore segment prot after reloc: Permission denied 解決辦法以下: 禁用 SELinux # vi /etc/sysconfig/selinux SELINUX=disabled 使用 chcon # chcon -t texrel_shlib_t /usr/local/mysql/lib/libmysqlclient.so.15
相關文章
相關標籤/搜索