联系邮箱:September@zbuse.com 投稿 / 读者墙 / 友情链接 / 文章存档 / 标签云

手工配置lamp

RedHat/RHEL September 912℃ 0评论

yum -y update
yum -y install gcc gcc-c++ authconf automake libtool libevent libevent-devel
yum -y install ncurse nucrse-devel gd gd-deevel freetype freetype-devel fontconfig fontconfig-devel libjpeg libjpeg-devel zlib zlib-devel pcre pcre-devel
yum -y install libmcrypt mhash

yum -y install mysql mysql-server mysql-devel
yum -y install httpd httpd-devel
yum -y install php*

启动apache
/etc/init.d/httpd restart

启动mysql
/etc/init.d/mysqld restart
设置开机启动
chkconfig httpd on
chkconfig mysqld on

附:如果需要修改的话,那么修改配置文件即可。
附1:mysql配置文件所在位置:
# ls -l /etc/my.cnf
-rw-r--r-- 1 root root 441 Nov4 02:53 /etc/my.cnf
#

附2:apache配置文件所在位置:
# ls -l /etc/httpd/
total 8
drwxr-xr-x 2 root root 4096 Jan 11 07:06 conf
drwxr-xr-x 2 root root 4096 Jan 11 07:03 conf.d
lrwxrwxrwx 1 root root 19 Jan 11 06:53 logs -> ../../var/log/httpd
lrwxrwxrwx 1 root root 27 Jan 11 06:53 modules -> ../../usr/lib/httpd/modules
lrwxrwxrwx 1 root root 13 Jan 11 06:53 run -> ../../var/run
#

附3:php配置文件所在位置:
# ls -l /etc/php.ini
-rw-r--r-- 1 root root 45079 Nov 30 00:53 /etc/php.ini
#
wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
tar xjf eaccelerator-0.9.6.tar.bz2
cd eaccelerator-0.9.6
/usr/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config
make
make install
cd ..
rm -rf eaccelerator-0.9.6
rm eaccelerator-0.9.6.tar.bz2
mkdir /tmp/eaccelerator
chmod 777 /tmp/eaccelerator
然后在/etc/php.d/中创建一个eaccelerator.ini
里面根据你自己情况分别写上
1.OPENVZextension="eaccelerator.so"
eaccelerator.shm_size="0"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.log_file = "/var/log/eaccelerator_log"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.keys = "disk_only"
eaccelerator.sessions = "disk_only"
eaccelerator.content = "disk_only"
2、xenextension="eaccelerator.so"
eaccelerator.shm_size="64"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.log_file = "/var/log/eaccelerator_log"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.keys = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content = "shm_and_disk"

转载请注明:装逼爱好者 » 手工配置lamp

喜欢 (1)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址