免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1374 | 回复: 2
打印 上一主题 下一主题

linux ES 5.3 apache/php/mysql服务器架设! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-01 20:21 |只看该作者 |倒序浏览
我想作一个apache/php/mysql网站服务器!这些软件都是在官网上下载的!其中,mysql是rpm包!下载到桌面之的在终端里rpm -ivh mysqlXXXXX.rpm之后安装成功了,apache和php是压缩包,./confgure之后make这样也安装成功了!安装的时候都很正常,apache和php都是在/usr/local/src里解压安装的!可是mysql安装完了不知道到那里去找!也不知道这种情况怎么给他们配置!在网上也看了很多资料,我的跟网上的不一样!我是第一次装这个系统也是第一次架设服务器!我还是个linux菜鸟,希望各位高手们能告诉我,我该怎么配置这些架设服务器!谢谢了! 

论坛徽章:
0
2 [报告]
发表于 2009-06-02 09:13 |只看该作者
目前正在测试基于centos的定制系统结合LAMP+zend支持的源码编译脚本
现在将脚本放上
yum -y install ntp vim-enhanced gcc gcc-c++ flex bison autoconf automake bzip2-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel kernel
(1) GD2
cd /usr/local/src
wget http://www.libgd.org/releases/oldreleases/gd-2.0.34.tar.gz
tar xzvf gd-2.0.34.tar.gz
cd gd-2.0.34
./configure --prefix=/usr/local/gd2
make
make install
(2) LibXML2
cd /usr/local/src
wget http://www.imagemagick.org/download/delegates/libxml2-2.6.29.tar.gz
tar xzvf libxml2-2.6.29.tar.gz
cd libxml2-2.6.29
./configure --prefix=/usr/local/libxml2
make
make install
(3) LibMcrypt

cd /usr/local/src
wget http://ftp.devil-linux.org/pub/devel/sources/1.2/libmcrypt-2.5.8.tar.bz2
tar xjvf libmcrypt-2.5.8.tar.bz2
cd libmcrypt-2.5.8
./configure --prefix=/usr/local/libmcrypt
make
make install
(4) Apache 日志截断程序
cd /usr/local/src
wget http://cronolog.org/download/cronolog-1.6.2.tar.gz
tar xzvf cronolog-1.6.2.tar.gz
cd cronolog-1.6.2
./configure --prefix=/usr/local/cronolog
make
make install
8.升级OpenSSL和OpenSSH
cd /usr/local/src
wget http://www.openssl.org/source/openssl-0.9.8e.tar.gz
wget http://mirror.mcs.anl.gov/openssh/portable/openssh-4.6p1.tar.gz
tar xzvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config --prefix=/usr/local/openssl
make
make test
make install
   
cd /usr/local/src
tar xzvf openssh-4.6p1.tar.gz
cd openssh-4.6p1
./configure  --prefix=/usr --with-pam --with-zlib --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/openssl --with-md5-passwords
make
make install
三、编译安装L.A.M.P环境
1. 下载软件
cd /usr/local/src
wget http://archive.apache.org/dist/httpd/httpd-2.2.4.tar.bz2
wget http://mirror.provenscaling.com/mysql/community/source/5.0/mysql-5.0.27.tar.gz
wget http://museum.php.net/php5/php-5.2.3.tar.bz2
wget http://files.directadmin.com/services/customapache/ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz
2. 编译安装MySQL
tar xzvf mysql-5.0.27.tar.gz
cd mysql-5.0.27
./configure  --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql  --with-comment=Source   --with-server-suffix=-Comsenz --with-mysqld-user=mysql   --without-debug --with-big-tables --with-charset=utf8  --with-collation=utf8   --with-extra-charsets=all     --with-pthread  --enable-static  --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static   --enable-assembler --without-isam   --without-innodb  --without-ndb-debug
./configure  --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql  --with-comment=Source   --with-server-suffix=-Comsenz --with-mysqld-user=mysql   --without-debug --with-big-tables --with-charset=utf8     --with-extra-charsets=all     --with-pthread  --enable-static  --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static   --enable-assembler --without-isam   --without-innodb  --without-ndb-debug
make
make install
useradd mysql
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root:mysql .
chown -R mysql /var/lib/mysql
cp share/mysql/my-huge.cnf /etc/my.cnf
cp share/mysql/mysql.server /etc/rc.d/init.d/mysqld
chmod 755 /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 3 mysqld on
/etc/rc.d/init.d/mysqld start
bin/mysqladmin -u root password '1234'
3. 编译安装Apache
cd /usr/local/src
tar xjvf httpd-2.2.4.tar.bz2
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support --disable-userdir
make
make install
echo '/usr/local/apache2/bin/apachectl start ' >> /etc/rc.local


4. 编译安装PHP
cd /usr/local/src
tar xjvf php-5.2.3.tar.bz2
cd php-5.2.3
./configure  --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/libxml2 --with-gd=/usr/local/gd2 --with-jpeg-dir=/usr --with-png-dir=/usr --with-bz2 --with-freetype-dir --with-iconv-dir --with-zlib-dir  --with-openssl=/usr/local/openssl --with-mcrypt=/usr/local/libmcrypt --enable-soap --enable-gd-native-ttf --enable-memory-limit --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --disable-cgi --disable-cli

make
make install
mkdir -p /usr/local/php/etc
cp php.ini-dist /usr/local/php/etc/php.ini
5. 安装Zend Optimizer
cd /usr/local/src
tar -xvf ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.3.0-linux-glibc21-i386
./install.sh
    安装Zend Optimizer过程的最后不要选择重启Apache。

wget http://download2.comsenz.com/UCenter/1.5.0/UCenter_1.5.0_SC_UTF8.zip
cd /usr/local/src
unzip UCenter_1.5.0_SC_UTF8.zip -d ucenter
cd ucenter
mv upload /usr/local/apache2/htdocs/uc
cd /usr/local/apache2/htdocs/uc
chmod -R 777 data/

cd /usr/local/src/
wget http://download2.comsenz.com/UCenter_Home/1.5/UCenter_Home_1.5_SC_UTF8.zip
unzip UCenter_Home_1.5_SC_UTF8.zip -d ucenter_home
cd ucenter_home
mv upload/ /usr/local/apache2/htdocs/uchome
cd /usr/local/apache2/htdocs/uchome
mv config.new.php config.php
chmod 777 config.php
chmod -R 777 ./attachment/
chmod -R 777 ./data/
chmod -R 777 ./uc_client/data/

cd /usr/local/src/
wget http://download2.comsenz.com/Discuz/7.0.0/Discuz_7.0.0_SC_UTF8.zip
unzip Discuz_7.0.0_SC_UTF8.zip -d discuz
cd discuz/
mv upload/ /usr/local/apache2/htdocs/bbs
cd /usr/local/apache2/htdocs/bbs/
chmod -R 777 ./config.inc.php  
chmod -R 777 ./attachments  
chmod -R 777 ./forumdata  
chmod -R 777 ./forumdata/cache  
chmod -R 777 ./forumdata/templates  
chmod -R 777 ./forumdata/threadcaches  
chmod -R 777 ./forumdata/logs  
chmod -R 777 ./uc_client/data/cache  

cd /usr/local/src/
wget http://download2.comsenz.com/SupeSite/7.0/SupeSite7.0_SC_UTF8.zip
unzip SupeSite7.0_SC_UTF8.zip -d supesite
cd supesite/
mv upload/ /usr/local/apache2/htdocs/space
cd /usr/local/apache2/htdocs/space
mv config.new.php config.php
chmod 777 config.php

chmod -R 777 ./attachments/   
chmod -R 777 ./cache/
chmod -R 777 ./channel/
chmod -R 777 ./html/
chmod -R 777 ./log/
chmod -R 777 ./styles/
chmod -R 777 ./model/
chmod -R 777 ./data/
chmod -R 777 ./uc_client/data/

先确认以下目录或文件属性为 (777) 可写模式。

chmod -R 777 attachment
chmod -R 777 data
chmod -R 777 attachment/cn_img
chmod -R 777 data/bbscache
chmod -R 777 attachment/photo
chmod -R 777 data/groupdb
chmod -R 777 attachment/thumb
chmod -R 777 data/guestcache
chmod -R 777 attachment/upload
chmod -R 777 data/style
chmod -R 777 attachment/mini
chmod -R 777 data/tmp
chmod -R 777 htm_data
chmod -R 777 data/tplcache


必要的可以到
http://www.linuxha.cn/html/webcluster/2009/0601/239.html
这里参考

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
3 [报告]
发表于 2009-06-02 09:14 |只看该作者
不推荐混合安装,楼主mysql也编译吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP