免费注册 查看新帖 |

Chinaunix

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

Macintosh10.4.8 apache2 php5 mediawiki1.8 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-16 08:46 |只看该作者 |倒序浏览
#install mysql
cd ~/mysql-5.027
./configure --prefix=/usr/local/mysql \
            --with-unix-socket-path=/usr/local/run/mysql_socket \
            --with-mysqld-user=mysql \
            --with-comment \
            --with-debug  
make
sudo make install
sudo make clean
sudo /usr/local/mysql/bin/mysql_install_db --force
sudo mkdir /usr/local/mysql/run
sudo chgrp -R mysql /usr/lcoal/mysql
sudo chown -R mysql /usr/local/mysql/run /usr/local/mysql/var
sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &
/usr/local/mysql/bin/mysqladmin -u root password picb
sudo mkdir /var/mysql
cd /var/mysql
sudo ln -s /usr/local/run/mysql_socket ./mysql.sock

#istall apache2
cd ~/httpd-2.2.3
./configure --prefix=/usr/local/apache2 \
            --enable-module=most \
            --enable-shared=max
make
sudo make install
sudo make clean
sudo /usr/local/apache2/bin/apachectl start

#install GD (before this we should have installed or have to install libxml2,zlib,libpngjpeg,
#freetype please check it, my OS no need to install libxml2 & zlib, but can install as follow: )

#install libxml2
cd ~/libxml2-2.6.27
./configure
make
sudo make install
sudo makeclean

#install zlib
cd ~/zlib-1.2.3
./configure
make
sudo make install
sudo makeclean

#install libpng
cd ~libpng-1.2.14
cp scripts/makefile.darwin Makefile
vi makefile
# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
#ZLIBLIB=../zlib
#ZLIBINC=../zlib
make
sudo make install
sudo make clean

#install jpeg
cd ~/jpeg-6b/
ln -s /usr/bin/glibtool ./libtool
export MACOSX_DEPLOYMENT_TARGET=10.4
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
./configure --prefix=/usr/local/jpeg6 \
            --enable-shared
make
sudo mkdir /usr/localjpeg6
sudo mkdir /usr/localjpeg6/include
sudo mkdir /usr/localjpeg6/lib
sudo mkdir /usr/localjpeg6/bin
sudo mkdir /usr/localjpeg6/man
sudo mkdir /usr/localjpeg6/man/man1
sudo make install-lib
sudo make install
sudo make clean

#install freetype2
cd ../freetype-2.2.1
/*edit the file include/freetype/config/ftoption.h and uncomment line 439 to read:
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
*/
./configure  --prefix=/usr/local/freetype2
make
sudo make install
sudo make clean

#install GD
sudo ln -s /usr/X11R6/include/fontconfig /usr/local/include
cd ~/gd-2.0.33
./configure --prefix=/usr/local/gd2 \
            --with-zlib \
            --with-png=/usr/local/libpng2 \
            --with-jpeg=/usr/local/jpeg6 \
            --with-freetype=/usr/local/freetype2
make
sudo make install
sudo make clean

#install libiconv
cd ~/libiconv-1.11
./configure --prefix=/usr/local/libiconv
make
sudo make install
sudo make clean

#install php5
cd ~/php-5.2.0
cd ./ext/iconv
ln -s /usr/local/libiconv/include/iconv.h iconv.h
./configure --prefix=/usr/local/php  \
             --with-zlib --with-xml   \
             --with-ldap=/usr  \
             --with-mysql=/usr/local/mysql  \
             --with-gd  \
             --with-jpeg-dir=/usr/local/jpeg6  \
             --with-png-dir=/usr/local/libpng2  \
             --with-iconv=/usr/local/libiconv  \
             --with-apxs2=/usr/local/apache2/bin/apxs   
             --enable-cli --enable-exif   \
             --enable-ftp --enable-mbstring  \
             --enable-dbx --enable-sockets  \
             --with-iodbc=/usr --with-curl=/usr
make
sudo make install
sudo make clean
sudo cp php.ini-dist /usr/lcoal/php/lib/php.ini
vi apache2/conf/httpd.conf
/* add these lines

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php

LoadModule php5_module modules/libphp5.so (if not work add it)
LoadModule mod_php5 /usr/local/php/libphp5.so (if not work add it)
*/


#setup mediawiki
WiKi name       picb
contactmail     andy@picb.ac.cn
language        en-English
license         no liense metadata
Adminname       WikiSysop
password        picb
share M         no cache
Database Type   MySOL
Database host   localhost
DB name         wikidb
DB usrname      wikiuser
password        picb       
super acco      root
password        picb

mv ~/config/LocalSettings.php ~/
rm -rf ~/config

#wiki Localsetting.php configure
#use EmEditor to edit this file and save in type of UTF-8 and erase tickle of "Add a Unicode Signature(BOM)"
change   $wgEnableUploads       =true; #allow user to upload file

add      $wgLocalTZoffset = 8;   #set time zone

         require_once( 'LdapAuthentication.php' );  #set ldap
         $wgAuth = new LdapAuthenticationPlugin();
         $wgLDAPDomainNames = array( "icb.ac.cn" );
         $wgLDAPServerNames = array( "icb.ac.cn"=>"10.10.118.2");
         $wgLDAPSearchStrings = array( "icb.ac.cn"=>"uid=USER-NAME,cn=users,dc=pdc,dc=icb,dc=ac,dc=cn");
         $wgLDAPUseSSL = false;
         $wgLDAPUseLocal = true;
         $wgLDAPAddLDAPUsers = false;
         $wgLDAPUpdateLDAP = false;
         $wgLDAPMailPassword = false;
         $wgLDAPRetrievePrefs = false;
         $wgMinimalPasswordLength = 1;

         #authenticat upload file type
         $wgShowIPinHeader = false;   #restrict user right to create account
         $wgGroupPermissions['*'    ]['createaccount']   = false;   
         $wgGroupPermissions['*'    ]['edit']            = false;

         $wgWhitelistRead = array( "Main Page", "Special:Userlogin" );   #anonymousr only can reae main page
         $wgGroupPermissions['*'    ]['read']            = false;

         $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'ppt', 'zip', 'rar', 'doc', 'avi', 'mp3', 'rm', 'txt', 'rmvb', 'mpg', 'csv', 'xls' );
         /** Files with these extensions will never be allowed as uploads. */
         $wgFileBlacklist = array(
         # HTML may contain cookie-stealing JavaScript and web bugs
         'html', 'htm', 'js', 'jsb',
         # PHP scripts may execute arbitrary code on the server
         'php', 'phtml', 'php3', 'php4', 'phps',
         # Other types that may be interpreted by some servers
         'shtml', 'jhtml', 'pl', 'py', 'cgi',
         # May contain harmful executables for Windows victims
         'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' );

cp     LdapAuthentication.php to ~/wiki/includes
chomod a+w+r ~/wiki/images

论坛徽章:
0
2 [报告]
发表于 2007-03-08 16:34 |只看该作者
#to support show formula through latex
download and install ocaml & mactex
cd ~/mediawiki/math
   make
and then we can see the texvc be install under directory math, however the apache use it so we should add it to PATH
  export PATH=$PATH;~/mediawiki/math
enable  $wgUseTeX in LocalSettings.php
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP